make_pm_wave 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. #####################################################-*-mode:shell-script-*-
  3. ### ##
  4. ### Alan W Black and Kevin Lenzo ##
  5. ### Copyright (c) 1998 ##
  6. ### All Rights Reserved. ##
  7. ### ##
  8. ### Permission to use, copy, modify, and licence this software and its ##
  9. ### documentation for any purpose, is hereby granted without fee, ##
  10. ### subject to the following conditions: ##
  11. ### 1. The code must retain the above copyright notice, this list of ##
  12. ### conditions and the following disclaimer. ##
  13. ### 2. Any modifications must be clearly marked as such. ##
  14. ### 3. Original authors' names are not deleted. ##
  15. ### ##
  16. ### THE AUTHORS OF THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO ##
  17. ### THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ##
  18. ### AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY ##
  19. ### SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ##
  20. ### WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ##
  21. ### AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ##
  22. ### ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ##
  23. ### THIS SOFTWARE. ##
  24. ### ##
  25. ### This file is part "Building Voices in the Festival Speech ##
  26. ### Synthesis System" by Alan W Black and Kevin Lenzo written at ##
  27. ### Robotics Institute, Carnegie Mellon University, fall 98 ##
  28. ############################################################################
  29. ### ##
  30. ### Generate (filled) pitchmark file from waveform files ##
  31. ### ##
  32. ############################################################################
  33. if [ ! "$ESTDIR" ]
  34. then
  35. echo "environment variable ESTDIR is unset"
  36. echo "set it to your local speech tools directory e.g."
  37. echo ' bash$ export ESTDIR=/home/awb/projects/speech_tools/'
  38. echo or
  39. echo ' csh% setenv ESTDIR /home/awb/projects/speech_tools/'
  40. exit 1
  41. fi
  42. for i in $*
  43. do
  44. fname=`basename $i .wav`
  45. echo $i
  46. $ESTDIR/bin/ch_wave -scaleN 0.9 $i -F 16000 -o tmp$$.wav
  47. $ESTDIR/bin/pitchmark tmp$$.wav -o pm/$fname.pm -otype est -min 0.005 -max 0.012 -fill -def 0.01 -wave_end -lx_lf 150 -lx_lo 91 -lx_hf 80 -lx_ho 51 -med_o 0
  48. rm -f tmp$$.wav
  49. done