diff --git a/GAVPI/GAVPI/VI.cs b/GAVPI/GAVPI/VI.cs index 7e9bb41..c7bce06 100755 --- a/GAVPI/GAVPI/VI.cs +++ b/GAVPI/GAVPI/VI.cs @@ -18,7 +18,6 @@ namespace GAVPI { public class VI { - SpeechSynthesizer vi_syn; SpeechRecognitionEngine vi_sre; ListView statusContainer; // listview in main form @@ -29,10 +28,10 @@ public class VI public VI() { - pushtotalk_active = false; - pushtotalk_keyIsDown = false; + pushtotalk_active = false; + pushtotalk_keyIsDown = false; pushtotalk_keyDownHook = new KeyboardHook.KeyDownEventHandler(KeyboardHook_KeyDown); - pushtotalk_keyUpHook = new KeyboardHook.KeyUpEventHandler(KeyboardHook_KeyUp); + pushtotalk_keyUpHook = new KeyboardHook.KeyUpEventHandler(KeyboardHook_KeyUp); } // @@ -55,6 +54,9 @@ public bool load_listen( ListView statusContainer ) vi_sre = new SpeechRecognitionEngine( GAVPI.vi_settings.recognizer_info ); GrammarBuilder phrases_grammar = new GrammarBuilder(); + // Grammer must match speech recognition language localization + phrases_grammar.Culture = GAVPI.vi_settings.recognizer_info; + List glossory = new List(); foreach (VI_Phrase trigger in GAVPI.vi_profile.Profile_Triggers) @@ -98,7 +100,6 @@ public bool load_listen( ListView statusContainer ) // TODO: // Push-to-Talk keyboard hook. Unimplemented. - try { KeyboardHook.KeyDown += pushtotalk_keyDownHook; diff --git a/GAVPI/GAVPI/VI_Settings.cs b/GAVPI/GAVPI/VI_Settings.cs index 9733872..4a6c27b 100755 --- a/GAVPI/GAVPI/VI_Settings.cs +++ b/GAVPI/GAVPI/VI_Settings.cs @@ -15,6 +15,7 @@ public class VI_Settings public System.Globalization.CultureInfo recognizer_info; public string voice_info; + public string pushtotalk_mode; public string pushtotalk_key; @@ -24,21 +25,22 @@ public VI_Settings() SpeechSynthesizer synthesizer = new SpeechSynthesizer(); voice_info = new SpeechSynthesizer().GetInstalledVoices()[0].VoiceInfo.Name; pushtotalk_mode = "Off" ; - pushtotalk_key = "Scroll" ; + pushtotalk_key = "Scroll" ; } public void load_settings(string filename) { + // TODO } public void save_settings() { + // TODO XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; XmlWriter writer = XmlWriter.Create("settings.xml", settings); writer.WriteStartDocument(); writer.WriteStartElement("gavpi"); - writer.WriteEndElement(); writer.WriteEndDocument(); writer.Flush(); diff --git a/GAVPI/GAVPI/frmGAVPI.cs b/GAVPI/GAVPI/frmGAVPI.cs index cb6dd5c..e7210d2 100755 --- a/GAVPI/GAVPI/frmGAVPI.cs +++ b/GAVPI/GAVPI/frmGAVPI.cs @@ -13,8 +13,7 @@ namespace GAVPI { public partial class frmGAVPI : Form { - string BUILD_VERSION = "GAVPI Alpha Build 0.03 08.10.14"; - + string BUILD_VERSION = "GAVPI Alpha Build 0.04 12.18.14"; public frmGAVPI() {