An easy to use React.js component for the Web Speech API.
It is as easy as to import a React.js component!
- Text-to-speech
- Easy to use
- Highlights words as they are read. See highlighting text using useSpeech Hook and Speech Component
- Provides API to handle errors and events. See Handling Errors and Events
- Handles multiple speech instances easily. See handling using useSpeech Hook and Speech Component
- Fully Customizable. See useSpeech Hook Usage and usage with FaC
- Stops speech instance on component unmount.
To install react-text-to-speech
# with npm:
npm install react-text-to-speech --save
# with yarn:
yarn add react-text-to-speech
# with pnpm:
pnpm add react-text-to-speech
# with bun:
bun add react-text-to-speech
The react-text-to-speech
package offers two main ways to integrate text-to-speech functionality into your React.js applications.
A Demo is worth a thousand words
Check the documentation to get you started!
Show your ❤️ and support by giving a ⭐. Any suggestions are welcome! Take a look at the contributing guide.