Skip to main content

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

Paper | Website

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

openvoice_cli-0.0.1.tar.gz (350.1 kB view hashes)

Uploaded Source

Built Distribution

openvoice_cli-0.0.1-py3-none-any.whl (32.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page