Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,15 @@
|
|
3 |
# gr.load("models/openai/whisper-large-v3-turbo").launch()
|
4 |
|
5 |
import gradio as gr
|
6 |
-
|
7 |
model = gr.load("models/openai/whisper-large-v3-turbo")
|
8 |
|
|
|
9 |
# Define a function to process the output and extract only the transcription text
|
10 |
def process_transcription(audio_input):
|
11 |
-
|
12 |
-
|
|
|
13 |
print(result)
|
14 |
# Extract the transcription text directly
|
15 |
transcription = result.text
|
|
|
3 |
# gr.load("models/openai/whisper-large-v3-turbo").launch()
|
4 |
|
5 |
import gradio as gr
|
6 |
+
from transformers import pipeline
|
7 |
model = gr.load("models/openai/whisper-large-v3-turbo")
|
8 |
|
9 |
+
pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo")
|
10 |
# Define a function to process the output and extract only the transcription text
|
11 |
def process_transcription(audio_input):
|
12 |
+
|
13 |
+
result = pipe(audio_input)
|
14 |
+
print(result["text"])
|
15 |
print(result)
|
16 |
# Extract the transcription text directly
|
17 |
transcription = result.text
|