-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_whisper-wait
More file actions
55 lines (49 loc) · 1.45 KB
/
Copy path_whisper-wait
File metadata and controls
55 lines (49 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#compdef whisper-wait
# ZSH completion script for whisper-wait
# Place this file in a directory in your $fpath (e.g., ~/.zsh/completions/)
# or source it directly
_whisper_wait_models=(
'tiny:Tiny model'
'tiny.en:Tiny English model'
'base:Base model'
'base.en:Base English model'
'small:Small model'
'small.en:Small English model'
'medium:Medium model'
'medium.en:Medium English model'
'large:Large model'
'large-v2:Large v2 model'
'large-v3:Large v3 model'
)
_whisper_wait() {
local -a commands
commands=(
'api:Run in API mode using OpenAI Whisper API'
'local:Run in local mode using a local Whisper model'
)
_arguments -C \
'1: :->command' \
'*::arg:->args'
case $state in
command)
_describe -t commands 'whisper-wait commands' commands
;;
args)
case $words[1] in
local)
_arguments \
'(-m --model)'{-m,--model}'[Specify model to use for transcription]:model:->models'
case $state in
models)
_describe -t models 'available models' _whisper_wait_models
;;
esac
;;
api)
# api command has no additional options
;;
esac
;;
esac
}
_whisper_wait "$@"