speechreader
v1.1.5
Published
speechreader use the SpeechSynthesisUtterance interface of the Web Speech API and provider a ready to use wrapper class to start adding TTS functionality to your project. This library is meant to be added on PROJECT RUNNING ON A WEB BROWSER.
Downloads
14
Readme
README
speechreader use the SpeechSynthesisUtterance interface of the Web Speech API and provider a ready to use wrapper class to start adding TTS functionality to your project. This library is meant to be added on PROJECT RUNNING ON A WEB BROWSER.
Installation
With npm installed, run :
$ npm install speechreader
Usage
Import the synthesizer class
import { Synthesizer } from 'speechreader'
Use the Synthesizer to read text
const synthesizer = new Synthesizer('I am a little tea pot')
synthesizer.play()
Use the Synthesizer to read HTML text
const synthesizer = new Synthesizer('<html><h1>I am a little tea pot</h1></html>')
synthesizer.play()
Set speech synthesizer locale
const synthesizer = new Synthesizer('I am a little tea pot','en-US')
synthesizer.play()
Pause text reading
synthesizer.pause()
resume text reading
synthesizer.resume()
stop text reading
synthesizer.stop()