Ejemplo n.º 1
0
    IEnumerator Record()
    {
        _text2.text = "";
        yield return(new WaitForEndOfFrame());

                #if !UNITY_EDITOR
        XunFeiVAInterface.ISR_StartRecording();
        yield return(new WaitForSeconds(3f));

        XunFeiVAInterface.ISR_StopRecording();
                #endif
    }
Ejemplo n.º 2
0
    IEnumerator Setup()
    {
        _button.gameObject.SetActive(false);
        yield return(new WaitForEndOfFrame());

                #if !UNITY_EDITOR
        XunFeiVAInterface.isrResultEvent      += ResultCallback;
        XunFeiVAInterface.isrErrorEvent       += ErrorCallback;
        XunFeiVAInterface.isrVolumeEvent      += VolumeCallback;
        XunFeiVAInterface.isrSpeechBeginEvent += SpeechBeginCallback;
        XunFeiVAInterface.isrSpeechStopEvent  += SpeechStopCallback;
        XunFeiVAInterface.Init("59bb45ec");
        yield return(new WaitForSeconds(2f));

        XunFeiVAInterface.ISR_CreateSession();
        yield return(new WaitForSeconds(1f));

        _button.gameObject.SetActive(true);
                #endif
    }