diff --git a/src/agent/agent.js b/src/agent/agent.js index 0d4b98c..449349f 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -177,6 +177,7 @@ export class Agent { requestInterrupt() { this.bot.interrupt_code = true; + this.bot.stopDigging(); this.bot.collectBlock.cancelTask(); this.bot.pathfinder.stop(); this.bot.pvp.stop(); @@ -357,7 +358,7 @@ export class Agent { } else { if (settings.speak) { - say(message); + say(to_translate); } this.bot.chat(message); } diff --git a/src/agent/speak.js b/src/agent/speak.js index 9fc9c60..e5fe658 100644 --- a/src/agent/speak.js +++ b/src/agent/speak.js @@ -24,7 +24,7 @@ function processQueue() { let command; 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) { command = `say "${textToSpeak}"`; } else {