DanGalt commited on
Commit
4208371
·
1 Parent(s): 911acef

make a limit stricter for a speed up

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -30,8 +30,7 @@ def translate(audio):
30
  def synthesise(text):
31
  inputs = processor(text=text, return_tensors="pt")
32
  input_ids = inputs["input_ids"]
33
- if input_ids.shape[1] > 600:
34
- input_ids = input_ids[0:1, :600]
35
  speech = model.generate_speech(input_ids.to(device), speaker_embeddings.to(device), vocoder=vocoder)
36
  return speech.cpu()
37
 
 
30
  def synthesise(text):
31
  inputs = processor(text=text, return_tensors="pt")
32
  input_ids = inputs["input_ids"]
33
+ input_ids = input_ids[0:1, :200]
 
34
  speech = model.generate_speech(input_ids.to(device), speaker_embeddings.to(device), vocoder=vocoder)
35
  return speech.cpu()
36