commit fe767fc1f2d887aedddc456c6bb333def66f0010
parent b9b56a7e62577a35867a19e6b850595806499f77
Author: umhau <umhau@alum.gcc.edu>
Date: Wed, 5 Jul 2017 23:02:34 -0400
found bug
Diffstat:
3 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
@@ -45,20 +45,22 @@ Usage Examples
-------------------------------------------------------------------------------
Add to a preexisting set of recordings, and adapt an existing acoustic model.
+Use model name 'model-name' and require 5 recordings of every item in the
+dictation file.
- vmc en-us \
+ vmc model-name \
-adapt /extant/model/location \
-addrecordings /audio/files/location /dictation/file/location.txt 5
Create a new model, and create a new set of audio recordings.
- vmc en-us \
+ vmc model-name \
-create /place/to/put/model \
-newrecordings /place/to/put/audio/files /dictation/file/location.txt 5
Import a previously created set of recordings, and adapt a preexisting model.
- vmc en-us \
+ vmc model-name \
-adapt /extant/model/location \
-importrecordings /audio/files/location
diff --git a/lib/create_test_model.sh b/lib/create_test_model.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+script=$(readlink -f "$0")
+scriptpath=$(dirname "$script")
+
+model_location="/tmp/test_model"
+audio_recordings_location="/tmp/test_audio_recordings"
+dict_file="/tmp/test_dict_file.txt"
+
+printf "hello\nworld\ntest phrases\nlast one now\n" > "$dict_file"
+
+
+vmc model_name \
+-create $model_location \
+-newrecordings $audio_recordings_location $dict_file 1
+
diff --git a/vmc b/vmc
@@ -89,7 +89,7 @@ if [ $2 == '-create' ] && [ ! -d "$model_location" ]; then
echo "$model_location"; read
mkdir $model_location; cp -r /opt/vmc/lib/en-us/* "$model_location/";
elif [ $2 == '-create' ] && [ -d "$model_location" ]; then
- echo -n "Model already exists at this directory! Press [enter] to overwrite."; read
+ echo -n "MODEL already exists at this directory! Press [enter] to overwrite."; read
sudo rm -r $model_location
mkdir $model_location; cp -r /opt/vmc/lib/en-us/* "$model_location/";
fi
@@ -105,7 +105,7 @@ else
fi
if [ $4 = '-newrecordings' ] && [ -d "$audio_folder" ]; then
- echo -n "Audio already exists at this directory! Press [enter] to overwrite."; read
+ echo -n "AUDIO already exists at this directory! Press [enter] to overwrite."; read
sudo rm -r $audio_folder; mkdir $audio_folder
fi