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

@@ -6,7 +6,10 @@ module.exports= class extends BaseEngine {
constructor() {
super("Google Translate TTS","mp3");
}
async getSpeech(text, voice='en-us', params={}) {
getDefaultVoice() {
return 'en-us';
}
async getSpeech(text, voice=this.getDefaultVoice(), params={}) {
const url = tts.getAudioUrl(text, {lang: voice});
return fetch(url);
}