import "./App.css"
import SpeechRecognition, { useSpeechRecognition } from 'react-speech-recognition';
import useClipboard from "react-use-clipboard";
import {useState} from "react";
const App = () => {
const [textToCopy, setTextToCopy] = useState();
const [isCopied, setCopied] = useClipboard(textToCopy, {
successDuration:1000
});
const startListening = () => SpeechRecognition.startListening({ continuous: true, language: 'en-IN' });
const { transcript, browserSupportsSpeechRecognition } = useSpeechRecognition();
if (!browserSupportsSpeechRecognition) {
return null
}
return (
<>
>
);
};
export default App;
Speech to Text Converter
A React hook that converts speech from the microphone to text and makes it available to your React components.
setTextToCopy(transcript)}>
{transcript}