Whisper Transcribe

io.github.ZahiriNatZuke由 GitHub 账号 ZahiriNatZuke 发布v1.1.3更新于 Oct 24, 2026

Transcribe audio locally with faster-whisper or through the OpenAI Whisper API.

发布方自己的服务:Transcribe

概览

AI 生成的概览

让助手使用本地 faster-whisper 或 OpenAI Whisper API 转写音频文件。

可以做什么
提供按文件路径或 base64 编码数据转写音频的工具,返回文本、检测到的语言和带时间戳的分段。可选的后处理步骤会把转写文本交给 OpenAI 聊天模型,修正拼写、语法和标点。list_models 工具会报告当前后端和可用的本地模型。
适用场景
适合让助手把录音、语音备忘或会议音频转成文字:可完全离线运行以保护隐私且不产生费用,也可通过 OpenAI 获得更高准确度。
运行要求
以 PyPI 包形式通过 stdio 在本地运行,用 uvx 或 pip 启动;需要 uv 或 Python 3.10+,仅支持桌面端。本地后端首次使用时会从 Hugging Face 下载 Whisper 模型。OpenAI 后端需要 OPENAI_API_KEY 和网络连接。可选变量:WHISPER_MODEL 和 WHISPER_POST_PROCESS_MODEL。
安装前请注意
OpenAI 后端会把音频发送给 OpenAI,并需要 OPENAI_API_KEY,该密钥保存在客户端配置中;API 用量由 OpenAI 计费。后处理也会把转写文本发送给 OpenAI。服务器会读取你提供的音频文件路径,并把解码后的 base64 音频写入临时文件后删除。在 Windows 上,Claude Desktop 可能需要 uvx 的完整路径并强制使用 Python 3.12。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Whisper Transcribe,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

whisper-transcribe-mcp

[PyPI version] [CI] [License: MIT] [Python 3.10+]

MCP server for audio transcription using faster-whisper (local, free, offline) or OpenAI Whisper API (cloud, requires API key). Works with Claude Desktop and Claude Code on macOS, Windows, and Linux.


Prerequisites

macOS

Option A — uv (recommended):

bash
brew install uv# orcurl -LsSf https://astral.sh/uv/install.sh | sh

Option B — Python: Python 3.10+ is included in macOS 12.3+. You can also install it with brew install python.


Windows

Option A — uv (recommended):

powershell
winget install astral-sh.uv

Or download the installer from astral.sh/uv.

Option B — Python: Download Python 3.10+ from python.org. During installation, check "Add Python to PATH".

No need to install ffmpeg or any compiler — everything is bundled in the package.


Linux

Option A — uv (recommended):

bash
curl -LsSf https://astral.sh/uv/install.sh | sh

Option B — Python:

bash
# Debian/Ubuntusudo apt install python3.12 python3.12-venv
# Fedorasudo dnf install python3.12
# Archsudo pacman -S python

No additional system dependencies required.


Installation

Option A — uvx (recommended, no permanent install)

uvx automatically downloads and installs the package in an isolated environment. Only requires uv to be installed.

bash
# Local backend:uvx "whisper-transcribe-mcp[local]"
# OpenAI backend:uvx "whisper-transcribe-mcp[openai]"
# Both backends:uvx "whisper-transcribe-mcp[all]"

Option B — pip

bash
# Local backend:pip install "whisper-transcribe-mcp[local]"
# OpenAI backend:pip install "whisper-transcribe-mcp[openai]"
# Both backends:pip install "whisper-transcribe-mcp[all]"

Use Cases

Case 1 — Local backend only (free, works offline)

Uses faster-whisper to transcribe locally. The model is downloaded from HuggingFace on first use (~74MB for base) and cached.

Install:

bash
pip install "whisper-transcribe-mcp[local]"

Environment variables:

WHISPER_MODEL=base   # or tiny, small, medium, large-v3

Case 2 — OpenAI backend only (best accuracy, requires API key)

Uses OpenAI's whisper-1 model. Requires an API key and internet connection. No local model downloads.

Install:

bash
pip install "whisper-transcribe-mcp[openai]"

Environment variables:

OPENAI_API_KEY=sk-...

Case 3 — Both backends (OpenAI if key present, local as fallback)

If OPENAI_API_KEY is set, OpenAI is used automatically. Otherwise falls back to local faster-whisper.

Install:

bash
pip install "whisper-transcribe-mcp[all]"

Configuration

Claude Desktop

Config file location by operating system:

OSPath
macOS~/Library/Application Support/Claude/claude_desktop_config.json
Windows%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

Add the entry inside "mcpServers":

Windows note: Claude Desktop runs in a restricted environment and may not have uvx in its PATH, and it may use a Python version (e.g. 3.14) for which ctranslate2 (a dependency of faster-whisper) does not yet have prebuilt wheels. Two fixes are required:

  1. Use the full path to uvx.exe instead of just uvx. Run where.exe uvx in PowerShell to find it (usually C:\Users\<YourUser>\.local\bin\uvx.exe).
  2. Force Python 3.12 via the --python 3.12 flag so that a compatible wheel is used.

Case 1 — Local:

macOS / Linux:

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "uvx",      "args": ["whisper-transcribe-mcp[local]"],      "env": {        "WHISPER_MODEL": "base"      }    }  }}

Windows:

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "C:\\Users\\<YourUser>\\.local\\bin\\uvx.exe",      "args": ["--python", "3.12", "whisper-transcribe-mcp[local]"],      "env": {        "WHISPER_MODEL": "base"      }    }  }}

Case 2 — OpenAI:

macOS / Linux:

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "uvx",      "args": ["whisper-transcribe-mcp[openai]"],      "env": {        "OPENAI_API_KEY": "sk-..."      }    }  }}

Windows:

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "C:\\Users\\<YourUser>\\.local\\bin\\uvx.exe",      "args": ["--python", "3.12", "whisper-transcribe-mcp[openai]"],      "env": {        "OPENAI_API_KEY": "sk-..."      }    }  }}

Case 3 — Both (OpenAI takes priority if key is set):

macOS / Linux:

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "uvx",      "args": ["whisper-transcribe-mcp[all]"],      "env": {        "OPENAI_API_KEY": "sk-...",        "WHISPER_MODEL": "base"      }    }  }}

Windows:

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "C:\\Users\\<YourUser>\\.local\\bin\\uvx.exe",      "args": ["--python", "3.12", "whisper-transcribe-mcp[all]"],      "env": {        "OPENAI_API_KEY": "sk-...",        "WHISPER_MODEL": "base"      }    }  }}

Restart Claude Desktop after editing the file.


Claude Code

Works the same on macOS, Windows, and Linux. Requires uv installed.

Claude Code config file location:

OSGlobalPer project
macOS / Linux~/.claude.json.claude/settings.json (project root)
WindowsC:\Users\<user>\.claude.json.claude\settings.json (project root)

The easiest way to add the server is via the Claude Code CLI, which updates the config file automatically:

bash
# Case 1 — Local:claude mcp add whisper-transcribe uvx -- "whisper-transcribe-mcp[local]"
# Case 2 — OpenAI:claude mcp add whisper-transcribe uvx --env OPENAI_API_KEY=sk-... -- "whisper-transcribe-mcp[openai]"
# Case 3 — Both (OpenAI with local fallback):claude mcp add whisper-transcribe uvx --env OPENAI_API_KEY=sk-... --env WHISPER_MODEL=base -- "whisper-transcribe-mcp[all]"

Windows + [all]: Add --python 3.12 before the package name to avoid ctranslate2 wheel issues. Edit ~/.claude.json directly and use "args": ["--python", "3.12", "whisper-transcribe-mcp[all]"].

To add it globally (available in all projects), use --scope user:

bash
claude mcp add --scope user whisper-transcribe uvx -- "whisper-transcribe-mcp[local]"

Or edit ~/.claude.json directly and add inside "mcpServers":

json
{  "mcpServers": {    "whisper-transcribe": {      "command": "uvx",      "args": ["whisper-transcribe-mcp[local]"],      "env": {        "WHISPER_MODEL": "base"      }    }  }}

Environment Variables

VariableDefaultDescription
WHISPER_MODELbaseLocal model size: tiny, base, small, medium, large-v3
OPENAI_API_KEY—If set, activates the OpenAI backend instead of local
WHISPER_POST_PROCESS_MODELgpt-5.4-nanoOpenAI chat model used when post_process=true

Backend selection and fallback ([all] only)

When installed with [all], the backend is chosen at startup:

  • OPENAI_API_KEY set → OpenAI is used. If the API call fails at runtime (network error, invalid key, quota exceeded), the server automatically falls back to local faster-whisper and includes a "fallback_reason" field in the response.
  • OPENAI_API_KEY not set → local faster-whisper is used directly, no fallback attempted.

Security and Permissions

The server runs locally over stdio and only needs the access its tools imply:

AccessWhy
File system readtranscribe_file reads the audio file path you pass it.
Temporary filestranscribe_base64 writes the decoded audio to a private temp file and always deletes it.
NetworkOnly for the OpenAI backend / post-processing, and for the first download of a local model from Hugging Face.
Environment variablesOPENAI_API_KEY, WHISPER_MODEL, WHISPER_POST_PROCESS_MODEL.

Tool inputs are validated before use: model_size must be a known Whisper model name, language must be an ISO 639 code, and extension must be a known audio format. OpenAI errors are returned as a short summary (error type and HTTP status); the full message goes to stderr. Releases are published from GitHub Actions with PyPI Trusted Publishing and PEP 740 provenance attestations.


Available Tools

transcribe_file

Transcribes an audio file by path (mp3, wav, m4a, ogg, flac, webm, etc.).

Parameters:

  • file_path (required): Absolute path to the audio file
  • language (optional): Language code (es, en, fr, etc.). Auto-detected if not provided.
  • model_size (optional): Local model size. Ignored with the OpenAI backend.
  • post_process (optional, default false): If true, passes the transcription through GPT-4.1 to fix spelling, grammar, and punctuation. Requires the openai package ([openai] or [all]).
  • post_process_prompt (optional): Custom system prompt for GPT post-processing. Use it to provide domain-specific context, proper nouns, or product names that Whisper may have misspelled. Falls back to a generic correction prompt if not provided.

Response (without post-processing):

json
{  "text": "Full transcription...",  "language": "en",  "language_probability": 0.99,  "segments": [    { "start": 0.0, "end": 4.2, "text": "First segment..." }  ],  "backend": "local",  "model": "base"}

Response (with post_process: true):

json
{  "text": "Corrected transcription...",  "raw_text": "Original transcription from Whisper...",  "post_process_model": "gpt-4.1",  "language": "en",  "language_probability": 0.99,  "segments": [...],  "backend": "local",  "model": "base"}

If post-processing fails, text retains the original transcription and a post_process_error field is added.


transcribe_base64

Transcribes audio provided as a base64-encoded string. Useful for programmatic integrations.

Parameters:

  • audio_base64 (required): Base64-encoded audio data
  • extension (optional, default mp3): File extension (mp3, wav, ogg, etc.)
  • language (optional): Language code
  • model_size (optional): Local model size
  • post_process (optional, default false): Same as in transcribe_file.
  • post_process_prompt (optional): Same as in transcribe_file.

list_models

Shows the active backend configuration, available local models, and the GPT model used for post-processing.


Local Model Sizes

ModelSizeRelative SpeedNotes
tiny39 MB~32xFastest, least accurate
base74 MB~16xGood balance (default)
small244 MB~6xBetter accuracy
medium769 MB~2xHigh accuracy
large-v31.5 GB~1xBest accuracy, slowest

Models are downloaded automatically from HuggingFace on first use and cached locally.


Troubleshooting

MCP not loading in Claude Desktop on Windows

Symptom: The server fails to start with a dependency resolution error like:

ctranslate2>=4.6.1 has no wheels with a matching platform tag (e.g., `win32`)hint: You require CPython 3.14 (`cp314`), but we only found wheels for `ctranslate2` with: `cp39`, `cp310`, `cp311`, `cp312`, `cp313`

Cause: Two issues combined:

  1. Claude Desktop does not include the user's local bin in its PATH, so uvx must be referenced by full path.
  2. Claude Desktop's uvx may pick a Python version (e.g. 3.14) for which ctranslate2 — a native dependency of faster-whisper — does not yet have prebuilt wheels for Windows.

Fix: Use the full path to uvx.exe and force Python 3.12 explicitly:

json
"whisper-transcribe": {  "command": "C:\\Users\\<YourUser>\\.local\\bin\\uvx.exe",  "args": ["--python", "3.12", "whisper-transcribe-mcp[local]"],  "env": { "WHISPER_MODEL": "base" }}

To find your exact uvx.exe path, run in PowerShell:

powershell
where.exe uvx

Transcribing audio files in Claude Desktop

Symptom: Claude Desktop fails to transcribe an uploaded audio file. It may attempt to read the file as base64 and pass it to transcribe_base64, which then fails or hangs for files larger than ~50 KB.

Cause: Claude Desktop runs in a sandboxed Linux container. When you upload a file using the attachment button, it is stored at a path like /mnt/user-data/uploads/audio.mp3 — inside the container. The MCP server runs on your Windows machine and has no access to that container path. Claude's fallback of base64-encoding the file and passing it to transcribe_base64 fails in practice because even a small audio file produces hundreds of kilobytes of base64 text, which overflows the context window before the tool call can be made.

Fix: Do not use the attachment button to upload audio files. Instead, place the file anywhere on your Windows filesystem and reference its path directly in the message:

"Transcribe the file at C:\Users\YourUser\Downloads\audio.mp3"

The MCP server will read the file directly from Windows and send it to the transcription backend. This works for files of any size within the Whisper API limit (25 MB).


Development

This project uses uv for reproducible development environments:

bash
uv sync --group devuv run ruff check .uv run ruff format --check .uv run pytest -quv run pre-commit install

See CONTRIBUTING.md for the contribution workflow.

Distribution and releases

The package is distributed through PyPI and described by server.json for the official MCP Registry. Version tags publish both destinations through GitHub OIDC, without long-lived publishing tokens. See docs/publishing.md for the release checklist and one-time repository setup.

The Registry entry describes the base PyPI package. Choose the [local], [openai], or [all] extra from the installation examples above so the transcription backend you need is installed.


License

MIT — see LICENSE

来源:README.md,提交 a0a029d

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v1.1.3最新Sep 22, 2026
  2. v1.1.2Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Transcribe 集成