File size: 4,969 Bytes
b3f916a | 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 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | ---
language:
- en
pipeline_tag: text-to-speech
tags:
- emotion
- emotions
- expressive-tts
- emotional-tts
license: other
---
# NeuTTS-2E
[](https://youtu.be/RYKQSTqdiDc)
[๐ Spaces Demo](https://huggingface.co/spaces/neuphonic/neutts-2e), [๐ง Github](https://github.com/neuphonic/neutts)
[Q8 GGUF version](https://huggingface.co/neuphonic/neutts-2e-q8-gguf), [Q4 GGUF version](https://huggingface.co/neuphonic/neutts-2e-q4-gguf)
*Created by [Neuphonic](http://neuphonic.com/) - building faster, smaller, on-device voice AI*
**NeuTTS-2E** is a super-fast, highly realistic, **on-device** emotional TTS speech language model. It is an early alpha release, **English-only** model, supporting **six emotions plus neutral** (`angry`, `disgusted`, `fearful`, `happy`, `sad`, `surprised` and `neutral`) across **four fixed speakers** (`emily`, `paul`, `sophie`, `steven`). With a compact backbone and an efficient LM + codec design, NeuTTS-2E delivers strong naturalness and expressive control at a fraction of the compute, making it ideal for embedded voice agents, assistants, toys, and privacy-sensitive applications.
> [!NOTE]
> This model is **English only** with fixed speakers: for other languages and instant voice cloning, see the [NeuTTS Nano Multilingual Collection](https://huggingface.co/collections/neuphonic/neutts-nano-multilingual-collection).
## Key Features
- โก๏ธ **Ultra-fast for on-device** โ built for real-time or better-than-real-time generation on laptop-class CPUs
- ๐ ๐๐ญ **Emotional control** โ six emotions plus neutral, selected with a single argument
- ๐ฃ **High realism for its size** โ natural, expressive speech in a compact footprint
- ๐ฆ **GGUF/GGML-friendly deployment** โ easy to run locally via CPU-first tooling
- ๐ **Local-first + compliance-friendly** โ keep audio and text on-device
> [!CAUTION]
> Websites like neutts.com are popping up and they're not affliated with Neuphonic, our github or this repo.
>
> We are on neuphonic.com only. Please be careful out there! ๐
## Model Details
NeuTTS-2E is designed for **maximum speed per parameter** while retaining strong naturalness and expressive control:
- **Backbone**: compact LM backbone tuned for emotional TTS token generation
- **Input Format**: text โ no phonemizer or system dependencies required
- **Speakers**: four fixed speakers (`emily`, `paul`, `sophie`, `steven`)
- **Emotions**: `angry`, `disgusted`, `fearful`, `happy`, `sad`, `surprised` and `neutral`
- **Audio Codec**: [NeuCodec](https://huggingface.co/neuphonic/neucodec) - our open-source neural audio codec that achieves exceptional audio quality at low bitrates using a single codebook
- **Format**: quantisations available in GGUF format for efficient on-device inference
- **Responsibility**: Watermarked outputs
- **Inference Speed**: Optimised for real-time generation on CPUs
- **Power Consumption**: Designed for mobile and embedded devices
### Parameter Count
- **Active params (backbone only):** **~125M**
- **Total params (backbone + tied embeddings/head):** **~236M**
## Get Started with NeuTTS
1. **Install NeuTTS**
```bash
pip install neutts
```
Or for a local editable install, clone the [neutts repository](https://github.com/neuphonic/neutts) and run in the base folder:
```bash
pip install -e .
```
Alternatively to install all dependencies, including `onnxruntime` and `llama-cpp-python` (equivalent to steps 2 and 3 below):
```bash
pip install neutts[all]
```
or for an editable install:
```bash
pip install -e .[all]
```
2. **(Optional) Install `llama-cpp-python` to use `.gguf` models.**
```bash
pip install "neutts[llama]"
```
Note that this installs `llama-cpp-python` without GPU support. To install with GPU support (e.g., CUDA, MPS) please refer to:
https://pypi.org/project/llama-cpp-python/
3. **(Optional) Install `onnxruntime` to use the `.onnx` decoder.**
```bash
pip install "neutts[onnx]"
```
## Examples
To get started with the example scripts, clone the neutts repository and navigate into the project directory:
```bash
git clone https://github.com/neuphonic/neutts.git
cd neutts
```
### Basic Example
Run the emotional example script to synthesize speech:
```bash
python -m examples.basic_example_emotions \
--input_text "I can't believe it's finally here!" \
--speaker emily \
--emotion happy
```
### Simple One-Code Block Usage
```python
from neutts import NeuTTS2E
import soundfile as sf
tts = NeuTTS2E()
wav = tts.infer(
"I can't believe it's finally here!",
speaker="emily",
emotion="happy",
)
sf.write("test.wav", wav, 24000)
```
# **Responsibility**
Every audio file generated by NeuTTS-2E includes by default a [Perth (Perceptual Threshold) Watermark](https://github.com/resemble-ai/perth).
# **Disclaimer**
Don't use this model to do bad thingsโฆ please.
|