jjzjj

c# - 如何在 C# 中使用谷歌语音识别 API?

我想从C#获取音频文件并发送到谷歌语音识别API以获得“语音到文本”的答案。我的代码是这样的:try{byte[]BA_AudioFile=GetFile(filename);HttpWebRequest_HWR_SpeechToText=null;_HWR_SpeechToText=(HttpWebRequest)HttpWebRequest.Create("https://www.google.com/speech-api/v2/recognize?output=json&lang="+DEFAULT_LANGUAGE+"&key="+key);_HWR_SpeechToText.