Fix ESpeak to use Stdin instead of a shell argument

This commit is contained in:
2021-04-06 12:46:11 +02:00
parent a4ccdf43cb
commit 0fd431d2bc
2 changed files with 3 additions and 2 deletions

View File

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