Skip to content
/ rtts Public

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

Notifications You must be signed in to change notification settings

8G6/rtts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 🚫 🚫 🚫 🚫 🚫 🚫 🚫

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published