TalkBot.FliteWrapper.Speak C# (CSharp) Method

Speak() public static method

public static Speak ( string textToSpeak ) : void
textToSpeak string
return void
        public static void Speak(string textToSpeak)
        {
            string ttsFilePath = ConvertTextToWav (textToSpeak, "text.wav");

            AVAudioPlayer player = AVAudioPlayer.FromUrl (NSUrl.FromString (ttsFilePath));
            player.PrepareToPlay ();
            player.Play ();
        }