Skip to content

Export omnilingualASR v2 - #3140

Merged
csukuangfj merged 2 commits into
k2-fsa:masterfrom
csukuangfj:export-omnilingual-v2
Feb 5, 2026
Merged

csukuangfj merged 2 commits into
k2-fsa:masterfrom
csukuangfj:export-omnilingual-v2

Conversation

@csukuangfj

@csukuangfj csukuangfj commented Feb 5, 2026 •

Copy link
Copy Markdown
Collaborator

See also #3138

CC @Edison2ST

Summary by CodeRabbit

  • New Features

    • Added support for new model variants (omniASR_CTC_300M_v2 and omniASR_CTC_1B_v2).
    • Enabled publishing to ModelScope platform.
  • Chores

    • Updated model export pipeline with improved credential and repository handling.

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Feb 5, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @csukuangfj, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request extends the functionality of the omnilingual ASR ONNX export script by incorporating support for the second version of the 300M and 1B CTC models. This update ensures that users can now generate ONNX models for these newer, potentially improved, ASR versions, enhancing the script's compatibility and utility for the latest model releases.

Highlights

  • Model Support Expansion: The export-onnx.py script has been updated to include support for omniASR_CTC_300M_v2 and omniASR_CTC_1B_v2 models, allowing for the export of these newer versions to ONNX format.
Changelog
  • scripts/omnilingual-asr/export-onnx.py
    • Updated the help message for the --model-card argument to list the newly supported omniASR_CTC_300M_v2 and omniASR_CTC_1B_v2 models.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/export-omnilingual-asr-to-onnx.yaml
Activity
  • The pull request was created by csukuangfj.
  • It references a related pull request: k2-fsa/sherpa-onnx/pull/3138.
  • The pull request also mentions @Edison2ST for CC.
  • No other explicit activity (comments, reviews) is provided in the context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@coderabbitai

coderabbitai Bot commented Feb 5, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR extends omnilingual ASR export support by adding v2 model variants (300M and 1B) to the CI pipeline and export script. The workflow now includes conditional logic for mapping v2 variants to their respective directories and introduces a new ModelScope publishing step alongside HuggingFace publishing. The export script validates model-card input against the expanded list of supported models.

Changes

Cohort / File(s) Summary
Model Export Configuration
.github/workflows/export-omnilingual-asr-to-onnx.yaml
Extended model_card matrix to include omniASR_CTC_300M_v2 and omniASR_CTC_1B_v2 variants. Added conditional logic to map v2 variants to v2 directories (ctc-v2, ctc-v2-int8). Updated HuggingFace credentials to csukuangfj2 user. Introduced a new "Publish to modelscope" step after HuggingFace publishing for tarball uploads.
Export Script
scripts/omnilingual-asr/export-onnx.py
Updated --model-card argument with explicit choices enforcement: "omniASR_CTC_300M", "omniASR_CTC_300M_v2", "omniASR_CTC_1B", "omniASR_CTC_1B_v2". Simplified help text to generic message.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 The ASR rabbits hop with glee,
v2 variants join the spree!
From HuggingFace to ModelScope they bound,
Exporting models all around,
CTC-v2 models exported just right! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@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 export-onnx.py script to support v2 versions of the omnilingual ASR models. The change is straightforward, updating the help message for the --model-card argument. I've suggested an improvement to use argparse's choices feature to validate the model card input, which will make the script more robust.

Comment on lines 19 to 23
"--model-card",
type=str,
required=True,
help="omniASR_CTC_300M, or omniASR_CTC_1B",
help="omniASR_CTC_300M, omniASR_CTC_300M_v2, omniASR_CTC_1B, or omniASR_CTC_1B_v2",
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve robustness and provide better error messages to the user, consider using the choices parameter for the --model-card argument. This will validate the user's input against the list of supported models and automatically list the available options in the help message.

        "--model-card",
        type=str,
        required=True,
        choices=[
            "omniASR_CTC_300M",
            "omniASR_CTC_300M_v2",
            "omniASR_CTC_1B",
            "omniASR_CTC_1B_v2",
        ],
        help="The model card to export.",
    )

@csukuangfj
csukuangfj merged commit 46d24f1 into k2-fsa:master Feb 5, 2026
1 check was pending
@csukuangfj
csukuangfj deleted the export-omnilingual-v2 branch February 5, 2026 04:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant