Skip to main content

audiosub

一个基于 Qwen3-ASR 的命令行工具,用于将音频文件转换为字幕文件。

特点

  • Apple Silicon 专属优化:基于 MLX 框架,充分利用 Metal GPU 加速
  • 准确度高:Qwen3-ASR-1.7B,中文及中英混排(技术词汇)识别优于 Whisper
  • 智能断句:按标点拆分短字幕,标点丢弃;超长句在词间停顿处断开,兜底 24 字硬拆
  • 词级时间戳:搭配 Qwen3-ForcedAligner,字幕与语音精准对齐
  • 一键生成:简单命令即可生成 .srt 字幕文件

系统要求

  • macOS(仅限 Apple Silicon 芯片,MLX 框架依赖 Metal GPU)
  • Python 3.12+
  • ffmpeg(brew install ffmpeg)
  • uv

使用方法

通过 uv 的 uvx 命令安装并使用。

uvx audiosub <filename>
# 将在当前目录生成 audio.srt 字幕文件

注意事项

  • 不支持 Intel 芯片的 Mac(MLX 框架仅支持 Apple Silicon)
  • 支持的音频格式:MP3、WAV、M4A 等(经 ffmpeg 解码)
  • 首次运行会自动下载 Qwen3-ASR-1.7B + ForcedAligner 模型(约 5GB)到 ~/.cache/huggingface/,请确保网络连接正常
  • 若模型下载中断报错(CAS Client Error),重试即可断点续传

依赖

  • Python 3.12+
  • mlx-qwen3-asr

许可证

MIT

Metadata

Release files for audiosub 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for audiosub 0.5.0
File Size Uploaded
audiosub-0.5.0.tar.gz 30.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for audiosub 0.5.0
File Interpreter ABI Platform
audiosub-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.9 kB

Release files / audiosub-0.5.0.tar.gz

Download URL audiosub-0.5.0.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2c92909ea8abc309128b8bda0ec4bbcda3c3ca4b4e8e04d094254aefe15696e5
BLAKE2b-256 checksum
How to use checksums
0fa9ec20b5b87051c0a024f07e1133917df405db16bbdce6bfc42f64a48ade2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / audiosub-0.5.0-py3-none-any.whl

Download URL audiosub-0.5.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7927a7ca43ea0eb030c5961948a1579a7207d1cc3302268916f8a6f8f1bbb16d
BLAKE2b-256 checksum
How to use checksums
f73cc975463dc72fe8839268c192f385cd97e6fc35863149ef25b206100590b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page