faster speak, dont speak commands

This commit is contained in:
MaxRobinsonTheGreat 2025-03-17 14:00:38 -05:00
parent 2015667b2e
commit 54c57acc93
2 changed files with 3 additions and 2 deletions

View file

@ -177,6 +177,7 @@ export class Agent {
requestInterrupt() { requestInterrupt() {
this.bot.interrupt_code = true; this.bot.interrupt_code = true;
this.bot.stopDigging();
this.bot.collectBlock.cancelTask(); this.bot.collectBlock.cancelTask();
this.bot.pathfinder.stop(); this.bot.pathfinder.stop();
this.bot.pvp.stop(); this.bot.pvp.stop();
@ -357,7 +358,7 @@ export class Agent {
} }
else { else {
if (settings.speak) { if (settings.speak) {
say(message); say(to_translate);
} }
this.bot.chat(message); this.bot.chat(message);
} }

View file

@ -24,7 +24,7 @@ function processQueue() {
let command; let command;
if (isWin) { if (isWin) {
command = `powershell -Command "Add-Type –AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak(\\"${textToSpeak}\\")"`; command = `powershell -Command "Add-Type -AssemblyName System.Speech; $s = New-Object System.Speech.Synthesis.SpeechSynthesizer; $s.Rate = 2; $s.Speak(\\"${textToSpeak}\\"); $s.Dispose()"`;
} else if (isMac) { } else if (isMac) {
command = `say "${textToSpeak}"`; command = `say "${textToSpeak}"`;
} else { } else {