Simple Text To Speech VB.NET

Simple Text To Speech VB.NET


FORM 1

Imports System.Speech.Synthesis
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim synth As New SpeechSynthesizer

        synth.Rate = TrackBar2.Value

        synth.Volume = TrackBar1.Value

        If ComboBox1.SelectedIndex = 0 Then
            synth.SelectVoiceByHints(VoiceGender.Male)
        ElseIf ComboBox1.SelectedIndex = 1 Then
            synth.SelectVoiceByHints(VoiceGender.Female)
        End If
        synth.Speak(RichTextBox1.Text)





    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged

    End Sub
End Class


Comments

Popular posts from this blog

QR CODE SCANNER (Emgu CV ) VB.NET

Simple Modern Login (Guna UI, Mysql) VB.NET

Simple Lottery Game (Guna UI) VB.NET