Metadata-Version: 2.4
Name: py-nanotts
Version: 0.1.2
Summary: Python bindings for NanoTTS (PicoTTS)
Home-page: https://github.com/rhasspy/py-nanotts
Author: Michael Hansen
Author-email: mike@rhasspy.org
License: Apache-2.0
Project-URL: Source, https://github.com/rhasspy/py-nanotts
Project-URL: Changelog, https://github.com/rhasspy/py-nanotts/blob/main/CHANGELOG.md
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.md
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-python
Dynamic: summary

# py-nanotts

Python bindings for NanoTTS (SVOX Pico). Generates raw PCM audio in a portable ABI3 wheel.

## Features

- Pure C extension using PicoTTS engine
- ABI3 / limited Python C API
- Returns raw PCM audio (16 kHz, mono, 16-bit LE)
- Bundles the Pico lingware files

## Install

Build a wheel locally:

```
python -m build --wheel
```

Install the resulting wheel from the `dist/` directory.

## Usage

```python
from py_nanotts import NanoTTS

pcm = NanoTTS().speak("Hello world", voice="en-GB", speed=1.0)
```

`NanoTTS.speak()` returns raw PCM bytes. Format:

- 16 kHz sample rate
- 1 channel (mono)
- 16-bit little-endian

## CLI

A minimal CLI is provided:

```
python -m py_nanotts "Hello world" -o hello.wav -v en-GB
```

## Notes

- Voices: `en-GB`, `en-US`, `de-DE`, `es-ES`, `fr-FR`, `it-IT`.
- The CLI writes a WAV file using Python's `wave` module.
