示例#1
0
        private void InitializeDictionary()
        {
            var path   = CombinePath(Application.dataPath, "..", DICT_PATH, VR.Settings.Locale + ".txt");
            var reader = new DictionaryReader(VR.Context.VoiceCommandType);

            // Load dictionary and save immediately
            VRLog.Info("Loading dictionary at {0}...", path);
            reader.LoadDictionary(path);
            VRLog.Info("Saving dictionary at {0}...", path);
            reader.SaveDictionary(path);
        }
示例#2
0
 private String GetVoiceCommands()
 {
     return(string.Join(";", DictionaryReader.ExtractCommandObjects(VR.Context.VoiceCommandType).SelectMany(command => command.Texts).ToArray()));
 }