Somewhat fancy voice command recognition software
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

language_updater.sh 655B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. blatherdir=~/.config/blather
  3. sourcefile=$blatherdir/sentences.corpus
  4. langdir=$blatherdir/language
  5. tempfile=$blatherdir/url.txt
  6. lmtoolurl=http://www.speech.cs.cmu.edu/cgi-bin/tools/lmtool/run
  7. cd $blatherdir
  8. # upload corpus file, find the resulting dictionary file url
  9. curl -L -F corpus=@"$sourcefile" -F formtype=simple $lmtoolurl \
  10. |grep -A 1 "base name" |grep http \
  11. | sed -e 's/^.*\="//' | sed -e 's/\.tgz.*$//' | sed -e 's/TAR//' > $tempfile
  12. # download the .dic and .lm files
  13. curl -C - -O $(cat $tempfile).dic
  14. curl -C - -O $(cat $tempfile).lm
  15. # mv em to the right name/place
  16. mv *.dic $langdir/dic
  17. mv *.lm $langdir/lm
  18. rm $tempfile