C#:带有 PromptBuilder 的语音合成器无法正常工作
我当然猜测我的电脑出了问题,也许是某个地方的图书馆……不确定。 首先,在家里,我听不到男声。我认为这是因为它在 Win7 Ultimate 上有一个不同的库。如果有人有任何想法,我将不胜感激。 在我的工作电脑 winXP SP3 (.NET 4) 上,我可以听到男声……但是……pbuilder 无法正常工作:
pbuilder.StartStyle(pStyle);
pbuilder.StartParagraph();
pbuilder.StartVoice(VoiceGender.Male, VoiceAge.Teen, 2);
pbuilder.StartSentence();
pbuilder.AppendText("Checking current weather.");
pbuilder.EndSentence();
pbuilder.EndVoice();
pbuilder.EndParagraph();
pbuilder.EndStyle();
ss.SpeakAsync(pbuilder);
在家工作……但在工作中,它说的都是(而且我我不是在开玩笑)是“Blah”。如果我输入:
ss.SpeakAsync("Checking current weather");
那么它就会这么说。 ???
如果有人感兴趣,我正在努力建造我自己的……迷你贾维斯(来自钢铁侠) http://code.google.com/p/jarvisv2win7/
在撰写本文时,具有语音识别功能,可以识别给定的命令(播放柴可夫斯基......检查电子邮件..天气有多冷?...等)
I'm of course guessing something is wrong with my computer, maybe a library somewhere.. not sure.
First off, at home, I can't get a male voice. I figure this is because it has a different library at home, on Win7 Ultimate. If anyone has any thoughts, I'd appreciate it.
On my work PC, winXP SP3 (.NET 4), I can get a male voice.... but... pbuilder doesn't work right:
pbuilder.StartStyle(pStyle);
pbuilder.StartParagraph();
pbuilder.StartVoice(VoiceGender.Male, VoiceAge.Teen, 2);
pbuilder.StartSentence();
pbuilder.AppendText("Checking current weather.");
pbuilder.EndSentence();
pbuilder.EndVoice();
pbuilder.EndParagraph();
pbuilder.EndStyle();
ss.SpeakAsync(pbuilder);
Works at home... but at work, all it says (and I'm not joking) is "Blah". If I put:
ss.SpeakAsync("Checking current weather");
Then it will say that. ???
In case anyone is interested, I'm working on building my own... mini Jarvis (from Iron Man)
http://code.google.com/p/jarvisv2win7/
At the time of this writing, has speech recognition, will recognize given commands (Play Tchaikovsky.... Check email.. How cold is it?... etc)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法在Windows 7上获得男声,因为Windows 7上默认没有安装男声。
XP 默认安装了两种英语语音(Microsoft Sam 和 Microsoft Mary),但是
Windows Vista 和 Windows 7 默认仅安装一种英语语音(Microsoft Anna)。
因此,在 Windows 7 上,您将无法选择男声,因为未安装男声。
根据 PromptBuilder 类,Windows XP 不是受支持的平台。
You can't get a male voice on Windows 7 because there is no male voice installed on windows 7 by default.
XP has two English voices (Microsoft Sam and Microsoft Mary) installed by default, but
Windows Vista and Windows 7 only have one English voice (Microsoft Anna) installed by default.
Therefore, on Windows 7, you won't be able to select a male voice because one is not installed.
According to the documentation for the PromptBuilder class, Windows XP is not a supported platform.