Fix voxpopuli prepare.sh Stage 6 failing for any lang other than en#2097
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughStage 6 in the VoxPopuli ASR preparation script now validates cutset manifests and writes logs using paths parameterized by the selected task and language. ChangesVoxPopuli manifest validation
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the prepare.sh script in the VoxPopuli ASR recipe to use dynamic variables ${task} and ${lang} instead of hardcoded values for the dataset paths. The reviewer recommended double-quoting these paths to prevent potential word splitting and globbing issues, which is a standard shell scripting best practice.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| data/fbank/voxpopuli-${task}-${lang}_cuts_${dataset}.jsonl.gz \ | ||
| 2>&1 | tee data/fbank/log/validate_voxpopuli-${task}-${lang}_cuts_${dataset}.log |
There was a problem hiding this comment.
It is highly recommended to double-quote paths containing variable expansions (such as ${task}, ${lang}, and ${dataset}) to prevent word splitting and globbing issues, adhering to standard shell scripting best practices (e.g., ShellCheck SC2086).
| data/fbank/voxpopuli-${task}-${lang}_cuts_${dataset}.jsonl.gz \ | |
| 2>&1 | tee data/fbank/log/validate_voxpopuli-${task}-${lang}_cuts_${dataset}.log | |
| "data/fbank/voxpopuli-${task}-${lang}_cuts_${dataset}.jsonl.gz" \ | |
| 2>&1 | tee "data/fbank/log/validate_voxpopuli-${task}-${lang}_cuts_${dataset}.log" |
References
- Always quote strings containing variables, command substitutions, spaces or shell meta-characters, unless careful word splitting or globbing is required. (link)
Stage 6 hardcoded the voxpopuli-asr-en manifest prefix while every other
stage uses voxpopuli-${task}-${lang}, so validation failed with 'file not
found' whenever lang != en. Parameterize the cuts path and the log path the
same way as stages 3-5.
Fixes k2-fsa#2064.
f921bf7 to
e9ba55b
Compare
csukuangfj
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
Fixes #2064.
Stage 6 of
egs/voxpopuli/ASR/prepare.shhardcodes thevoxpopuli-asr-enmanifest prefix, while stages 3-5 build it asvoxpopuli-${task}-${lang}. With anylangother thanen(e.g.lang=it, the reporter's case), validation fails withfile not found: data/fbank/voxpopuli-asr-en_cuts_voxpopuli.jsonl.gz.This parameterizes the cuts path and the log path the same way as the other stages — the exact workaround described in the issue:
Verified with
bash -nand by resolving the path withtask=asr lang=it dataset=dev→data/fbank/voxpopuli-asr-it_cuts_dev.jsonl.gz, matching what Stage 5 produces.Summary by CodeRabbit