[英]TTS bot messages overlap
我為 twitch 創建了一個 tts bot,效果很好,但是每次有任何消息接近時,它都會嘗試同時說出它們,但它只會變成噪音。 有誰知道如何解決這個問題?
var tmi = require('tmi.js');
var say = require('say');
//BOT CONNECTION OPTIONS
var options = {
options: {
debug: false
},
connection: {
cluster: "as",
reconnect: true
},
identity: {
username: "",
password: ""
},
channels: [""]
};
var client = new tmi.client(options);
client.connect();
client.on("chat", function (channel, userstate, message, self) {
say.speak(userstate.username + " says " + message);
});
試試這個:跳過
client.on("chat", function (channel, userstate, message, self) {
if(!say.isSpeaking()){
say.speak(userstate.username + " says " + message, TextToSpeech.QUEUE_FLUSH,null);
}
});
或在 que 中添加 txt
client.on("chat", function (channel, userstate, message, self) {
say.speak(userstate.username + " says " + message, TextToSpeech.QUEUE_ADD,null);
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.