@@ -230,32 +230,32 @@ function getSTT() {
230
230
mkdir whisper.cpp
231
231
cd whisper.cpp
232
232
git clone https://github.com/ggerganov/whisper.cpp.git .
233
- function whichWhisperModel() {
234
- availableModels=" tiny, base, small, medium, large"
233
+ fi
234
+ function whichWhisperModel() {
235
+ availableModels=" tiny, base, small, medium, large"
236
+ echo
237
+ echo " Which Whisper model would you like to use?"
238
+ echo " Options: $availableModels "
239
+ echo ' (tiny is recommended)'
240
+ echo
241
+ read -p " Enter preferred model: " whispermodel
242
+ if [[ ! -n ${whispermodel} ]]; then
235
243
echo
236
- echo " Which Whisper model would you like to use?"
237
- echo " Options: $availableModels "
238
- echo ' (tiny is recommended)'
244
+ echo " You must enter a key."
245
+ whichWhisperModel
246
+ fi
247
+ if [[ ! ${whispermodel} == * " $availableModels " * ]]; then
239
248
echo
240
- read -p " Enter preferred model: " whispermodel
241
- if [[ ! -n ${whispermodel} ]]; then
242
- echo
243
- echo " You must enter a key."
244
- whichWhisperModel
245
- fi
246
- if [[ ! ${whispermodel} == * " $availableModels " * ]]; then
247
- echo
248
- echo " Invalid model."
249
- whichWhisperModel
250
- fi
251
- }
252
- whichWhisperModel
253
- ./models/download-ggml-model.sh $whispermodel
254
- echo " export WHISPER_MODEL=$whispermodel " >> ./chipper/source.sh
255
- cd bindings/go
256
- make whisper
257
- cd ${origDir}
258
- fi
249
+ echo " Invalid model."
250
+ whichWhisperModel
251
+ fi
252
+ }
253
+ whichWhisperModel
254
+ ./models/download-ggml-model.sh $whispermodel
255
+ echo " export WHISPER_MODEL=$whispermodel " >> ./chipper/source.sh
256
+ cd bindings/go
257
+ make whisper
258
+ cd ${origDir}
259
259
else
260
260
echo " export STT_SERVICE=coqui" >> ./chipper/source.sh
261
261
if [[ ! -f ./stt/completed ]]; then
0 commit comments