jcchurch / HuntTheYetiAlexa

Play the game Hunt the Yeti on the Amazon Echo
17 stars 2 forks source link

How to convert your audio files. #3

Closed tron1991 closed 7 years ago

tron1991 commented 7 years ago

Hey jcchurch, I was wondering how you managed to convert your audio files into correct music mp3 files. When I test my alexa skill, I can't seem to play my audio clip file(1min in duration). I followed the instructions on here, but I couldn't get it working https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference#audio

How did you convert the audio tracks.

jcchurch commented 7 years ago

Hi. I used the tool avconv for converting my audio files.

Here's the command that I used to convert all of the files in a single directory (assuming that all files are audio).

for i in *; do avconv -i $i -codec:a libmp3lame -b 48k -ar 16000 $i; done

Here's a similar example for a single file.

avconv -i victory.mp3 -codec:a libmp3lame -b 48k -ar 16000 victory.2.mp3

Hope this helps.