Skip to content

Instantly share code, notes, and snippets.

@anilkay
Created October 24, 2021 21:09
Show Gist options
  • Select an option

  • Save anilkay/d275e5d836542eee564a38ca4d408d48 to your computer and use it in GitHub Desktop.

Select an option

Save anilkay/d275e5d836542eee564a38ca4d408d48 to your computer and use it in GitHub Desktop.
async static Task SpeechSynthesis3(SpeechConfig speechConfig)
{
speechConfig.SpeechSynthesisLanguage = "tr-TR";
//speechConfig.SpeechSynthesisVoiceName = "tr-TR-EmelNeural";
var audioConfig=AudioConfig.FromWavFileOutput("uretilen.wav");
using var synthesizer = new SpeechSynthesizer(speechConfig,audioConfig);
while (true)
{
string speech = Console.ReadLine();
if (speech.ToLower().Contains("sentezi kapat")) break;
await synthesizer.SpeakTextAsync(speech);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment