Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- FFMPEG=/Applications/ffmpeg
- TMPFILE="temporaryfile.wav"
- TRANSCRIBE="java -cp /Users/johnny/Downloads/sphinx4-5prealpha-src/sphinx4-core/build/libs/sphinx4-core-5prealpha-SNAPSHOT.jar:/Users/johnny/Downloads/sphinx4-5prealpha-src/sphinx4-data/build/libs/sphinx4-data-5prealpha-SNAPSHOT.jar:/Users/johnny/Downloads/commons-math3-3.6.1-src/src/main/java/:/Users/johnny/Documents/programming/sphinx_speech_recog -Xmx3G TranscribeFile"
- for f in *.mp3
- do
- $FFMPEG -i "${f}" -acodec pcm_s16le -ar 16000 "${TMPFILE}"
- $TRANSCRIBE "${TMPFILE}" "${f%.mp3}.txt"
- rm -f "${TMPFILE}"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement