whiit 452 B

123456789101112131415
  1. #!/bin/bash
  2. # whiit, just flites/mpvs out ('s last line).
  3. # about: whiit's basically a "pardon me, i missed that, please would you say it again <slower>?"
  4. #usage: whiit <chan dir here>
  5. echo "usage: whiit <chan>"
  6. last_line=$(tail -n1 "$1/out" | cut -d ' ' -f 2-)
  7. if [[ -n "$last_line" ]]; then
  8. echo "$last_line" | flite -o /tmp/whiit_audio.wav
  9. mpv --no-terminal --speed=1 --no-cache /tmp/whiit_audio.wav
  10. else
  11. echo "No lines to replay."
  12. fi