mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-25 17:35:25 +02:00
faster speak, dont speak commands
This commit is contained in:
parent
2015667b2e
commit
54c57acc93
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue