系統需求、音訊裝置設定、互動式選單、命令列參數與硬體建議——把整份操作手冊濃縮在這裡。需要逐步細節,請看完整使用手冊。Requirements, audio setup, the interactive menu, CLI flags and hardware tips — the whole manual, condensed. For step-by-step detail, see the full manual.
macOS(Apple Silicon / Intel)· Python 3.12+ · Homebrew(需事先安裝)· BlackHole 2ch(虛擬音訊驅動,選配;macOS 13 以上預設用內建 ScreenCaptureKit,免安裝驅動)macOS (Apple Silicon / Intel) · Python 3.12+ · Homebrew (pre-installed) · BlackHole 2ch (optional; macOS 13+ uses the built-in ScreenCaptureKit, no driver needed)
Windows 10 以上 · Python 3.12+(從 python.org 安裝,勾選「Add to PATH」)· PowerShell 5.1+(Windows 10 內建)Windows 10+ · Python 3.12+ (from python.org, check "Add to PATH") · PowerShell 5.1+ (built in)
Ubuntu 22.04 / Debian 12 以上(其他發行版需自行安裝系統套件)· Python 3.10+(含 python3-venv)· 桌面版使用 PipeWire 或 PulseAudio,免裝虛擬音效卡;無桌面主機可安裝伺服器版(WebUI 以 systemd 常駐)Ubuntu 22.04 / Debian 12+ (other distros: install system packages manually) · Python 3.10+ (with python3-venv) · Desktop uses PipeWire or PulseAudio, no virtual sound card; headless hosts can use the server edition (WebUI as a systemd service)
安裝腳本會在安裝前自動檢查可用空間是否足夠。The installer checks free space before starting.
| 安裝層級Install tier | 大小Size | 內容Includes |
|---|---|---|
| 最小Minimal | ~3 GB | venv + 1 個 Whisper 模型 + 基本套件venv + 1 Whisper model + basics |
| 推薦Recommended | ~8 GB | 加上 HuggingFace 快取(離線處理用)+ HuggingFace cache (offline processing) |
| 完整Full | ~14 GB | 全部 Whisper 模型 + 快取 + MoonshineAll Whisper models + cache + Moonshine |
| 安裝層級Install tier | 大小Size | 內容Includes |
|---|---|---|
| 最小Minimal | ~5 GB | PyTorch + 1 個模型PyTorch + 1 model |
| 完整Full | ~12 GB | PyTorch + 全部 5 個模型 + 講者辨識套件PyTorch + all 5 models + diarization |
mkdir -p ~/Apps/jt-live-whisper && cd ~/Apps/jt-live-whisper
curl -fsSL https://raw.githubusercontent.com/jasoncheng7115/jt-live-whisper/main/install.sh -o install.sh
bash install.sh
mkdir -p ~/Apps/jt-live-whisper && cd ~/Apps/jt-live-whisper
curl -fsSL https://raw.githubusercontent.com/jasoncheng7115/jt-live-whisper/main/install.sh -o install.sh
bash install.sh
mkdir -p ~/Apps/jt-live-whisper && cd ~/Apps/jt-live-whisper
curl -fsSL https://raw.githubusercontent.com/jasoncheng7115/jt-live-whisper/main/install.sh -o install.sh
bash install.sh --server
兩種安裝都可用 ./install.sh --doctor 檢查音訊、套件、GPU 與伺服器連線;--upgrade 升級、--uninstall 移除。Both support ./install.sh --doctor (audio, packages, GPU, server connectivity), --upgrade and --uninstall.
mkdir C:\jt-live-whisper -Force | Out-Null; cd C:\jt-live-whisper
irm https://raw.githubusercontent.com/jasoncheng7115/jt-live-whisper/main/install.ps1 -OutFile install.ps1
powershell -ExecutionPolicy Bypass -File install.ps1
安裝腳本會自動下載並設定所有地端 AI 模型和相依套件。最後會詢問是否設定 GPU 語音辨識伺服器(選填)。首次安裝約 10–20 分鐘(視網路速度,macOS 需額外編譯 whisper.cpp;Linux 不需要)。The installer downloads and configures all local AI models and dependencies, then offers optional GPU-server setup. First run ~10–20 min (macOS also compiles whisper.cpp; Linux does not need it).
jt-live-whisper v2.17.0 起,macOS 13 以上不需要安裝任何驅動:使用系統內建的 ScreenCaptureKit 擷取系統音訊,不必建立多重輸出裝置、不必重開機,Zoom / Teams 的喇叭與麥克風設定也完全不用改,喇叭或耳機照常出聲。Since jt-live-whisper v2.17.0, on macOS 13+ no audio driver is needed: system audio is captured with the built-in ScreenCaptureKit — no Multi-Output Device, no reboot, and no changes to your Zoom/Teams audio settings.
./start.sh --sck-permission 重新授權,WebUI 設定頁也有授權按鈕。Quit the terminal app completely (Cmd+Q) and reopen it for the permission to take effect. Re-authorize anytime with ./start.sh --sck-permission, or from the WebUI settings page.系統設為靜音時只會收到無聲訊號(用耳機聽沒問題,但不要靜音)。macOS 12 以下或不想授權時,仍可改用 BlackHole:安裝驅動 → 重開機 → 建立多重輸出裝置(勾選喇叭 + BlackHole 2ch、主裝置選 BlackHole)→ 系統設定選此裝置;也可用 --audio-source blackhole 強制指定。Muting system output yields silence (headphones are fine — just don’t mute). On macOS 12 or if you prefer not to grant the permission, BlackHole still works: install → reboot → create a Multi-Output Device (speakers + BlackHole 2ch, BlackHole as primary) → select it in System Settings; or force it with --audio-source blackhole.
Windows 不需要安裝額外虛擬音訊驅動。程式透過 WASAPI Loopback 直接擷取系統播放的音訊,大多數情況不需手動設定。Windows needs no extra audio driver — the app captures system playback via WASAPI Loopback, usually with zero setup.
.\start.ps1 --list-devices 確認列表中有 loopback 裝置。Verify with .\start.ps1 --list-devices — a loopback device should appear.Linux 不需要安裝虛擬音效卡,也不必改變輸出裝置。程式直接從「預設喇叭」的 monitor 來源錄音,喇叭或耳機照常出聲,會議軟體的設定不用改。Linux needs no virtual sound card and no output changes — the app records from the default speaker’s monitor source while your speakers or headphones keep playing.
JTLW_MONITOR_SOURCE 或 config.json 的 linux_monitor_source。It follows the current default output; to pick another source set JTLW_MONITOR_SOURCE or linux_monitor_source in config.json../start.sh --list-devices,應看到 [-500] 系統音訊(…);或執行 ./install.sh --doctor。Verify with ./start.sh --list-devices — [-500] 系統音訊 (…) should appear — or run ./install.sh --doctor.# macOS:透過 Homebrew 安裝 brew install ollama # Windows:從 https://ollama.com/ 下載安裝程式 # Linux:官方安裝腳本 curl -fsSL https://ollama.com/install.sh | sh # 下載推薦的翻譯模型(各平台皆同) ollama pull gemma4:26b # 約 17GB;記憶體不足可改 qwen2.5:14b
推薦硬體:若有 NVIDIA DGX Spark(128GB),把 Ollama 裝在上面 CP 值很高,透過 --llm-host 指向即可。不裝 LLM 也能翻譯:可切換 NLLB(中日英互譯)或 Argos(僅英翻中)離線引擎,但摘要仍需 LLM。Recommended: a DGX Spark (128 GB) is great value for Ollama; point to it via --llm-host. No LLM? Use NLLB / Argos offline — summaries still need an LLM.
# macOS / Linux cd ~/Apps/jt-live-whisper ./start.sh # Windows (PowerShell) cd C:\jt-live-whisper .\start.ps1
程式進入互動式選單,依序選擇功能模式、翻譯引擎、AI 辨識模型等。音訊裝置全自動偵測,不需手動選擇。The interactive menu walks you through mode, translation engine and model. Audio devices are auto-detected.
以下以 macOS / Linux 指令為主,Windows 請把 ./start.sh 換成 .\start.ps1,其餘參數相同。Examples use macOS / Linux; on Windows replace ./start.sh with .\start.ps1 — flags are identical.
./start.sh --webui # macOS / Linux .\start.ps1 --webui # Windows
自動開啟瀏覽器(預設 http://localhost:19781),網頁中完成所有設定後按「開始」即可。即時 / 離線功能全包,支援淺色 / 深色主題、手機 / 平板。Opens the browser (default http://localhost:19781); configure and click Start. Live & offline features, light/dark themes, phone/tablet.
# CLI 模式(跳過選單) ./start.sh --mode en2zh --engine llm --llm-model gemma4:26b # 英中雙向字幕(對方英文翻中文 + 自己中文翻英文) ./start.sh --mode en_zh # 日中雙向字幕 ./start.sh --mode ja_zh # 韓中雙向字幕 ./start.sh --mode ko_zh # 即時翻譯 + 同時轉錄麥克風 ./start.sh --mode en2zh --mic
# 英翻中 + 自動摘要 ./start.sh --input meeting.mp3 --summarize # 講者辨識 ./start.sh --input meeting.mp3 --diarize # 指定講者人數(填「發言量足以辨認的人數」,不確定就不要填) ./start.sh --input meeting.mp3 --diarize --num-speakers 3 --summarize
不確定就不要填 --num-speakers。實測 7 人會議填「7」反而最差(講者搞錯 30.15%),不填是 22.90%——發言太短的人聲紋不足以成群,硬湊一群給他會把主要講者拆散。When unsure, omit --num-speakers. On a real 7-speaker meeting, passing "7" was the worst result (30.15% speaker confusion) versus 22.90% when omitted — people who barely speak can't form a reliable voiceprint, and forcing a cluster for them fragments the main speakers.
./start.sh --summarize logs/英翻中_逐字稿_20260101_120000.txt
即時模式快捷鍵:Ctrl+C 停止轉錄 · Ctrl+P 暫停 / 繼續。Live-mode shortcuts: Ctrl+C stop · Ctrl+P pause / resume.
# 安裝:不裝桌面套件,WebUI 以 systemd 服務常駐、開機自動啟動 ./install.sh --server # 服務管理 sudo systemctl status jt-live-whisper-webui sudo systemctl restart jt-live-whisper-webui journalctl -u jt-live-whisper-webui -f # 環境診斷(相依套件、音訊、GPU 伺服器連線) ./install.sh --doctor # 升級(從 GitHub 拉最新版,會自動重啟服務) ./install.sh --upgrade
安裝完成時會產生一組遠端管理密碼並顯示一次,請當下記下來——設定檔裡只存 sha256 雜湊,遺失只能重設。The installer prints a generated admin password once — write it down. Only its SHA-256 hash is stored; if lost it must be reset.
| 設定(config.json)Setting (config.json) | 作用Effect |
|---|---|
webui.allowed_ips | 只允許清單內的來源連進來,支援 CIDR(如 ["192.168.0.0/24"])。空的=不限制,本機一律放行。Only listed sources may connect; CIDR supported. Empty = unrestricted; localhost always allowed. |
webui.tls | 加密連線,憑證預設自簽,可用 tls_cert / tls_key 換成正式憑證。預設關閉,升級不會把既有網址從 http 變成 https。Encrypts the connection with a self-signed cert by default; swap in your own via tls_cert / tls_key. Off by default so upgrades never change your URL. |
webui.trusted_proxies | 放在 nginx / Caddy 後面時必填。不設定就完全不信任 X-Forwarded-For——否則代理後面的每個請求都會被當成本機。Required behind nginx / Caddy. Without it X-Forwarded-For is ignored entirely, otherwise every proxied request would look local. |
webui_passwords | 遠端唯讀 / 管理密碼,只存 sha256 雜湊。安全設定、關鍵字、懸浮字幕、字幕轉發四頁一律只有本機能改。Remote read / admin passwords, stored as SHA-256 only. The four settings pages are local-only, always. |
要從別台電腦改那四頁設定,用 SSH 通道即可,不必把管理介面暴露在網路上:ssh -L 19781:127.0.0.1:19781 帳號@伺服器,然後瀏覽器開 http://127.0.0.1:19781。To reach the local-only pages from another machine, tunnel instead of exposing the UI: ssh -L 19781:127.0.0.1:19781 user@server, then open http://127.0.0.1:19781.
| 參數Flag | 說明Description | 預設Default |
|---|---|---|
--webui | 啟動 WebUI 瀏覽器介面Launch the Web UI | |
--mode MODE | 功能模式(en2zh / zh2en / ja2zh / zh2ja / ko2zh / zh2ko / en_zh / ja_zh / ko_zh / en / zh / ja / ko / nan / nan2en / record)Mode (en2zh / zh2en / ja2zh / zh2ja / ko2zh / zh2ko / en_zh / ja_zh / ko_zh / en / zh / ja / ko / nan / nan2en / record) | en2zh |
--asr ASR | 辨識引擎(whisper / moonshine / faster-whisper)ASR engine | whisper |
-m, --model | Whisper 模型(base.en … large-v3-turbo / large-v3)Whisper model | 依裝置推薦auto |
--moonshine-model | Moonshine 模型(medium / small / tiny)Moonshine model | medium |
-s, --scene | 使用場景(meeting / training / presentation / subtitle)Scene | training |
-e, --engine | 翻譯引擎(llm / nllb / argos)Translation engine | llm |
--llm-model | LLM 翻譯模型LLM translation model | gemma4:26b(伺服器沒有時改用 qwen2.5:14b) (falls back to qwen2.5:14b) |
--llm-host HOST | LLM 伺服器位址(自動偵測類型)LLM server address (auto-detected) | |
--topic TOPIC | 會議主題(提升翻譯與摘要品質)Meeting topic | |
-d, --device ID | 音訊裝置 IDAudio device ID | 自動偵測auto |
--list-devices | 列出可用音訊裝置後離開List audio devices and exit | |
--input FILE […] | 離線處理音訊檔Offline-process audio files | |
--diarize | 啟用講者辨識(需 --input)Enable diarization (needs --input) | |
--num-speakers N | 指定講者人數(需 --diarize)Speaker count (needs --diarize) | 自動auto |
--summarize [FILE …] | 生成 AI 摘要Generate AI summary | |
--summary-model | 摘要用 LLM 模型Summary LLM model | gpt-oss:120b |
--mic | 同時轉錄麥克風(即時模式)Also transcribe mic (live) | |
--record | 即時模式同時錄製音訊Record audio in live mode | |
--rec-device ID | 錄音裝置 IDRecording device ID | |
--denoise | 即時模式啟用背景降噪Background denoise (live) | |
--local-asr | 強制本機辨識(忽略 GPU 伺服器)Force local recognition | |
--restart-server | 強制重啟 GPU 伺服器Force-restart GPU server |
jt-live-whisper/ translate_meeting.py # 主程式(跨平台) webui.py / webui.html # WebUI 後端 + 前端 subtitle_overlay.py # 懸浮字幕(PyQt6) start.sh / start.ps1 # 啟動腳本 install.sh / install.ps1 # 安裝腳本 install-linux.sh # Linux 安裝腳本(install.sh 自動轉交) remote_whisper_server.py # GPU 伺服器端服務(選配) config.json # 使用者設定(自動產生) SOP.md / CHANGELOG.md # 手冊 / 版本記錄 logs/ recordings/ # 記錄檔 / 暫存音訊 whisper.cpp/ venv/ # 即時引擎(macOS / Windows)/ 虛擬環境
# 即時模式 系統音訊(ScreenCaptureKit / WASAPI / PipeWire) → Whisper / Moonshine # 地端辨識 → LLM / NLLB / Argos # 地端翻譯 → 終端字幕 + 記錄檔 # 離線模式 音訊檔 → ffmpeg → faster-whisper → (選配) 講者辨識 → LLM 翻譯 + AI 摘要 # WebUI(--webui) webui.py (FastAPI + WebSocket) → 瀏覽器設定頁 → 啟動 translate_meeting.py 子行程 → TCP localhost:19780 收事件 → WebSocket 推送到瀏覽器
GPU 伺服器上跑的 remote_whisper_server.py 是一支獨立的服務,不會跟著本機升級一起更新。本機執行 ./install.sh --upgrade 更新的是本機程式,伺服器上的服務還是舊的——而有設定 GPU 伺服器時,辨識與講者辨識預設就走伺服器。The remote_whisper_server.py running on your GPU box is a separate service that does not upgrade with the client. ./install.sh --upgrade updates the local program only — and when a GPU server is configured, recognition and diarization go there by default.
v2.21.1 起,本機每次連上伺服器都會比對版本,不一致時提示並說明如何更新:Since v2.21.1 the client compares versions on every connect and tells you how to update:
[版本不一致] GPU 伺服器 v2.20.9,本機 v2.21.1
辨識與講者辨識仍會使用伺服器上的舊版;伺服器未開放遠端更新
手動更新:scp remote_whisper_server.py 主機:~/jt-whisper-server/server.py 後重啟服務
版本不一致不會中斷作業——伺服器舊一點通常仍可使用,只是你會知道結果來自哪個版本。A mismatch never aborts the job — an older server usually still works; you just know which version produced the result.
兩邊都設定同一組密鑰後,本機發現伺服器版本較舊時會自動把新版推上去,由伺服器驗證通過才替換並重啟,過程中顯示狀態列。With a shared token configured on both sides, the client pushes the new version when the server is behind; the server verifies it before swapping and restarting, with a live status bar.
JT_WHISPER_UPDATE_TOKEN='夠長的隨機字串' \
~/jt-whisper-server/start.sh 8978
沒有設定這個環境變數時,更新端點完全不存在。Without this variable the update endpoint does not exist at all.
"remote_whisper": {
"host": "192.168.1.40",
"whisper_port": 8978,
"update_token": "夠長的隨機字串"
}
⚠️ 這個功能本質上是「讓遠端主機執行你送過去的程式」。 區域網路不等於安全網路,所以預設關閉。不確定是否需要時,維持關閉、手動更新即可——版本提示照樣會出現。⚠️ This lets a remote host execute code you send it. A LAN is not a trusted network, so it ships disabled. If in doubt, leave it off and update manually — you still get the version warning.
| 更新前的檢查Pre-update check | 不通過時On failure |
|---|---|
| HMAC 簽章是否相符HMAC signature matches | unauthorized |
| 時間戳是否在 5 分鐘內Timestamp within 5 min | unauthorized |
| 大小是否超過 8 MBSize under 8 MB | payload_too_large |
| 內容 SHA-256 是否相符SHA-256 matches | checksum_mismatch |
| 語法是否正確Syntax is valid | invalid_syntax |
| 送來的版本是否比較新Offered version is newer | downgrade_refused |
實際啟動一次是否成功(--selftest)Actually starts once (--selftest) | selftest_failed |
| 是否有作業正在執行No job in flight | busy |
任何一項不過就保留舊版、服務不受影響;舊版會備份成 server.py.bak-<時間>,只保留最近 5 份。Any failure keeps the old version and leaves the service untouched; the old file is backed up as server.py.bak-<time>, last 5 kept.
這些檢查分兩類。只有簽章在管「誰可以更新」;其餘都在管「更新的東西會不會把服務弄死」。--selftest 本身就會執行上傳的程式碼,所以它擋得住壞掉的更新、擋不住惡意的更新——密鑰是唯一的安全邊界。Two different kinds of check. Only the signature governs who may update; the rest govern whether the update breaks the service. --selftest runs the uploaded code, so it stops broken updates, not malicious ones — the key is the only security boundary.
為什麼用簽章而不是直接送密鑰:這條連線是 HTTP。直接送密鑰的話,任何能側錄區網封包的人都拿得到一組可重複使用的憑證。改用 HMAC 之後,側錄者只能重放「同一份內容」(無害),無法偽造新的 payload。
為什麼不接受降版:多個用戶端共用同一台伺服器時,若只比對「版本不同」,新舊用戶端會無限來回互相覆蓋,每次重啟都中斷別人的辨識。
為什麼要先啟動一次:服務沒有 systemd 之類的看門狗,換上去起不來就直接消失、不會自動復原。Why sign instead of sending the key: this is plain HTTP — sending the key hands a reusable credential to anyone sniffing the LAN. With HMAC a sniffer can only replay the same payload (harmless), never forge a new one.
Why downgrades are refused: with several clients sharing one server, matching on "different version" alone makes old and new clients overwrite each other forever, each restart killing someone's job.
Why it must boot once first: there is no systemd-style watchdog — a build that won't start simply disappears.
所有 AI 推論皆在地端執行,硬體規格直接影響辨識速度與體驗。All inference is local — hardware directly affects speed and experience.
| 配置Config | 記憶體RAM | 適用場景Use case |
|---|---|---|
| Apple(M2 以上)Apple (M2+) | 16 GB | 即時轉錄、離線處理;GPU 加速 mlx-whisper,推薦 large-v3-turboLive + offline; mlx-whisper GPU, large-v3-turbo |
| Apple(M2 以上)Apple (M2+) | 24 GB+ | 即時轉錄 + 本機 LLM;可同時跑 Ollama 14B 翻譯Live + local LLM (Ollama 14B alongside) |
| Intel | 8 GB+ | 離線處理為主;即時建議搭 GPU 伺服器Offline-focused; pair a GPU server for live |
| 配置Config | 即時辨識Live | 離線 7 分鐘音檔Offline 7-min clip |
|---|---|---|
| 純 CPU(無獨顯)CPU only | 勉強可用Usable | ~15–25 分min |
| GTX 1660 Super (6 GB) | 可用OK | ~1–2 分min |
| RTX 4060 (8 GB) | 流暢Smooth | ~30–40 秒(性價比最高)s (best value) |
| RTX 4060 Ti (16 GB) | 流暢Smooth | ~20–30 秒s |
| RTX 3060 (12 GB) | 流暢Smooth | ~40–50 秒s |
Windows + NVIDIA GPU 是最簡單的高效能方案:不需額外硬體或伺服器,安裝後直接用 large-v3-turbo,即時與離線都有 CUDA 加速。最低建議 6 GB VRAM。Windows + NVIDIA GPU is the simplest high-performance setup — no extra hardware, CUDA for both live and offline. 6 GB VRAM minimum.
| 配置Config | 說明Notes |
|---|---|
| 純 CPUCPU only | 即時模式建議 base.en / small(程式自動推薦),或搭 GPU 伺服器Live: base.en / small (auto-recommended), or pair a GPU server |
| NVIDIA GPU(6 GB 以上)NVIDIA GPU (6 GB+) | 自動安裝 CUDA 版 PyTorch,faster-whisper 走 CUDA,建議 large-v3-turboCUDA PyTorch installed automatically; faster-whisper on CUDA, large-v3-turbo |
| 無桌面伺服器Headless server | ./install.sh --server:離線處理 + WebUI 常駐服務./install.sh --server: offline processing + always-on WebUI |
| GPU | VRAM | 離線 7 分鐘音檔Offline 7-min | 說明Notes |
|---|---|---|---|
| RTX 4060 以上RTX 4060+ | 8 GB+ | ~20–30 秒s | 消費級入門Entry |
| RTX 4090 | 24 GB | ~10–15 秒s | 消費級旗艦Flagship |
| NVIDIA DGX Spark | 128 GB | ~10 秒s | 同時跑 Ollama LLM + Whisper,一機搞定Ollama LLM + Whisper on one box |
| 用途Use | 建議模型Model | 記憶體 / VRAMRAM / VRAM |
|---|---|---|
| 翻譯Translation | 14B 以上(如 gemma4:26b、qwen2.5:14b)≥14B (e.g. gemma4:26b, qwen2.5:14b) | ~12 GB(gemma4:26b ~17 GB) |
| 摘要Summary | 120B 以上(如 gpt-oss:120b)≥120B (e.g. gpt-oss:120b) | ~80 GB |
# macOS / Linux ./install.sh --upgrade # Windows (PowerShell) .\install.ps1 -Upgrade
自動從 GitHub 下載最新版本,升級後建議重新執行安裝腳本確認相依套件完整。Pulls the latest from GitHub; re-run the installer afterward to verify dependencies.