|
|
|
30.04.2008 08:09 |
Ian |
Hi
I am trying to get the Microsoft Simplified Chinese voice to speak phonemes from the Microsoft Chinese phoneme set, but without any success. The following C# test class illustrates my problem. The call to "SpeakChineseText" generates Chinese speech. On the other hand, the call to "SpeakChinesePhonemes" results in total silence.
Can anyone tell me what I am doing wrong, or what I might have overlooked?
I am running Windows XP Professional 2002 (SP2), with SAPI 5.1 (Microsoft Speech Object Library) and targetting .NET 2.
Thanks
Ian ---------------------------------------------------------------------- using SpeechLib;
namespace TestApp { public class SAPITest { private SpVoice voice;
public SAPITest() { // Create a Microsoft Simplified Chinese voice. this.voice = new SpVoice(); this.voice.Voice = voice.GetVoices("Name=Microsoft Simplified Chinese", "").Item(0); }
public void SpeakChineseText() { this.voice.Speak("ä¸å›½äºº", SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak); }
public void SpeakChinesePhonemes() { voice.Speak("", SpeechVoiceSpeakFlags.SVSFlagsAsync | SpeechVoiceSpeakFlags.SVSFIsXML | SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak); } } } ---------------------------------------------------------------------- |
 |
|
|
Re: Problem with phonemes and Chinese TTS |
Post Reply |
|
|
02.05.2008 11:26 |
Steve Meyer [MSFT] |
Hi Ian,
Try wrapping your pron element in a sapi element like this: SYM=\"chan 3 ye 4\"/>.
For more details about the SAPI TTS grammar format see the XML Schema : SAPI whitepaper in the SAPI 5.1 SDK help file. And since you're working in C# I recommend taking a look at the mangaged Speech API in the .NET Framework (3.0 and later). Check out the System.Speech.Synthesis namespace for working with TTS.
-- Steve Meyer
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ian" wrote in message news:E45E0991-43C9-4EE9-8FFF-7C4D5CF71C6A@microsoft.com... > Hi > > I am trying to get the Microsoft Simplified Chinese voice to speak > phonemes > from the Microsoft Chinese phoneme set, but without any success. The > following C# test class illustrates my problem. The call to > "SpeakChineseText" generates Chinese speech. On the other hand, the call > to > "SpeakChinesePhonemes" results in total silence. > > Can anyone tell me what I am doing wrong, or what I might have overlooked? > > I am running Windows XP Professional 2002 (SP2), with SAPI 5.1 (Microsoft > Speech Object Library) and targetting .NET 2. > > Thanks > > Ian > ---------------------------------------------------------------------- > using SpeechLib; > > namespace TestApp > { > public class SAPITest > { > private SpVoice voice; > > public SAPITest() > { > // Create a Microsoft Simplified Chinese voice. > this.voice = new SpVoice(); > this.voice.Voice = > voice.GetVoices("Name=Microsoft Simplified Chinese", > "").Item(0); > } > > public void SpeakChineseText() > { > this.voice.Speak("ä¸å›½äºº", > SpeechVoiceSpeakFlags.SVSFlagsAsync | > SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak); > } > > public void SpeakChinesePhonemes() > { > voice.Speak("", > SpeechVoiceSpeakFlags.SVSFlagsAsync | > SpeechVoiceSpeakFlags.SVSFIsXML | > SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak); > } > } > } > ----------------------------------------------------------------------
|
 |
|
|
Re: Problem with phonemes and Chinese TTS |
Post Reply |
|
|
06.05.2008 07:43 |
Ian |
Hi Steve
Thank you for responding to my question on the Chinese phoneme problem.
I have tried your suggestion of wrapping the PRON element inside a SAPI element, but unfortunately this doesn't make any difference.
However, I did get some interesting results when I switched to the managed Speech API and targeted .NET 3.5.
The following code fragment shows my attempt to speak Chinese phonemes with this API:
using System.Speech; using System.Speech.Synthesis;
public void SpeakChinesePhonemes() { PromptBuilder pb = new PromptBuilder();
pb.StartVoice("Microsoft Simplified Chinese"); pb.AppendSsmlMarkup(" chanye ");
//pb.StartVoice("Microsoft Mike"); //pb.AppendSsmlMarkup(" tomato ");
pb.EndVoice(); string ssmlText = pb.ToXml();
SpeechSynthesizer synthesizer = new SpeechSynthesizer(); synthesizer.SpeakSsml(ssmlText); }
The synthesizer.SpeakSsml call throws an exception: 'phoneme' attribute in 'item' not valid.
This is probably none too surprising, since I don't know how to specify my phoneme alphabet in the phoneme element. I have assumed that the Chinese phoneme set is the one described in the SAPI 5.1 documentation, which is based on the 411 syllables of Hanyu Pinyin. I tried registering for phoneme events when speaking raw Chinese text in the hope that I could at least see what phonemes were actually being generated by the tts engine, but the Simplified Chinese voice doesn't seem to be firing these events.
On the other hand, when I repeat all this with Microsoft Mike (see commented out code above), everything works exactly as I would want: phoneme events are raised and contain exactly the ipa phonemes that were passed into the ssml. This is a major step forward for me, since this is the first time that I have been able to see phoneme events from the english speaking voices (I posted a question on this a number of months back).
I have also tried the following:
pb.StartVoice("Microsoft Simplified Chinese"); pb.AppendSsmlMarkup(" tomato ");
in the hope that the Simplified Chinese voice would recognize the ipa phonemes, but once again the voice was silent.
So I am running out of ideas here, unless you can suggest anything else to try.
On the other hand, the managed Speech API is a big improvement on the old COM-based API and is working much better for me in other areas of my work. Many thanks for the pointer.
Regards
Ian Robertson
"Steve Meyer [MSFT]" wrote:
> Hi Ian, > > Try wrapping your pron element in a sapi element like this: > SYM=\"chan 3 ye 4\"/>. > > For more details about the SAPI TTS grammar format see the XML Schema : SAPI > whitepaper in the SAPI 5.1 SDK help file. And since you're working in C# I > recommend taking a look at the mangaged Speech API in the .NET Framework > (3.0 and later). Check out the System.Speech.Synthesis namespace for > working with TTS. > > -- Steve Meyer > > This posting is provided "AS IS" with no warranties, and confers no rights. > > "Ian" wrote in message > news:E45E0991-43C9-4EE9-8FFF-7C4D5CF71C6A@microsoft.com... > > Hi > > > > I am trying to get the Microsoft Simplified Chinese voice to speak > > phonemes > > from the Microsoft Chinese phoneme set, but without any success. The > > following C# test class illustrates my problem. The call to > > "SpeakChineseText" generates Chinese speech. On the other hand, the call > > to > > "SpeakChinesePhonemes" results in total silence. > > > > Can anyone tell me what I am doing wrong, or what I might have overlooked? > > > > I am running Windows XP Professional 2002 (SP2), with SAPI 5.1 (Microsoft > > Speech Object Library) and targetting .NET 2. > > > > Thanks > > > > Ian > > ---------------------------------------------------------------------- > > using SpeechLib; > > > > namespace TestApp > > { > > public class SAPITest > > { > > private SpVoice voice; > > > > public SAPITest() > > { > > // Create a Microsoft Simplified Chinese voice. > > this.voice = new SpVoice(); > > this.voice.Voice = > > voice.GetVoices("Name=Microsoft Simplified Chinese", > > "").Item(0); > > } > > > > public void SpeakChineseText() > > { > > this.voice.Speak("ä¸å›½äºº", > > SpeechVoiceSpeakFlags.SVSFlagsAsync | > > SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak); > > } > > > > public void SpeakChinesePhonemes() > > { > > voice.Speak("", > > SpeechVoiceSpeakFlags.SVSFlagsAsync | > > SpeechVoiceSpeakFlags.SVSFIsXML | > > SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak); > > } > > } > > } > > ---------------------------------------------------------------------- > > |
 |
|