Skip to main content

Faster-Whisper Modal 云端推理客户端

Project description

modal-chickenrice

Faster-Whisper Modal 云端推理客户端。

无本地 GPU?使用 Modal 云 GPU 运行 Faster-Whisper 转录/翻译。

安装

注意:此包要求 Python == 3.10(与 Modal 远程容器环境的镜像一致)。 使用 uv 时请指定 Python 版本:

uv tool install modal-chickenrice --python 3.10
pip install modal questionary

使用

python -m modal_infer
# 或安装后:
modal-chickenrice

程序会交互式询问:

  1. GPU 类型 — T4(性价比首选)、L4、L40S、A100、H100 等
  2. 模型选择 — 海南鸡(日→中)、whisper-base、自定义 HF 模型
  3. 输入路径 — 单个音频文件或文件夹(批量处理)
  4. 批处理 — 可选启用,更高显存消耗更快速度
  5. 超时时间 — 默认 60 分钟

工作流程

  1. 上传音频文件到 Modal Volume
  2. 在 Modal GPU 容器上克隆仓库并下载模型
  3. 运行推理 → 生成字幕文件
  4. 结果下载回本地

文件夹模式

输入文件夹时,自动并发处理多个音频文件(容器复用),跳过已有字幕的文件。

项目结构

modal_chickenrice/
  modal_infer/
    __init__.py
    __main__.py       # 主入口,交互式 CLI
    resources/
      environment-cuda128.yml  # Modal 镜像 conda 环境
  pyproject.toml
  README.md

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

modal_chickenrice-0.1.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

modal_chickenrice-0.1.2-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

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