1.0.0 • Published 3 years ago
@jace.dev/speechy v1.0.0
Speechy
A simple script to help out with Text-to-speech in Javascript
Installation
NPM
npm i @jace.dev/speechyYARN
yarn add @jace.dev/speechyPNPM
pnpm install @jace.dev/speechyHow 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
1.0.0
3 years ago