English 中文(简体)
语音的拼音字符
原标题:Phonetic characters to speech

我的目的是让我的应用程序使用不太流行的语言(例如闽南语、马来语等)。我目前的方法是使用录制的mp3。

我想知道是否有语音字符语音引擎存在于.net或任何平台?

这里的拼音字符就像纸质字典中的拼音条目一样。知道吗?

最佳回答

以下是VB.NET代码:

 create the object. This object will store your phonetic  characters 
Dim PBuilder As New System.Speech.Synthesis.PromptBuilder

 add your phonetic  characters  here. Just ignore the first parameter.
 The second parameter is your phonetic  characters 
PBuilder.AppendTextWithPronunciation("test", "riːdɪŋ")

 now create a speaker to speak your phonetic  characters 
Dim SpeechSynthesizer2 As New System.Speech.Synthesis.SpeechSynthesizer

 now actually speaking. It will speak  reading 
SpeechSynthesizer2.Speak(PBuilder)

这是转换后的C#代码:

//create the object. This object will store your phonetic  characters 
System.Speech.Synthesis.PromptBuilder PBuilder = new System.Speech.Synthesis.PromptBuilder();

//add your phonetic  characters  here. Just ignore the first parameter.
//The second parameter is your phonetic  characters 
PBuilder.AppendTextWithPronunciation("test", "riːdɪŋ");

//now create a speaker to speak your phonetic  characters 
System.Speech.Synthesis.SpeechSynthesizer SpeechSynthesizer2 = new System.Speech.Synthesis.SpeechSynthesizer();

//now actually speaking. It will speak  reading 
SpeechSynthesizer2.Speak(PBuilder);
问题回答

您需要的是一个大型词汇TTS引擎。Microsoft有语音SDK,它允许您在键入时说话,以及Windows SAPI(Speech API-不确定SDK和API是否是一样的东西)。我知道他们确实有男性和女性的英语配音,但可能没有其他语言,如马来语(那里可能还没有太多市场)。你可能想看看CMU的音乐节项目。他们通常有很多不同语言的声音,但有些不太知名的声音可能不如英语的声音发达。

Further update:
Check the MBROLA site out. It is an open-source project for developing multi-lingual Large vocab TTS engines and they also have a malay extension. I do not know how good it is though. I tried out the Hindi one and feel that there is a lot of work that still needs to be done.

此外,请查看BabelFish网站。他们有很多免费TTS引擎的链接,这些引擎应该支持马来语。

更新3:我不知道这是否适合您的目的,但如果应用程序必须说出的文本较低,那么您也可以在有限的词汇表上尝试级联语音合成。用马来语(或任何其他语言)录制句子片段,并将程序的输出传递给您自己的有限vocab-tts引擎,在那里您可以创建输出。一个例子可以是(英语):“was the most valve player”。在这里,“was the most valve player”变成了一个片段,而“player X”可以随意更改。如果这符合你的目的,应该会很好地发挥作用。

你看过System.Speech命名空间?

特别是System.Speech.SynthesisSystem.Speech.Synthesis.TtsEngine命名空间。

.NetSystem.Speech.Synthesis.PromptBuilder类将从SSML字符串。您可以使用这些字符串从原始音素和采样音频中构建声音。音频不依赖于语言。

也许是这个?System.Speech.Recognition.Srgs语法字母表

我试过System.Speech.Synthesis.PromptBuilder。我不得不说,当前语音字符的实现非常初级,而且不准确。例如,PromptBuilder缺少语音语调,单词中缺少重音强调。PromptBuilder只能输出单调和机器人的声音,这很烦人。

我的建议是继续使用你目前的方法。从翻译完美语音字符所需的时间来看,使用mp3传递信息更自然,也更具成本效益。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签