我现在已经录了音,保存为wav文件放在本地,请问在隐式发送和显式发送分别要怎么写C#的代码呢?
有参考吗。一直提示 参数不对。
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);
unity3d 是可以使用REST API的
有参考吗。一直提示 参数不对。
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);
unity3d 是可以使用REST API的