Created
October 24, 2021 21:09
-
-
Save anilkay/d275e5d836542eee564a38ca4d408d48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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