Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
1e2be4f
1
Parent(s):
ce364ed
fix: update tuple audio input handling in transcribe function to extract second element and skip empty tuples
Browse files
app.py
CHANGED
@@ -33,9 +33,6 @@ def transcribe(audio, state=""):
|
|
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
|
39 |
|
40 |
if isinstance(audio, np.ndarray):
|
41 |
audio_buffer.append(audio)
|
|
|
33 |
print(f"Tuple contents: {audio}")
|
34 |
# Try extracting the first element
|
35 |
audio = audio[1] if len(audio) > 1 else None
|
|
|
|
|
|
|
36 |
|
37 |
if isinstance(audio, np.ndarray):
|
38 |
audio_buffer.append(audio)
|