Skip to content

Commit

Permalink
Parse speaker mix from file
Browse files Browse the repository at this point in the history
  • Loading branch information
yqzhishen committed Jan 21, 2023
1 parent 8abfb8b commit 63675e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@ def infer_once(path: str, save_mel=False):

if spk_mix is not None:
param['spk_mix'] = spk_mix
elif 'spk_mix' in param:
param_spk_mix = param['spk_mix']
for spk_name in param_spk_mix:
values = str(param_spk_mix[spk_name]).split()
if len(values) == 1:
param_spk_mix[spk_name] = float(values[0])
else:
param_spk_mix[spk_name] = [float(v) for v in values]

if not hparams.get('use_midi', False):
merge_slurs(param)
Expand Down

0 comments on commit 63675e8

Please sign in to comment.