Android TV中用于语音识别的非默认语言

Android TV中用于语音识别的非默认语言,android,android-tv,Android,Android Tv,我无法强制自定义Android电视应用程序从语音输入中识别非默认语言。内置YouTube应用程序(和其他应用程序)也存在同样的问题。然而,它在内置的谷歌搜索应用程序(Katniss)中工作 我的代码在Nexus手机上运行良好,但在Nexus播放器上设置自定义语言不会在所选语言中给出任何结果 SpeechRecognizer sr = SpeechRecognizer.createSpeechRecognizer(this); Intent intent = new Intent(Recogn

我无法强制自定义Android电视应用程序从语音输入中识别非默认语言。内置YouTube应用程序(和其他应用程序)也存在同样的问题。然而,它在内置的谷歌搜索应用程序(Katniss)中工作

我的代码在Nexus手机上运行良好,但在Nexus播放器上设置自定义语言不会在所选语言中给出任何结果

SpeechRecognizer sr =  SpeechRecognizer.createSpeechRecognizer(this);

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE,"voice.recognition.test");

String loc = "ru-RU";

intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, loc);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_PREFERENCE, loc);
intent.putExtra(RecognizerIntent.EXTRA_ONLY_RETURN_LANGUAGE_PREFERENCE, loc);

intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS,5);
sr.startListening(intent);

看起来它是在一个谷歌搜索应用程序更新中修复的