say
command
Example script for Tivoli:
function tts(voice, text) {
var sound = SoundCache.getSound(
"https://say.tivolicloud.com/sound.wav?voice=" +
encodeURIComponent(voice) +
"&text=" +
encodeURIComponent(text)
);
function play() {
Audio.playSound(sound, {
position: MyAvatar.position,
volume: 0.5
});
Chat.sendMessage(text, false, false);
}
if (sound.downloaded) {
play();
} else {
sound.ready.connect(play);
}
}
tts("Samantha", "Hi there!");