请问unity3d可以使用rest_api吗?
chapmanchen 发布于2015-10 浏览:1644 回复:2
0
收藏

我现在已经录了音,保存为wav文件放在本地,请问在隐式发送和显式发送分别要怎么写C#的代码呢?


收藏
点赞
0
个赞
共2条回复 最后由用户已被禁言回复于2022-04
#3Canvas_x回复于2016-03

有参考吗。一直提示 参数不对。

Dictionary data = new Dictionary();


        data.Add("format", speechData.format);

        data.Add("rate", speechData.rate);

        data.Add("channel", speechData.channel);

        data.Add("cuid", speechData.cuid);

        data.Add("token", speechData.token);

        data.Add("speech", speechData.speech);


        string jsonDataPost = Json.Serialize(data);


        Dictionary headers = new Dictionary();


        headers.Add("Content-Type", "application/json");


        byte[] body = System.Text.Encoding.UTF8.GetBytes(jsonDataPost);



        WWW www = new WWW(speechUrl, body, headers);


        yield return www;


        Debug.Log(www.text);


0
#2水寒319回复于2016-01

unity3d 是可以使用REST API的

0
TOP
切换版块