Metadata-Version: 2.1
Name: openlrc
Version: 0.0.3
Summary: Transcribe and translate voice into LRC file.
Project-URL: Homepage, https://github.com/zh-plus/Open-Lyrics
Project-URL: Bug Tracker, https://github.com/zh-plus/Open-Lyrics/issues
Author-email: Hao Zheng <zhenghaosustc@gmail.com>
License-File: LICENSE
Keywords: lrc,openai-gpt3,voice transcribe,whisper
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Requires-Dist: faster-whisper
Requires-Dist: langcodes
Requires-Dist: language-data
Requires-Dist: openai
Requires-Dist: rich
Requires-Dist: tiktoken
Description-Content-Type: text/markdown

# Open-Lyrics

Open-Lyrics is a open-source project to transcribe (
using [faster-whisper](https://github.com/guillaumekln/faster-whisper)) voice file and
translate/polish ([OpenAI-GPT](https://github.com/openai/openai-python)) the text.

**This new project is rapidly underway, and we welcome any issues or pull requests.**

## Installation

1. Please install CUDA and cuDNN first according to https://opennmt.net/CTranslate2/installation.html to
enable `faster-whisper`.

2. Add your [OpenAI API key](https://platform.openai.com/account/api-keys) to environment variable `OPENAI_API_KEY`.

3. This project can be installed from PyPI:

    ```shell
    pip install openlrc
    ```

## Usage

```python
from openlrc import LRCer

lrcer = LRCer()
lrcer('./data/test.mp3')  # Generate ./data/test.lrc
```

## Todo

- [ ] Add transcribed examples.
    - [ ] Song
    - [ ] Podcast
    - [ ] Audiobook
- [ ] Make translate prompt more robust.
- [ ] Add local LLM support.
- [ ] Multi-thead support for both whisper model and GPT request.
- [ ] Automatically fix json encoder error using GPT.

## Credits

- https://github.com/guillaumekln/faster-whisper
- https://github.com/openai/openai-python
- https://github.com/openai/whisper