|
|
2 months ago | |
|---|---|---|
| .. | ||
| .claude-plugin | 2 months ago | |
| bin | 2 months ago | |
| scripts | 2 months ago | |
| skills | 2 months ago | |
| README.md | 2 months ago | |
| package.json | 2 months ago | |
| skill-package-manifest.json | 2 months ago | |
Claude Code skill + CLI that transcribes audio files via the Fmode gateway
(POST /api/listen/transcribe, backed by iFlytek LFASR). iFlytek credentials
live only on the server — the client just needs an fmode token, and the
server bills by actual audio duration.
# transcribe an audio file (auto-probes duration for the pre-check)
npx fmode-listen@latest transcribe -- meeting.mp3
# language + speaker diarization + dump full JSON
npx fmode-listen@latest transcribe -- meeting.mp3 \
--language autodialect --diarize --speakers 3 --out result.json
# custom gateway (default https://server.fmode.cn/api/listen)
npx fmode-listen@latest transcribe -- meeting.mp3 --gateway https://server.fmode.cn/api/listen
transcribe prints the plain transcript to stdout. Everything after -- is
passed through to the runner.
The runner resolves the token in this order:
FMODE_API_TOKEN environment variable~/.fmode/config.json → fmodeApiToken / newapiToken (written by FmodeStudio)./.fmode/config.json → fmodeApiToken / newapiToken~/.claude/settings.json (plus settings.local.json / project .claude/) → env.ANTHROPIC_AUTH_TOKEN — this is Claude Code's sk- token; the runner reads it automatically, no manual config needed. Only accepted when it starts with sk- (real Anthropic sk-ant- is excluded) and the base points to fmode.A "token not found" error means the token is missing, not that the service is unavailable — do not click any payment/top-up popup; just supply the token via any source above.
Never put iFlytek appId/apiKey/secretKey on the client — they belong to the
server only.
# project-level → ./.claude/skills/fmode-listen
npx fmode-listen@latest workspace
# user-level → ~/.claude/skills/fmode-listen
npx fmode-listen@latest install
Then prompt Claude Code, e.g. 把 meeting.mp3 转写成文字,开启说话人分离。
ceil(minutes) × unit price, minimum 1 minute.duration is only used for the pre-flight balance check.rechargeUrl.| Command | Description |
|---|---|
transcribe -- <file> [opts] / run -- ... |
transcribe an audio file via the gateway |
workspace / install |
install the Claude Code skill |
check / smoke / path |
verify install / run smoke test / print target |
import { transcribeFile, probeDurationMs, resolveApiToken }
from './skills/fmode-listen/scripts/listen-runner.mjs';
const { text, segments, raw } = await transcribeFile({
filePath: 'meeting.mp3',
language: 'autodialect',
diarize: true,
speakers: 3,
});
MIT