File size: 1,374 Bytes
22d0cc3
0a88ee7
 
 
 
22d0cc3
0a88ee7
22d0cc3
 
 
 
0a88ee7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: Tiny Code-Only TTS
emoji: πŸ€–
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 5.23.0
app_file: app.py
pinned: false
---

# Tiny Code-Only TTS for Hugging Face Spaces

This project builds a simple text-to-speech system from code only.

- No API key
- No external model
- No pretrained checkpoint
- Pure Python waveform synthesis
- Gradio UI for Hugging Face Spaces

## What it does

It converts text into robotic speech audio using a lightweight phoneme-style synthesizer. The engine uses handcrafted sound rules for vowels, fricatives, stops, nasals, liquids, and pauses.

This is a starter TTS project for deployment and experimentation. It is intentionally simple and CPU-friendly.

## Project structure

```text
.
β”œβ”€β”€ app.py
β”œβ”€β”€ requirements.txt
└── mini_tts/
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ config.py
    β”œβ”€β”€ normalizer.py
    β”œβ”€β”€ service.py
    └── synth.py
```

## Run locally

```bash
pip install -r requirements.txt
python app.py
```

## Deploy on Hugging Face Spaces

1. Create a new Space.
2. Choose `Gradio`.
3. Upload these files.
4. Space will install `requirements.txt`.
5. Open the app and generate speech directly from text.

## Notes

- The voice is synthetic and simple by design.
- You can tune pitch, speed, and voice color in the UI.
- You can extend phoneme rules in `mini_tts/synth.py`.