Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,17 @@ selectCollectionDocument(u"TimeSeries", u"DocumentofMinute")
|
|
32 |
|
33 |
|
34 |
asr = pipeline("automatic-speech-recognition", "facebook/wav2vec2-base-960h")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
classifier = pipeline("text-classification")
|
36 |
|
37 |
def speech_to_text(speech):
|
|
|
32 |
|
33 |
|
34 |
asr = pipeline("automatic-speech-recognition", "facebook/wav2vec2-base-960h")
|
35 |
+
|
36 |
+
def transcribe(audio):
|
37 |
+
text = asr(audio)["text"]
|
38 |
+
return text
|
39 |
+
|
40 |
+
gr.Interface(
|
41 |
+
fn=transcribe,
|
42 |
+
inputs=gr.inputs.Audio(source="microphone", type="filepath"),
|
43 |
+
outputs="text").launch()
|
44 |
+
|
45 |
+
|
46 |
classifier = pipeline("text-classification")
|
47 |
|
48 |
def speech_to_text(speech):
|