// initialization
        void Awake()
        {
            string _currentGUID = System.Guid.NewGuid().ToString();

            gameObject.name = gameObject.name + _currentGUID;
            TTSHelper.Initialize(gameObject.name, TTSHelper.UnitedKingdom);
        }
Example #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtSentence.Text.Trim()))
     {
         TTSHelper.GetInstance().TTSSpeaker(txtSentence.Text);
     }
     else
     {
         MessageBox.Show("No no,sentences are not found");
     }
 }
Example #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("Test TTS");
            string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\testTTS.wav";
            string text     = "If you see that text,you must be interested in TTS part of English Practice Helper , thank you ";

            try
            {
                Console.WriteLine("Test TTS Speaker");
                TTSHelper.GetInstance().TTSSpeaker(text);

                Thread.Sleep(10000);

                Console.WriteLine("Test TTS speaker and save to file");
                TTSHelper.GetInstance().TTSToFile(text, filePath);
                Console.WriteLine("Save to " + filePath);
            }catch (Exception ex)
            {
                Console.WriteLine("We got trouble:" + ex.Message);
            }
            Console.ReadLine();
        }
 public void Destroy()
 {
     TTSHelper.Stop();
 }