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(); }
private void Start() { ap = new AipNLP(); }