Start and stop recognition
Start recognition
Call request() to start speech recognition with the vehicle microphone. The SDK activates the microphone and begins recognizing the input speech.
Complete SDK initialization and result listener registration before calling request(). For a mode that uses server-based recognition, also complete app registration or UA authentication.
- Kotlin
- Java
speechToText.addListener(resultListener)
speechToText.request()
speechToText.addListener(resultListener);
speechToText.request();
The registered ResultListener receives readiness and recognition results.
Stop recognition
Call stop() to stop the active speech recognition session and release the microphone.
- Kotlin
- Java
speechToText.stop()
speechToText.stop();
When recognition ends, ResultListener.onEndedRecognition() is called.