bash : check Audio file duration

$ ffmpeg -i TTS-TNM@2-PG4-all.aiff 2>&1 | grep Duration   Duration: 00:02:11.09, start: 0.000000, bitrate: 352 kb/s   $ afinfo TTS-TNM@2-PG4-all.aiff | awk ‘/estimated duration/ { print $3 }’ 131.089070   $ afinfo TTS-TNM@2-PG4-all.aiff | awk ‘/estimated duration/ { print $3 }’ | paste -sd+ – | bc | awk ‘{printf(“%d:%02d:%02d:%02d\n”,($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}’ 0:00:02:11  

Read More

bash : ttsTXT.sh

#!/bin/sh usage () { echo " Usage: $0 --name \"TTS-TNM@1\" --voice-kr Yuna --voice-en Susan -rate 155 " >&2; exit 1 } while [ $# -gt 0 ]; do case "$1" in --name) NAME="$2"; shift;; --voice-kr) VOICEkr="$2"; shift;; --voice-en) VOICEen="$2"; shift;; --rate) RATE="$2"; shift;; --) shift; break;; -*) usage ;; *) break ;; esac; shift done […]

Read More

bash : ttsScript.sh

#!/bin/sh usage () { echo " Usage: $0 --name \"TTS-TNM@1-PG\" --page 1-2 " >&2; exit 1 } while [ $# -gt 0 ]; do case "$1" in --name) NAME="$2"; shift;; --page) PAGE="$2"; shift;; --) shift; break;; -*) usage ;; *) break ;; esac; shift done [ "$NAME" = "" -o "$PAGE" = "" ] && […]

Read More

CentOS 7 : tts festival

# yum install festival festvox* # festival festival> (voice.list) (nitech_us_slt_arctic_hts  nitech_us_rms_arctic_hts  nitech_us_clb_arctic_hts  nitech_us_awb_arctic_hts  nitech_us_bdl_arctic_hts  nitech_us_jmk_arctic_hts  ked_diphone    kal_diphone)   festival> (set! voice_default ‘nitech_us_jmk_arctic_hts) festival> (SayText “Hello, world!”) festival> (quit) # text2wave test.txt -o test.aiff -otype aiff   # echo “How are you?” | festival –tts  

Read More