Added Google TTS, lowercase voices so that people don't have to remember ridiculous case

This commit is contained in:
2021-04-10 23:45:02 +02:00
parent 40e50b6546
commit f0c71d75dc
10 changed files with 927 additions and 11 deletions

View File

@@ -10,7 +10,7 @@ module.exports = class AzureTTS extends BaseEngine {
}
getDefaultVoice() {
return "";
return "Aria";
}
getSpeechFile(text, filepath, voice = this.getDefaultVoice(), params = {}) {
@@ -48,7 +48,7 @@ module.exports = class AzureTTS extends BaseEngine {
json.forEach((voice) => {
if (this.voices[voice.DisplayName]) {
if (voice.Name.includes('Neural')) {
this.voices[voice.DisplayName] = voice.ShortName;
this.voices[voice.DisplayName.toLowerCase()] = voice.ShortName;
}
} else {
this.voices[voice.DisplayName] = voice.ShortName;