Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
-
import torch
|
3 |
from transformers import pipeline
|
4 |
|
5 |
-
# Load the
|
6 |
-
asr_pipeline = pipeline("speech-recognition"
|
7 |
|
8 |
# Define a Gradio interface to listen to microphone input and display the transcribed text
|
9 |
def transcribe_audio():
|
@@ -18,6 +17,6 @@ gr.Interface(
|
|
18 |
fn=transcribe_audio,
|
19 |
inputs=gr.inputs.Microphone(label="Speak into the microphone"),
|
20 |
outputs="text",
|
21 |
-
title="Speech-to-Text with
|
22 |
description="Speak into the microphone and see the text transcription.",
|
23 |
).launch()
|
|
|
1 |
import gradio as gr
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
# Load the default speech recognition model pipeline from Hugging Face
|
5 |
+
asr_pipeline = pipeline("automatic-speech-recognition")
|
6 |
|
7 |
# Define a Gradio interface to listen to microphone input and display the transcribed text
|
8 |
def transcribe_audio():
|
|
|
17 |
fn=transcribe_audio,
|
18 |
inputs=gr.inputs.Microphone(label="Speak into the microphone"),
|
19 |
outputs="text",
|
20 |
+
title="Speech-to-Text with Default Model",
|
21 |
description="Speak into the microphone and see the text transcription.",
|
22 |
).launch()
|