Repository for tts-react
, a React component and hook that uses the SpeechSynthesis
and SpeechSynthesisUtterance
API's to convert text to speech. You can fallback to the HTMLAudioElement
API by providing a fetchAudioData
prop to the hook or component.
Important
Requires a peer dependency of React and ReactDOM >= 19.
Use tts-react@3
if your project is on React 18.
npm i react react-dom tts-react
For projects using React 18:
npm i react@18 react-dom@18 tts-react@3
- Helped fix a
SpeechSynthesisUtterance
default volume Chrome bug.