Skip to content

Commit 2576f3e

Browse files
authored
Update README.md
1 parent 32af874 commit 2576f3e

File tree

1 file changed

+35
-31
lines changed

1 file changed

+35
-31
lines changed

README.md

+35-31
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,49 @@ This will install all the necessary dependencies, including a **CPU support only
2828

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

31-
Installation into virtual environment on **Windows** with **GPU support**:
32-
31+
### Windows
3332
```bash
3433
python -m venv venv
3534
venv\Scripts\activate
3635
pip install xtts-api-server
3736
pip install torch==2.1.1+cu118 torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118
3837
```
3938

39+
### Linux
40+
```bash
41+
python -m venv venv
42+
source venv\Scripts\activate
43+
pip install xtts-api-server
44+
pip install torch==2.1.1+cu118 torchaudio==2.1.1+cu118 --index-url https://download.pytorch.org/whl/cu118
45+
```
46+
47+
# Use Docker image with Docker Compose
48+
49+
A Dockerfile is provided to build a Docker image, and a docker-compose.yml file is provided to run the server with Docker Compose as a service.
50+
51+
You will need to setup the env variables by copying the .env.example file to .env and filling in the values.
52+
If you want to use your own speakers, you can put it in `example` folder before building the image.
53+
The example folder will be copied to the container and the server will use it as a speaker folder.
54+
55+
You can build the image with the following command:
56+
57+
```bash
58+
cd docker
59+
docker compose build
60+
```
61+
62+
Then you can run the server with the following command:
63+
64+
```bash
65+
docker compose up # or with -d to run in background
66+
```
67+
4068
## Starting Server
4169

4270
`python -m xtts_api_server` will run on default ip and port (localhost:8020)
4371

72+
Use the `--deepspeed` flag to process the result fast ( 2-3x acceleration )
73+
4474
```
4575
usage: xtts_api_server [-h] [-hs HOST] [-p PORT] [-sf SPEAKER_FOLDER] [-o OUTPUT] [-t TUNNEL_URL] [-ms MODEL_SOURCE] [--lowvram] [--deepspeed] [--streaming-mode] [--stream-play-sync]
4676
@@ -99,20 +129,14 @@ Improved streaming mode is suitable for complex languages such as Chinese, Japan
99129

100130
API Docs can be accessed from [http://localhost:8020/docs](http://localhost:8020/docs)
101131

102-
# Voice Samples
132+
# How to add speaker
103133

104-
You can find the sample in this repository more details in the API documentation
105-
106-
[erew123](https://github.com/erew123) put together a pack of 40+ votes, you can download to try them out [here](https://filebin.net/t97nd69ac7qm2rsf)
134+
By default the `speakers` folder should appear in the folder, you need to put there the wav file with the voice sample, you can also create a folder and put there several voice samples, this will give more accurate results
107135

108136
# Selecting Folder
109137

110138
You can change the folders for speakers and the folder for output via the API.
111139

112-
# Get Speakers
113-
114-
Once you have at least one file in your speakers folder, you can get its name via API and then you only need to specify the file name.
115-
116140
# Note on creating samples for quality voice cloning
117141

118142
The following post is a quote by user [Material1276 from reddit](https://www.reddit.com/r/Oobabooga/comments/1807tsl/comment/ka5l8w9/?share_id=_5hh4KJTXrEOSP0hR0hCK&utm_content=2&utm_medium=android_app&utm_name=androidcss&utm_source=share&utm_term=1)
@@ -135,28 +159,8 @@ The following post is a quote by user [Material1276 from reddit](https://www.red
135159
>
136160
> Using AI generated audio clips may introduce unwanted sounds as its already a copy/simulation of a voice, though, this would need testing.
137161
138-
# Use Docker image with Docker Compose
139-
140-
A Dockerfile is provided to build a Docker image, and a docker-compose.yml file is provided to run the server with Docker Compose as a service.
141-
142-
You will need to setup the env variables by copying the .env.example file to .env and filling in the values.
143-
If you want to use your own speakers, you can put it in `example` folder before building the image.
144-
The example folder will be copied to the container and the server will use it as a speaker folder.
145-
146-
You can build the image with the following command:
147-
148-
```bash
149-
cd docker
150-
docker compose build
151-
```
152-
153-
Then you can run the server with the following command:
154-
155-
```bash
156-
docker compose up # or with -d to run in background
157-
```
158-
159162
# Credit
160163

161164
1. Thanks to the author **Kolja Beigel** for the repository [RealtimeTTS](https://github.com/KoljaB/RealtimeTTS) , I took some of its code for my project.
162165
2. Thanks **[erew123](https://github.com/oobabooga/text-generation-webui/issues/4712#issuecomment-1825593734)** for the note about creating samples and the code to download the models
166+
3. Thanks **lendot** for helping to fix the multiprocessing bug and adding code to use multiple samples for speakers

0 commit comments

Comments
 (0)