sreepurna
sreepurna

Reputation: 1662

MIME type of mp3 file using Speech to Text

I am using speech to text API of Watson. Initially I used a .wav file but I want to use a mp3 file. So I want know the MIME type of mp3 file for specifying the content type?

Upvotes: 1

Views: 1648

Answers (1)

Sayuri Mizuguchi
Sayuri Mizuguchi

Reputation: 5330

You can see within official documentation the Audio formats support is:

  • Audio formats: Transcribes Free Lossless Audio Codec (FLAC), Linear 16-bit Pulse-Code Modulation (PCM), Waveform Audio File Format (WAV), Ogg format with the Opus or Vorbis codec, Web Media (WebM) format with the Opus or Vorbis codec, mu-law (or u-law) audio data, or basic audio.

Check: MIME Types for Speech to Text.

One good idea to use your mp3 audio is to convert before sending for the API.

And, depends on what you want, you can use this article. In this article, Jason shows how to use mp3 with Asterisk to send the voice audio for Speech to Text. I'm not sure if works yet.

EDIT: [10/2017]

A few days ago, Watson Speech to Text release one new version that supports mp3 input features.

Check the audio formats supported now:

Audio formats: Transcribe Free Lossless Audio Codec (FLAC), MP3 (Motion Picture Experts Group, or MPEG) format, Linear 16-bit Pulse-Code Modulation (PCM), Waveform Audio File Format (WAV), Ogg format with the Opus or Vorbis codec, Web Media (WebM) format with the Opus or Vorbis codec, mu-law (or u-law) audio data, and basic audio.

Upvotes: 2

Related Questions