Implement api.output, announcevoice command, a bunch of other tts shit, etc etc etc buh

This commit is contained in:
2021-04-07 01:33:47 +02:00
parent 0fd431d2bc
commit 158ed0372f
9 changed files with 61 additions and 10 deletions

View File

@@ -5,7 +5,10 @@ module.exports=class extends BaseEngine {
constructor() {
super('ESpeak','wav')
}
async getSpeechFile(text, filepath, voice='en', params={}) {
getDefaultVoice() {
return 'en';
}
async getSpeechFile(text, filepath, voice=this.getDefaultVoice(), params={}) {
let proc=await spawn('espeak', ['-v', voice, '-w',filepath, '--stdin']);
proc.stdin.end(text);
}