A command-line tool for generating subtitles from audio file using mlx-whisper
Project description
audiosub
一个基于 mlx-whisper 的命令行工具,用于将音频文件转换为字幕文件。
特点
- 资源占用小:基于 mlx-whisper,专为 Apple Silicon 优化
- 转换速度快:利用 Apple Metal 加速,处理速度快
- 准确度高:使用 OpenAI Whisper 模型,支持多种语言
- 使用简单:命令行操作,一键生成字幕文件
Prerequisites
- Python 3.12+
- macOS
- uv
使用方法
通过 uv 的 uvx 命令安装并使用。
uvx asub audio.mp3
# 将在当前目录生成 audio.srt 字幕文件
注意事项
- 仅支持 macOS:由于使用了 mlx 库,本工具仅能在 macOS 系统上运行
- Apple Silicon 优化:在 Apple Silicon (M1/M2/M3) 芯片上性能最佳
- 支持的音频格式:支持常见的音频格式,如 MP3、WAV、M4A 等
- 首次运行:首次使用时会自动下载 Whisper 模型,请确保网络连接正常
依赖
- Python 3.12+
- mlx-whisper
- click
许可证
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
audiosub-0.1.0.tar.gz
(56.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file audiosub-0.1.0.tar.gz.
File metadata
- Download URL: audiosub-0.1.0.tar.gz
- Upload date:
- Size: 56.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89a9875b3fa4494acb3b7fd8f234717b92ee5c16fbd93bdf0936b121050c2b76
|
|
| MD5 |
0512c30506357bccf12b479387cc36b0
|
|
| BLAKE2b-256 |
9461b7b21cbc4e9cf6f1b9b827f5dc4c6986eaa4b894b06c9c170bda3ff7d998
|
File details
Details for the file audiosub-0.1.0-py3-none-any.whl.
File metadata
- Download URL: audiosub-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b9667e320b199f5e1477c5fc13234087dca6892393eabac5be2e13c7a7b61af
|
|
| MD5 |
61223916ce16cab3e8477abd9509069c
|
|
| BLAKE2b-256 |
b04f71d1c29cce40f5c9e627089618c3a29084a86706a5bcc926f5a616dcdbd4
|