useVoiceSearch hook provides the logic to build a custom voice search component using the Web Speech API.
Import
Parameters
Whether to trigger a search on every interim result (partial results during speech).
The language for speech recognition (e.g., ‘en-US’, ‘fr-FR’).
Function to add additional query parameters based on the voice input.
Returns
Whether the browser supports the Web Speech API.
Whether the voice search is currently listening.
Function to start or stop listening for voice input.
The current state of the voice recognition.