mirror of
https://github.com/pstrueb/piper.git
synced 2026-06-01 09:27:02 +00:00
Merge pull request #38 from trunglebka/master
Correcting librosa mel compute
This commit is contained in:
@@ -103,7 +103,9 @@ def mel_spectrogram_torch(
|
|||||||
fmax_dtype_device = str(fmax) + "_" + dtype_device
|
fmax_dtype_device = str(fmax) + "_" + dtype_device
|
||||||
wnsize_dtype_device = str(win_size) + "_" + dtype_device
|
wnsize_dtype_device = str(win_size) + "_" + dtype_device
|
||||||
if fmax_dtype_device not in mel_basis:
|
if fmax_dtype_device not in mel_basis:
|
||||||
mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax)
|
mel = librosa_mel_fn(
|
||||||
|
sr=sampling_rate, n_fft=n_fft, n_mels=num_mels, fmin=fmin, fmax=fmax
|
||||||
|
)
|
||||||
mel_basis[fmax_dtype_device] = torch.from_numpy(mel).type_as(y)
|
mel_basis[fmax_dtype_device] = torch.from_numpy(mel).type_as(y)
|
||||||
if wnsize_dtype_device not in hann_window:
|
if wnsize_dtype_device not in hann_window:
|
||||||
hann_window[wnsize_dtype_device] = torch.hann_window(win_size).type_as(y)
|
hann_window[wnsize_dtype_device] = torch.hann_window(win_size).type_as(y)
|
||||||
|
|||||||
Reference in New Issue
Block a user