voice2text
火山引擎语音识别 CLI 工具,支持智能缓存和并发处理。
安装
pip install shellus-voice2text
使用
# 单文件处理
voice2text audio.mp3
# 批量处理(自动生成 .srt 文件)
voice2text *.mp3
# 输出纯文本
voice2text audio.mp3 --txt
# 输出 LRC 歌词
voice2text audio.mp3 --lrc
# 输出原始 JSON
voice2text audio.mp3 --json
# 控制并发数
voice2text *.mp3 --max-workers 5
特性
- 智能缓存:相同文件自动跳过,避免重复识别
- 并发处理:支持多文件并发,默认3个
- 自动输出:完成后自动生成对应格式文件
- 断点续传:失败任务可重新运行,已完成的直接跳过
配置
首次使用运行交互式初始化:
voice2text init
配置保存在 ~/.voice2text/config.json,包含:
{
"app_key": "your_app_key",
"access_key": "your_access_key",
"resource_id": "volc.seedasr.auc",
"s3_endpoint": "https://tos-cn-guangzhou.volces.com",
"s3_bucket": "your_bucket",
"s3_access_key": "your_s3_key",
"s3_secret_key": "your_s3_secret",
"max_concurrent_tasks": "3"
}
环境变量可覆盖配置文件:VOLC_APP_KEY, VOLC_ACCESS_KEY, VOLC_RESOURCE_ID, S3_ENDPOINT, S3_BUCKET, S3_ACCESS_KEY, S3_SECRET_KEY, MAX_CONCURRENT_TASKS。
API 文档
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
Metadata
Release files for shellus-voice2text 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shellus_voice2text-1.0.3.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shellus_voice2text-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.0 kB
Release files / shellus_voice2text-1.0.3.tar.gz
| Download URL | shellus_voice2text-1.0.3.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
027b9e68ce44235295fdefdc8d4d86fab221336353afc694cbaa8c16061667ac
|
|
BLAKE2b-256 checksum How to use checksums |
7da25d5d18908bffbf71a8e5f03eeafce68aa7b53730ab9634c444b36e7d1069
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / shellus_voice2text-1.0.3-py3-none-any.whl
| Download URL | shellus_voice2text-1.0.3-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
01d059a8972464f719756b3258742099e131f5bcdf38209244d407172a743b87
|
|
BLAKE2b-256 checksum How to use checksums |
8c8ad0a3bb099fd6be6b17e850031de54f02cf1def490f0baa0ee0b6e6cbf2cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|