Skip to main content

Dia-JAX: A JAX port of Dia, the text-to-speech model for generating realistic dialogue from text with emotion and tone control.

Project description

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

pip install diajax

⚙️ Usage

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

Run from Command Line

# Generate audio with default settings
dia --text "[S1] Testing Dia-JAX. [S2] How does it sound?"

# Or with custom parameters
dia --text "[S1] Another test. [S2] With different settings." \
    --output custom.mp3 \
    --temperature 1.0 \
    --seed 42

As a Python Library

import diajax
model, config = diajax.load('jaco-bro/Dia-1.6B')
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 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 for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diajax-0.0.1a0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diajax-0.0.1a0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file diajax-0.0.1a0.tar.gz.

File metadata

  • Download URL: diajax-0.0.1a0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for diajax-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 17bc038a3f7121b153fb8011be8c417c53ed01d312fea1c32ef23f3ade9b32e2
MD5 31df3f92d3f69e173b377fb432e3fbae
BLAKE2b-256 65d0c8bfc1c9a139c11b518043fac1af62d40b1f6b51a926b5e69be67b6e604c

See more details on using hashes here.

File details

Details for the file diajax-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: diajax-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for diajax-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e0d38ad98dd18cb758ebc26a2cce9bd574aa43c10b739af73efe39217aa9b1b
MD5 0169b992b63b5deb89b8c0c7262b7271
BLAKE2b-256 bf309a0d64b62912186d5c1e654eee1d704f108dc17b84532ba5d26ca694ed4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page