2017-10-14 61 views
3

孟加拉語的TTS內容適用於我的Nexus 5x,但不是其他手機。 在其他三星手機只能說英文單詞,但跳過(不說)孟加拉語單詞。文本到語音的孟加拉不工作

任何人都可以獲取這種類型的問題,請幫助我。

謝謝。

代碼:

@Override 
    public void onInit(int i) { 
     if (i == TextToSpeech.SUCCESS) { 

     int result = mTextToSpeech.setLanguage(new Locale("bn_IN"));//https://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android 

     floatRead.setImageResource(R.drawable.ic_volume_off); 

     if (result == TextToSpeech.LANG_MISSING_DATA 
       || result == TextToSpeech.LANG_NOT_SUPPORTED) { 
      Log.i("TTS", "This Language is not supported"); 
      AppApplication.getInstance().showToast("This Language is not supported"); 
     } 
     read(mNewsDetails.title, true); 
     read(mNewsDetails.plain_text, false); 

    } else { 
     floatRead.setImageResource(R.drawable.ic_read); 
    } 
    } 

`

void read(String text, boolean flush) { 
     if (flush == true) { 
      if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) 
       mTextToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, null, null); 
      else 
       mTextToSpeech.speak(text, TextToSpeech.QUEUE_FLUSH, null); 
     } else { 
      if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) 
       mTextToSpeech.speak(text, TextToSpeech.QUEUE_ADD, null, null); 
      else 
       mTextToSpeech.speak(text, TextToSpeech.QUEUE_ADD, null); 
     } 
    } 

`

回答

3

-Google通過軟件更新更新設備上的Google TTS版本,以使語言環境支持。
如果Google TTS版本在兩個正在測試的設備中都相同,請進行驗證。
根據我的信息,Google Text-to-speech 3.11.12增加了對Bangla的支持以及其他各種改進。
參見:
Google TTS

-Samsung設備的支持:
三星文本到語音轉換引擎
谷歌文本到語音轉換引擎

這實際上有不同的語言環境支持集。