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] 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

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 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.1a1.tar.gz (13.9 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.1a1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: diajax-0.0.1a1.tar.gz
  • Upload date:
  • Size: 13.9 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.1a1.tar.gz
Algorithm Hash digest
SHA256 2d6053cda52c6d9d22b44407a5487b91546ea083480bc6f610afdb8f6b94862f
MD5 b0ef97a55962b905e3fde3bc7cccdb5f
BLAKE2b-256 35f0fa42477d5aa87e04e05774ffce3a4adcaf7de0d5b006b0c77d3c97042a80

See more details on using hashes here.

File details

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

File metadata

  • Download URL: diajax-0.0.1a1-py3-none-any.whl
  • Upload date:
  • Size: 13.2 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.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ae08698e28b15c2a67b49342e8ef8be7b6819537b879da34822a7e40efd720f
MD5 80387ff67bf090d3deee65d3f9e696e7
BLAKE2b-256 b49aef59facea79ef8da02010ad920b48d6bf3050cb96cb33b2f81eec0791893

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