using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using iFlytekSpeechRecognizer;
using System;
using UnityEngine.UI;
public class SpeechRecognizer : MonoBehaviour
{
public AudioSource _audio;
public Text text;
private int frequency = 16000;//采样率
private const string app_id = "appid = 5940ac5d";
private const string session_begin_params = "sub = iat, domain = iat, language = zh_cn, accent = mandarin, sample_rate = 16000, result_type = plain, result_encoding = utf-8";
// Start is called before the first frame update
void Start()
{
iFlytek.InitiFlytek(app_id, session_begin_params);
iFlytek.RecognizerResult += Result
unity链接科大讯飞语音识别(windows)
最新推荐文章于 2024-06-21 18:49:41 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)