2
文本到语音转换为英语语言使用Visual Basic 2008文本到语音
Dim speech As Object = CreateObject("SAPI.SpVoice")
speech.speak(TextBox1.Text)
我的问题,这可怎么使用其他语言(讲什么语言!) ? 谢谢
文本到语音转换为英语语言使用Visual Basic 2008文本到语音
Dim speech As Object = CreateObject("SAPI.SpVoice")
speech.speak(TextBox1.Text)
我的问题,这可怎么使用其他语言(讲什么语言!) ? 谢谢
Sapi接口是一个COM接口。 您可以在大多数支持COM的语言(Windows)上使用它,例如PHP,C,VBA,...
...但如果你的意思是现实世界的语言,你必须安装额外的 “声音”
SAPI接口在.NET 3.0,System.Speech.Synthesis命名空间中得到了很好的包装。可用于任何.NET兼容语言。
Imports System.Speech.Synthesis
...
Dim synth = New SpeechSynthesizer
synth.Speak("Works in any .NET language")
You must first Add a reference to System.Speech:
click menu Project, then Add Reference to .NET, then System.Speech.
Otherwise the code above will fail at the Imports System.Speech.Synthesis line.
该代码不能编译。还有你在说什么其他的语言?口语?编程语言? – 2011-02-28 12:19:37
使用语言 – sam 2011-03-01 19:33:51