---
license: apache-2.0
language:
- en
tags:
- text-to-speech
- tts
- speech-synthesis
- pytorch
- ultra-small
- tiny-tts
- local-tts
- experimental
pipeline_tag: text-to-speech
library_name: pytorch
---

# Inflect-Nano-v1

Inflect-Nano-v1 is an **ultra-small English text-to-speech model** with only **4.63M inference parameters total**. That includes both the acoustic model and the neural vocoder.

The goal is simple: explore how far a truly tiny, fully local TTS stack can be pushed while staying small enough to run in places where normal TTS models are too large. It is one of the smallest neural TTS releases in this class, sitting far below the size of most modern speech synthesis systems.

This is an experimental release, not a production or SOTA voice model. It is small, fast to load, and usable for demos, but it still has audible quality limits.

## Why It Is Notable

- **4.63M total inference parameters**
- **Includes the vocoder**, not just a front-end acoustic model
- English-only single-voice speech synthesis
- 24 kHz waveform output
- Compact non-autoregressive acoustic model
- Small Snake-activation HiFi-GAN-style vocoder
- Designed for local/offline experiments and tiny-model research

## Quick Facts

| Item | Value |
|---|---:|
| Total inference parameters | **4.632M** |
| Acoustic model | **3.465M** |
| Vocoder generator | **1.167M** |
| Language | English |
| Voice | single male voice |
| Sample rate | 24 kHz |
| Acoustic output | 80-bin mel spectrogram |
| Vocoder | Snake V2Mid HiFi-GAN-style generator |

## Audio Examples

These examples cover punctuation, short questions, numbers, hard words, longer phrasing, and transition-heavy prompts.

| Prompt | Audio |
|---|---|
| "Did the timing change?" she answered. "Then why did Logan leave?" | [example_01.wav](./examples/example_01.wav) |
| Who puts a parking meter next to an ER label? | [example_02.wav](./examples/example_02.wav) |
| Please say neighborhood, statistics, and anesthesiologist clearly, without rushing through the middle syllables. | [example_03.wav](./examples/example_03.wav) |
| I said 91, not 306, which is a very different number. | [example_04.wav](./examples/example_04.wav) |
| The inference path looked natural, but the decoder still needed a smoother transition before Marcus approved the final test. | [example_05.wav](./examples/example_05.wav) |
| The appointment moved to 1:25, the invoice was $674.96, and the archive was labeled 1998. | [example_06.wav](./examples/example_06.wav) |
| If Logan sounded uneasy, then it happened near Long Beach, and the pause has to carry that. | [example_07.wav](./examples/example_07.wav) |
| The word aluminum should not steal attention from the softer ending after entrepreneur. | [example_08.wav](./examples/example_08.wav) |

## Install

```bash
git clone https://huggingface.co/owensong/Inflect-Nano-v1
cd Inflect-Nano-v1
pip install -r requirements.txt
```

The text frontend may download tokenizer files on first run.

## Usage

```bash
python inference.py \
  --text "Wait, are you actually being for real now? I can't believe it!" \
  --out sample.wav
```

CPU example:

```bash
python inference.py \
  --device cpu \
  --text "Please say neighborhood, statistics, and anesthesiologist clearly." \
  --out sample_cpu.wav
```

Optional controls:

```bash
python inference.py \
  --text "No, seriously, did Jordan leave the receipt in Albuquerque?" \
  --length-scale 1.03 \
  --pitch-scale 1.00 \
  --energy-scale 1.00 \
  --out sample_controlled.wav
```

Gradio demo:

```bash
python app.py
```

## Architecture

Inflect-Nano-v1 is a two-part TTS stack:

```text
text
-> normalization + English G2P frontend
-> compact FastSpeech-style acoustic model
-> 80-bin mel spectrogram
-> Snake V2Mid HiFi-GAN-style vocoder
-> 24 kHz waveform
```

### Acoustic Model

The acoustic model is a compact non-autoregressive FastSpeech-style network. It predicts duration, energy, brightness, and pitch, expands token states into frame states, and decodes 80-bin mel spectrograms.

Main config:

```json
{
  "hidden": 168,
  "encoder_layers": 5,
  "decoder_layers": 6,
  "decoder_ff_mult": 3,
  "kernel_size": 7,
  "speaker_dim": 64,
  "dropout": 0.08,
  "n_mels": 80,
  "sample_rate": 24000,
  "max_frames": 1400,
  "postnet_scale": 0.1,
  "use_frame_pitch": true,
  "abs_frame_bins": 512
}
```

Approximate acoustic split:

```text
total acoustic: 3.465M
encoder:        1.292M
decoder:        1.211M
postnet:        0.276M
local context:  0.226M
frame GRU:      0.128M
heads/embeds/projections: remainder
```

### Vocoder

The vocoder is a custom Snake-activation HiFi-GAN-style generator.

Main config:

```json
{
  "variant": "snake_v2mid",
  "sample_rate": 24000,
  "n_fft": 1024,
  "hop_size": 256,
  "win_size": 1024,
  "num_mels": 80,
  "fmax": 12000.0,
  "upsample_rates": [8, 8, 2, 2],
  "upsample_kernel_sizes": [16, 16, 4, 4],
  "upsample_initial_channel": 144,
  "resblock_kernel_sizes": [3, 7, 11],
  "resblock_dilation_sizes": [[1, 3, 5], [1, 3, 5], [1, 3, 5]],
  "activation": "snake"
}
```

Discriminators are training-only and are not included in inference parameter counts.

## Model Files

```text
weights/inflect_nano_v1_acoustic.pt
weights/inflect_nano_v1_vocoder.pt
```

## Limitations

This model is intentionally tiny and has clear quality limits:

- Unseen text can stumble or sound unstable.
- The voice can sound robotic, buzzy, or artifacted.
- Long or unusual prompts are less reliable.
- It is not a voice cloning model.
- It is not multilingual.
- It is not suitable for production accessibility, safety, or high-quality narration use.

## Recommended Framing

Use this as:

> An experimental 4.63M-parameter English TTS model exploring the quality/size tradeoff for ultra-small local speech synthesis.

Do not present it as SOTA or production-quality.

## License

Apache-2.0.

This repository includes a small third-party English text frontend derived from TinyTTS-style code for tokenization/G2P compatibility. Its license is included as `TINY_TTS_LICENSE`.
