Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import json
import logging
import os
import textwrap
from pathlib import Path

import numpy as np
Expand Down Expand Up @@ -93,16 +92,10 @@ def save_processing(
if separate_encoder_and_decoder_init:
return

audio_processor_json = textwrap.dedent("""\
{
audio_processor_cfg = {
"feature_extraction": {
"sequence": [
{
"operation": {
"name": "audio_decoder",
"type": "AudioDecoder"
}
},
{"operation": {"name": "audio_decoder", "type": "AudioDecoder"}},
{
"operation": {
"name": "STFT",
Expand Down Expand Up @@ -511,27 +504,23 @@ def save_processing(
0.000986635684967041,
0.0005550682544708252,
0.0002467334270477295,
0.0000616908073425293
]
}
0.0000616908073425293,
],
},
}
},
{
"operation": {
"name": "log_mel_spectrogram",
"type": "LogMelSpectrum",
"attrs": {
"chunk_size": 30,
"hop_length": 160,
"n_fft": 400,
"n_mel": 80
}
"attrs": {"chunk_size": 30, "hop_length": 160, "n_fft": 400, "n_mel": config.num_mel_bins},
}
}
},
]
}
}
""")
audio_processor_json = json.dumps(audio_processor_cfg, indent=4)

with open(os.path.join(output_dir, "audio_processor_config.json"), "w") as f:
f.write(audio_processor_json)

Expand Down
Loading