local-whisper

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Local Whisper STT

本地Whisper语音转文本

Local speech-to-text using OpenAI's Whisper. Fully offline after initial model download.
使用OpenAI的Whisper实现本地语音转文本。模型初次下载完成后可完全离线运行

Usage

使用方法

bash
undefined
bash
undefined

Basic

基础用法

~/.thinkfleetbot/skills/local-whisper/scripts/local-whisper audio.wav
~/.thinkfleetbot/skills/local-whisper/scripts/local-whisper audio.wav

Better model

使用更优模型

~/.thinkfleetbot/skills/local-whisper/scripts/local-whisper audio.wav --model turbo
~/.thinkfleetbot/skills/local-whisper/scripts/local-whisper audio.wav --model turbo

With timestamps

包含时间戳

~/.thinkfleetbot/skills/local-whisper/scripts/local-whisper audio.wav --timestamps --json
undefined
~/.thinkfleetbot/skills/local-whisper/scripts/local-whisper audio.wav --timestamps --json
undefined

Models

模型

ModelSizeNotes
tiny
39MFastest
base
74MDefault
small
244MGood balance
turbo
809MBest speed/quality
large-v3
1.5GBMaximum accuracy
模型大小说明
tiny
39M速度最快
base
74M默认模型
small
244M平衡性能最优
turbo
809M速度与质量最佳平衡
large-v3
1.5GB精度最高

Options

选项

  • --model/-m
    — Model size (default: base)
  • --language/-l
    — Language code (auto-detect if omitted)
  • --timestamps/-t
    — Include word timestamps
  • --json/-j
    — JSON output
  • --quiet/-q
    — Suppress progress
  • --model/-m
    — 模型尺寸(默认:base)
  • --language/-l
    — 语言代码(省略则自动检测)
  • --timestamps/-t
    — 包含单词时间戳
  • --json/-j
    — 输出JSON格式
  • --quiet/-q
    — 隐藏进度信息

Setup

安装配置

Uses uv-managed venv at
.venv/
. To reinstall:
bash
cd ~/.thinkfleetbot/skills/local-whisper
uv venv .venv --python 3.12
uv pip install --python .venv/bin/python click openai-whisper torch --index-url https://download.pytorch.org/whl/cpu
使用uv管理的虚拟环境
.venv/
。如需重新安装:
bash
cd ~/.thinkfleetbot/skills/local-whisper
uv venv .venv --python 3.12
uv pip install --python .venv/bin/python click openai-whisper torch --index-url https://download.pytorch.org/whl/cpu