gospacedev commited on
Commit
202030f
1 Parent(s): 27afca3

delay user audio decoding

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import torch
2
  import spaces
3
  import numpy as np
@@ -54,6 +55,7 @@ def generate(instruct_history, temperature=0.1, max_new_tokens=128, top_p=0.95,
54
  def transcribe(audio, past_history):
55
  global instruct_history, formatted_history
56
 
 
57
  sr, y = audio
58
  y = y.astype(np.float32)
59
  y /= np.max(np.abs(y))
 
1
+ import time
2
  import torch
3
  import spaces
4
  import numpy as np
 
55
  def transcribe(audio, past_history):
56
  global instruct_history, formatted_history
57
 
58
+ time.sleep(1)
59
  sr, y = audio
60
  y = y.astype(np.float32)
61
  y /= np.max(np.abs(y))