Delicious Digg Facebook Favorites More Stumbleupon Twitter
Blog seputar hobby

Friday, October 18, 2013

Posted by Maulana yusuf 8:49 AM
No comments
Program ini diciptakan untuk memudahkan kita dalam mempelajari bagaimana cara mengucapkan kata-kata yang berbahasa inggris dengan baik dan benar. Kita bisa mengatur kecepatan pengucapan kata sesuai dengan yang diinginkan, serta beberapa opsi  lain yang bisa kita gunakan.

Berikut adalah screen shoot aplikasnya:


dan berikut ini source code program tersebut:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bUcapkan.Click
        Dim bicara As New SpeechLib.SpVoice
        'bicara.AudioOutputStream.Format.Type = SpeechLib.SpeechAudioFormatType.SAFT11kHz16BitStereo
        bicara.Rate = kecepatan.Value
        Dim kataKata() As String, jumlahkata As Integer, loopingKata As Integer, mulaiBlock As Integer = 0
        If rPerkata.Checked = True Then
            kataKata = tTulisan.Text.Split(" ")
            jumlahkata = kataKata.Length - 1
            tTulisan.SelectionStart = 0
            tTulisan.SelectionLength = tTulisan.Text.Length
            tTulisan.SelectionColor = bWarnaTulisan.BackColor
            For loopingKata = 0 To jumlahkata
                tTulisan.SelectionStart = mulaiBlock
                tTulisan.SelectionLength = kataKata(loopingKata).Length
                If cBlock.Checked = True Then
                    tTulisan.SelectionBackColor = bWarnaBlock.BackColor
                End If
                bicara.Speak(kataKata(loopingKata), SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault)
                tTulisan.SelectionBackColor = bWarnaBackgrounText.BackColor
                If cWarnaiKata.Checked = True Then
                    tTulisan.SelectionColor = bWarnaTulisanSdhDiBaca.BackColor
                End If
                tTulisan.Refresh()
                mulaiBlock = mulaiBlock + kataKata(loopingKata).Length + 1
            Next
        Else
            bicara.Speak(tTulisan.Text, SpeechLib.SpeechVoiceSpeakFlags.SVSFDefault)
        End If
    End Sub
    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rNormal.CheckedChanged
        cBlock.Enabled = False
        cWarnaiKata.Enabled = False
    End Sub
    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rPerkata.CheckedChanged
        cBlock.Enabled = True
        cWarnaiKata.Enabled = True
    End Sub
    Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
    End Sub
    Private Sub bFont_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bFont.Click
        fontDialog.ShowDialog()
        tTulisan.Font = fontDialog.Font
    End Sub
    Private Sub bWarnaBackgrounText_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bWarnaBackgrounText.Click
        colorDialog.ShowDialog()
        tTulisan.BackColor = colorDialog.Color
        bWarnaBackgrounText.BackColor = colorDialog.Color
    End Sub
    Private Sub bWarnaTulisan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bWarnaTulisan.Click
        colorDialog.ShowDialog()
        tTulisan.ForeColor = colorDialog.Color
        bWarnaTulisan.BackColor = colorDialog.Color
    End Sub
    Private Sub bWarnaBlock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bWarnaBlock.Click
        colorDialog.ShowDialog()
        bWarnaBlock.BackColor = colorDialog.Color
    End Sub
    Private Sub bWarnaTulisanSdhDiBaca_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bWarnaTulisanSdhDiBaca.Click
        colorDialog.ShowDialog()
        bWarnaTulisanSdhDiBaca.BackColor = colorDialog.Color
    End Sub

0 comments:

Post a Comment

Search

Our Sponsors