Currently there are two way to use TTS.
Local(On demand) TTS such as aquestalk is not available for now pull requests are welcome!
No matter which way you choose, you should prepare an extrenal TTS engine first.
Tested below:
See also official documents of each of them.
key.json under scripts directory$ tts-server --port 8080 --model_name tts_models/ja/kokoro/tacotron2-DDC
config.tts.host|port of stackchan/manifest_local.json{
"config": {
"tts": {
"host": "your.tts.host.local",
"port": 8080
}
}
}
config.tts of stackchan/manifest_local.json.
{
"config": {
"tts": {
"type": "elevenlabs",
"token": "YOUR_API_KEY"
},
}
}
mods/monologue/speeches_monologue.js and other examples)// speeches.js
export const speeches = {
niceToMeetYou: 'Hello. I am Stach-chan. Nice to meet you.',
hello: 'Hello World.',
konnichiwa: 'Konnichiwa.',
nihao: 'Nee hao.',
}
npm run generate-speech-[google|coqui|voicevox]
stackchan/assets/soundsRobot#speak(sentense: string) with the sentense.import { speeches } from 'speeches'
const keys = Object.keys(speeches)
export async function onRobotCreated(robot) {
await robot.say('hello')
await robot.say(keys[0] /* 'niceToMeetYou' */)
}
config.tts.type according to your TTS server in manifest_local.json{
"config": {
"tts": {
"type": "remote",
"host": "your.tts.host.local",
"port": 8080
}
}
}
Robot#say(sentense: string)// ...
export async function onRobotCreated(robot) {
await robot.say('Now I can speak any sentense you want.')
}