【问题标题】:android speech recognition continously has no answer [duplicate]android语音识别一直没有答案[重复]
【发布时间】:2013-03-15 00:47:32
【问题描述】:

我想创建一个等待特定关键字语音的 android 应用:当用户说出这个关键字时,服务就准备好接收用户语音命令。所以我正在寻找一个连续的语音识别器,

喜欢这个人:

Can I keep the speech recognizer listening indefinitely?

喜欢这个人:

Continuous Speechrecognition in Android

还有这个人:

Continuous Speech Recognition Android

但说真的,所有这些都没有一个明确的答案!有没有人能够管理这个?有源代码吗?

【问题讨论】:

  • 这里不需要问重复的问题,你可以投票其他问题。只是再次咆哮并不会增加您获得高质量答案的机会。

标签: android voice-recognition


【解决方案1】:

创建一个服务并将您的识别器代码放在那里,它会起作用。您的意图需要以下内容

mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                                    RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
    mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, 
                                    this.getPackageName());  

请参阅http://developer.android.com/reference/android/speech/RecognizerIntent.html 了解更多信息。

【讨论】:

    猜你喜欢
    • 2012-07-15
    • 2022-12-11
    • 1970-01-01
    • 2015-03-29
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多