Metadata-Version: 2.1
Name: openvoice-cli
Version: 0.0.2
Summary: Use OpenVoice 2 stage via console or python scripts
Project-URL: Homepage, https://github.com/daswer123/OpenVoice-cli
Project-URL: Bug Tracker, https://github.com/daswer123/OpenVoice-cli/issues
Author-email: daswer123 <daswerq123@gmail.com>
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: faster-whisper>=0.9.0
Requires-Dist: librosa==0.9.1
Requires-Dist: numpy>1.22.2
Requires-Dist: pydub==0.25.1
Requires-Dist: torch==1.13.1
Requires-Dist: torchaudio==0.13.1
Requires-Dist: typing-extensions>=4.6.1
Requires-Dist: wavmark==0.0.2
Requires-Dist: whisper-timestamped>=1.14.2
Description-Content-Type: text/markdown

## OpenVoice-cli

**This fork, does not generate voice from text, it only uses the 2nd stage of voice2voice. Therefore, you need to have a sample and a voice already prepared**

[Paper](https://arxiv.org/abs/2312.01479) |
[Website](https://research.myshell.ai/open-voice) 

## About

The second stage of OpenVoice "Tone color extractor" is used, via console or python scripts.

Feel free to make PRs or use the code for your own needs

## Demo

https://github.com/daswer123/OpenVoice-cli/assets/22278673/7b4255eb-7797-4370-825a-81f2c67c8f90

## Changelog

You can keep track of all changes on the [release page](https://github.com/daswer123/OpenVoice-cli/releases)

## TODO
- [ ] Batch generation via console
- [ ] Possibility to use inference import through code

## Installation

Simple installation :

```bash
pip install openvoice-cli
```

**Attention is used Pytorch version 1.13.1 higher unfortunately can not, waiting for an update from the authors of openvoice**

This will install all the necessary dependencies, including a **CPU support only** version of PyTorch

I recommend that you install the **GPU version** to improve processing speed ( up to 3 times faster )

Read the end of the README to learn how to install.

### Windows
```bash
python -m venv venv
venv\Scripts\activate
pip install openvoice-cli
pip install torch==1.13.1+cu117 torchaudio==0.13.1+cu117 --index-url https://download.pytorch.org/whl/cu117
```

### Linux
```bash
python -m venv venv
source venv\bin\activate
pip install openvoice-cli
pip install torch==1.13.1+cu117 torchaudio==0.13.1+cu117 --index-url https://download.pytorch.org/whl/cu117
```

## Usage

```bash
python -m openvoice_cli [-h] -i INPUT -r REF [-d DEVICE] [-o OUTPUT]
```

### Options

- `-h`, `--help`:
     Show this help message and exit.

- `-i INPUT`, `--input INPUT` (mandatory):
     Path to the input audio file.

- `-r REF`, `--ref REF` (mandatory):
     Path to the reference audio file for tone color extraction.

The following options are optional:

- `-d DEVICE`, `--device DEVICE`:
     Specify the device to use for processing; defaults to 'cpu'. Can be set to a CUDA device with 'cuda:0' if supported and desired.

- `-o OUTPUT`, `--output OUTPUT`:
     Designate the output path for the converted audio file. By default, the output will be saved as "out.wav" in the current directory. 


### Example Command via console
**Single file**
```bash
python -m openvoice_cli -i ./test/test.wav -ref ./test/ref.wav -o ./test/ready.wav
```

## License
This repository is licensed under MIT License

Original repository is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, which prohibits commercial usage. **MyShell reserves the ability to detect whether an audio is generated by OpenVoice**, no matter whether the watermark is added or not.
