michsethowusu walusungungulube commited on
Commit
2cd54ee
·
0 Parent(s):

Duplicate from walusungungulube/ghana-tts-36k-gguf

Browse files

Co-authored-by: Walusungu Lulukile Ngulube <walusungungulube@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ ghana-tts-36k-f16-audiovae-f16.gguf filter=lfs diff=lfs merge=lfs -text
37
+ ghana-tts-36k-f16.gguf filter=lfs diff=lfs merge=lfs -text
38
+ ghana-tts-36k-q4_k-audiovae-f16.gguf filter=lfs diff=lfs merge=lfs -text
39
+ ghana-tts-36k-q4_k.gguf filter=lfs diff=lfs merge=lfs -text
40
+ ghana-tts-36k-q8_0-audiovae-f16.gguf filter=lfs diff=lfs merge=lfs -text
41
+ ghana-tts-36k-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
42
+ ghana-tts-36k-f32.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - text-to-speech
5
+ - voxcpm
6
+ - gguf
7
+ - ghana-tts
8
+ base_model: ghananlpcommunity/ghana-tts-36k
9
+ ---
10
+
11
+ # ghana-tts-36k — GGUF quantized variants
12
+
13
+ GGUF conversions of [`ghananlpcommunity/ghana-tts-36k`](https://huggingface.co/ghananlpcommunity/ghana-tts-36k)
14
+ for use with [bluryar/VoxCPM.cpp](https://github.com/bluryar/VoxCPM.cpp).
15
+
16
+ **The `.gguf` files are backend-agnostic** — the same file runs on both a CPU-only
17
+ and a CUDA build of the inference engine. Only the *binary* you compile differs
18
+ between CPU and GPU deployment, not the weight file.
19
+
20
+ ## Files
21
+
22
+ | File | Quant | AudioVAE | Size | Notes |
23
+ |---|---|---|---|---|
24
+ | `ghana-tts-36k-f32.gguf` | F32 | original | largest | Reference/max-accuracy baseline |
25
+ | `ghana-tts-36k-f16.gguf` | F16 | mixed | | |
26
+ | `ghana-tts-36k-f16-audiovae-f16.gguf` | F16 | f16 | | |
27
+ | `ghana-tts-36k-q8_0.gguf` | Q8_0 | mixed | | **Recommended for CPU** |
28
+ | `ghana-tts-36k-q8_0-audiovae-f16.gguf` | Q8_0 | f16 | | **Recommended for GPU (CUDA)** |
29
+ | `ghana-tts-36k-q4_k.gguf` | Q4_K | mixed | | Smallest, more accuracy loss |
30
+ | `ghana-tts-36k-q4_k-audiovae-f16.gguf` | Q4_K | f16 | smallest of the practical options | Fastest CPU model-only RTF; good compact CUDA option too |
31
+
32
+ ## Which one to use
33
+
34
+ Based on [bluryar/VoxCPM.cpp](https://github.com/bluryar/VoxCPM.cpp)'s own published
35
+ benchmarks on the same `"voxcpm"` architecture family (not run on this exact
36
+ checkpoint — validate on your own audio before committing to one in production):
37
+
38
+ **CPU inference:**
39
+ - Default pick: **`ghana-tts-36k-q8_0.gguf`** — best full-pipeline RTF at this model scale on CPU.
40
+ - Smaller/faster, slight accuracy trade-off: `ghana-tts-36k-q4_k-audiovae-f16.gguf`.
41
+
42
+ **GPU (CUDA) inference:**
43
+ - Default pick: **`ghana-tts-36k-q8_0-audiovae-f16.gguf`** — best full-pipeline RTF at this model scale on CUDA.
44
+ - Smallest CUDA-friendly option: `ghana-tts-36k-q4_k-audiovae-f16.gguf`.
45
+
46
+ ## Inference
47
+
48
+ This repo includes two scripts that build and run [VoxCPM.cpp](https://github.com/bluryar/VoxCPM.cpp) against these weights:
49
+
50
+ - `infer_cpu.sh` — builds a CPU-only `voxcpm_tts` and runs it against `ghana-tts-36k-q8_0.gguf`.
51
+ - `infer_gpu.sh` — builds a CUDA-enabled `voxcpm_tts` (requires an NVIDIA GPU + CUDA toolkit) and runs it against `ghana-tts-36k-q8_0-audiovae-f16.gguf`.
52
+
53
+ Usage (either script):
54
+
55
+ ```bash
56
+ bash infer_cpu.sh "Text to synthesize" prompt.wav "Exact transcript of prompt.wav" out.wav
57
+ bash infer_gpu.sh "Text to synthesize" prompt.wav "Exact transcript of prompt.wav" out.wav
58
+ ```
59
+
60
+ Swap in a different `.gguf` from this repo by editing the `MODEL_PATH` variable
61
+ at the top of either script.
ghana-tts-36k-f16-audiovae-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4718cb4d6e9620ca89173c969d9b0138f3775538f3a4a3a55351816daf8ca16d
3
+ size 1460771872
ghana-tts-36k-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4718cb4d6e9620ca89173c969d9b0138f3775538f3a4a3a55351816daf8ca16d
3
+ size 1460771872
ghana-tts-36k-f32.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77baf8801bdbe1cd77ca2ea1095f903bed3373fec6bef90b5b511032a09018ee
3
+ size 2913602336
ghana-tts-36k-q4_k-audiovae-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d7227bee9a187c1905f505943330e1c144be8e4d03c602c10801392e938f6b7
3
+ size 571242016
ghana-tts-36k-q4_k.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cc677f558f24a0ad23f4f29148a5cfdf63763f8ba74b66fdf4d5d5bc6afbcd0
3
+ size 499832224
ghana-tts-36k-q8_0-audiovae-f16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:552b37352bf215a1fb31c0b13bed2105793551853c504f21c1bd994a7c4f02cf
3
+ size 850327072
ghana-tts-36k-q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3668d62ab177b24fbf99deb08993029df8d91d09ae5cc45296ce8011bf355617
3
+ size 803072768
infer_cpu.sh ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # CPU inference for ghana-tts-36k via VoxCPM.cpp
5
+ # Usage: bash infer_cpu.sh "text" prompt.wav "prompt transcript" out.wav
6
+
7
+ TEXT="${1:?text required}"
8
+ PROMPT_AUDIO="${2:?prompt audio path required}"
9
+ PROMPT_TEXT="${3:?prompt transcript required}"
10
+ OUTPUT="${4:-out.wav}"
11
+
12
+ MODEL_PATH="$(dirname "$0")/ghana-tts-36k-q8_0.gguf" # recommended CPU variant
13
+ THREADS="${THREADS:-4}"
14
+
15
+ if [ ! -d VoxCPM.cpp ]; then
16
+ git clone --depth 1 https://github.com/bluryar/VoxCPM.cpp.git
17
+ fi
18
+
19
+ if [ ! -f VoxCPM.cpp/build-cpu/examples/voxcpm_tts ]; then
20
+ cmake -S VoxCPM.cpp -B VoxCPM.cpp/build-cpu -G Ninja \
21
+ -DCMAKE_BUILD_TYPE=Release \
22
+ -DVOXCPM_CUDA=OFF \
23
+ -DVOXCPM_BUILD_TESTS=OFF \
24
+ -DVOXCPM_BUILD_WASM=OFF \
25
+ -DVOXCPM_BUILD_BENCHMARK=OFF
26
+ cmake --build VoxCPM.cpp/build-cpu --target voxcpm_tts -j"$(nproc)"
27
+ fi
28
+
29
+ VoxCPM.cpp/build-cpu/examples/voxcpm_tts \
30
+ --text "$TEXT" \
31
+ --prompt-audio "$PROMPT_AUDIO" \
32
+ --prompt-text "$PROMPT_TEXT" \
33
+ --output "$OUTPUT" \
34
+ --model-path "$MODEL_PATH" \
35
+ --backend cpu \
36
+ --threads "$THREADS"
37
+
38
+ echo "Wrote $OUTPUT"
infer_gpu.sh ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ # CUDA inference for ghana-tts-36k via VoxCPM.cpp
5
+ # Requires an NVIDIA GPU + CUDA toolkit (nvcc) on this machine.
6
+ # Usage: bash infer_gpu.sh "text" prompt.wav "prompt transcript" out.wav
7
+
8
+ TEXT="${1:?text required}"
9
+ PROMPT_AUDIO="${2:?prompt audio path required}"
10
+ PROMPT_TEXT="${3:?prompt transcript required}"
11
+ OUTPUT="${4:-out.wav}"
12
+
13
+ MODEL_PATH="$(dirname "$0")/ghana-tts-36k-q8_0-audiovae-f16.gguf" # recommended GPU variant
14
+ THREADS="${THREADS:-4}"
15
+
16
+ if ! command -v nvcc >/dev/null 2>&1; then
17
+ echo "nvcc not found — this script requires a CUDA toolkit installed." >&2
18
+ exit 1
19
+ fi
20
+
21
+ if [ ! -d VoxCPM.cpp ]; then
22
+ git clone --depth 1 https://github.com/bluryar/VoxCPM.cpp.git
23
+ fi
24
+
25
+ if [ ! -f VoxCPM.cpp/build-cuda/examples/voxcpm_tts ]; then
26
+ cmake -S VoxCPM.cpp -B VoxCPM.cpp/build-cuda -G Ninja \
27
+ -DCMAKE_BUILD_TYPE=Release \
28
+ -DVOXCPM_CUDA=ON \
29
+ -DVOXCPM_BUILD_TESTS=OFF \
30
+ -DVOXCPM_BUILD_WASM=OFF \
31
+ -DVOXCPM_BUILD_BENCHMARK=OFF
32
+ cmake --build VoxCPM.cpp/build-cuda --target voxcpm_tts -j"$(nproc)"
33
+ fi
34
+
35
+ VoxCPM.cpp/build-cuda/examples/voxcpm_tts \
36
+ --text "$TEXT" \
37
+ --prompt-audio "$PROMPT_AUDIO" \
38
+ --prompt-text "$PROMPT_TEXT" \
39
+ --output "$OUTPUT" \
40
+ --model-path "$MODEL_PATH" \
41
+ --backend cuda \
42
+ --threads "$THREADS"
43
+
44
+ echo "Wrote $OUTPUT"