jeff1evesque / LeQue

Activate installed microphone, and analyze sound input
13 stars 2 forks source link

Bash: Optimize 'pocketsphinx_continuous' Conversion #350

Open jeff1evesque opened 10 years ago

jeff1evesque commented 10 years ago

Since, we will have audio recordings segmented, and saved onto the server, we will spawn a new thread (or process) for each segment in order to perform pocketsphinx_continuous on the wav file. This will require us to modify the existing converter_wav_text script:

...
# apply CMUSphinx on audio wav file
inotifywait ../audio/recording_converted -m -e close_write |

  while read path action file; do

    # do something with the file
      filename="${file%%.*}"
      pocketsphinx_continuous -infile ../audio/recording_converted/"$file" -hmm en-us -lm cmusphinx-5.0-en-us.lm.dmp >| ../audio/recording_text/"$filename"

  done