Skip to content

Add Flux Multilingual support to WorkersAIFluxSTT#1459

Draft
whoiskatrin wants to merge 3 commits intomainfrom
fix/issue-1441-flux-multilingual
Draft

Add Flux Multilingual support to WorkersAIFluxSTT#1459
whoiskatrin wants to merge 3 commits intomainfrom
fix/issue-1441-flux-multilingual

Conversation

@whoiskatrin
Copy link
Copy Markdown
Contributor

@whoiskatrin whoiskatrin commented May 4, 2026

Summary

Fixes #1441.

This adds @cloudflare/voice support for configuring Deepgram Flux multilingual transcription through WorkersAIFluxSTT.

Previously, WorkersAIFluxSTT always called @cf/deepgram/flux with only the default audio and end-of-turn options, so callers could not request flux-general-multi or pass language hints for non-English or multilingual voice agents.

Changes

  • Add model to WorkersAIFluxSTTOptions so callers can request Deepgram Flux variants such as flux-general-multi.
  • Add languageHints to WorkersAIFluxSTTOptions to bias Flux Multilingual toward expected languages.
  • Forward multilingual configuration through the Workers AI websocket input as model and language_hint.
  • Automatically set model: "flux-general-multi" when languageHints are provided and no explicit model is set.
  • Preserve existing default behavior when no multilingual options are provided.
  • Add tests covering Workers AI Flux input construction.
  • Update packages/voice/README.md with multilingual examples.
  • Add a changeset for @cloudflare/voice.

Example

// Multilingual auto-detect
transcriber = new WorkersAIFluxSTT(this.env.AI, {
  model: "flux-general-multi"
});

// Bias recognition toward expected languages
transcriber = new WorkersAIFluxSTT(this.env.AI, {
  languageHints: ["en", "es"]
});

When languageHints is provided without model, WorkersAIFluxSTT automatically requests flux-general-multi.

Validation

Passed:

npm run test -w @cloudflare/voice -- src/tests/workers-ai-providers.test.ts
npm run test:workers -w @cloudflare/voice
npm run build -w @cloudflare/voice
npx oxfmt --check packages/voice/src/workers-ai-providers.ts packages/voice/src/tests/workers-ai-providers.test.ts packages/voice/README.md .changeset/fuzzy-badgers-speak.md

Notes:

  • npm run test -w @cloudflare/voice

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 4, 2026

🦋 Changeset detected

Latest commit: 3bb6e68

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudflare/voice Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 4, 2026

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@1459

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@1459

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@1459

hono-agents

npm i https://pkg.pr.new/hono-agents@1459

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@1459

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@1459

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@1459

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@1459

commit: 3bb6e68

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.

Support Flux multilingual model (flux-general-multi) and language_hint parameter in WorkersAIFluxSTT

1 participant