Ejemplo n.º 1
0
    void Start()
    {
#if !UNITY_WEBGL
        //获取麦克风设备,判断是否有麦克风设备
        if (Microphone.devices.Length > 0)
        {
            isHaveMic         = true;
            currentDeviceName = Microphone.devices[0];
        }
#endif

        //获取相关组件
        textBtn        = this.transform.GetChild(0).GetComponent <Text>();
        audioSource    = this.GetComponent <AudioSource>();
        textResult     = GameObject.Find("SpeakContent").GetComponent <Text>();
        analysisResult = GameObject.Find("AnalysisResults").GetComponent <Text>();

        ap = new AipNLP();
    }
Ejemplo n.º 2
0
 private void Start()
 {
     ap = new AipNLP();
 }