Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AIきりたんラッパー (Mac版)
set -e
set -u
neutrinoDir=${1}
shift
set -- -b "${1}" -s "${2}" -n "${3}" -m "${4}" -p "${5}" -f "${6}"
while getopts b:f:m:n:p:s: arg
do
case ${arg} in
b)
basename=${OPTARG}
;;
f)
formantShift=${OPTARG}
;;
m)
modelDir=${OPTARG}
;;
n)
numThreads=${OPTARG}
;;
p)
pitchShift=${OPTARG}
;;
s)
suffix=${OPTARG}
;;
esac
done
basename=${basename:-sample1}
numThreads=${numThreads:-0}
suffix=${suffix:-musicxml}
modelDir=${modelDir:-KIRITAN}
pitchShift=${pitchShift:-1.0}
formantShift=${formantShift:-1.0}
cd "${neutrinoDir}"
bin/musicXMLtoLabel score/musicxml/"${basename}"."${suffix}" \
score/label/full/"${basename}".lab \
score/label/mono/"${basename}".lab
bin/NEUTRINO score/label/full/"${basename}".lab \
score/label/timing/"${basename}".lab \
output/"${basename}".f0 \
output/"${basename}".mgc \
output/"${basename}".bap \
model/"${modelDir}"/ \
-n ${numThreads} -t
bin/WORLD output/"${basename}".f0 \
output/"${basename}".mgc \
output/"${basename}".bap \
-f ${pitchShift} \
-m ${formantShift} \
-o output/"${basename}"_syn.wav \
-n ${numThreads} -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment