@jace.dev/speechy
v1.0.0
Published
A simple script to help out with Text-to-speech in Javascript
Downloads
3
Maintainers
Readme
Speechy
A simple script to help out with Text-to-speech in Javascript
Installation
NPM
npm i @jace.dev/speechy
YARN
yarn add @jace.dev/speechy
PNPM
pnpm install @jace.dev/speechy
How to use
import Speechy from '@jace.dev/speechy';
var speechy = new Speechy();
speechy.say("Hello World");
OR
import Speechy from '@jace.dev/speechy';
var speechy = new Speechy();
speechy.text("Hello World");
speechy.speak();
OR
import Speechy from '@jace.dev/speechy';
var speechy = new Speechy("Hello world");
speechy.speak();
Other Methods
speechy.text(text)
: Sets the text to be spokenspeechy.speak()
: Speaks the textspeechy.pause()
: Pauses the speechspeechy.resume()
: Resumes the speechspeechy.stop()
: Stops the speechxwspeechy.setRate(rate)
: Sets the speech rate [0 - 1] default: 1speechy.setPitch(pitch)
: Sets the speech pitch [0 - 1] default: 1speechy.setVolume(volume)
: Sets the speech volume [0 - 1] default: 1speechy.setVoice(voice)
: Sets the speech voicespeechy.getVoices()
: Returns an array of available voices