C# 返回语音拼音但无法识别

发布于 2024-11-08 12:13:30 字数 628 浏览 2 评论 0原文

我正在尝试制作一个像人类一样的波斯语语音词典(db),所以我尝试说话并让 c# 以语音方式生成它,但问题是我找不到任何事件来查找我所说的内容。例如,我们有 SpeechRecognized 事件,但它在识别语音后触发。这是我的代码示例:

<pre>
<code>
SpeechRecognizer rec = new SpeechRecognizer();

public Form1(){

        InitializeComponent();

        rec.SpeechRecognized += rec_SpeechRecognized(rec_SpeechRecognized); // this will fire after recognize
        rec.SpeechDetected +=new EventHandler(rec_SpeechDetected); // this will fired each time but with no return
        rec.enabled = true;
    }
</code>
<pre>

注意: 我希望 C# 生成我所说内容的语音值,而不是识别它。

I'm trying to make a human like dictionary (db) of Persian speech, so I tried to speak and have c# produce it phonetically, but the problem is I cant find any event to find what I spoke. For example, we have SpeechRecognized event but it fired after recognizing the speech. Here is my code sample:

<pre>
<code>
SpeechRecognizer rec = new SpeechRecognizer();

public Form1(){

        InitializeComponent();

        rec.SpeechRecognized += rec_SpeechRecognized(rec_SpeechRecognized); // this will fire after recognize
        rec.SpeechDetected +=new EventHandler(rec_SpeechDetected); // this will fired each time but with no return
        rec.enabled = true;
    }
</code>
<pre>

Note:
I want c# to produce the phonetic value of what I say, not to recognize it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦冥 2024-11-15 12:13:30

我认为 System.Speech.Recognition 不会公开您所说内容的语音解释。 Windows 识别器使用特定于语言的模型来尝试匹配指定语言中的单词。

Windows 7 中的语音引擎支持以下语言:中文(简体)、中文(繁体)、法语、德语、日语、西班牙语、英国英语和美国英语。请参阅http://msdn.microsoft.com/en-us/goglobal/ee426904

Microsoft 服务器语音引擎支持 26 种语言。我不认为支持波斯语。请参阅 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=F704CD64-1DBF-47A7-BA49-27C5843A12D5

也许使用 C++ 和 SAPI 您可以获取底层音素。如果您搜索“SAPI 音素提取”,您可能会发现一些有用的信息。特别是看看
使用 SAPI 进行语音识别:通过现象实现自定义语言支持它描述了构建自定义语法以尝试从替代语言中提取音素。

我在 http://developer.valvesoftware.com/wiki/Phoneme_Tool 看到的其他有趣的参考资料http://www.mail-archive.com/[电子邮件受保护]/msg19793.html

I don't think System.Speech.Recognition will expose a phonetic interpretation of what you said. The Windows recognizer uses a language specific model to try to match words in the specified language.

The speech engine in Windows 7 supports the following languages: Chinese (Simplified), Chinese (Traditional), French, German, Japanese, Spanish, UK English, and US English. See http://msdn.microsoft.com/en-us/goglobal/ee426904

The Microsoft server speech engine supports 26 languages. I don't believe Persian is supported. See http://www.microsoft.com/downloads/en/details.aspx?FamilyID=F704CD64-1DBF-47A7-BA49-27C5843A12D5

Perhaps using C++ and SAPI you can get to the underlying phonemes. If you search "SAPI Phoneme Extraction" you may find something helpful. In particular look at
Speech Recognition with SAPI: Custom Language Support through phenomes which describes building a custom grammar to try to extract phonemes from an alternate language.

Other interesting references I saw at http://developer.valvesoftware.com/wiki/Phoneme_Tool and http://www.mail-archive.com/[email protected]/msg19793.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文