# lucidrains/naturalspeech2-pytorch

Implementation of Natural Speech 2, Zero-shot Speech and Singing Synthesizer, in Pytorch

Repository: https://github.com/lucidrains/naturalspeech2-pytorch
Canonical: https://ross.abutalabs.com/products/naturalspeech2-pytorch
Language: Python
License: MIT
License Family: permissive
Topics: artificial-intelligence, deep-learning, singing-synthesis, speech-synthesis, latent-diffusion, residual-vector-quantization, zero-shot
Last push: 2023-09-24T16:20:12+00:00

## Health v2 (maintenance only)
Score: 20/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 88
- inputs: {"age_days": 1232, "days_push": 1074, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1333, forks 104 (observed 2026-08-28T04:04:24.616344+00:00)

## What it is
A PyTorch implementation of NaturalSpeech 2, a zero-shot text-to-speech and singing synthesizer that combines a neural audio codec with a latent diffusion model for non-autoregressive generation. It is a research codebase (marked WIP) published as a pip-installable library for training and sampling speech diffusion models.

## Use cases
- train a zero-shot text-to-speech model in pytorch
- synthesize singing voices from text
- generate speech audio with a latent diffusion model
- experiment with neural audio codecs like encodec for TTS
- clone a voice from a short speech prompt
- research non-autoregressive speech synthesis

## When to choose
- you want to experiment with or extend the NaturalSpeech 2 architecture in PyTorch
- you need a research-grade zero-shot TTS/singing synthesis codebase
- you want to train a latent-diffusion speech model on your own audio data

## When to avoid
- you need a production-ready TTS system with pretrained voices
- you want a simple API to convert text to speech without training
- you need guaranteed stability or long-term support for a WIP research repo

## Facets
- artifact type: library
- maturity: experimental
- function: machine-learning, deep-learning, tts, audio-processing
- domain: artificial-intelligence, deep-learning, speech-processing
- platform: python
- tags: text-to-speech, latent-diffusion, zero-shot, speech-synthesis, singing-synthesis, neural-audio-codec, pytorch, research-implementation, natural-language-processing, gpu

## Member repositories
- lucidrains/naturalspeech2-pytorch (main) score 20

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:24.616344+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:44:47.781997+00:00, confidence not recorded.
  - readme: https://github.com/lucidrains/naturalspeech2-pytorch (fetched 2026-08-28T04:04:24.616344+00:00, sha 7b891ca2fd8a)
  - registry_pypi: https://pypi.org/pypi/naturalspeech2-pytorch/json (fetched 2026-08-29T12:04:01.904137+00:00, sha 1810774c8426)
- Data as of 2026-08-30T08:39:29.467469+00:00.
