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

オープン 初心者向け
#7,371 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@sx4im がすでに取り組んでいます。

2026年11月7日 から。

  • #7372 @sx4im による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
node.js, typescript

調査の方向性

skills/media-use/scripts/transcribe.mjsから始め、オプションがどのように解析され、hyperframes transcribeコマンドに渡されるかを追ってください。次に、既存のモデルと言語に関するガイダンスを確認するため、skills/media-use/audio/references/transcribe.mdを読んでください。スクリプトが省略可能な--languageの値を受け付け、それをCLIに渡し、使い方を文書化できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
54.1k
フォーク
4.9k
平均マージ
7時間
マージ済み PR(30日)
799

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

heygen-com/hyperframes のほかの issue

heygen-com/hyperframes の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。