

Add a --warmup-file option to pass in a path
@754f3129443010ea200162fd902484bb47429538
--- whisper_online_server.py
+++ whisper_online_server.py
... | ... | @@ -10,6 +10,8 @@ |
10 | 10 |
parser.add_argument("--host", type=str, default='localhost') |
11 | 11 |
parser.add_argument("--port", type=int, default=43007) |
12 | 12 |
|
13 |
+parser.add_argument("--warmup-file", type=str, dest="warmup_file") |
|
14 |
+ |
|
13 | 15 |
|
14 | 16 |
# options from whisper_online |
15 | 17 |
add_shared_args(parser) |
... | ... | @@ -61,10 +63,9 @@ |
61 | 63 |
|
62 | 64 |
|
63 | 65 |
|
64 |
-demo_audio_path = "cs-maji-2.16k.wav" |
|
65 |
-if os.path.exists(demo_audio_path): |
|
66 |
+if os.path.exists(args.warmup_file): |
|
66 | 67 |
# load the audio into the LRU cache before we start the timer |
67 |
- a = load_audio_chunk(demo_audio_path,0,1) |
|
68 |
+ a = load_audio_chunk(args.warmup_file,0,1) |
|
68 | 69 |
|
69 | 70 |
# TODO: it should be tested whether it's meaningful |
70 | 71 |
# warm up the ASR, because the very first transcribe takes much more time than the other |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?