RL10x commited on
Commit
9bbfde2
·
verified ·
1 Parent(s): ab1b068

Model card: usage with the included code

Browse files
Files changed (1) hide show
  1. README.md +25 -1
README.md CHANGED
@@ -33,7 +33,28 @@ filter) makes the waveform directly. No separate neural vocoder is needed.
33
  | `tiny_voca_hindi.pt` | PyTorch checkpoint (state dict + config), after 100k training steps | 38.9 MB |
34
  | `config.json` | the model configuration | |
35
 
36
- The inference code is **not included in this repository**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  ## Training
39
 
@@ -48,3 +69,6 @@ The inference code is **not included in this repository**.
48
  The weights are released under **CC BY 4.0**, following the training data:
49
  - voice data: [Rasa](https://huggingface.co/datasets/ai4bharat/Rasa) by AI4Bharat (CC BY 4.0);
50
  - architecture and original code: [tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) (Apache-2.0).
 
 
 
 
33
  | `tiny_voca_hindi.pt` | PyTorch checkpoint (state dict + config), after 100k training steps | 38.9 MB |
34
  | `config.json` | the model configuration | |
35
 
36
+ ## Usage
37
+
38
+ The inference code is included: Python (`speak.py`, `tiny_voca/`, `hindi_text/`) and a C++ engine on ggml with a small
39
+ web page (`cpp/`, `web/`).
40
+
41
+ ```bash
42
+ git clone https://huggingface.co/FcbLeo/tiny-voca-hindi
43
+ cd tiny-voca-hindi
44
+ pip install -r requirements.txt
45
+ python speak.py "आज 15 अगस्त है और तापमान 32 डिग्री है।" --style happy --out happy.wav
46
+ ```
47
+
48
+ Text is normalised first, so numbers, dates, times, money and units are read as Hindi words.
49
+
50
+ C++ engine (CPU only; CMake downloads ggml v0.29.0 during the first build):
51
+
52
+ ```bash
53
+ cpp\build.bat # Windows (Visual Studio 2022 C++ tools)
54
+ sh cpp/build.sh # Linux / macOS
55
+ cpp/build/tts_hi --model tts_hi_q8_0.gguf --text "नमस्ते, आप कैसे हैं?" --style conv --out hello.wav
56
+ cpp/build/tts_hi --model tts_hi_q8_0.gguf --serve 8090 --page web --threads 4 # web page on http://127.0.0.1:8090
57
+ ```
58
 
59
  ## Training
60
 
 
69
  The weights are released under **CC BY 4.0**, following the training data:
70
  - voice data: [Rasa](https://huggingface.co/datasets/ai4bharat/Rasa) by AI4Bharat (CC BY 4.0);
71
  - architecture and original code: [tiny-voca](https://huggingface.co/n4ze3m/tiny-voca) (Apache-2.0).
72
+
73
+ The inference code is released under the **Apache License 2.0** (`LICENSE`, `NOTICE`).
74
+ `cpp/third_party/httplib.h` is [cpp-httplib](https://github.com/yhirose/cpp-httplib) (MIT).