Added examples
Browse files- app.py +8 -1
- examples/audio_1.mp3 +0 -0
- examples/audio_2.mp3 +0 -0
- examples/audio_3.mp3 +0 -0
- examples/audio_4.mp3 +0 -0
app.py
CHANGED
@@ -29,4 +29,11 @@ def transcribe(audio):
|
|
29 |
with torch.cuda.amp.autocast():
|
30 |
return pipeline({"sampling_rate": sr, "raw": y}, generate_kwargs={"forced_decoder_ids": forced_decoder_ids}, max_new_tokens=255)["text"]
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
with torch.cuda.amp.autocast():
|
30 |
return pipeline({"sampling_rate": sr, "raw": y}, generate_kwargs={"forced_decoder_ids": forced_decoder_ids}, max_new_tokens=255)["text"]
|
31 |
|
32 |
+
examples = [
|
33 |
+
"./examples/audio_1.mp3",
|
34 |
+
"./examples/audio_2.mp3",
|
35 |
+
"./examples/audio_3.mp3",
|
36 |
+
"./examples/audio_4.mp3"
|
37 |
+
]
|
38 |
+
|
39 |
+
gr.Interface(fn=transcribe, inputs="microphone", outputs="text", examples=examples).launch(share=True)
|
examples/audio_1.mp3
ADDED
Binary file (30.1 kB). View file
|
|
examples/audio_2.mp3
ADDED
Binary file (26.2 kB). View file
|
|
examples/audio_3.mp3
ADDED
Binary file (59.4 kB). View file
|
|
examples/audio_4.mp3
ADDED
Binary file (35.9 kB). View file
|
|