Hi, I am trying to test the Media Translation API to translate a file called audio.wav with the code provided at https://github.com/googleapis/python-media-translation/blob/main/samples/snippets/translate_from_fil... but when I run it I get this result:
Can anyone tell me what can be the problem?
I have previously used the audio.raw file and it worked fine, the problem is when I try to use the audio.wav file.
Hi @MiguelCh,
Welcome Back to Google Cloud Community.
Based on your investigation here are some possible answers for your come across errors:
Here are some references that might help you.
https://cloud.google.com/translate/media/docs/basics
https://cloud.google.com/translate/media/docs
Hello, thank you for replying.
- The audio file I am trying to translate has a duration of 3:35 minutes and a weight of 1.6MB.
- Yes I have the access rights and I am authenticated to use the MediaTranslation API.
- I have used the FFmpeg tool to convert the audio.mp3 file to 16-bit signed PCM with the following command: ffmpeg -i audio.mp3 -c:a pcm_s16le audio.wav.
I have also verified that my file contains valid audio with ffprobe and I understand that it does:
The code I am using looks like this:
And when executed this is what is displayed:
Thank you very much for any help you can give me.