## 翻譯
在 **SpeechRecognizer** 中指定對應的參數后,可以使用翻譯功能,即傳入當前語種音頻,返回識別并翻譯后的目標語種文本結果。
主要涉及以下參數
* SpeechConstant.ASR_SCH 啟用翻譯
* SpeechConstant.ADD_CAP 翻譯通道
* SpeechConstant.ORI_LANG 原始語種
* SpeechConstant.TRANS_LANG 目標語種
* SpeechConstant.TRS_SRC 結果格式
~~~
mAsr.setParameter( SpeechConstant.ASR_SCH, "1" );
mAsr.setParameter( SpeechConstant.ADD_CAP, "translate" );
mAsr.setParameter( SpeechConstant.TRS_SRC, "its" );
mAsr.setParameter( SpeechConstant.ORI_LANG, "cn" );
mAsr.setParameter( SpeechConstant.TRANS_LANG, "en" );
mAsr.startListening( mRecognizerListener );
~~~
翻譯結果格式,參考附錄。