Created
June 6, 2016 22:29
-
-
Save dylansturg/b1827c4d5e4d56fd321edafcd779d026 to your computer and use it in GitHub Desktop.
C# example of using Android's TextToSpeech API
This file contains 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
protected void SpeakText() | |
{ | |
var speaker = new TextToSpeech(this, this); | |
speaker.SetLanguage(Java.Util.Locale.Default); | |
speaker.SetPitch(1); // Normal speech | |
speaker.SetSpeechRate(1); // Normal speech | |
var speechId = "1"; // Each speak call needs a unique identifier | |
speaker.Speak("Hello From Android", QueueMode.Flush, null, speechId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment