Fixed crash with announcer

master
Talon 2021-07-03 22:51:19 +02:00
parent 57d37a7b0b
commit ee88a48fa5
3 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,8 @@ module.exports = function (bot, api) {
} else {
str = printf(api.strings.USER_JOINED, username);
}
const filepath = await api.generateVoice(str, api.announcementEngine, api.announcementVoice);
api.queue.add(__dirname + "/sysmsg.wav");
api.queue.add(channel, str);
api.queue.add(filepath);
})
}

1
package-lock.json generated
View File

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

View File

@ -8,7 +8,7 @@ module.exports = class extends BaseEngine {
super('sam', 'Software Automatic Mouth', 'wav')
}
getDefaultVoice() {
return 'en';
return 'sam';
}
async getSpeechFile(text, filepath, voice = this.getDefaultVoice(), params = {}) {
let sam = new Sam();