Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,9 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
6 |
|
7 |
def transcribe(audio):
|
8 |
|
|
|
|
|
|
|
9 |
pipe = pipeline(
|
10 |
"automatic-speech-recognition",
|
11 |
model="openai/whisper-small",
|
|
|
6 |
|
7 |
def transcribe(audio):
|
8 |
|
9 |
+
# Extract the audio data from the tuple
|
10 |
+
audio_data = audio[0] if isinstance(audio, tuple) else audio
|
11 |
+
|
12 |
pipe = pipeline(
|
13 |
"automatic-speech-recognition",
|
14 |
model="openai/whisper-small",
|