light-tts
A lightweight text-to-speech module for Node.js
Installation
$ npm install light-tts
Usage
You can either save the audio as an mp3 file or speak it directly:
var LightTTS = ; // Play the received speechLightTTS; // Save the received speech into an mp3 fileLightTTS; // .mp3 extension added automatically
The callback functions are run after the speech is finished playing or the file is completely written.
Options
Here is a short list of the possible options:
api_name
- Choose which API to use:google
ortts_api
.google
is the defaultlang
- Choose which language to use. Only thegoogle
APi supports this option
To set new options:
// Switch to SpanishLightTTS;