コード例 #1
0
 void OnSpeakerCompleted(string text)
 {
     Debug.LogWarning("[Iflytek] OnSpeakerCompleted: " + text);
     if (VoiceMgr.isListening == false)
     {
         int code = VoiceMgr.Start();
         Debug.LogWarning("[Iflytek] Start Listening");
     }
 }
コード例 #2
0
    // Speech recognizer returns error, here we need to make sure everything works fine
    void OnSpeechError(string code)
    {
        Debug.LogWarning("[Iflytek] OnSpeechError: " + code);

        if (code == "10118")
        {
            // no input, if still focused, then restart listening, if not focused
            // restart listening
            if (VoiceMgr.isListening == false)
            {
                VoiceMgr.Start();
            }
        }
    }