(f0, uv, hparams)
| 32 | |
| 33 | |
| 34 | def norm_f0(f0, uv, hparams): |
| 35 | is_torch = isinstance(f0, torch.Tensor) |
| 36 | if hparams['pitch_norm'] == 'standard': |
| 37 | f0 = (f0 - hparams['f0_mean']) / hparams['f0_std'] |
| 38 | if hparams['pitch_norm'] == 'log': |
| 39 | f0 = torch.log2(f0) if is_torch else np.log2(f0) |
| 40 | if uv is not None and hparams['use_uv']: |
| 41 | f0[uv > 0] = 0 |
| 42 | return f0 |
| 43 | |
| 44 | |
| 45 | def norm_interp_f0(f0, hparams): |
no outgoing calls
no test coverage detected