2
맞춤 Android TV 애플리케이션이 음성 입력에서 기본이 아닌 언어를 인식하도록 할 수 없습니다. 내장 YouTube 응용 프로그램 (및 기타)에서도 동일한 문제가 발생합니다. 그러나 내장 된 Google 검색 앱 (Katniss)에서 작동합니다.Android TV에서 음성 인식을위한 기본이 아닌 언어
Nexus 휴대 전화에서 잘 작동하는 코드가 있지만 Nexus Player에서 맞춤 언어를 설정해도 선택한 언어로 결과가 나오지 않습니다.
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);