Search code examples
google-cloud-platformspeech-to-text

How to enable MP3 encoding feature for Speech-to-text API


For the Google Cloud Speech-to-text api, the encoding of MP3 is supported but it is under a beta. As stated here:

https://cloud.google.com/speech-to-text/docs/encoding

When I try to send a request with the encoding set to MP3, I get an error response of Invalid value at 'config.encoding' (TYPE_ENUM), "MP3".

Do I have to enable this beta feature somewhere? And if so, where can I do this?


Solution

  • You might be using the v1 and not the v1p1beta1, the MP3 encoding is there in v1p1beta1. Reference

    v1

    v1p1beta1