Skip to content

Fix generating subtitles for funasr nano - #3659

Merged
csukuangfj merged 1 commit into
k2-fsa:masterfrom
csukuangfj:fix-funasr-nano
Jun 4, 2026
Merged

csukuangfj merged 1 commit into
k2-fsa:masterfrom
csukuangfj:fix-funasr-nano

Conversation

@csukuangfj

@csukuangfj csukuangfj commented Jun 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Refactor
    • Updated path validation logic to accept both files and directories as valid inputs in the subtitle generation example script.

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 4, 2026
@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c21047b8-65a2-4cf0-8643-a2a35249ac01

📥 Commits

Reviewing files that changed from the base of the PR and between 6c883e7 and 23a5515.

📒 Files selected for processing (1)
  • python-api-examples/generate-subtitles.py

📝 Walkthrough

Walkthrough

A single-line update to the assert_file_exists() validation function in the subtitle generation script. The function now accepts both files and directories as valid paths by checking .exists() instead of .is_file().

Changes

Path validation update

Layer / File(s) Summary
Validation method update
python-api-examples/generate-subtitles.py
assert_file_exists() now checks Path(filename).exists() instead of Path(filename).is_file(), allowing both files and directories to pass validation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A path is more than just a file,
Directories deserve a smile,
One line loosens the strict hand,
Now both can journey through the land. 🐰

✨ 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 and usage tips.

@csukuangfj
csukuangfj merged commit 6abe999 into k2-fsa:master Jun 4, 2026
4 of 7 checks passed
@csukuangfj
csukuangfj deleted the fix-funasr-nano branch June 4, 2026 10:33

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

Copy link
Copy Markdown

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 assert_file_exists function in python-api-examples/generate-subtitles.py to use Path(filename).exists() instead of Path(filename).is_file(). There are no review comments to address, and I have no additional feedback to provide.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant