让您的应用程序使用自定义语音说话
可能的重复:
如何为 tts 创建自定义 sapi 语音 < /p>
嘿伙计们,这是一个令人费解的问题,我被要求让我的一个应用程序进行对话,以便在机器出现问题时它可以提醒操作员。问题是他们想使用特定的声音。
让这变得更加困难的是,它需要说明问题是什么,并且对于一个外设来说,有超过 70 个错误代码,并且连接了 9 个不同的外设,它们都需要此功能。
我看过解释如何使用 Microsoft 的文本转语音引擎的帖子(例如 http://www.itechgiz.com/2011/01/create-a-simple-text-to-speech-application-in-visual-studio)但无法看到如何实现这个。
我猜我必须让他们的人说出特定的短语才能让声音能够生成单词,但不知道从哪里开始!
顺便问一下,任何想法都必须是 C# Win 形式吗?
Possible Duplicate:
How to create a custom sapi voice for tts
Hey Guys here's a puzzling problem, I have been asked to get one of my applications to talk so it can alert the operator when there is a problem on the machine. Problem is they want to use a specific voice.
What makes this even more difficult is the fact that it needs to say what the problem is and for one single peripheral there are over 70 error codes and there are 9 different peripherals connected that all need this feature.
I've seen posts that explain how to use the text to speech engine by Microsoft (e.g. http://www.itechgiz.com/2011/01/create-a-simple-text-to-speech-application-in-visual-studio) but fail to see how I can implement this.
I'm guessing I'd have to get their guy to say specific phrases to get the sounds to be able to generate the words but haven't got a clue where to start!
Any ideas, by the way must be C# Win forms?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我同意 Jalal Aldeen 的评论...
自定义语音确实很难做到...请参阅 Jalal Aldeen 评论中的链接...
您可以使用
System.Speech
类并调整现有语音用于输出。另一种选择 - 尽管仅适用于非常简单的情况(远非完美!):
如果每个错误代码都对应于没有或只有很少变化的特定短语,那么您可以只录制那个人的声音(每个短语/错误代码一个 .wav),然后重播当前错误代码的正确 .wav...您甚至可以使其成为一个“两步”过程...根据您播放 .wav 的某些条件和一些附加信息,具体取决于某些错误代码特定条件(使用 .wav 或与最近的内置合成)嗓音)...
I agree with Jalal Aldeen's comment...
A custom voice is really hard to do... see the link from Jalal Aldeen's comment...
You can use the
System.Speech
classes and tweak an existing voice for output.Another option - although only for very simple cases (very far from perfect!):
IF every error code corresponds to a specific phrases with no or very little variation then you could just record the voice of that guy (one .wav per phrase/error code) and just replay the right .wav for the current error code... you could even make it a "two-step" process... depending on some condition you play a .wav and some additional information depending on some error-code specific condition (either with a .wav or synthezied with the nearest built-in voice)...