Update benchmark_hf_pipeline.py
Browse files- benchmark_hf_pipeline.py +9 -7
benchmark_hf_pipeline.py
CHANGED
@@ -13,13 +13,15 @@ pipe = pipeline(
|
|
13 |
chunk_length_s=15,
|
14 |
batch_size=64
|
15 |
)
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
20 |
elapsed = {}
|
21 |
-
for x in
|
22 |
start = time()
|
23 |
-
transcription = pipe(x
|
24 |
-
elapsed[x
|
25 |
pprint(elapsed)
|
|
|
13 |
chunk_length_s=15,
|
14 |
batch_size=64
|
15 |
)
|
16 |
+
test_audio = [
|
17 |
+
"kotoba-whisper-eval/audio/long_interview_1.wav",
|
18 |
+
"kotoba-whisper-eval/audio/manzai1.wav",
|
19 |
+
"kotoba-whisper-eval/audio/manzai2.wav",
|
20 |
+
"kotoba-whisper-eval/audio/manzai3.wav"
|
21 |
+
]
|
22 |
elapsed = {}
|
23 |
+
for x in test_audio:
|
24 |
start = time()
|
25 |
+
transcription = pipe(x, generate_kwargs=generate_kwargs)
|
26 |
+
elapsed[x] = time() - start
|
27 |
pprint(elapsed)
|