Advertisement
Guest User

Untitled

a guest
Mar 1st, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.60 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. FFMPEG=/Applications/ffmpeg
  4. TMPFILE="temporaryfile.wav"
  5. 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"
  6.  
  7.  
  8. for f in *.mp3
  9. do
  10.    $FFMPEG -i "${f}" -acodec pcm_s16le -ar 16000 "${TMPFILE}"
  11.    $TRANSCRIBE "${TMPFILE}" "${f%.mp3}.txt"
  12.    rm -f "${TMPFILE}"
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement