# Amphion

> Open-source toolkit for audio, music, and speech generation

- Category: Multimodal Generation / Audio, Music & Voice
- Language: Python
- Licence: MIT
- Repository: https://github.com/open-mmlab/Amphion
- Website: https://openhlt.github.io/amphion/
- Canonical page: https://ai-tldr.dev/tools/amphion/

## In short

Amphion is an open-source toolkit for generating audio, music, and speech. It pulls many separate generation tasks into one codebase so researchers and engineers can study and reproduce them in a single place. It sits in the Audio, Music & Voice category of the Multimodal Generation tools and is open-source, written in Python and licensed MIT.

## Overview

Amphion is an open-source toolkit for generating audio, music, and speech. It pulls many separate generation tasks into one codebase so researchers and engineers can study and reproduce them in a single place.

The project covers a wide range of jobs: text-to-speech, singing voice synthesis, voice conversion, accent conversion, singing voice conversion, and text-to-audio. It also ships several neural vocoders and a set of objective evaluation metrics. Amphion adds interactive visualizations of classic models, which help newcomers see how the architectures work inside.

## What it does

- Text-to-speech with state-of-the-art architectures including FastSpeech2, VITS, VALL-E, NaturalSpeech2, and the non-autoregressive MaskGCT model
- Voice conversion, accent conversion, and singing voice conversion, including zero-shot frameworks such as Vevo and FACodec
- Text-to-audio generation built on a latent diffusion model in the style of AudioLDM and AUDIT
- A collection of neural vocoders spanning GAN-based (HiFi-GAN, BigVGAN), flow-based, diffusion-based, and auto-regressive designs
- Comprehensive objective evaluation metrics covering F0, energy, intelligibility, spectrogram distortion, and speaker similarity
- Unified data preprocessing for common datasets plus support for the large-scale Emilia speech dataset and its Emilia-Pipe pipeline

## Getting started

Amphion can be installed with the setup installer using conda, or by pulling its Docker image. After installing, follow the task recipes in the repository to run a specific generation job.

1. Clone the repository

   Download the source code from GitHub and move into the project folder.

```bash
git clone https://github.com/open-mmlab/Amphion.git
cd Amphion
```

2. Create the Python environment

   Use conda to create and activate a dedicated environment for Amphion.

```bash
conda create --name amphion python=3.9.15
conda activate amphion
```

3. Install the dependencies

   Run the provided shell script to install the required Python packages.

```bash
sh env.sh
```

4. Or use the Docker image

   If you prefer Docker, pull the official image and run it with GPU access, mounting your working directory.

```bash
docker pull realamphion/amphion
docker run --runtime=nvidia --gpus all -it -v .:/app realamphion/amphion
```

## When to use it

- Reproducing and comparing speech and audio generation models for research and benchmarking
- Building text-to-speech, voice conversion, or singing voice systems from a single shared codebase
- Generating audio from text descriptions using diffusion-based text-to-audio models
- Evaluating generated audio with consistent objective metrics for intelligibility, distortion, and speaker similarity
- Teaching and learning how classic audio models work through Amphion's interactive visualizations
