Spaces:
Sleeping
Sleeping
Add tuple validation
Browse files
app.py
CHANGED
@@ -17,6 +17,9 @@ language_model = PunctuationModel()
|
|
17 |
|
18 |
def transcription(audio_stream, is_video = False):
|
19 |
try:
|
|
|
|
|
|
|
20 |
if is_video:
|
21 |
waveform, sample_rate = torchaudio.load(audio_stream, format = "wav")
|
22 |
else:
|
|
|
17 |
|
18 |
def transcription(audio_stream, is_video = False):
|
19 |
try:
|
20 |
+
if isinstance(audio_stream, tuple):
|
21 |
+
audio_stream = audio_stream[0]
|
22 |
+
|
23 |
if is_video:
|
24 |
waveform, sample_rate = torchaudio.load(audio_stream, format = "wav")
|
25 |
else:
|