Metadata-Version: 2.4
Name: shellus-voice2text
Version: 1.0.3
Summary: 火山引擎语音识别 CLI 工具
Author: shellus
License: MIT
Project-URL: Homepage, https://github.com/shellus/voice2text
Project-URL: Repository, https://github.com/shellus/voice2text
Project-URL: Issues, https://github.com/shellus/voice2text/issues
Keywords: volcengine,asr,speech-recognition,voice2text,subtitle
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: boto3
Dynamic: license-file

# voice2text

[![PyPI version](https://badge.fury.io/py/shellus-voice2text.svg)](https://pypi.org/project/shellus-voice2text/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

火山引擎语音识别 CLI 工具，支持智能缓存和并发处理。

## 安装

```bash
pip install shellus-voice2text
```

## 使用

```bash
# 单文件处理
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个
- **自动输出**：完成后自动生成对应格式文件
- **断点续传**：失败任务可重新运行，已完成的直接跳过

## 配置

首次使用运行交互式初始化：

```bash
voice2text init
```

配置保存在 `~/.voice2text/config.json`，包含：

```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 文档

- [大模型录音文件识别 API](https://www.volcengine.com/docs/6561/1354868)
- [火山引擎控制台](https://console.volcengine.com/speech/service/8)

## 许可证

MIT License

## 贡献

欢迎提交 Issue 和 Pull Request！
