/ Модель

Характеристики

Архитектура
encodec · dense
Опубликована
15 июн 2023

encodec_32khz

ЭмбеддингиТекст → embedding3 профессии

Нейросетевой аудиокодек Meta AI для сжатия и восстановления музыки в реальном времени, в том числе в сценариях MusicGen.

39 359скачиваний за 30 дней19лайковвеса обновлены4 сен 2023

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

EnCodec 32 kHz — нейросетевой аудиокодек Meta AI, обученный в рамках проекта MusicGen. Он использует потоковую архитектуру кодировщика и декодировщика с квантованным латентным представлением и предназначен для сжатия и восстановления аудиосигнала с низкой задержкой.

Модель можно применять отдельно для сжатия и декомпрессии аудиофайлов, а также вместе с официальными чекпойнтами MusicGen. Вариант обучен на музыкальных данных, включая внутренний набор Meta AI и каталоги Shutterstock и Pond5. Для обработки доступны потоковый режим и режим с разбиением аудио на перекрывающиеся фрагменты; можно задавать битрейт.

Модель рассчитана на высококачественное сжатие музыки и работу в реальном времени. Карточка не описывает поддержку конкретных естественных языков: модель обрабатывает аудиосигнал, а не текст. Лицензия в предоставленных данных не указана.

Сценарии применения

  • сжатие музыкальных аудиофайлов
  • декодирование сжатой музыки с высоким качеством
  • потоковая передача аудио с низкой задержкой
  • подготовка аудиопредставлений для MusicGen
  • сжатие аудио с выбором битрейта

Ограничения

Эта версия предназначена прежде всего для использования с MusicGen, хотя её можно применять и отдельно. В предоставленных данных не указаны условия лицензии.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

encodec image

Model Card for EnCodec

This model card provides details and information about EnCodec 32kHz, a state-of-the-art real-time audio codec developed by Meta AI. This EnCodec checkpoint was trained specifically as part of the MusicGen project, and is intended to be used in conjuction with the MusicGen models.

Model Details

Model Description

EnCodec is a high-fidelity audio codec leveraging neural networks. It introduces a streaming encoder-decoder architecture with quantized latent space, trained in an end-to-end fashion. The model simplifies and speeds up training using a single multiscale spectrogram adversary that efficiently reduces artifacts and produces high-quality samples. It also includes a novel loss balancer mechanism that stabilizes training by decoupling the choice of hyperparameters from the typical scale of the loss. Additionally, lightweight Transformer models are used to further compress the obtained representation while maintaining real-time performance. This variant of EnCodec is trained on 20k of music data, consisting of an internal dataset of 10K high-quality music tracks, and on the ShutterStock and Pond5 music datasets.

  • Developed by: Meta AI
  • Model type: Audio Codec

Model Sources

Uses

Direct Use

EnCodec can be used directly as an audio codec for real-time compression and decompression of audio signals. It provides high-quality audio compression and efficient decoding. The model was trained on various bandwiths, which can be specified when encoding (compressing) and decoding (decompressing). Two different setup exist for EnCodec:

  • Non-streamable: the input audio is split into chunks of 1 seconds, with an overlap of 10 ms, which are then encoded.
  • Streamable: weight normalizationis used on the convolution layers, and the input is not split into chunks but rather padded on the left.

Downstream Use

This variant of EnCodec is designed to be used in conjunction with the official MusicGen checkpoints. However, it can also be used standalone to encode audio files.

How to Get Started with the Model

Use the following code to get started with the EnCodec model using a dummy example from the LibriSpeech dataset (~9MB). First, install the required Python packages:

pip install --upgrade pip
pip install --upgrade transformers datasets[audio] 

Then load an audio sample, and run a forward pass of the model:

from datasets import load_dataset, Audio
from transformers import EncodecModel, AutoProcessor


# load a demonstration datasets
librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")

# load the model + processor (for pre-processing the audio)
model = EncodecModel.from_pretrained("facebook/encodec_48khz")
processor = AutoProcessor.from_pretrained("facebook/encodec_48khz")

# cast the audio data to the correct sampling rate for the model
librispeech_dummy = librispeech_dummy.cast_column("audio", Audio(sampling_rate=processor.sampling_rate))
audio_sample = librispeech_dummy[0]["audio"]["array"]

# pre-process the inputs
inputs = processor(raw_audio=audio_sample, sampling_rate=processor.sampling_rate, return_tensors="pt")

# explicitly encode then decode the audio inputs
encoder_outputs = model.encode(inputs["input_values"], inputs["padding_mask"])
audio_values = model.decode(encoder_outputs.audio_codes, encoder_outputs.audio_scales, inputs["padding_mask"])[0]

# or the equivalent with a forward pass
audio_values = model(inputs["input_values"], inputs["padding_mask"]).audio_values

Evaluation

For evaluation results, refer to the MusicGen evaluation scores.

Summary

EnCodec is a state-of-the-art real-time neural audio compression model that excels in producing high-fidelity audio samples at various sample rates and bandwidths. The model's performance was evaluated across different settings, ranging from 24kHz monophonic at 1.5 kbps to 48kHz stereophonic, showcasing both subjective and objective results. Notably, EnCodec incorporates a novel spectrogram-only adversarial loss, effectively reducing artifacts and enhancing sample quality. Training stability and interpretability were further enhanced through the introduction of a gradient balancer for the loss weights. Additionally, the study demonstrated that a compact Transformer model can be employed to achieve an additional bandwidth reduction of up to 40% without compromising quality, particularly in applications where low latency is not critical (e.g., music streaming).

Citation

BibTeX:

@misc{copet2023simple,
      title={Simple and Controllable Music Generation}, 
      author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez},
      year={2023},
      eprint={2306.05284},
      archivePrefix={arXiv},
      primaryClass={cs.SD}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
EncodecModel
Ревизия весов
d0c4538

0 моделей