demavior commited on
Commit
f7f7365
·
verified ·
1 Parent(s): 1d7ef7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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",