romit
commited on
Commit
•
87a303c
1
Parent(s):
be5109e
Updated README
Browse files
README.md
CHANGED
@@ -6,4 +6,66 @@ language:
|
|
6 |
base_model:
|
7 |
- 11mlabs/indri-0.1-124m-tts
|
8 |
pipeline_tag: text-to-speech
|
9 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
base_model:
|
7 |
- 11mlabs/indri-0.1-124m-tts
|
8 |
pipeline_tag: text-to-speech
|
9 |
+
---
|
10 |
+
|
11 |
+
# Indri GGUF Inference
|
12 |
+
|
13 |
+
Refer to the original model and more details [here](https://huggingface.co/11mlabs/indri-0.1-124m-tts).
|
14 |
+
|
15 |
+
This guide will help in running Indri models on CPU in GGUF format.
|
16 |
+
|
17 |
+
## Step 1: Build llama.cpp
|
18 |
+
|
19 |
+
To run the inference locally, you need to build `llama.cpp` project. The updated guide to do so can be found [here](https://github.com/ggerganov/llama.cpp/blob/master/docs/build.md).
|
20 |
+
|
21 |
+
```bash
|
22 |
+
git clone https://github.com/ggerganov/llama.cpp
|
23 |
+
cd llama.cpp
|
24 |
+
|
25 |
+
cmake -B build
|
26 |
+
cmake --build build --config Release
|
27 |
+
```
|
28 |
+
|
29 |
+
## Step 2: Download the model
|
30 |
+
|
31 |
+
Download the GGUF format models from HuggingFace and place them inside `llama.cpp/models/`.
|
32 |
+
The models can be found [here](https://huggingface.co/11mlabs/indri-0.1-124m-tts-GGUF/tree/main).
|
33 |
+
|
34 |
+
Once the model is placed inside the directory, run the `llama-cpp` server from inside the `llama.cpp` directory
|
35 |
+
|
36 |
+
```bash
|
37 |
+
# For F16 model, update for different quantization accordingly
|
38 |
+
./build/bin/llama-server -m /indri-0.1-124M-tts-F16.gguf --samplers 'top_k:temperature' --top_k 15
|
39 |
+
```
|
40 |
+
|
41 |
+
Refer [here](https://github.com/ggerganov/llama.cpp/tree/master/examples/main) if you are facing issues in running the llama-server locally.
|
42 |
+
|
43 |
+
## Step 3: Run the inference script
|
44 |
+
|
45 |
+
Clone the GitHub repository:
|
46 |
+
|
47 |
+
```bash
|
48 |
+
git clone https://github.com/cmeraki/indri.git
|
49 |
+
cd indri
|
50 |
+
|
51 |
+
python -m src.tts_gguf --text 'hi my name is Indri' --speaker '[spkr_63]' --out out.wav
|
52 |
+
```
|
53 |
+
|
54 |
+
Speakers are available [here](https://github.com/cmeraki/indri?tab=readme-ov-file#available-speakers).
|
55 |
+
|
56 |
+
You can also run an inference server
|
57 |
+
|
58 |
+
```bash
|
59 |
+
pip install -r requirements.txt
|
60 |
+
|
61 |
+
# Install ffmpeg (for Mac/Windows, refer here: https://www.ffmpeg.org/download.html)
|
62 |
+
sudo apt update -y
|
63 |
+
sudo apt upgrade -y
|
64 |
+
sudo apt install ffmpeg -y
|
65 |
+
|
66 |
+
python -m server_ggpuf
|
67 |
+
```
|
68 |
+
|
69 |
+
Redirect to `http://localhost:8000/docs` to see the API documentation and test the service.
|
70 |
+
|
71 |
+
We are working on making this process more straightforward. Stay tuned for updates!
|