修改
This commit is contained in:
@@ -2,12 +2,11 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Stary.Evo;
|
||||
using Rokid.UXR.Module;
|
||||
using UnityEngine.Android;
|
||||
|
||||
namespace Stary.Evo.RKTools
|
||||
{
|
||||
#if Evo_Rokid
|
||||
public class VoiceCommandController : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, Action> VoiceCommands = new Dictionary<string, Action>();
|
||||
@@ -39,8 +38,8 @@ namespace Stary.Evo.RKTools
|
||||
Permission.RequestUserPermission("android.permission.RECORD_AUDIO");
|
||||
}
|
||||
|
||||
ModuleManager.Instance.RegistModule("com.rokid.voicecommand.VoiceCommandHelper", false);
|
||||
OfflineVoiceModule.Instance.ChangeVoiceCommandLanguage(LANGUAGE.CHINESE);
|
||||
Rokid.UXR.Module.ModuleManager.Instance.RegistModule("com.rokid.voicecommand.VoiceCommandHelper", false);
|
||||
Rokid.UXR.Module.OfflineVoiceModule.Instance.ChangeVoiceCommandLanguage(Rokid.UXR.Module.LANGUAGE.CHINESE);
|
||||
isInit = true;
|
||||
}
|
||||
|
||||
@@ -54,9 +53,9 @@ namespace Stary.Evo.RKTools
|
||||
return;
|
||||
}
|
||||
|
||||
OfflineVoiceModule.Instance.AddInstruct(LANGUAGE.CHINESE, content, spell, this.gameObject.name,
|
||||
Rokid.UXR.Module.OfflineVoiceModule.Instance.AddInstruct(Rokid.UXR.Module.LANGUAGE.CHINESE, content, spell, this.gameObject.name,
|
||||
"OnReceive");
|
||||
OfflineVoiceModule.Instance.Commit();
|
||||
Rokid.UXR.Module.OfflineVoiceModule.Instance.Commit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -81,8 +80,8 @@ namespace Stary.Evo.RKTools
|
||||
public void ClearAllVoiceCommand()
|
||||
{
|
||||
VoiceCommands.Clear();
|
||||
OfflineVoiceModule.Instance.ClearAllInstruct();
|
||||
OfflineVoiceModule.Instance.Commit();
|
||||
Rokid.UXR.Module.OfflineVoiceModule.Instance.ClearAllInstruct();
|
||||
Rokid.UXR.Module.OfflineVoiceModule.Instance.Commit();
|
||||
}
|
||||
|
||||
void OnReceive(string msg)
|
||||
@@ -94,4 +93,6 @@ namespace Stary.Evo.RKTools
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user