如何获得一个文本转语音程序来识别句子中的特定单词? [英] How to get a Text-to-speech program to recognize a specific word out of a sentence?

查看:101
本文介绍了如何获得一个文本转语音程序来识别句子中的特定单词?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用


system.speech


system.Synthesis <制作个人助理(JARVIS风格) / p>

system.Recognition。


现在,代码的工作原理如下:


如果我说一个特定的单词或句子,我设置到系统,例如:"关于新闻的任何新故事?"。


打开新闻网站



现在我想做的是让他识别与句子相关的单词。


例如: 我说的任何内容都有"新闻"这个词。在其中,系统将识别出"新闻"一词。并打开新闻网站。


任何人都可以帮助我吗?非常感谢:D

解决方案

嗨Benoson31,


感谢您在此发帖。


对于您的问题,我们可以分两部分来完成。首先,将语音转换为文本。其次,根据文本,确认它是否包含"新闻"。或者没有。


关于如何将语音转换为文本的第一部分,您可以参考我之前完成的主题。


HTTPS: //social.msdn.microsoft.com/Forums/en-US/b06bdce5-8f79-4309-8354-b23328c3ff13/c-speech-to-text-british-recognition?forum=csharpgeneral


对于第二部分,您要打开哪个新闻网站?


我以BBC新闻为例。


根据我提供的链接,当你从演讲中得到文本时,新的我们需要做的是检查它是否会隐藏"新闻"。或者没有。


如果文本包含"新闻",当您点击button2时,它将在默认浏览器中打开BBC新闻网站。

 private void button2_Click(object sender,EventArgs e)
{
if(textBox1.Text.Contains(" News"))
{
System。 Diagnostics.Process.Start(QUOT; HTTP://www.bbc.com/news");
}
}

如果您对此问题有更多了解,请随时与我们联系。


最诚挚的问候,


Wendy



Hi, i am trying to make a personal assistant (JARVIS style) using

system.speech

system.Synthesis

system.Recognition.

Now, the code works like that:

if i say a specific word or sentence, that i set to the system, like :"Any new story on the news?".

It would open the news website.

Now what i would like to do is to make him recognize words that are related to the sentence.

For example: Anything i say that has the word "News" in it, The system would recognize the word "News" and open up the News Website.

Can anyone help me with that? Thanks a lot :D

解决方案

Hi Benoson31,

Thank you for posting here.

For your question, we could do that in two parts. First, convert speech to text. Second, according to the text, confirm whether it contains "News" or not.

For the first part, about how to convert speech to text, you could refer to the thread I done before.

https://social.msdn.microsoft.com/Forums/en-US/b06bdce5-8f79-4309-8354-b23328c3ff13/c-speech-to-text-british-recognition?forum=csharpgeneral

For the second part, what News Website you want to open?

I use BBC News for example.

According to the link I provide, when you get the text from the speech, new what we need to do is to check whether it cintains "News" or not.

If the text contains "News", when you click the button2, it will open the BBC News website in default browser.

  private void button2_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Contains("News"))
            {
                System.Diagnostics.Process.Start("http://www.bbc.com/news");
            }
        }

If you have something more about this issue, please feel free to contact us.

Best Regards,

Wendy


这篇关于如何获得一个文本转语音程序来识别句子中的特定单词?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆