media-use transcribe.mjs: add --language so non-English audio isn't translated by small.en

Aperta Adatta ai principianti
#7,371 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@sx4im ci sta già lavorando.

Dal 7/11/2026.

  • #7372 di @sx4im — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
88/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
node.js, typescript

Direzione di ricerca

Inizia da skills/media-use/scripts/transcribe.mjs e segui come vengono analizzate le opzioni e passate al comando hyperframes transcribe. Poi leggi skills/media-use/audio/references/transcribe.md per consultare le indicazioni esistenti su modelli e lingue. Il lavoro è completato quando lo script accetta un valore facoltativo per --language, lo passa alla CLI e ne documenta l’uso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem

skills/media-use/scripts/transcribe.mjs has no way to pass a language to the CLI, so non-English audio outside Parakeet's 25 languages (Thai, Japanese, Chinese, Korean, ...) comes back translated into English.

  • Its options are --input, --out, --engine, --model, --json and --help (transcribe.mjs#L32-L43). --model only reaches parakeet-mlx (#L113).
  • The CLI fallback runs hyperframes transcribe <input> --dir <tmp> --engine <engine> --json with no --language and no --model (#L137).
  • With no language, the CLI uses its default whisper model small.en (packages/cli/src/whisper/manager.ts, DEFAULT_MODEL), which is English-only. whisper.cpp then translates Thai speech into English instead of transcribing it.

The CLI itself handles this well: --language th makes initialModelForLanguage swap small.en for multilingual small, and pickRunner routes to whisper because parakeetSpeaks("th") is false. The skill script just never passes it.

Repro (v0.9.20, macOS):

say -v Kanya -o th.aiff "สวัสดีครับ วันนี้อากาศดีมาก"
ffmpeg -i th.aiff -ar 16000 -ac 1 th.wav
npx hyperframes transcribe th.wav --dir . --json                 # small.en, which skills/hyperframes/references/captions.md says translates non-English speech
npx hyperframes transcribe th.wav --dir . --json --language th   # engine whisper, model small: Thai text
node skills/media-use/scripts/transcribe.mjs --input th.wav       # no way to get the second result
Proposed solution

Add a --language option to transcribe.mjs and forward it to the CLI call:

language: { type: "string" }, // ISO 639-1, e.g. th, ja; omit for auto
// ...
["hyperframes", "transcribe", inputPath, "--dir", workDir, "--engine", cliEngine, "--json",
 ...(args.language ? ["--language", args.language] : [])],

Then mention it in skills/media-use/audio/references/transcribe.md next to the CLI's --model small --language <code> guidance, so an agent that already knows the language can pass it through the script too.

Alternatives considered
  • A shell wrapper around npx that appends --language: it works for typed commands, but execFileSync skips shell functions, so it never reaches this script.
  • An env var such as HYPERFRAMES_TRANSCRIBE_LANGUAGE read by the CLI: this would cover every caller, but it's a bigger change than one forwarded flag.
Additional context

hyperframes CLI 0.9.20, installed as the Claude Code plugin. Same code on main at 896a77c.

Lingua principale
TypeScript
Stelle
54.1k
Fork
4.9k
Merge medio
7h
PR unite (30g)
799

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di heygen-com/hyperframes

Tutte le issue di heygen-com/hyperframes

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.