Exemplo n.º 1
0
 /**
  * 播报短信内容
  *
  * @param content
  */
 protected void broadcastContent(String content) {
   SpeechSynthesizer tts = SpeachHelper.getInstance(mContext).getSpeechSynthesizer();
   if (null != tts) {
     if (tts.isSpeaking()) {
       tts.stopSpeaking();
     } else {
       tts.startSpeaking(content, mSynListener);
     }
   }
 }
Exemplo n.º 2
0
 public void stopSpeaking() {
   if (mSpeechSynthesizer != null) mSpeechSynthesizer.stopSpeaking();
 }