More details here
My first script "Emergency"
using System;
using System.Drawing;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
// Initial State
if(BFS.ScriptSettings.ReadValueBool("Protocol")==false)
{
BFS.ScriptSettings.WriteValueBool("Cancel",false);
BFS.ScriptSettings.WriteValueBool("Protocol",true);
BFS.ScriptSettings.WriteValueInt("State Order",1);
BFS.ScriptSettings.WriteValueBool("Emergency Mode",true);
//--------------------------------------------------------------
while (true)
{
if(BFS.ScriptSettings.ReadValueInt("State Order")==1)
{
BFS.Speech.TextToSpeech( "Danger" );
BFS.VoiceBotActions.Delay(500);
if ((BFS.ScriptSettings.ReadValueBool("Cancel")==true) )
{
BFS.ScriptSettings.WriteValueBool("Cancel",false);
BFS.ScriptSettings.WriteValueInt("State Order",0);
BFS.ScriptSettings.WriteValueBool("Emergency Mode",false);
BFS.ScriptSettings.WriteValueBool("Protocol",false);
break;
}
}
else if(BFS.ScriptSettings.ReadValueInt("State Order")==0)
{
BFS.ScriptSettings.WriteValueBool("Cancel",false);
BFS.ScriptSettings.WriteValueInt("State Order",0);
BFS.ScriptSettings.WriteValueBool("Emergency Mode",false);
BFS.ScriptSettings.WriteValueBool("Protocol",false);
break;
}
//break;
}
}
else
{
BFS.Speech.TextToSpeech( "Another protocol activating" );
}
}
}
And my second script "Cancel protocol"
using System;
using System.Drawing;
public static class VoiceBotScript
{
public static void Run(IntPtr windowHandle)
{
// your code goes here
BFS.ScriptSettings.WriteValueBool("Cancel",true);
}
}
3.6 version
1. Command "Emergency"
2. TTS says "Danger Danger Danger ...."
3. Command "Cancel" (anytime)
4. "Emergency" command Stops
(So yes, I'm trying to issue new commands while a TTS read-out is still playing)
3.7 version
1. Command "Emergency"
2. TTS says "Danger Danger Danger ...."
3. Command "Cancel"
4. My "Cancel" Command ignored
if I delete "BFS.Speech.TextToSpeech( "Danger" );" my "Cancel" command works properly.
That is why I thought "Ignore commands during Text to Speech" setting is not working.
Also the default voice changing is not applied to "BFS.Speech.TextToSpeech"
FYI
I use steam version Software and updated to 3.7 from 3.6
I installed voicebot on D drive not C drive(OS)
I tried both "BFS.General.ThreadWait" and "BFS.VoiceBotActions.Delay" after " BFS.Speech.TextToSpeech"