Skip to main content

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 audiosub <filename>
# 将在当前目录生成 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.2.0.tar.gz (55.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiosub-0.2.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file audiosub-0.2.0.tar.gz.

File metadata

  • Download URL: audiosub-0.2.0.tar.gz
  • Upload date:
  • Size: 55.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for audiosub-0.2.0.tar.gz
Algorithm Hash digest
SHA256 88090b5be7a821e05ef4712a6c8e40aa02056ff27adc1ee1b360a4f9f0867e35
MD5 7cad705222f2fb3ee9948e45e240992a
BLAKE2b-256 84e130edbdd6661e0033686317984a5be616eac4a10b2aea4579c0a49ccb9872

See more details on using hashes here.

File details

Details for the file audiosub-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: audiosub-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.8

File hashes

Hashes for audiosub-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c123e0a7fbbc92288a240d07fbb5859c67f86a8befaf53e50996ee2abe8c885b
MD5 d5438fbfb0d7f810ddbbc91264621e47
BLAKE2b-256 4a2b4feebb0a8e0def4379322ecdc81e14607278c7b3f35ea060f2d70005cdb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page