commit 89fc86b43aef7a9f960fe976a8a57b6d9642cefc
parent 5a09f29e0514742f272716f6487577697cea5e13
Author: umhau <umhau@alum.gcc.edu>
Date: Fri, 9 Jun 2017 14:05:22 -0400
Added ability to specify source of base acoustic model.
Diffstat:
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/vmc.sh b/vmc.sh
@@ -20,7 +20,9 @@
# vm-training-file (sentences the user should record for training purposes)
# output-folder (this is a complete file path)
# [reps] (how many times to get a recording of each sentence)
-#
+# acoustic-model Location of acoustic model to start with. (this is a
+# complete file path, not including 'en-us'.) Optional.
+#
# DEPENDENCIES
#
# CMU Sphinx, Python 3 (& 2.7), Perl, and other misc. packages.
@@ -102,6 +104,8 @@ if [[ $2 = '-record' ]]; then
python3 $fdir/getaudio.py $vm_training_file $audio_folder $iterations $model_name
+ echo "Recorded audio files saved into $audio_folder. They can be reused."
+
elif [[ $2 = '-import' ]]; then
mkdir -p $audio_folder
@@ -111,7 +115,14 @@ elif [[ $2 = '-import' ]]; then
fi
# copy default acoustic model
-cp -r $tdir/en-us $output_folder
+if [ -n "$6" ]; then
+ echo "Pulling base acoustic model from $6"
+ read -p "Press enter to continue, or CTRL-C to exit"
+ cp -r $installation_directory/en-us $output_folder
+else
+ echo "Using default base acoustic model."
+ cp -r $tdir/en-us $output_folder
+fi
# PRODUCE DERIVATIVE FILES ------------------------------------------------------------------------