Repository navigation
Include WAV recordings in mixed-format Babel manifests - #1586
wangyusheng1985 wants to merge 4 commits into
Conversation
Signed-off-by: wangyusheng1985 <wangyusheng1985@users.noreply.github.com>
| @@ -0,0 +1,44 @@ | |||
| from pathlib import Path | |||
There was a problem hiding this comment.
Let's remove the test file - we don't add tests for recipes in this repo
There was a problem hiding this comment.
Thanks for the review. I’ll address this in the existing pull request and rerun the focused validation.
| ) | ||
| wav_recordings = RecordingSet.from_recordings( | ||
| Recording.from_file(p) for p in audio_dir.glob("*.wav") | ||
| recordings = RecordingSet.from_recordings( |
There was a problem hiding this comment.
Isn't this change functionally identical?
There was a problem hiding this comment.
No. The original code only matched *.sph, so WAV recordings were omitted. This change discovers both *.sph and *.wav files in one per-split RecordingSet and adds mixed-format regression coverage.
|
Not quite. The previous approach combined separate SPH and WAV RecordingSets through a lazy iterator chain; this version constructs one complete per-split RecordingSet directly from both file types. |
Summary
.sphand.wavfiles through one per-split recording iteratordevandtrainingdataValidation
ruff check lhotse/recipes/babel.py test/recipes/test_babel.pyblack --check lhotse/recipes/babel.py test/recipes/test_babel.pyFixes #574
Validation observed for this change:
docker exec -w /workspace lhotse-babel-test pytest -q test/recipes/test_babel.pyruff check lhotse/recipes/babel.py test/recipes/test_babel.pydocker exec -w /workspace lhotse-babel-test black --check lhotse/recipes/babel.py test/recipes/test_babel.pyFixes #574