Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/184.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 集会电话中的语音翻译_Android_Google Api_Voice Recognition_Agora.io - Fatal编程技术网

Android 集会电话中的语音翻译

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

我需要在来自Agora(RTC)的视频通话中集成谷歌翻译 需要的行为:对手说了什么,我听到了他的演讲,之后我需要再次听到他的演讲,但要翻译成选定的语言。 我使用下一个代码:

 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你有什么解决办法吗?