Unverified Commit 184466a9 authored by nateanl's avatar nateanl Committed by GitHub
Browse files

Add melkwargs setting for MFCC in HuBERT pipeline (#1949)

parent 0c48eddf
...@@ -68,7 +68,9 @@ def extract_feature( ...@@ -68,7 +68,9 @@ def extract_feature(
waveform = waveform[0].to(device) waveform = waveform[0].to(device)
if feature_type == "mfcc": if feature_type == "mfcc":
feature_extractor = torchaudio.transforms.MFCC( feature_extractor = torchaudio.transforms.MFCC(
sample_rate=sample_rate sample_rate=sample_rate,
n_mfcc=13,
melkwargs={'n_fft': 400, 'hop_length': 160, 'center': False}
).to(device) ).to(device)
mfccs = feature_extractor(waveform) # (freq, time) mfccs = feature_extractor(waveform) # (freq, time)
# mfccs = torchaudio.compliance.kaldi.mfcc( # mfccs = torchaudio.compliance.kaldi.mfcc(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment