Ejemplo n.º 1
0
 //bool IsSupportChinese(Locale locale)
 //{
 //    var r = textToSpeech.IsLanguageAvailable(Locale.China);
 //    return r != LanguageAvailableResult.MissingData && r != LanguageAvailableResult.NotSupported;
 //}
 public new void Dispose()
 {
     if (_tts != null)
     {
         _tts.Stop();
         _tts.Shutdown();
         _tts.Dispose();
         _tts = null;
     }
     base.Dispose(true);
 }
Ejemplo n.º 2
0
 public ITextToSpeech Init(string engine = null)
 {
     if (string.IsNullOrEmpty(engine))
     {
         _tts = new Android.Speech.Tts.TextToSpeech(Application.Context, this);
         _engine = _tts.DefaultEngine;
     }
     else
     {
         _tts = new Android.Speech.Tts.TextToSpeech(Application.Context, this, engine);
         _engine = engine;
     }
     HasInit = true;
     return this;
 }