What is the right command to convert an mp3 file to the required codec version (MPEG version 2) and bit rate (48 kbps) for Amazon Alexa SSML?

前端 未结 2 535
野的像风
野的像风 2021-02-05 09:43

I am trying to convert an mp3 file to the format expected by the audio tag in the Amazon Alexa SSML markup language as described here: https://developer.amazon.com/public/soluti

2条回答
  •  [愿得一人]
    2021-02-05 10:15

    Here's what I had to do to get it working:

    ffmpeg -i input.mp3 -b:a 48k -ar 16000 output.mp3
    

    Here's the output when I play it with mpg123:

    $ mpg123 output.mp3 
    High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
            version 1.22.4; written and copyright by Michael Hipp and others
            free software (LGPL) without any warranty but with best wishes
    
    Playing MPEG stream 1 of 1: output.mp3 ...
    
    MPEG 2.0 layer III, VBR, 16000 Hz joint-stereo
    
    [0:02] Decoding of output.mp3 finished.
    

提交回复
热议问题