Plachta commited on
Commit
33fa82e
1 Parent(s): 5d2aa5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -133,14 +133,14 @@ def infer(text_raw, character, language, duration, noise_scale, noise_scale_w, i
133
  x_tst = stn_tst.unsqueeze(0)
134
  x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
135
  sid = torch.LongTensor([char_id])
136
- if not is_symbol:
137
- jp2phoneme = japanese_cleaners(text)
138
- else:
139
- jp2phoneme = text
140
- durations = net_g.predict_duration(x_tst, x_tst_lengths, sid=sid, noise_scale=noise_scale,
141
- noise_scale_w=noise_scale_w, length_scale=duration)
142
- char_dur_list = []
143
  try:
 
 
 
 
 
 
 
144
  for i, char in enumerate(jp2phoneme):
145
  char_pos = i * 2 + 1
146
  char_dur = durations[char_pos]
 
133
  x_tst = stn_tst.unsqueeze(0)
134
  x_tst_lengths = torch.LongTensor([stn_tst.size(0)])
135
  sid = torch.LongTensor([char_id])
 
 
 
 
 
 
 
136
  try:
137
+ if not is_symbol:
138
+ jp2phoneme = japanese_cleaners(text)
139
+ else:
140
+ jp2phoneme = text
141
+ durations = net_g.predict_duration(x_tst, x_tst_lengths, sid=sid, noise_scale=noise_scale,
142
+ noise_scale_w=noise_scale_w, length_scale=duration)
143
+ char_dur_list = []
144
  for i, char in enumerate(jp2phoneme):
145
  char_pos = i * 2 + 1
146
  char_dur = durations[char_pos]