Fix non neuralness

master
Talon 2021-04-11 00:55:42 +02:00
parent 6b43761ca7
commit cbb4a6898b
2 changed files with 2 additions and 1 deletions

1
package-lock.json generated
View File

@ -1854,6 +1854,7 @@
"hasInstallScript": true,
"dependencies": {
"node-addon-api": "^3.0.0",
"node-gyp": "3.x",
"node-pre-gyp": "^0.11.0"
},
"optionalDependencies": {

View File

@ -46,7 +46,7 @@ module.exports = class AzureTTS extends BaseEngine {
const res = await fetch(process.env.AZURE_LIST_ENDPOINT, opts);
const json = await res.json();
json.forEach((voice) => {
if (this.voices[voice.DisplayName]) {
if (this.voices[voice.DisplayName.toLowerCase()]) {
if (voice.Name.includes('Neural')) {
this.voices[voice.DisplayName.toLowerCase()] = voice.ShortName;
}