yoruno-vn / script /transcode.sh
nenekochan's picture
pipeline for ja scripts and voice parallel corpus
1bb0419
raw
history blame contribute delete
321 Bytes
#!/usr/bin/env bash
BASE=$1
if [[ $BASE == *ja* ]]; then
ENCODING=shift-jis
if [[ $BASE == *2022-mainichi* ]]; then
ENCODING=unicode
fi
else
ENCODING=unicode
if [[ $BASE == *2016a-yubikiri-old* ]]; then
ENCODING=gbk
fi
fi
for f in $BASE/*.ks; do
iconv -f $ENCODING -t utf-8 < $f > $f.tmp
mv $f.tmp $f
done