Skip to content

fix: support newer onnx-asr Nemo import path#633

Open
VooDisss wants to merge 1 commit into
speaches-ai:masterfrom
VooDisss:oonx-asr-compatibility-patch
Open

fix: support newer onnx-asr Nemo import path#633
VooDisss wants to merge 1 commit into
speaches-ai:masterfrom
VooDisss:oonx-asr-compatibility-patch

Conversation

@VooDisss
Copy link
Copy Markdown

What was broken

speaches failed to start when onnx-asr 0.11+ was installed.

Startup crashed while importing the Parakeet executor with:

ImportError: cannot import name 'NemoConformerTdt' from 'onnx_asr.models'

The current code assumes NemoConformerTdt is available from:

onnx_asr.models

That is no longer true in newer onnx-asr releases, where the class is exposed from:

onnx_asr.models.nemo

What this changes

This patch keeps the existing import for older versions and adds a fallback for newer ones.

  • first try: from onnx_asr.models import NemoConformerTdt
  • fallback to: from onnx_asr.models.nemo import NemoConformerTdt

What this fixes

  • restores app startup when newer onnx-asr versions are installed
  • keeps compatibility with the older import path used by the current locked dependency set
  • avoids forcing users to downgrade onnx-asr just to run the server

Why this matters

This failure happens before the app is fully up, so users hit a hard startup error even if they are not actively using the Parakeet path.

The fallback keeps the change narrow and makes startup more tolerant of dependency drift.

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.

1 participant