Android 集会电话中的语音翻译
我需要在来自Agora(RTC)的视频通话中集成谷歌翻译 需要的行为:对手说了什么,我听到了他的演讲,之后我需要再次听到他的演讲,但要翻译成选定的语言。 我使用下一个代码:Android 集会电话中的语音翻译,android,google-api,voice-recognition,agora.io,Android,Google Api,Voice Recognition,Agora.io,我需要在来自Agora(RTC)的视频通话中集成谷歌翻译 需要的行为:对手说了什么,我听到了他的演讲,之后我需要再次听到他的演讲,但要翻译成选定的语言。 我使用下一个代码: Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerInt
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.ENGLISH.toString());
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, Locale.ENGLISH.toString());
intent.putExtra(RecognizerIntent.EXTRA_SUPPORTED_LANGUAGES, Locale.ENGLISH.toString());
try {
speechRecognizer.startListening(intent);
} catch (Exception e) {
e.printStackTrace();
}
但是,当我尝试实现这一点时,我总是在calback中收到ERROR_AUDIO ERROR。
当我从调用中输出此代码时,一切正常在调用时不能使用google intent,您需要尝试外部API。例如,什么API?google流式语音api@Yulia你找到解决方案了吗?你不能在通话中使用google intent,你需要尝试一个外部API。例如什么API?谷歌流式语音api@Yulia你有什么解决办法吗?