mirror of
https://github.com/babysor/MockingBird.git
synced 2024-03-22 13:11:31 +08:00
Fix length issue
This commit is contained in:
parent
8ef5e1411d
commit
eeee32f3e3
@ -23,7 +23,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument("-o", "--out_dir", type=Path, default=argparse.SUPPRESS, help=\
|
||||
"Path to the output directory that will contain the mel spectrograms, the audios and the "
|
||||
"embeds. Defaults to <datasets_root>/PPGVC/ppg2mel/")
|
||||
parser.add_argument("-n", "--n_processes", type=int, default=16, help=\
|
||||
parser.add_argument("-n", "--n_processes", type=int, default=8, help=\
|
||||
"Number of processes in parallel.")
|
||||
# parser.add_argument("-s", "--skip_existing", action="store_true", help=\
|
||||
# "Whether to overwrite existing files with the same name. Useful if the preprocessing was "
|
||||
|
@ -83,9 +83,9 @@ class OneshotVcDataset(torch.utils.data.Dataset):
|
||||
n_fft=1024,
|
||||
num_mels=80,
|
||||
sampling_rate=SAMPLE_RATE,
|
||||
hop_size=200,
|
||||
win_size=800,
|
||||
fmin=0,
|
||||
hop_size=160,
|
||||
win_size=1024,
|
||||
fmin=80,
|
||||
fmax=8000,
|
||||
)
|
||||
return melspec.squeeze(0).numpy().T
|
||||
|
@ -15,7 +15,7 @@ def compute_f0(wav, sr=16000, frame_period=10.0):
|
||||
"""Compute f0 from wav using pyworld harvest algorithm."""
|
||||
wav = wav.astype(np.float64)
|
||||
f0, _ = pyworld.harvest(
|
||||
wav, sr, frame_period=frame_period, f0_floor=20.0, f0_ceil=600.0)
|
||||
wav, sr, frame_period=frame_period, f0_floor=80.0, f0_ceil=600.0)
|
||||
return f0.astype(np.float32)
|
||||
|
||||
def f02lf0(f0):
|
||||
|
Loading…
x
Reference in New Issue
Block a user