Installation
This guide will help you set up all the necessary packages and tools required to use Voice Service on your system.
SoX Installation
This guide provides instructions on how to install SoX (Sound eXchange) on various operating systems.
Windows
- Download the latest SoX installer from the SoX official website.
- Run the installer and follow the on-screen instructions to complete the installation.
- Once installed, you need to add the SoX installation directory to your
PATH
environment variable to usesox
from any command line.
Adding SoX to PATH:
The guild is reference from How to Add to the Windows PATH Environment Variable.
- Open the Start Search, type in “env”, and choose “Edit the system environment variables”:
- Click the “Environment Variables…” button.
- Under the “System Variables” section (the lower half), find the row with “Path” in the first column, and click edit.
- The “Edit environment variable” UI will appear. Here, you can click “New” and type in the SoX installation directory path.
The default installation path for SoX is C:\Program Files (x86)\sox-14-4-2
.
Modify the path according to your installation directory if it differs.
Verify Installation:
-
After adding to the
PATH
, open Command Prompt and run:sox --version
macOS
- Open the Terminal.
- Install SoX by running the following command:
brew install sox
- Once installation is complete, verify it by running:
sox --version
- If the version information appears, SoX is successfully installed.
Linux
-
Open a terminal.
-
To install SoX on a Linux system, the process can vary depending on the specific Linux distribution you are using. Below are instructions for some of the most common Linux distributions.
Run the following commands to install SoX:
- Ubuntu / Debian
sudo apt-get update
sudo apt-get install sox - Fedora
sudo dnf install sox
- Arch Linux
sudo pacman -S sox
- CentOS
sudo yum install sox
- Ubuntu / Debian
-
Once SoX is installed, you can verify it by running:
sox --version
-
If everything is set up correctly, it will display the installed version of SoX.
GPT-SoVits installation
To configure GPT-SoVits for Text-to-Voice conversion, follow these steps:
- Go to the GPT-SoVits GitHub repository.
- Download the zipped folder from the repository.
- Extract the zipped folder to a preferred location on your system.
- Open Command Prompt (CMD).
- Use the following command to navigate to the extracted folder:
cd path/to/extracted/folder
- Enter the following command to CMD to run the server.
Or if you use API v2, you can run the server with the following command:
.\runtime\python.exe .\api.py
.\runtime\python.exe .\api_v2.py
- Once the script runs, copy the server address displayed in the CMD window.
- Open the voice settings page in your app.
- Go to the GPT-SoVits settings in the voice setting and paste the copied server address into the "Client Host" field.
The default address of API v1 is http://127.0.0.1:9880/
API v2 is http://127.0.0.1:9880/tts/
.
Does not close the CMD window while using GPT-SoVits, as the server must remain active for the service to function.