本文介绍了如何修复可重复使用C#的语音合成器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,基本上,我使用了两个语音识别引擎(speechrecog和speechrecog1)和一个语音合成器.当问到语音提示时,您的问题如何?
然后它回答我很好(如果计算机从两个数字1,2中选择2).然后,它初始化第二个语音识别引擎.当它做它的东西.然后,它将第二个关闭,第一个再次打开.但是问题是当使用第二个 语音识别引擎重复(语音合成器)我尝试第二个语音识别引擎的次数.
这是该表格的代码:

So basically I used two speech recognition engines(speechrecog & speechrecog1) and one speech synthesizer. When the speechrecog is asked a question like how are you
it then replies I am fine (if the computer picks 2 from the two numbers 1,2). Then it initializes the second speech recognition engine. When it does its stuff. It then turns the second one off and the first one on again. But the problem is when using the second speech recognition engine it repeats( speech synthesizer) the number of times I have tried the second speech recognition engine out.
Here's my code for that form:

http://pastebin.com/fXUws5gA
例如:
   文本文件you.txt包含:
   我没事.谢谢.%你好吗#good#bad
电脑问我是否很好,我很好地回答.在good.txt文件中:
哦,很酷

我第一次问她:你好吗?

回复:很好,谢谢.你好吗

用户:好

回复:太好了(1次)


我第二次问她:你好吗?

回复:很好,谢谢.你好吗

用户:好

回复:太好了(重复2次)


我第三次问她:你好吗?

回复:很好,谢谢.你好吗

用户:好

回复:太好了(重复3次)




我该如何解决重复问题.

http://pastebin.com/fXUws5gA
For example:
    the text file how are you.txt contains:
    i am fine. thank you.% how are you#good#bad
and the computer asks if im good and I reply with good. In the good.txt file:
Oh thats cool

the first time I ask her: How are you?

Reply:I am fine thankyou. How are you

User: good

reply: Oh thats cool(1 time)


the 2nd time I ask her: How are you?

Reply:I am fine thankyou. How are you

User: good

reply: Oh thats cool(repeats it 2 times)


the 3rd time I ask her: How are you?

Reply:I am fine thankyou. How are you

User: good

reply: Oh thats cool(repeats it 3 times)




How do i fix the repetition problem.



推荐答案

谢谢您在这里发布.

对于您的问题,我举个好例子.您可以使用语音输入文字来获得您所说的内容,然后将文字中的作品进行比较.比较好之后,请阅读good.txt文件,并使用 SpeechSynthesizer.speek() 在.txt文件中说出作品.

For your question, I use good for example. You could use speech to text to get the what you are saying and then compare the works in the text. Such as good, after comparing, read the good.txt file and use SpeechSynthesizer.speek() to say the works in .txt file.

您可以从 语音识别, 语音到文本,文本到语音以及在C#项目中的语音合成,以供参考将语音用于文本和语音合成.

You could download the source file from the Speech recognition, speech to text, text to speech, and speech synthesis in C# in code project for reference of the use of speech to text and speech synthesis.

我希望这会有所帮助.

最好的问候,

Wendy


这篇关于如何修复可重复使用C#的语音合成器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 10:06