我正在尝试将.m4a文件上传到Google语音转文本,但无法正常工作。我收到此错误:
Error: 3 INVALID_ARGUMENT: Invalid recognition 'config': bad encoding..
我正在使用这种类型的未指定编码(因为我不知道...)。 (来自Node.js。)
encoding = "ENCODING_UNSPECIFIED";
我正在查看文档,但找不到解决方法。 (https://cloud.google.com/speech-to-text/docs/reference/rest/v1/RecognitionConfig#AudioEncoding)。
编辑:这是DLL的文档。我认为这比Node.js中使用的要先进得多。这不是我用于其他文件类型(例如.mp3)的内容。
枚举RecognitionConfig.Types.AudioEncoding | Google.Cloud.Speech.V1 https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Speech.V1/api/Google.Cloud.Speech.V1.RecognitionConfig.Types.AudioEncoding.html