Module exposing: getSpeechRecognition, useSpeechRecognition
// Source: https://github.com/siberiacancode/reactuse | License: MIT | Copyright 2024 siberiacancode
// Provided via justclaw.it.com; keep this notice with the code.
import { useEffect, useState } from 'react';
export const getSpeechRecognition = () =>
window?.SpeechRecognition ?? window?.webkitSpeechRecognition;
/**
* @name useSpeechRecognition
* @description - Hook that provides a streamlined interface for incorporating speech-to-text functionality
* @category Browser
* @usage low
*
* @browserapi window.SpeechRecognition https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition
*
* @param {boolean} [options.continuous=false] Whether recognition should continue after pauses
* @param {boolean} [options.interimResults=false] Whether interim results should be provided
*
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key