By default, the SDK should be configured to listen for a bounded duration (e.g., 30 seconds) using VADParameter.maxDuration. This is important when using final responses, since computing the final result (including GoP scores, detailed timing, etc.) takes additional processing time. For use cases where only partial results are used, this constraint is not relevant.

For use cases requiring always-on listening (e.g., hands-free voice commands), continuous listening can be achieved by restarting the recognizer in the finalResponse callback.

Implementation

onFinalResponse(response):
    // Process the response (keep this quick to minimize listening gaps)
    processResult(response.result)

    // Restart listening immediately
    recognizer.startListening()

VAD Gating

When implementing continuous listening, enable VAD gating to prevent the recognizer from processing audio until speech is detected:

recognizer.setVadGating(true)

With VAD gating enabled, the recognizer waits for voice activity before starting recognition, reducing unnecessary processing during silence and improving battery efficiency.