Spaces:
Runtime error
Runtime error
SevenhuijsenM commited on
Commit ·
1698c04
1
Parent(s): 8fec8bb
Changed audio source from gradio
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
pipe = pipeline(model="dussen/whisper-small-hi")
|
| 5 |
|
| 6 |
def transcribe(audio):
|
| 7 |
text = pipe(audio)["text"]
|
|
@@ -9,7 +9,7 @@ def transcribe(audio):
|
|
| 9 |
|
| 10 |
iface = gr.Interface(
|
| 11 |
fn=transcribe,
|
| 12 |
-
inputs=gr.Audio(
|
| 13 |
outputs="text",
|
| 14 |
title="Whisper Small Italian",
|
| 15 |
description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
|
|
|
|
| 1 |
from transformers import pipeline
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
pipe = pipeline(model="dussen/whisper-small-hi")
|
| 5 |
|
| 6 |
def transcribe(audio):
|
| 7 |
text = pipe(audio)["text"]
|
|
|
|
| 9 |
|
| 10 |
iface = gr.Interface(
|
| 11 |
fn=transcribe,
|
| 12 |
+
inputs=gr.Audio(sources=["microphone"], type="filepath"),
|
| 13 |
outputs="text",
|
| 14 |
title="Whisper Small Italian",
|
| 15 |
description="Realtime demo for Swedish speech recognition using a fine-tuned Whisper small model.",
|