Skip to content

Document Whisper language param format#28168

Merged
elithrar merged 2 commits intoproductionfrom
opencode/issue24588-20260207024707
Feb 13, 2026
Merged

Document Whisper language param format#28168
elithrar merged 2 commits intoproductionfrom
opencode/issue24588-20260207024707

Conversation

@ask-bonk
Copy link
Contributor

@ask-bonk ask-bonk bot commented Feb 7, 2026

Both files look correct. Here's a summary of the changes:

Changes Made

1. src/content/workers-ai-models/whisper-large-v3-turbo.json

Updated the language input parameter description to clarify:

  • The expected format: ISO 639-1 two-letter codes (e.g., en, es, fr)
  • Three concrete examples: English, Spanish, French
  • A link to the Whisper language documentation for the full list of supported languages
  • That the model auto-detects language when the parameter is omitted

2. src/components/models/code/WhisperBase64Code.astro

  • Workers TypeScript example: Added the language: "en" parameter with inline comments showing the format and listing example codes (en, es, fr)
  • New Python example: Added a complete Python snippet showing how to base64-encode an audio file and pass the language parameter
  • New curl example: Added a curl snippet showing how to encode audio and send it with the language parameter via the REST API

These changes directly address the issue where users didn't know whether to use en vs english, es vs spanish, etc.

Closes #24588

github run

Co-authored-by: elithrar <elithrar@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
*.astro @cloudflare/content-engineering, @kodster28

@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

@elithrar elithrar enabled auto-merge (squash) February 13, 2026 21:45
@elithrar
Copy link
Collaborator

/bonk the model JSONs come from an upstream API, so will get overwritten next run. can you make the changes in the .astro instead? and revert changes in json per @mchenco

@ask-bonk
Copy link
Contributor Author

ask-bonk bot commented Feb 13, 2026

Done. Here's what I did:

  • Reverted whisper-large-v3-turbo.json -- the language field description is back to the original "The language of the audio being transcribed or translated." since this file comes from an upstream API and will get overwritten on the next run.
  • Kept all .astro changes intact -- the language format documentation (ISO 639-1 codes, examples, auto-detect note) lives in the code examples (Workers TypeScript, Python, curl) in WhisperBase64Code.astro, which is the right place for it.

github run

@elithrar elithrar merged commit fbe17cb into production Feb 13, 2026
9 checks passed
@elithrar elithrar deleted the opencode/issue24588-20260207024707 branch February 13, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants