YCHuang2112 commited on
Commit
09896ad
1 Parent(s): 82b5c3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,8 +69,8 @@ def translate(audio):
69
 
70
 
71
  def synthesise(text):
72
- inputs = processor(text=text, return_tensors="pt")
73
- # inputs = processor(text=text, return_tensors="pt", truncation=True, max_length=500)
74
  speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
75
  return speech.cpu()
76
 
 
69
 
70
 
71
  def synthesise(text):
72
+ #inputs = processor(text=text, return_tensors="pt")
73
+ inputs = processor(text=text, return_tensors="pt", truncation=True, max_length=200)
74
  speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
75
  return speech.cpu()
76