chough

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Installation

安装

Arch Linux:
paru -S chough-bin
macOS:
brew install --cask hyperpuncher/tap/chough
Windows:
winget install chough
Source:
go install github.com/hyperpuncher/chough/cmd/chough@latest
Requires:
ffmpeg
for audio/video support
Arch Linux:
paru -S chough-bin
macOS:
brew install --cask hyperpuncher/tap/chough
Windows:
winget install chough
源码安装:
go install github.com/hyperpuncher/chough/cmd/chough@latest
依赖:
ffmpeg
以支持音频/视频处理

Quick Reference

快速参考

bash
undefined
bash
undefined

Basic transcription (text to stdout)

基础转录(文本输出到标准输出)

chough audio.mp3
chough audio.mp3

JSON with timestamps

带时间戳的JSON格式

chough -f json podcast.mp3 > transcript.json
chough -f json podcast.mp3 > transcript.json

WebVTT subtitles

WebVTT字幕格式

chough -f vtt -o subs.vtt video.mp4
chough -f vtt -o subs.vtt video.mp4

Low memory (30s chunks)

低内存模式(30秒分片)

chough -c 30 audiobook.mp3
undefined
chough -c 30 audiobook.mp3
undefined

Flags

命令行参数

FlagDescriptionDefault
-c, --chunk-size
Chunk size in seconds60
-f, --format
Output: text, json, vtttext
-o, --output
Output filestdout
--version
Show version-
参数说明默认值
-c, --chunk-size
分片大小(秒)60
-f, --format
输出格式:text、json、vtttext
-o, --output
输出文件路径标准输出
--version
显示版本信息-

Chunk Size Guide

分片大小指南

  • 15-30s: Low memory (~500MB), higher error rate
  • 60s: Balanced (default) - ~1.6GB RAM
  • 15-30秒:低内存占用(约500MB),错误率较高
  • 60秒:平衡模式(默认)- 约1.6GB内存

Performance

性能表现

DurationTimeSpeed
15s2.0s7.4x realtime
1min4.3s14.1x realtime
5min16.2s18.5x realtime
30min90.2s19.9x realtime
时长耗时处理速度
15秒2.0秒7.4倍实时速度
1分钟4.3秒14.1倍实时速度
5分钟16.2秒18.5倍实时速度
30分钟90.2秒19.9倍实时速度

Troubleshooting

故障排查

Out of memory: Use
-c 30
or
-c 15
Model fails: Check internet, verify
$XDG_CACHE_HOME
is writable ffmpeg errors: Ensure ffmpeg is installed
内存不足: 使用
-c 30
-c 15
参数 模型加载失败: 检查网络连接,确认
$XDG_CACHE_HOME
目录可写入 ffmpeg错误: 确保已安装ffmpeg

Notes

注意事项

  • First run downloads ~650MB model to
    $XDG_CACHE_HOME/chough/models
  • Auto-extracts audio from video files
  • Set
    CHOUGH_MODEL
    env var to use custom model path
  • VTT groups tokens into subtitle cues automatically
  • 首次运行时会下载约650MB的模型到
    $XDG_CACHE_HOME/chough/models
    目录
  • 自动从视频文件中提取音频
  • 设置环境变量
    CHOUGH_MODEL
    可指定自定义模型路径
  • VTT格式会自动将分词结果分组为字幕片段

Docs

文档