0

Hye I am new to AWS. My application is to record audio and convert speech to text using AWS transcribe.

So I am recording audio from a web browser and I saved it to AWS S3. Later when I tried to use AWS transcribe on that audio file I am getting an error Unsupported audio format: matroska,webm . So anyone please help me to solve this issue. I am using Javascript. My code is


let blob = new Blob(chunks, {type: "audio/mp3" })
var s3 = new AWS.S3();

var params = {Bucket: 'xxx', Key: 'audio', Body: blob};
s3.upload(params, function(err, data) {
  console.log(err, data);
});

In the S3 bucket it is showing as mp3 only but when I am trying to transcribe I am getting error Unsupported audio format: matroska,webm. So kindly help me to solve this issue

Joao Jorge
  • 103
  • 1
  • 2
  • 16
  • Hi! Could you download the file and check the actual format using a music player? What is the file extension? – Jonny5 Dec 28 '19 at 18:13
  • Hye Jonny thanks for your reply. I downloaded the audio and properties are still showing mp3 only – kakara vinay Dec 30 '19 at 01:21
  • @karakara vinay can you try using the command line approach? that should help you quickly identify what is wrong. [This example](https://docs.aws.amazon.com/transcribe/latest/dg/getting-started-cli.html) should be very easy to follow. – Jonny5 Dec 31 '19 at 13:13

1 Answers1

-1

As the error says you are using a wrong input audio format type. AWS Transcribe supports the input types as mentioned in the official AWS Transcribe FAQ.

Amazon Transcribe supports both 16 kHz and 8kHz audio streams, and multiple audio encodings, including WAV, MP3, MP4 and FLAC.

You need to convert your audio file to one of the supported audio format before sending it to transcribe. You can try to do this using online tools or some SDK.

Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136
  • Thanks for your reply. I checked the format of the file in s3. It is showing as mp3 only. My transcript job is working fine When I converted the mp3 file into flac using some online tools(manually). Is there any problem with mp3 format? Can you tell me some AWS sdk which will automatically convert mp3 to flac – kakara vinay Dec 30 '19 at 01:28