Skip to content

Commit 5b97377

Browse files
authored
Add files via upload
1 parent e5a6409 commit 5b97377

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

whisperGUI.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
from gooey import Gooey, GooeyParser
2+
import subprocess
3+
4+
@Gooey(required_cols=1,
5+
target='main.exe',
6+
suppress_gooey_flag=True)
7+
def main():
8+
parser = GooeyParser(description='GUI for whisper.cpp, a high-performance C++ port of OpenAI\'s Whisper')
9+
10+
parser.add_argument(
11+
'-f',
12+
'--file',
13+
metavar='WAV file to transcribe',
14+
help='convert with: ffmpeg -i input.mp3 -ar 16000 -ac 1 -c:a pcm_s16le output.wav',
15+
widget='FileChooser')
16+
17+
parser.add_argument(
18+
'-m',
19+
'--model',
20+
metavar='GGML model (.bin)',
21+
help='select GGML model (tiny,base,small,medium,large)',
22+
widget='FileChooser')
23+
24+
parser.add_argument(
25+
'-l',
26+
'--language',
27+
metavar='Language',
28+
help='select language for transcription',
29+
choices=['en','zh','de','es','ru','ko','fr','ja','pt','tr','pl','ca','nl','ar','sv','it','id','hi','fi','vi','iw','uk','el','ms','cs','ro','da','hu','ta','no','th','ur','hr','bg','lt','la','mi','ml','cy','sk','te','fa','lv','bn','sr','az','sl','kn','et','mk','br','eu','is','hy','ne','mn','bs','kk','sq','sw','gl','mr','pa','si','km','sn','yo','so','af','oc','ka','be','tg','sd','gu','am','yi','lo','uz','fo','ht','ps','tk','nn','mt','sa','lb','my','bo','tl','mg','as','tt','haw','ln','ha','ba','jw','su'],
30+
widget='FilterableDropdown')
31+
32+
parser.add_argument(
33+
'--translate',
34+
action='store_true',
35+
help='check to translate transcription to english')
36+
37+
parser.add_argument(
38+
'-otxt',
39+
'--output-txt',
40+
action='store_true',
41+
help='check to output result in a text file')
42+
43+
parser.add_argument(
44+
'-osrt',
45+
'--output-srt',
46+
action='store_true',
47+
help='check to output result in a srt file')
48+
49+
parser.add_argument(
50+
'-ovtt',
51+
'--output-vtt',
52+
action='store_true',
53+
help='check to output result in a vtt file')
54+
55+
parser.add_argument(
56+
'-su',
57+
'--speed-up',
58+
action='store_true',
59+
help='check to speed up audio by factor of 2 (faster processing, reduced accuracy)')
60+
61+
parser.parse_args()
62+
63+
64+
if __name__ == '__main__':
65+
main()

0 commit comments

Comments
 (0)