• 大小: 94KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-08
  • 语言: 其他
  • 标签: 语音识别  

资源简介

Unity语音识别功能开发用得到,文件包含demo,一看就懂,觉得是个好东西,收藏一下有时间学习蛤,感兴趣的可以下载看看

资源截图

代码片段和文件信息

using System.Collections;
using UnityEngine;

namespace Assets.ChatRobot
{
    public delegate void WebChatResponse(string res);

    public abstract class WebChatBot : MonoBehaviour
    {
        public abstract string Url { get; }
        public abstract string Key { get; }

        public void Require(string req)
        {
            StartCoroutine(_Require(req));
        }

        public WebChatResponse OnGetResponse;

        private IEnumerator _Require(string req)
        {
            var www = ProcessWWW(req);
            yield return www;
            if (www.error != null)
            {
                Debug.Log(www.error);
                yield break;
            }
            var text = www.text;
            Debug.Log(text);
            if (OnGetResponse != null)
                OnGetResponse.Invoke(text);
        }

        protected abstract WWW ProcessWWW(string req);
    }

    public interface IWebChatBotResponsebase
    {
        string Text { get; }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-06-30 04:16  UnitySapi-master\
     文件         378  2017-06-30 04:16  UnitySapi-master\.gitattributes
     文件         817  2017-06-30 04:16  UnitySapi-master\.gitignore
     文件        1059  2017-06-30 04:16  UnitySapi-master\License.txt
     文件         752  2017-06-30 04:16  UnitySapi-master\README.md
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\
     文件         191  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot.meta
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\
     文件         191  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing.meta
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\
     文件       17556  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\TuLing.unity
     文件         174  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\TuLing.unity.meta
     文件        1516  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\TuLingChatRobot.cs
     文件         262  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\TuLingChatRobot.cs.meta
     文件         342  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\TuLingChatRobotManager.cs
     文件         262  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\ChatRobot\TuLing\TuLingChatRobotManager.cs.meta
     文件         191  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Core.meta
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Core\
     文件        1488  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Core\ByteInArg.cs
     文件         262  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Core\ByteInArg.cs.meta
     文件        6142  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Core\SocketExtra.cs
     文件         262  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Core\SocketExtra.cs.meta
     文件         191  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Sapi.meta
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Sapi\
     文件        3370  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Sapi\Speecher.cs
     文件         262  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Sapi\Speecher.cs.meta
     文件        1119  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Sapi\SpeecherManager.cs
     文件         262  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Sapi\SpeecherManager.cs.meta
     文件         191  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Scene.meta
     目录           0  2017-06-30 04:16  UnitySapi-master\SApiClient\Assets\Scene\
............此处省略58个文件信息

评论

共有 条评论