Skip to content

Commit

Permalink
Update preprocess_hubert_f0.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardust-minus authored Jul 22, 2023
1 parent 61c78b4 commit 7423deb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions preprocess_hubert_f0.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
speech_encoder = hps["model"]["speech_encoder"]


def process_one(filename, hmodel,f0p,diff=False,mel_extractor=None,rank):
def process_one(filename, hmodel,f0p,diff=False,rank,mel_extractor=None):
# print(filename)
wav, sr = librosa.load(filename, sr=sampling_rate)
audio_norm = torch.FloatTensor(wav)
Expand Down Expand Up @@ -114,7 +114,7 @@ def process_batch(file_chunk, f0p, diff=False, mel_extractor=None):
hmodel = utils.get_speech_encoder(speech_encoder, device=device)
print("Loaded speech encoder.")
for filename in tqdm(file_chunk):
process_one(filename, hmodel, f0p, diff, mel_extractor, rank)
process_one(filename, hmodel, f0p, diff, rank, mel_extractor)

def parallel_process(filenames, num_processes, f0p, diff, mel_extractor):
with ProcessPoolExecutor(max_workers=num_processes) as executor:
Expand Down

0 comments on commit 7423deb

Please sign in to comment.