HKUST-Audio commited on
Commit
efcf731
·
verified ·
1 Parent(s): 8571da1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -67,11 +67,12 @@ def text2speech(input_text, speaker_choice):
67
  # 文本生成
68
  outputs = model.generate(
69
  input_ids,
70
- max_length=2048,
71
- eos_token_id=speech_end_id,
72
- do_sample=True,
73
- top_p=1,
74
- temperature=0.8,
 
75
  )
76
 
77
  # 把新生成的 token(不包括输入部分)取出来
 
67
  # 文本生成
68
  outputs = model.generate(
69
  input_ids,
70
+ max_length=2048, # We trained our model with a max length of 2048
71
+ eos_token_id= speech_end_id ,
72
+ do_sample=True,
73
+ top_p=0.95, # Adjusts the diversity of generated content
74
+ temperature=0.9, # Controls randomness in output
75
+ repetition_penalty= 1.2,
76
  )
77
 
78
  # 把新生成的 token(不包括输入部分)取出来