KingNish commited on
Commit
864e6b1
·
verified ·
1 Parent(s): 913488c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,10 +57,10 @@ def stream_transcribe(stream, new_chunk):
57
 
58
  end_time = time.time()
59
  latency = end_time - start_time
60
- return stream, transcriber({"sampling_rate": sr, "raw": stream})["text"], f"{latency:.2f}"
61
  except Exception as e:
62
  print(f"Error during Transcription: {e}")
63
- return previous_transcription, "Error"
64
 
65
  @spaces.GPU
66
  def transcribe(inputs, previous_transcription):
 
57
 
58
  end_time = time.time()
59
  latency = end_time - start_time
60
+ return stream, pipe({"sampling_rate": sr, "raw": stream})["text"], f"{latency:.2f}"
61
  except Exception as e:
62
  print(f"Error during Transcription: {e}")
63
+ return stream, e, "Error"
64
 
65
  @spaces.GPU
66
  def transcribe(inputs, previous_transcription):