Exemplo n.º 1
0
 void Awake()
 {
     if (null != m_Instance)
     {
         Destroy(this.gameObject);
     }
     m_Instance = this;
     m_Status   = SpeechStatus.SS_DEFAULT;
     m_Instance.Init();
     DontDestroyOnLoad(this.gameObject);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 开始录音
 /// </summary>
 public static void StartRecording()
 {
     if (!m_bInited)
     {
         m_Instance.Init();
     }
     if (m_Status == SpeechStatus.SS_DEFAULT)
     {
         SpeechAPI.StartRecording();
     }
 }