cviniciussdias/audio-subtitle-generator
最新稳定版本:v0.1.5
Composer 安装命令:
composer require cviniciussdias/audio-subtitle-generator
包简介
README 文档
README
Subtitle generator using Whisper.PHP from an audio input.
Prerequisites
- PHP >=8.3
- Composer
- FFI
- JIT (optional, for performance)
Usage
After cloning the repository and running composer install, to display the command's usage:
php generate-subtitle -h
If you prefer to require this package as a composer dependency, after running composer require cviniciussdias/audio-subtitle-generator, to display the command's usage:
./vendor/bin/generate-subtitle -h
Options
-f, --filepath=<file_path> File path of the audio to be transcribed
-p, --prompt=<initial_prompt> Text (or file path) of the initial prompt for context about the audio
-m, --model=<model> Model to be used (tiny.en, tiny, base.en, base, small.en, small, medium.en, medium, large-v1, large-v2, large-v3, large) (default: tiny.en)
-t, --threads=<number_of_threads> Number of threads to use (default: 16)
-l, --language=<language> Two letter code of the audio's language. (default: autodetect)
-o, --output=<output_path> Output path of the subtitle file (.srt extension)
Example:
The following example will generate the subtitle file subtitle.srt inside the current directory based on the audio.mp3 file in the same path:
php generate-subtitle \
-f=audio.mp3 \
--prompt="Initial prompt for context about the audio" \
--model=small \
-t8 \
-l=pt \
--output=subtitle.srt
Docker
If you prefer, you can use Docker to run this tool:
https://hub.docker.com/r/cviniciussdias/audio-subtitle-generator
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-02