Skip to content

Instantly share code, notes, and snippets.

@mattintosh4
Created March 8, 2020 12:28
Show Gist options
  • Save mattintosh4/2bb47e18e61fca604bb11ed421bd82d2 to your computer and use it in GitHub Desktop.
Save mattintosh4/2bb47e18e61fca604bb11ed421bd82d2 to your computer and use it in GitHub Desktop.
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