I am trying to make an Alexa skill, and I am using audio mp3 files stored is S3, lambda function has access to my DynamoDb and ultimately S3. But I have an issue with my audio files. I keep on getting "The audio is not of a supported MPEG version" when I test alexa skill. I tried multiple ffmpeg -i
file conversions.
When I type ffprobe -v quiet -print_format json -show_format -show_streams "Piano.mf.A1.audio10.mp3"
this is what i have for my file down below:
Input #0, mp3, from 'Piano.mf.A1.audio10.mp3':
Metadata:
encoder : Lavf61.9.107
Duration: 00:00:07.00, start: 0.025057, bitrate: 129 kb/s
Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc61.33
PS C:\Users\boban\OneDrive\Desktop\newBob2> ffprobe -v quiet -print_format json -show_format -show_streams "Piano.mf.A1.audio10.mp3"
{
"streams": [
{
"index": 0,
"codec_name": "mp3",
"codec_long_name": "MP3 (MPEG audio layer 3)",
"codec_type": "audio",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "fltp",
"sample_rate": "44100",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"initial_padding": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/14112000",
"start_pts": 353600,
"start_time": "0.025057",
"duration_ts": 98795520,
"duration": "7.000816",
"bit_rate": "128000",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0,
"non_diegetic": 0,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0,
"multilayer": 0
},
"tags": {
"encoder": "Lavc61.33"
}
}
],
"format": {
"filename": "Piano.mf.A1.audio10.mp3",
"nb_streams": 1,
"nb_programs": 0,
"nb_stream_groups": 0,
"format_name": "mp3",
"format_long_name": "MP2/3 (MPEG audio layer 2/3)",
"start_time": "0.025057",
"duration": "7.000816",
"size": "112892",
"bit_rate": "129004",
"probe_score": 51,
"tags": {
"encoder": "Lavf61.9.107"
}
}
}
It should be everything that is required, am I doing something wrong, this is the only thing stopping me from finishing the skill. Asking ChatGPT said it could be because of the mp3float, and after many conversions it still doesn't work.
I am trying to make an Alexa skill, and I am using audio mp3 files stored is S3, lambda function has access to my DynamoDb and ultimately S3. But I have an issue with my audio files. I keep on getting "The audio is not of a supported MPEG version" when I test alexa skill. I tried multiple ffmpeg -i
file conversions.
When I type ffprobe -v quiet -print_format json -show_format -show_streams "Piano.mf.A1.audio10.mp3"
this is what i have for my file down below:
Input #0, mp3, from 'Piano.mf.A1.audio10.mp3':
Metadata:
encoder : Lavf61.9.107
Duration: 00:00:07.00, start: 0.025057, bitrate: 129 kb/s
Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc61.33
PS C:\Users\boban\OneDrive\Desktop\newBob2> ffprobe -v quiet -print_format json -show_format -show_streams "Piano.mf.A1.audio10.mp3"
{
"streams": [
{
"index": 0,
"codec_name": "mp3",
"codec_long_name": "MP3 (MPEG audio layer 3)",
"codec_type": "audio",
"codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000",
"sample_fmt": "fltp",
"sample_rate": "44100",
"channels": 2,
"channel_layout": "stereo",
"bits_per_sample": 0,
"initial_padding": 0,
"r_frame_rate": "0/0",
"avg_frame_rate": "0/0",
"time_base": "1/14112000",
"start_pts": 353600,
"start_time": "0.025057",
"duration_ts": 98795520,
"duration": "7.000816",
"bit_rate": "128000",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0,
"non_diegetic": 0,
"captions": 0,
"descriptions": 0,
"metadata": 0,
"dependent": 0,
"still_image": 0,
"multilayer": 0
},
"tags": {
"encoder": "Lavc61.33"
}
}
],
"format": {
"filename": "Piano.mf.A1.audio10.mp3",
"nb_streams": 1,
"nb_programs": 0,
"nb_stream_groups": 0,
"format_name": "mp3",
"format_long_name": "MP2/3 (MPEG audio layer 2/3)",
"start_time": "0.025057",
"duration": "7.000816",
"size": "112892",
"bit_rate": "129004",
"probe_score": 51,
"tags": {
"encoder": "Lavf61.9.107"
}
}
}
It should be everything that is required, am I doing something wrong, this is the only thing stopping me from finishing the skill. Asking ChatGPT said it could be because of the mp3float, and after many conversions it still doesn't work.
Share Improve this question asked Mar 19 at 21:33 Boban BoBo BanjevicBoban BoBo Banjevic 939 bronze badges 2- 1 stackoverflow/a/53489893/32453 help perhaps? – rogerdpack Commented Mar 19 at 23:56
- 1 Mate it worked, I love you, I spent 6 hours on this. – Boban BoBo Banjevic Commented Mar 20 at 0:42
1 Answer
Reset to default 2Using the code below in cmd worked, of course you have to install ffmpeg, Thank you @rogerdpack for posting the link of the other stack, where I found solution link of the alexa docs https://developer.amazon/de-DE/docs/alexa/custom-skills/speech-synthesis-markup-language-ssml-reference.html#h3_converting_mp3
ffmpeg -i <input-file> -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 <output-file>