Plachta commited on
Commit
8919ab2
1 Parent(s): b74de9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -122,7 +122,7 @@ def infer(text_raw, character, language, duration, noise_scale, noise_scale_w):
122
  with torch.no_grad():
123
  x_tst = stn_tst.unsqueeze(0)
124
  x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
125
- sid = torch.LongTensor([0])
126
  audio = net_g.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=duration)[0][0,0].data.float().numpy()
127
  currentDateAndTime = datetime.now()
128
  print(f"\nCharacter {character} inference successful: {text}")
@@ -163,7 +163,8 @@ if __name__ == "__main__":
163
  "You may duplicate this space or [open in Colab](https://colab.research.google.com/drive/1J2Vm5dczTF99ckyNLXV0K-hQTxLwEaj5?usp=sharing) to run it privately and without any queue.\n\n"
164
  "您可以复制该空间至私人空间运行或打开[Google Colab](https://colab.research.google.com/drive/1J2Vm5dczTF99ckyNLXV0K-hQTxLwEaj5?usp=sharing)在线运行。\n\n"
165
  "This model has been integrated to the model collections of [Moe-tts](https://huggingface.co/spaces/skytnt/moe-tts), it is suggested to bookmark moe-tts as a backup, in case this space may crash some time.\n\n"
166
- "现已加入[Moe-tts](https://huggingface.co/spaces/skytnt/moe-tts)模型大全,建议收藏以便在该空间出错时作为备用。\n\n"
 
167
  "If your input language is not Japanese, it will be translated to Japanese by Google translator, but accuracy is not guaranteed.\n\n"
168
  "如果您的输入语言不是日语,则会由谷歌翻译自动翻译为日语,但是准确性不能保证。\n\n"
169
  )
 
122
  with torch.no_grad():
123
  x_tst = stn_tst.unsqueeze(0)
124
  x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
125
+ sid = torch.LongTensor([char_id])
126
  audio = net_g.infer(x_tst, x_tst_lengths, sid=sid, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=duration)[0][0,0].data.float().numpy()
127
  currentDateAndTime = datetime.now()
128
  print(f"\nCharacter {character} inference successful: {text}")
 
163
  "You may duplicate this space or [open in Colab](https://colab.research.google.com/drive/1J2Vm5dczTF99ckyNLXV0K-hQTxLwEaj5?usp=sharing) to run it privately and without any queue.\n\n"
164
  "您可以复制该空间至私人空间运行或打开[Google Colab](https://colab.research.google.com/drive/1J2Vm5dczTF99ckyNLXV0K-hQTxLwEaj5?usp=sharing)在线运行。\n\n"
165
  "This model has been integrated to the model collections of [Moe-tts](https://huggingface.co/spaces/skytnt/moe-tts), it is suggested to bookmark moe-tts as a backup, in case this space may crash some time.\n\n"
166
+ "现已加入[Moe-tts](https://huggingface.co/spaces/skytnt/moe-tts)模型大全。\n\n"
167
+ "2023/1/9 更新: 人物全是特别周的bug已修复,对此带来的不便感到十分抱歉。\n\n"
168
  "If your input language is not Japanese, it will be translated to Japanese by Google translator, but accuracy is not guaranteed.\n\n"
169
  "如果您的输入语言不是日语,则会由谷歌翻译自动翻译为日语,但是准确性不能保证。\n\n"
170
  )