Use OpenVoice 2 stage via console or python scripts
Project description
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
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
Changelog
You can keep track of all changes on the release page
TODO
- Batch generation via console
- Possibility to use inference import through code
Installation
Simple installation :
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
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
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
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
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openvoice_cli-0.0.1.tar.gz
.
File metadata
- Download URL: openvoice_cli-0.0.1.tar.gz
- Upload date:
- Size: 350.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d613476160e7b673f3374bbbbe204d1a107a5c506a4eb45eda7bb116673c14e9 |
|
MD5 | c12506563ca91de63b4056cee9ab0ba0 |
|
BLAKE2b-256 | ceb1caf6b6d7f2f2d60f0a86335255d3c897127c50cb35c56b11870b9172fdc7 |
File details
Details for the file openvoice_cli-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: openvoice_cli-0.0.1-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a9a54556fd97385cb2e9f6908962828ed7acdec697f56769ad84ade5c574d9e |
|
MD5 | 4370f776a0c7a1149038cc34b0a08a8c |
|
BLAKE2b-256 | 628de2b97b88f893b5e3f8b3d2e753419d961ceece8ea00e7994f4bf9c0c77f6 |