Skip to content

Latest commit

 

History

History
84 lines (73 loc) · 1.95 KB

README.md

File metadata and controls

84 lines (73 loc) · 1.95 KB

rtts (Ryu Text to Speech)

How to install

npm i rtts

rtts is an open source JavaScript package for text to speech conversion

example usage

const rtts = require('rtts');
(async()=>{
    rtts.rate=2.1
    rtts.vol=100
    await rtts.talk('hi');
})()

Options

Volume

A value between 0-100

rtts.vol

Speed

A value between 0-100

rtts.rate

Export

saves output as .wav in given dir .if no dir is given it will store output as example.wav in CW

rtts.exportWav(text,dir)

Ontalk

function will repeat every intervel until speech is ended only valid after calling rtts.talk

rtts.ontalk(callback,intervel)

Kill

terminate rtts.talk

rtts.kill

Kill

Terminate the running rtts.talk

rtts.kill

listVoices

list all available voices in current device options

Option Notes
name Name of the TTS instance
lang language of the TTS instance
gender Gender of the TTS instance
age Vocal age of the TTS instance
id TTS instance ID
ver TTS instance version
lcid Windows Language Code Identifier
langid ISO Language Code
rtts.listVoices(options) 

Options can be passed as strings separated by comas

for example if you only want to list names and age of avilable voices

rtts.listVoices('name,age') 

Features

Platform Speak Export Stop Speed Voice Voloume List
Windows 🚫
Linux 🚫 🚫 🚫 🚫 🚫 🚫 🚫
macOS 🚫 🚫 🚫 🚫 🚫 🚫 🚫