Skip to content

Instantly share code, notes, and snippets.

@anilkay
Created October 24, 2021 20:57
Show Gist options
  • Select an option

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

Select an option

Save anilkay/e652763b9d4cbfa850546ac83a98081c to your computer and use it in GitHub Desktop.
async static Task SpeechSynthesis(SpeechConfig speechConfig)
{
speechConfig.SpeechSynthesisLanguage = "tr-TR";
speechConfig.SpeechSynthesisVoiceName = "tr-TR-EmelNeural";
using var synthesizer = new SpeechSynthesizer(speechConfig);
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