Reputation: 31
text-to-speech for English language using Visual Basic 2008
Dim speech As Object = CreateObject("SAPI.SpVoice")
speech.speak(TextBox1.Text)
My question, how this can be used for other languages(Spoken Languages!!!)? thanks
Upvotes: 2
Views: 9954
Reputation: 942538
The SAPI interface got a nice wrapper in .NET 3.0, System.Speech.Synthesis namespace. Usable in any .NET compatible language. Use Project > Add Reference and select System.Speech. Write code similar to :
Imports System.Speech.Synthesis
...
Dim synth = New SpeechSynthesizer
synth.Speak("Works in any .NET language")
Upvotes: 6
Reputation: 2251
The Sapi interface is a COM-interface. You can use this with most languages (on windows) which support COM, e.g. PHP, C, VBA, ...
...but if you mean real-world languages, you have to install additional "voices"
Upvotes: 1