1.1.5 • Published 1 year ago

speechreader v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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()
1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.0

1 year ago