How can I use speech recognition without the annoying dialog in android phones

前端 未结 4 2411
囚心锁ツ
囚心锁ツ 2020-11-22 14:47

Is this possible without modify the android APIs? I\'ve found a article about this. There\'s one a comment that I should do modifications to the android APIs. But it didn\'

4条回答
  •  猫巷女王i
    2020-11-22 15:43

    Use the SpeechRecognizer interface. Your app needs to have the RECORD_AUDIO permission, and you can then create a SpeechRecognizer, give it a RecognitionListener and then call its startListening method. You will get callbacks to the listener when the speech recognizer is ready to begin listening for speech and as it receives speech and converts it to text.

提交回复
热议问题