返回顶部
f

faster-whisper-local-service

Local speech-to-text (STT) transcription service for OpenClaw using faster-whisper. Runs as HTTP microservice on localhost for voice input, microphone transcription, and speech recognition. No recurring API costs — after initial model download, runs fully local. Supports WebChat voice input, Telegram voice messages, and any OpenClaw voice workflow. Keywords: STT, speech to text, voice transcription, local transcription, whisper, faster-whisper, offline, microphone, speech recognition, voice inpu

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.2.0
安全检测
已通过
1,293
下载量
0
收藏
概述
安装方式
版本历史

faster-whisper-local-service

# Faster Whisper Local Service Provision a local STT backend used by voice skills. ## What this sets up - Python venv for faster-whisper - `transcribe-server.py` HTTP endpoint at `http://127.0.0.1:18790/transcribe` - systemd user service: `openclaw-transcribe.service` ## Important: Model download on first run On first startup, faster-whisper downloads model weights from Hugging Face (~1.5 GB for `medium`). This requires internet access and disk space. After the initial download, models are cached locally and the service runs **fully offline**. | Model | Download size | RAM usage | |---|---|---| | tiny | ~75 MB | ~400 MB | | base | ~150 MB | ~500 MB | | small | ~500 MB | ~800 MB | | medium | ~1.5 GB | ~1.4 GB | | large-v3 | ~3.0 GB | ~3.5 GB | To pre-download models in an air-gapped environment, see [faster-whisper docs](https://github.com/SYSTRAN/faster-whisper#model-download). ## Security notes ### Network isolation - Binds to `127.0.0.1` only — **not reachable from the network**. - CORS restricted to a single origin (`https://127.0.0.1:8443` by default). - No credentials, API keys, or secrets are used or stored. ### Input validation - **Upload size limit**: Requests exceeding the configured limit are rejected before processing (HTTP 413). Default: 50 MB, configurable via `MAX_UPLOAD_MB`. - **Magic-byte check**: Only files with recognized audio signatures (WAV, OGG, FLAC, MP3, WebM, M4A) are accepted. Unrecognized formats are rejected (HTTP 415) before reaching GStreamer. - **Subprocess safety**: All arguments to `gst-launch-1.0` are passed as a list — no shell expansion or injection is possible. ### GStreamer dependency The service uses GStreamer's `decodebin` for audio format conversion. Like any media library, GStreamer's parsers process binary data and should be kept up to date. **Mitigation**: install `gst-launch-1.0` from your OS vendor's trusted packages and apply security updates regularly. The magic-byte pre-filter above reduces the attack surface by rejecting non-audio payloads before they reach GStreamer. ### No data exfiltration - No outbound network calls (after initial model download). - No telemetry, analytics, or phone-home behavior. - Temporary files are created in a per-request `TemporaryDirectory` and cleaned up immediately. ## Reproducibility defaults - Pinned package: `faster-whisper==1.1.1` (override via env) - Explicit dependency check for `gst-launch-1.0` - CORS restricted to one origin by default - Configurable workspace/service paths (no hardcoded user path) ## Deploy ```bash bash scripts/deploy.sh ``` With custom settings: ```bash WORKSPACE=~/.openclaw/workspace \ TRANSCRIBE_PORT=18790 \ WHISPER_MODEL_SIZE=medium \ WHISPER_LANGUAGE=auto \ TRANSCRIBE_ALLOWED_ORIGIN=https://10.0.0.42:8443 \ bash scripts/deploy.sh ``` ### Language setting Default: `auto` (auto-detect language). Set `WHISPER_LANGUAGE=de` for German-only, `en` for English-only, etc. Fixed language is faster and more accurate if you only use one language. Idempotent: safe to run repeatedly. ## What this skill modifies | What | Path | Action | |---|---|---| | Python venv | `$WORKSPACE/.venv-faster-whisper/` | Creates venv, installs faster-whisper via pip | | Transcribe server | `$WORKSPACE/voice-input/transcribe-server.py` | Writes server script | | Systemd service | `~/.config/systemd/user/openclaw-transcribe.service` | Creates + enables persistent service | | Model cache | `~/.cache/huggingface/` | Downloads model weights on first run | ## Uninstall ```bash systemctl --user stop openclaw-transcribe.service systemctl --user disable openclaw-transcribe.service rm -f ~/.config/systemd/user/openclaw-transcribe.service systemctl --user daemon-reload ``` Optional full cleanup: ```bash rm -rf ~/.openclaw/workspace/.venv-faster-whisper rm -f ~/.openclaw/workspace/voice-input/transcribe-server.py ``` ## Verify ```bash bash scripts/status.sh ``` Expected: - service `active` - endpoint responds (HTTP 200/500 acceptable for invalid sample payload) ## Notes - This skill provides backend transcription only. - Pair with `webchat-voice-proxy` for browser mic + HTTPS/WSS integration. - For one-step install, use `webchat-voice-full-stack` (deploys backend + proxy in order).

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 faster-whisper-local-service-1776420032 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 faster-whisper-local-service-1776420032 技能

通过命令行安装

skillhub install faster-whisper-local-service-1776420032

下载 Zip 包

⬇ 下载 faster-whisper-local-service v0.2.0

文件大小: 6.34 KB | 发布时间: 2026-4-17 19:25

v0.2.0 最新 2026-4-17 19:25
Security hardening: input validation (magic-byte check, configurable upload size limit), GStreamer subprocess timeout, sanitized error responses, restructured security docs

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部