2016-05-06 16 views
0

私はMicrosoft.Speech.Synthesis Synthesizerを使用しているアプリケーションで作業しています。私はスペイン語の声(es-ES、ヘレナ)を使用しようとしています。コードは以下の通りです:オーディオを聞くことができません - Microsoft.Speech.Synthesis(Spanish Voice Helena)

using Microsoft.Speech.Synthesis; 
... 
... 

//Inside main method 
SpeechSynthesizer synth = new SpeechSynthesizer(); 
List<InstalledVoice> installedVoices = new List<InstalledVoice>(); 
foreach (InstalledVoice voice in synth.GetInstalledVoices()){ 
     installedVoices.Add(voice); 
     Console.WriteLine(voice.VoiceInfo.Name); 
} 
synth.SelectVoice(installedVoices[0].VoiceInfo.Name); 
synth.Rate = 0; 

synth.TtsVolume = 100; 
synth.SpeakAsync("Hola Mundo"); 

Console.WriteLine(); 
Console.ReadKey(); 

コンソールの出力は以下の通りです:スピーチの声(ES-ES、ヘレナ)へ

Microsoftサーバースピーチテキスト

問題は、プログラムがdoesnのことです話すことはありません。私はオーディオを聞くことができません。誰も私にこれを手伝ってもらえますか?

すべてのご協力をいただきありがとうございます。

答えて

0

出力設定が不足しているようです。

// Configure the synthesizer to send output to the default audio device. 
synth.SetOutputToDefaultAudioDevice(); 

これは出力をシステムのデフォルトオーディオデバイスに設定します。

+0

まだ何も聞こえません –