Skip to content

Fix Moonshine ASR token decoding - #1738

Open
Mr-Neutr0n wants to merge 1 commit into
huggingface:mainfrom
Mr-Neutr0n:fix/moonshine-pipeline-tokenizer
Open

Fix Moonshine ASR token decoding#1738
Mr-Neutr0n wants to merge 1 commit into
huggingface:mainfrom
Mr-Neutr0n:fix/moonshine-pipeline-tokenizer

Conversation

@Mr-Neutr0n

Copy link
Copy Markdown

What does this PR do?

Fixes Moonshine automatic speech recognition pipelines that fail during token decoding.

Moonshine processors can contain only a feature extractor, while the tokenizer is loaded separately on the pipeline. _call_moonshine currently asks the processor to decode generated token IDs, which raises Unable to decode without a tokenizer. This change uses the pipeline tokenizer, matching the other ASR paths.

The regression test constructs a processor without a tokenizer and verifies that generated tokens are decoded through the pipeline tokenizer.

Fixes #1735.

Tests

  • focused Moonshine Jest test passes
  • Prettier checks pass for both changed files
  • pnpm build passes, including TypeScript type generation

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.

Moonshine ASR pipeline throws 'Unable to decode without a tokenizer' — _call_moonshine calls processor.batch_decode but processor has no tokenizer

1 participant