NeMo Curator audio processing stages use the soundfile library for audio file handling. Built-in error handling surfaces unreadable or unsupported files during duration calculation.
Audio stages support formats compatible with the soundfile library (backed by libsndfile):
libsndfile build)Note: AAC/M4A is not supported by default by soundfile/libsndfile. Prefer WAV or FLAC for consistent cross-platform behavior.
The GetAudioDurationStage automatically handles corrupted or unreadable files:
When soundfile/libsndfile cannot read audio files:
Here is a complete pipeline that handles format validation through built-in error handling:
To check supported formats on your system:
This approach leverages the built-in error handling of NeMo Curator’s audio stages rather than requiring extra format validation steps.