thuyentruong commited on
Commit
0bd83b4
1 Parent(s): 974405a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -25,7 +25,8 @@ def translate(audio):
25
 
26
 
27
  def synthesise(text):
28
- inputs = tokenizer(text=text, return_tensors="pt")
 
29
  with torch.no_grad():
30
  speech = model(**inputs).waveform
31
  return speech.cpu()
 
25
 
26
 
27
  def synthesise(text):
28
+ inputs = tokenizer(text=text, return_tensors="pt",max_length=598,
29
+ truncation=True,)
30
  with torch.no_grad():
31
  speech = model(**inputs).waveform
32
  return speech.cpu()