From bb6b54a03d442833dcc34fda6c09d585a112bbcf Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 6 Mar 2023 21:02:24 +0200 Subject: [PATCH] bench-wts.sh : rename script + add execute permission --- extra/{qual-bench.sh => bench-wts.sh} | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) rename extra/{qual-bench.sh => bench-wts.sh} (90%) mode change 100644 => 100755 diff --git a/extra/qual-bench.sh b/extra/bench-wts.sh old mode 100644 new mode 100755 similarity index 90% rename from extra/qual-bench.sh rename to extra/bench-wts.sh index afb4ea5..223d71b --- a/extra/qual-bench.sh +++ b/extra/bench-wts.sh @@ -1,6 +1,8 @@ +# Benchmark word-level timestamps for different models +# # This script takes two arguments # - an audio file -# - [optional] path to a font file +# - [optional] path to a font file # I'm using "/usr/share/fonts/truetype/freefont/FreeMono.ttf" on Ubuntu @@ -10,8 +12,9 @@ if [ -z "$1" ]; then fi #TODO: Make this a command line parameter -models="base small large" +#models="base small large" #models="tiny.en tiny base.en base small.en small medium.en medium large-v1 large" +models="tiny.en base.en small.en medium.en large" DURATION=$(ffprobe -i $1 -show_entries format=duration -v quiet -of csv="p=0") DURATION=$(printf "%.2f" $DURATION) @@ -19,7 +22,7 @@ echo "Input file duration: ${DURATION}s" for model in $models; do echo "Running $model" - COMMAND="./main -m models/ggml-$model.bin -owts -f $1 -of $1.$model" + COMMAND="./main -m models/ggml-$model.bin -owts -f $1 -of $1.$model" if [ ! -z "$2" ]; then COMMAND="$COMMAND -fp $2" @@ -40,7 +43,7 @@ for model in $models; do # If the file already exists, delete it if [ -f $1.mp4 ]; then - rm $1.$model.mp4 + rm $1.mp4 fi bash $1.$model.wts >/dev/null 2>&1 @@ -64,4 +67,4 @@ COMMAND="$COMMAND vstack=inputs=${COUNT}[v]\" -map \"[v]\" -map 1:a $1.all.mp4 > echo $COMMAND # Run the command -eval $COMMAND \ No newline at end of file +eval $COMMAND