Advertisement
CookiePPP

Untitled

Dec 27th, 2019
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | None | 0 0
  1. # Trim the data and Convert Sampling rate to 22050Hz
  2. %%shell
  3. apt -qq install -y sox
  4. cd /content/tacotron2/wavs
  5. mkdir out
  6. mkdir out_
  7. for f in *.wav; do
  8.     # do some stuff here with "$f"
  9.     # remember to quote it or spaces may misbehave
  10.     #echo "$f"
  11.     g="out_/${f}"
  12.     sox "$f" "$g" silence 1 0.05 0.1% reverse silence 1 0.05 0.1% reverse
  13.     h="out/${f}"
  14.     sox "$g" -r 22050 -c 1 -b 16 "$h" > /dev/null
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement