Metadata-Version: 2.2
Name: diajax
Version: 0.0.2a1
Summary: Dia-JAX: A JAX port of Dia, the text-to-speech model for generating realistic dialogue from text with emotion and tone control.
Home-page: https://github.com/jaco-bro/diajax
Author: J Joe
Author-email: backupjjoe@gmail.com
License: Apache-2.0
Requires-Python: >=3.12.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jax-metal==0.1.1; platform_system == "Darwin"
Requires-Dist: jaxlib==0.5.0
Requires-Dist: jax==0.5.0
Requires-Dist: flax==0.10.4
Requires-Dist: safetensors>=0.5.3
Requires-Dist: pydantic>=2.11.3
Requires-Dist: huggingface-hub>=0.30.2
Requires-Dist: soundfile>=0.13.1
Requires-Dist: descript-audio-codec>=1.0.0
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Dia-JAX

**An experimental JAX port of Dia, the 1.6B parameter text-to-speech model from Nari Labs**

Dia-JAX is a work-in-progress port of the original PyTorch-based Dia model to JAX via Flax NNX.

## Features

Just like the original Dia model, Dia-JAX aims to offer:

- Generate dialogue via `[S1]` and `[S2]` tags
- Generate non-verbal elements like `(laughs)`, `(coughs)`, etc.
  - Supported verbal tags: `(laughs), (clears throat), (sighs), (gasps), (coughs), (singing), (sings), (mumbles), (beep), (groans), (sniffs), (claps), (screams), (inhales), (exhales), (applause), (burps), (humming), (sneezes), (chuckle), (whistles)`
- Voice cloning with reference audio (TODO: currently not implemented)
- Quality comparable to commercial solutions like ElevenLabs Studio 

## Quickstart

### Install via pip

```bash
pip install diajax
```

## ⚙️ Usage

**Note: Currently only recommended for experimental/development use due to memory issues**

### Run from Command Line

```bash
# Generate audio with default settings
dia --text "[S1] Dear Jacks, to generate audio from text from any machine. (applause) [S2] Really? How! (screams) [S1] With flakes and an axe. (chuckles)"

# Or with custom parameters
dia --temperature 0.7 --cfg-filter-top-k 42
```
### As a Python Library

```python
import diajax
model, config = diajax.load()
output = diajax.generate(model, config, text)

import soundfile as sf
sf.write('dia.mp3', output, 44100)
```

## Acknowledgments

This project is a port of the [original Dia model](https://github.com/nari-labs/dia) by Nari Labs. We thank them for releasing their model and code, which made this port possible.

## License

This project is licensed under the same terms as the original Dia model. See [LICENSE](LICENSE) for details.
