Skip to content

Fix voxpopuli prepare.sh Stage 6 failing for any lang other than en#2097

Merged
csukuangfj merged 1 commit into
k2-fsa:masterfrom
HenryVarro666:fix-2064-voxpopuli-lang
Jul 14, 2026
Merged

Fix voxpopuli prepare.sh Stage 6 failing for any lang other than en#2097
csukuangfj merged 1 commit into
k2-fsa:masterfrom
HenryVarro666:fix-2064-voxpopuli-lang

Conversation

@HenryVarro666

@HenryVarro666 HenryVarro666 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #2064.

Stage 6 of egs/voxpopuli/ASR/prepare.sh hardcodes the voxpopuli-asr-en manifest prefix, while stages 3-5 build it as voxpopuli-${task}-${lang}. With any lang other than en (e.g. lang=it, the reporter's case), validation fails with file 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:

data/fbank/voxpopuli-${task}-${lang}_cuts_${dataset}.jsonl.gz
data/fbank/log/validate_voxpopuli-${task}-${lang}_cuts_${dataset}.log

Verified with bash -n and by resolving the path with task=asr lang=it dataset=devdata/fbank/voxpopuli-asr-it_cuts_dev.jsonl.gz, matching what Stage 5 produces.

Summary by CodeRabbit

  • Bug Fixes
    • Updated VoxPopuli cutset validation to use task- and language-specific manifest files.
    • Validation output logs now match the same task and language context for clearer traceability.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c2c5f4bb-fe9c-46c0-a939-2fd66a8e848b

📥 Commits

Reviewing files that changed from the base of the PR and between f921bf7 and e9ba55b.

📒 Files selected for processing (1)
  • egs/voxpopuli/ASR/prepare.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • egs/voxpopuli/ASR/prepare.sh

📝 Walkthrough

Walkthrough

Stage 6 in the VoxPopuli ASR preparation script now validates cutset manifests and writes logs using paths parameterized by the selected task and language.

Changes

VoxPopuli manifest validation

Layer / File(s) Summary
Parameterized validation manifest and log paths
egs/voxpopuli/ASR/prepare.sh
Stage 6 uses ${task} and ${lang} in the manifest and log filenames while preserving tee output capture.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main fix: Stage 6 path handling for non-English VoxPopuli languages.
Linked Issues check ✅ Passed The change updates the hardcoded English manifest and log paths to use ${task} and ${lang}, matching issue #2064.
Out of Scope Changes check ✅ Passed The PR only changes the Stage 6 VoxPopuli validation paths needed to fix the reported file-not-found error.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +164 to +165
data/fbank/voxpopuli-${task}-${lang}_cuts_${dataset}.jsonl.gz \
2>&1 | tee data/fbank/log/validate_voxpopuli-${task}-${lang}_cuts_${dataset}.log

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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).

Suggested change
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
  1. 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.
@HenryVarro666 HenryVarro666 force-pushed the fix-2064-voxpopuli-lang branch from f921bf7 to e9ba55b Compare July 13, 2026 23:50

@csukuangfj csukuangfj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@csukuangfj csukuangfj merged commit 2c6513a into k2-fsa:master Jul 14, 2026
102 of 128 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error of "file not found" when using voxpopuli/ASR/prepare.sh with language different from en

2 participants