nemo_curator.stages.audio.tagging.resample_audio
nemo_curator.stages.audio.tagging.resample_audio
Resample Audio Stage
Resamples audio files to a target sample rate and format. Follows the exact pattern from NeMo Curator: https://github.com/NVIDIA-NeMo/Curator/blob/main/nemo_curator/stages/audio/common.py
Module Contents
Classes
API
Dataclass
Bases: ProcessingStage[AudioTask, AudioTask]
Stage for resampling audio files in a TTS/ALM dataset.
Takes a manifest containing audio file paths and resamples them to target sample rate and format, while creating a new manifest with updated paths.
audio_filepath_key
audio_item_id_key
duration_key
input_format
name
resampled_audio_dir
resampled_audio_filepath_key
target_format
target_nchannels
target_sample_rate
Process a single task by resampling the audio file.
Parameters:
task
AudioTask with data dict containing audio_filepath and audio_item_id(optional)
Returns: AudioTask
AudioTask with updated metadata