We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 56bf789 + d3551be commit c0cb408Copy full SHA for c0cb408
1 file changed
scripts/termux-speech-to-text
@@ -8,15 +8,22 @@ show_usage () {
8
exit 0
9
}
10
11
-while getopts :h option
+show_progress=false
12
+while getopts :hp option
13
do
14
case "$option" in
15
h) show_usage;;
16
+ p) show_progress=true;;
17
?) echo "$SCRIPTNAME: illegal option -$OPTARG"; exit 1;
18
esac
19
done
20
shift $(($OPTIND-1))
21
22
if [ $# != 0 ]; then echo "$SCRIPTNAME: too many arguments"; exit 1; fi
23
-/data/data/com.termux/files/usr/libexec/termux-api SpeechToText
24
+CMD=/data/data/com.termux/files/usr/libexec/termux-api
25
+if [ $show_progress = true ]; then
26
+ $CMD SpeechToText
27
+else
28
+ $CMD SpeechToText | tail -1
29
+fi
0 commit comments