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

Uploaded Python 3

File details

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

File metadata

  • Download URL: diajax-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0658f9f1f13b241733ee299c7faeef4139ca96f175090efc47a0161ab88f8f54
MD5 711b08260d8cfc2edafcbe00c7db5f53
BLAKE2b-256 925691d097015b850ab76bf28dbf6b2adff0267a939c7145b85f31e6c67fa291

See more details on using hashes here.

File details

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

File metadata

  • Download URL: diajax-0.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b21fedf03ce3343687a53358ab6be3615af31c6b9c909a0db80d0fdc40f389b
MD5 f50cecf36d65062e7fce6f511aa1d129
BLAKE2b-256 f54f1388ff6194eb807c3c66ab237f2a4c3d2abf3812384ea033f5e3b37a883b

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