File size: 2,770 Bytes
45cf6b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---
license: mpl-2.0
language:
- si
tags:
- si
- lk
- dialog
- male
- tts
- uom
- vits
---

# SinhalaVITS-TTS-M1 - Male Voice 01
This is a specially trained Coqui TTS [Coqui TTS](https://github.com/coqui-ai/TTS) model specially for **Sinhala**, developed by **Dialog Axiata PLC** and the **Dialog – UoM Research Lab**. 

We trained it on a custom recorded dataset adapting a strong male voice.

---
## Features
- Model architecture: VITS
- Language: Sinhala (si-lk)
- Training Sampling rate: 22050 Hz
- Framework: Coqui TTS
---

## Dataset
- Voice: Male (Sanjaya)
- Recording Sampling Rate: 44100Hz
- No. of Clips: 1096
- Total Length: >100mins (~2 hrs.)

## Training Specs
- Hardware: NVidia GeForce GTX1060 6GB GPU
- Training Time: **~85 hours**
- Global Steps: 170,000
- Batch Size: 16
- Epochs:
- Loss Convergence: Stable mel + KL losses


## Installation

You can run this model locally using the included Flask-based inference server. This server will automatically use CUDA if it's available on your system. 

1. First install requirements.
   
   ```bash
    pip install -r requirements.txt
   ```
2. Then start the API server
   
  ```bash
    python inference_M1.py
  ```
  _This starts a Flask server at http://localhost:8000._

3. Then you can use curl or any HTTP client (like Postman) to send Sinhala text to the server.
   The API endpoint is '/tts'
  ```bash
    curl -X POST http://localhost:8000/tts \
       -H "Content-Type: application/json" \
       -d '{"text": "ΰΆ†ΰΆΊΰ·”ΰΆΆΰ·ΰ·€ΰΆ±ΰ·Š"}' \
       --output output.wav
  ```
4. This API will,
    * Convert Sinhala text β†’ Romanized Sinhala (via romanizer.py)
    * Generate speech using the VITS model
    * Return output.wav (Sinhala voice)
      
## File Structure
  ```bash
    SinhalaVITS-TTS-M2/
      β”œβ”€β”€ Sanjaya_170000.pth          # Fine-tuned VITS checkpoint
      β”œβ”€β”€ Sanjaya_config.json         # Model configuration
      β”œβ”€β”€ romanizer.py                # Sinhala β†’ Roman converter
      β”œβ”€β”€ inference_M1.py             # Flask-based inference server
      β”œβ”€β”€ requirements.txt            # Required dependencies
      β”œβ”€β”€ LICENSE                     # MPL-2.0 license
      └── README.md                   # This file
  ```
## Contributors

  * Kasun Ranasinghe (Dialog-UoM Reasearch Lab)
  * Randika Silva (Dialog Axiata PLC)
  * Vipula Wakkumbura (Dialog-UoM Reasearch Lab)

## Acknowledgements
  * PathNirvana (https://github.com/pathnirvana/coqui-tts) – Previous work in Sinhala TTS
  * Coqui TTS – Open-source TTS framework enabling the foundation of this work
  * Sinhala dataset contributor (Sanjaya Nirodh) – for providing professional, quality speech samples

## License
This model is released under the MPL-2.0 license.