GavinHuang commited on
Commit
ce364ed
·
1 Parent(s): 615813d

fix: update tuple audio input handling in transcribe function to extract second element

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ def transcribe(audio, state=""):
32
  if isinstance(audio, tuple):
33
  print(f"Tuple contents: {audio}")
34
  # Try extracting the first element
35
- audio = audio[0] if len(audio) > 0 else None
36
  if not audio:
37
  print("Empty tuple, skipping")
38
  return state, state
 
32
  if isinstance(audio, tuple):
33
  print(f"Tuple contents: {audio}")
34
  # Try extracting the first element
35
+ audio = audio[1] if len(audio) > 1 else None
36
  if not audio:
37
  print("Empty tuple, skipping")
38
  return state, state