xTorch8 commited on
Commit
80317ce
·
1 Parent(s): f9bbc64

Add tuple validation

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