Communitygithub.com

Faster Whisper

使用 faster-whisper 進行本地語音轉文字。速度比 OpenAI Whisper 快 4-6 倍,準確率相同;GPU 加速可實現約 20 倍即時轉錄。支援標準模型與蒸餾模型,並提供逐字時間戳。

Faster Whisper 是什麼?

Faster Whisper 技能基於 CTranslate2 對 OpenAI Whisper 的重新實作,提供本地、高效、離線的語音轉文字能力。它在保持與原始 Whisper 相同準確度的同時,實現 4-6 倍的速度提升,並在 GPU 加速下達到約 20 倍即時轉錄(例如 10 分鐘的音訊約 30 秒內完成)。此技能支援多種平台(Linux、macOS、Windows、WSL2),並自動偵測 GPU 以優化效能。使用者可以選擇標準模型(如 large-v3-turbo)以獲得最佳準確度,或使用蒸餾模型(預設為 distil-large-v3)以在不顯著降低詞錯誤率(WER)的情況下獲得約 6 倍的額外加速。技能提供簡單的命令列介面,支援批次處理、JSON 輸出、逐字時間戳、語音活動偵測(VAD)以及 99 種以上語言的辨識與自動偵測,適合會議記錄、訪談、字幕生成等多種場景。安裝腳本會自動處理相依性(包括 Python 和 ffmpeg),並針對不同平台提供詳細的 GPU 支援說明。

相容平台~Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/sundial-org/awesome-openclaw-skills/tree/HEAD/skills/faster-whisper

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Faster Whisper 是做什麼的?

使用 faster-whisper 進行本地語音轉文字 — 這是 OpenAI Whisper 基於 CTranslate2 的重新實作,運行速度快 4-6 倍,且準確率相同。使用 GPU 加速時,可達到約 20 倍即時轉錄(10 分鐘的音訊檔案約 30 秒完成)。

使用時機

當您需要以下功能時,可使用此技能:

  • 轉錄音訊/視訊檔案 — 會議、訪談、Podcast、講座、YouTube 影片
  • 將語音本地轉換為文字 — 無 API 費用,可離線運作(下載模型後)
  • 批次處理多個音訊檔案 — 對大量收藏集有效
  • 生成字幕/標題 — 提供逐字時間戳
  • 多語言轉錄 — 支援 99 種以上語言,具自動偵測功能

觸發詞:「轉錄此音訊」、「將語音轉為文字」、「他們說了什麼」、「製作文字稿」、「音訊轉文字」、「為此影片加字幕」

何時不應使用:

  • 即時/串流轉錄(請改用串流最佳化工具)
  • 僅有雲端環境且無本地運算資源
  • 音訊檔案小於 10 秒,此時 API 呼叫延遲影響不大

快速參考

任務指令備註
基本轉錄./scripts/transcribe audio.mp3使用預設的 distil-large-v3
更快的英文轉錄./scripts/transcribe audio.mp3 --model distil-medium.en --language en僅英文,快 6.8 倍
最高準確度./scripts/transcribe audio.mp3 --model large-v3-turbo --beam-size 10較慢但品質最佳
逐字時間戳./scripts/transcribe audio.mp3 --word-timestamps用於字幕/標題
JSON 輸出./scripts/transcribe audio.mp3 --json -o output.json程式化存取
多語言轉錄./scripts/transcribe audio.mp3 --model large-v3-turbo自動偵測語言
移除靜音./scripts/transcribe audio.mp3 --vad語音活動偵測

模型選擇

根據您的需求選擇合適的模型:

digraph model_selection {
    rankdir=LR;
    node [shape=box, style=rounded];

    start [label="開始", shape=doublecircle];
    need_accuracy [label="需要最高
準確度?", shape=diamond];
    multilingual [label="多語言
內容?", shape=diamond];
    resource_constrained [label="資源
有限?", shape=diamond];

    large_v3 [label="large-v3
或
large-v3-turbo", style="rounded,filled", fillcolor=lightblue];
    large_turbo [label="large-v3-turbo", style="rounded,filled", fillcolor=lightblue];
    distil_large [label="distil-large-v3
(預設)", style="rounded,filled", fillcolor=lightgreen];
    distil_medium [label="distil-medium.en", style="rounded,filled", fillcolor=lightyellow];
    distil_small [label="distil-small.en", style="rounded,filled", fillcolor=lightyellow];

    start -> need_accuracy;
    need_accuracy -> large_v3 [label="是"];
    need_accuracy -> multilingual [label="否"];
    multilingual -> large_turbo [label="是"];
    multilingual -> resource_constrained [label="否 (英文)"];
    resource_constrained -> distil_small [label="行動/邊緣裝置"];
    resource_constrained -> distil_medium [label="有些限制"];
    resource_constrained -> distil_large [label="無限制"];
}

模型表格

標準模型(完整 Whisper)

模型大小速度準確度使用案例
tiny / tiny.en39M最快基本快速草稿
base / base.en74M非常快良好一般用途
small / small.en244M快較好大多數任務
medium / medium.en769M中等高高品質轉錄
large-v1/v2/v31.5GB較慢最佳最高準確度
large-v3-turbo809M快極佳推薦用於準確度

蒸餾模型(約快 6 倍,WER 差約 1%)

模型大小與標準模型速度比準確度使用案例
distil-large-v3756M約快 6.3 倍9.7% WER預設,最佳平衡
distil-large-v2756M約快 5.8 倍10.1% WER備用方案
distil-medium.en394M約快 6.8 倍11.1% WER僅限英文,資源有限
distil-small.en166M約快 5.6 倍12.1% WER行動/邊緣裝置

.en 模型僅限英文,對於英文內容速度稍快且效果更佳。

設定

Linux / macOS / WSL2

# 執行設定腳本(建立 venv、安裝依賴、自動偵測 GPU)
./setup.sh

Windows(原生)

# 從 PowerShell 執行(若缺少則透過 winget 自動安裝 Python 與 ffmpeg)
.\setup.ps1

Windows 設定腳本將:

  • 若未找到 Python,透過 winget 自動安裝 Python 3.12
  • 若未找到 ffmpeg,透過 winget 自動安裝 ffmpeg
  • 偵測 NVIDIA GPU 並安裝支援 CUDA 的 PyTorch
  • 建立 venv 並安裝所有依賴

系統需求:

  • Linux/macOS/WSL2:Python 3.10+、ffmpeg
  • Windows:無需事先安裝!設定腳本會透過 winget 自動安裝必要元件

平台支援

平台加速速度自動安裝
Windows + NVIDIA GPUCUDA約 20 倍即時 🚀✅ 完整
Linux + NVIDIA GPUCUDA約 20 倍即時 🚀手動安裝必要元件
WSL2 + NVIDIA GPUCUDA約 20 倍即時 🚀手動安裝必要元件
macOS Apple SiliconCPU*約 3-5 倍即時手動安裝必要元件
macOS IntelCPU約 1-2 倍即時手動安裝必要元件
Windows(無 GPU)CPU約 1 倍即時✅ 完整
Linux(無 GPU)CPU約 1 倍即時手動安裝必要元件

*faster-whisper 在 macOS 上僅使用 CTranslate2 的 CPU 模式,但 Apple Silicon 的效能已足夠實際使用。

GPU 支援(重要!)

設定腳本會自動偵測您的 GPU 並安裝支援 CUDA 的 PyTorch。請務必在可用時使用 GPU — CPU 轉錄極慢。

硬體速度9 分鐘影片
RTX 3070(GPU)約 20 倍即時約 27 秒
CPU(int8)約 0.3 倍即時約 30 分鐘

若設定腳本未偵測到您的 GPU,請手動安裝支援 CUDA 的 PyTorch:

Linux/macOS/WSL2:

# 針對 CUDA 12.x
uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cu121

# 針對 CUDA 11.x
uv pip install --python .venv/bin/python torch --index-url https://download.pytorch.org/whl/cu118

Windows:

# 針對 CUDA 12.x
.venv\Scripts\pip install torch --index-url https://download.pytorch.org/whl/cu121

# 針對 CUDA 11.x
.venv\Scripts\pip install torch --index-url https://download.pytorch.org/whl/cu118

使用方法

Linux/macOS/WSL2:

# 基本轉錄
./scripts/transcribe audio.mp3

# 使用特定模型
./scripts/transcribe audio.wav --model large-v3-turbo

# 使用逐字時間戳
./scripts/transcribe audio.mp3 --word-timestamps

# 指定語言(比自動偵測更快)
./scripts/transcribe audio.mp3 --language en

# JSON 輸出
./scripts/transcribe audio.mp3 --json

Windows(cmd 或 PowerShell):

# 基本轉錄
.\scripts\transcribe.cmd audio.mp3

# 使用特定模型
.\scripts\transcribe.cmd audio.wav --model large-v3-turbo

# 使用逐字時間戳(PowerShell 原生語法亦可)
.\scripts\transcribe.ps1 audio.mp3 -WordTimestamps

# JSON 輸出
.\scripts\transcribe.cmd audio.mp3 --json

選項

--model, -m        模型名稱(預設:distil-large-v3)
--language, -l     語言代碼(例如 en、es、fr — 省略則自動偵測)
--word-timestamps  包含逐字時間戳
--beam-size        Beam search 大小(預設:5,越大越準確但越慢)
--vad              啟用語音活動偵測(移除靜音)
--json, -j         輸出為 JSON
--output, -o       將文字稿儲存至檔案
--device           cpu 或 cuda(自動偵測)
--compute-type     int8、float16、float32(預設:自動最佳化)
--quiet, -q       隱藏進度訊息

範例

# 轉錄 YouTube 音訊(先使用 yt-dlp 提取)
yt-dlp -x --audio-format mp3 <URL> -o audio.mp3
./scripts/transcribe audio.mp3

# 批次轉錄並輸出 JSON
for file in *.mp3; do
  ./scripts/transcribe "$file" --json > "${file%.mp3}.json"
done

# 使用較大 beam size 進行高準確度轉錄
./scripts/transcribe audio.mp3 \
  --model large-v3-turbo --beam-size 10 --word-timestamps

# 快速英文轉錄
./scripts/transcribe audio.mp3 \
  --model distil-medium.en --language en

# 使用 VAD 轉錄(移除靜音)
./scripts/transcribe audio.mp3 --vad

常見錯誤

錯誤問題解決方案
GPU 可用時仍用 CPU轉錄慢 10-20 倍在 Windows/Linux 上檢查 nvidia-smi;驗證 CUDA 安裝
未指定語言對已知內容浪費時間自動偵測當您知道語言時使用 --language en
使用錯誤的模型不必要地緩慢或準確度差預設的 distil-large-v3 已足夠;僅在準確度問題時使用 large-v3
忽略蒸餾模型錯過 6 倍加速且準確度損失小於 1%在嘗試標準模型前先試用 distil-large-v3
忘記安裝 ffmpeg設定失敗或無法處理音訊設定腳本會處理此問題;手動安裝需另外安裝 ffmpeg
記憶體不足錯誤模型對可用 VRAM/RAM 而言過大使用較小模型或 --compute-type int8
過度調整 beam size超過 beam-size 5-7 後效益遞減預設 5 已足夠;關鍵文字稿可嘗試 10

效能說明

  • 首次執行:將模型下載至 ~/.cache/huggingface/(一次性)
  • GPU:若可用則自動使用 CUDA(快約 10-20 倍)
  • 量化:在 CPU 上使用 INT8 以獲得約 4 倍加速,準確度損失極小
  • 記憶體:
    • distil-large-v3:約 2GB RAM / 約 1GB VRAM
    • large-v3-turbo:約 4GB RAM / 約 2GB VRAM
    • tiny/base:<1GB RAM

為何選擇 faster-whisper?

  • 速度:比 OpenAI 原始 Whisper 快約 4-6 倍
  • 準確度:相同(使用相同模型權重)
  • 效率:透過量化降低記憶體使用量
  • 適合生產環境:穩定的 C++ 後端(CTranslate2)
  • 蒸餾模型:約快 6 倍,準確度損失小於 1%

故障排除

「CUDA 不可用 — 使用 CPU」:安裝支援 CUDA 的 PyTorch(請參閱上方的 GPU 支援) 設定失敗:請確保已安裝 Python 3.10+ 記憶體不足:使用較小模型或 --compute-type int8 CPU 上緩慢:此為預期情況 — 實際轉錄請使用 GPU 模型下載失敗:檢查 ~/.cache/huggingface/ 的權限(Linux/macOS)或 %USERPROFILE%\.cache\huggingface\(Windows)

Windows 專屬問題

「找不到 winget」:從 Microsoft Store 安裝 App Installer,或手動安裝 Python 與 ffmpeg 「安裝後 Python 不在 PATH 中」:關閉並重新開啟終端機,然後再次執行 setup.ps1 PowerShell 執行原則錯誤:執行 Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned,或改用 transcribe.cmd 雖有 GPU 但找不到 nvidia-smi:安裝 NVIDIA 驅動程式 — Game Ready 或 Studio 驅動程式均包含 nvidia-smi

參考資料

Individual skills in this repo

This repo contains 19 individual skills — each has its own dedicated page.

sundial-org/awesome-openclaw-skills

Complete X (Twitter) algorithm mastery - engagement weights, viral formulas, shadow ban avoidance, thread optimization, and growth strategies. Based on X's open-source code analysis and real creator data.

sundial-org/awesome-openclaw-skills

Create product demo videos by automating browser interactions and capturing frames. Use when the user wants to record a demo, walkthrough, product showcase, or interactive video of a web application. Supports Playwright CDP screencast for high-quality capture and FFmpeg for video encoding.

sundial-org/awesome-openclaw-skills

Text-to-speech conversion using node-edge-tts npm package for generating audio from text. Supports multiple voices, languages, speed adjustment, pitch control, and subtitle generation. Use when: (1) User requests audio/voice output with the "tts" trigger or keyword. (2) Content needs to be spoken rather than read (multitasking, accessibility, driving, cooking). (3) User wants a specific voice, speed, pitch, or format for TTS output.

sundial-org/awesome-openclaw-skills

Comprehensive video/audio processing with FFmpeg. Use for: (1) Video transcoding and format conversion, (2) Cutting and merging clips, (3) Audio extraction and manipulation, (4) Thumbnail and GIF generation, (5) Resolution scaling and quality adjustment, (6) Adding subtitles or watermarks, (7) Speed adjustment (slow/fast motion), (8) Color correction and filters.

sundial-org/awesome-openclaw-skills

Generate FFmpeg commands from natural language video editing requests - cut, trim, convert, compress, change aspect ratio, extract audio, and more.

sundial-org/awesome-openclaw-skills

Create a verbatim transcript for a YouTube URL using Google Gemini (speaker labels, paragraph breaks; no time codes). Use when the user asks to transcribe a YouTube video or wants a clean transcript (no timestamps).

sundial-org/awesome-openclaw-skills

Generate landing page code from product descriptions

sundial-org/awesome-openclaw-skills

Generate a beautiful HTML landing page from your package.json. Use when you need a quick marketing page for your project.

sundial-org/awesome-openclaw-skills

Founder vs employee personal branding strategies with LinkedIn positioning and exit planning

sundial-org/awesome-openclaw-skills

Monitor stock/crypto holdings, get price alerts, track portfolio performance

sundial-org/awesome-openclaw-skills

End-to-end AI video generation - create videos from text prompts using image generation, video synthesis, voice-over, and editing. Supports OpenAI DALL-E, Replicate models, LumaAI, Runway, and FFmpeg editing.

sundial-org/exa-web-search-free

Free AI search via Exa MCP. Web search for news/info, code search for docs/examples from GitHub/StackOverflow, company research for business intel. No API key needed.

sundial-org/finance-news

Market news briefings with AI summaries. Use when asked about stock news, market updates, portfolio performance, morning/evening briefings, financial headlines, or price alerts. Supports US/Europe/Japan markets, WhatsApp delivery, and English/German output.

sundial-org/jina-reader

Web content extraction via Jina AI Reader API. Three modes: read (URL to markdown), search (web search + full content), ground (fact-checking). Extracts clean content without exposing server IP.

sundial-org/memory-setup

Enable and configure Moltbot/Clawdbot memory search for persistent context. Use when setting up memory, fixing "goldfish brain," or helping users configure memorySearch in their config. Covers MEMORY.md, daily logs, and vector search setup.

sundial-org/news-summary

This skill should be used when the user asks for news updates, daily briefings, or what's happening in the world. Fetches news from trusted international RSS feeds and can create voice summaries.

sundial-org/ontology

Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.

sundial-org/remind-me

Set reminders using natural language. Automatically creates one-time cron jobs and logs to markdown.

sundial-org/stock-market-pro

Professional stock price tracking, fundamental analysis, and financial reporting tool. Supports global markets (US, KR, etc.), Crypto, and Forex with real-time data. (1) Real-time quotes, (2) Valuation metrics (PE, EPS, ROE), (3) Earnings calendar and consensus, (4) High-quality Candlestick & Line charts with technical indicators (MA5/20/60).

相關技能