speech-synth
v1.0.1
Published
Simple text to speech module built on Web Speech API
Downloads
329
Maintainers
Readme
speech-synth
Simple text to speech module built on Web Speech API.
Try out a live demo of the component here
The NPM page can be found here
The GitHub page can be found here
Table of Contents
Usage
Install Module
run npm install speech-synth --save
in console while in root directory to add the component to your project.
Initial Setup
Import the module buy using a requrie statement:
const speech = require('speech-synth');
or an import statement:
import speech from 'speech-synth';
Component API
- say:
- Description: convert text to speech
- Type: Method
- Params: (input, voiceURI)
- input -> String to be spoken
- voiceURI -> name of the voice to use
- Default:
'Google US English'
- Default:
- Return: none
speech.say('hello')
- getVoiceNames:
- Description: returns an array of all voiceURI options that can be used with the say method
- Type: Method
- Params: none
- Return: Array[String]
speech.getVoiceNames()
Example:
let voice = speech.getVoiceNames()[3];
speech.say('My voice is Google Deutsch', voice);
Team
- Development Team Members:
- Alec Draymore