Я работаю над API Google Cloud Speech для преобразования аудио в текст. Несколько месяцев назад он работал нормально, но теперь у меня возникают проблемы с этим API.
public SyncRecognizeResponse getResponse(CloudSpeechAPIService sService, RecognitionConfig sConfig, string fileName)
{
//read the audio file into a base 64 string and add to API object
RecognitionAudio sAudio = new RecognitionAudio();
byte[] audioBytes = getAudioStreamBytes(fileName);
sAudio.Content = Convert.ToBase64String(audioBytes);
//create the request with the config and audio files
SyncRecognizeRequest sRequest = new SyncRecognizeRequest();
sRequest.Config = sConfig;
sRequest.Audio = sAudio;
//execute the request
SyncRecognizeResponse response = sService.Speech.Syncrecognize(sRequest).Execute();
return response;
}
Ошибка:
An Error occurred, but the error response could not be deserialized at Google.Apis.Requests.ClientServiceRequest`1.Execute()
at speectText.Form1.getResponse(CloudSpeechAPIService sService, RecognitionConfig sConfig, String fileName).
Пожалуйста, помогите мне решить эту проблему.
Спасибо, сатиш