Processing Harvard sentences with metavoice
Steps for a draft paper
curl https://www.cs.columbia.edu/~hgs/audio/harvard.html|grep '^<li>'|awk -F'[<>]' '{print $3}' > harvard.txt
> >> with open("als3_mult.txt", "w") as outf:... for id in range(2, 11): ... for line in harvard:
... wav_file = tts.synthesise(text=line, spk_ref_path="als3.mp3")
... outf.write(f"{id}\t{wav_file}\n")
from fam.llm.fast_inference import TTS
tts = TTS()
with open("harvard.txt") as harv:
for line in harv.readlines():
harvard.append(line.strip())
with open("park6_mult.txt", "w") as outf:
for id in range(1, 11):
for line in harvard:
wav_file = tts.synthesise(text=line, spk_ref_path="park6.mp3")
outf.write(f"{id}\t{wav_file}\n")
with open("aut1_mult.txt", "w") as outf:
for id in range(1, 11):
for line in harvard:
wav_file = tts.synthesise(text=line, spk_ref_path="aut1.mp3")
outf.write(f"{id}\t{wav_file}\n")
with open("park6_mult.txt", "w") as outf:
for id in range(1, 11):
for line in harvard:
wav_file = tts.synthesise(text=line, spk_ref_path="park6.mp3")
outf.write(f"{id}\t{wav_file}\n")
#!/bin/bash
cat "$1" |while read i
do
id=$(echo "$i"|awk -F'\t' '{print $1}')
dirname=$(printf "batch_%02d" $id)
file=$(echo "$i"|awk -F'\t' '{print $NF}')
echo "$id : $dirname : $file"
if [ ! -d "$2"/"$dirname" ];
then
echo "$2"/"$dirname"
mkdir -p "$2"/"$dirname"
fi
cp "$file" "$2"/"$dirname"/
done