/ Модель

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

Лицензия
Apache 2.0
Архитектура
parler_tts · dense
Библиотека
transformers
Опубликована
22 ноя 2024

parler-tts-mini-multilingual-v1.1

Синтез речиТекст → аудио3 профессии

Мультиязычная модель Parler-TTS преобразует текст в управляемую голосовыми описаниями речь на восьми европейских языках.

3 668скачиваний за 30 дней59лайковвеса обновлены4 дек 2024

Бенчмарки

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

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

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

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

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

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

Parler-TTS Mini Multilingual v1.1 — мультиязычная модель синтеза речи, разработанная в сотрудничестве аудиокоманды Hugging Face и Quantum Squadra при содействии AI4Bharat. Это дообученная версия Parler-TTS Mini на очищенных данных CML-TTS и неанглоязычной части Multilingual LibriSpeech; для сохранения английской речи также использован набор LibriTTS-R. В обучении задействовано около 9 200 часов неанглоязычных данных и 580 часов англоязычных данных.

Модель преобразует текст в речь на английском, французском, испанском, португальском, польском, немецком, нидерландском и итальянском языках. Текстовое описание позволяет задавать характеристики голоса и звучания, например темп, высоту, пол, реверберацию и уровень шума; также можно выбирать из 16 обученных дикторов для более стабильного голоса. Архитектура — Parler-TTS на базе Transformer, используется библиотека Transformers и формат весов Safetensors.

Карточка не приводит размер модели или длину контекста. Указаны подсказки по качеству и управлению просодией, но отдельные оценки качества и ограничения не приведены. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Parler-TTS Mini Multilingual v1.1

Parler-TTS Mini Multilingual v1.1 is a multilingual extension of Parler-TTS Mini.

🚨 As compared to Mini Multilingual v1, this version was trained with some consistent speaker names and with better format for descriptions. 🚨

It is a fine-tuned version, trained on a cleaned version of CML-TTS and on the non-English version of Multilingual LibriSpeech. In all, this represents some 9,200 hours of non-English data. To retain English capabilities, we also added back the LibriTTS-R English dataset, some 580h of high-quality English data.

Parler-TTS Mini Multilingual can speak in 8 European languages: English, French, Spanish, Portuguese, Polish, German, Italian and Dutch.

Thanks to its better prompt tokenizer, it can easily be extended to other languages. This tokenizer has a larger vocabulary and handles byte fallback, which simplifies multilingual training.

🚨 This work is the result of a collaboration between the HuggingFace audio team and the Quantum Squadra team. The AI4Bharat team also provided advice and assistance in improving tokenization. 🚨

📖 Quick Index

🛠️ Usage

🚨Unlike previous versions of Parler-TTS, here we use two tokenizers - one for the prompt and one for the description.🚨

👨‍💻 Installation

Using Parler-TTS is as simple as "bonjour". Simply install the library once:

pip install git+https://github.com/huggingface/parler-tts.git

🎲 Random voice

Parler-TTS Mini Multilingual has been trained to generate speech with features that can be controlled with a simple text prompt, for example:

import torch
from parler_tts import ParlerTTSForConditionalGeneration
from transformers import AutoTokenizer
import soundfile as sf

device = "cuda:0" if torch.cuda.is_available() else "cpu"

model = ParlerTTSForConditionalGeneration.from_pretrained("parler-tts/parler-tts-mini-multilingual-v1.1").to(device)
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler-tts-mini-multilingual-v1.1")
description_tokenizer = AutoTokenizer.from_pretrained(model.config.text_encoder._name_or_path)

prompt = "Salut toi, comment vas-tu aujourd'hui?"
description = "A female speaker delivers a slightly expressive and animated speech with a moderate speed and pitch. The recording is of very high quality, with the speaker's voice sounding clear and very close up."

input_ids = description_tokenizer(description, return_tensors="pt").input_ids.to(device)
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)

generation = model.generate(input_ids=input_ids, prompt_input_ids=prompt_input_ids)
audio_arr = generation.cpu().numpy().squeeze()
sf.write("parler_tts_out.wav", audio_arr, model.config.sampling_rate)

🎯 Using a specific speaker

To ensure speaker consistency across generations, this checkpoint was also trained on 16 speakers, characterized by name (e.g. Daniel, Christine, Richard, Nicole, ...).

To take advantage of this, simply adapt your text description to specify which speaker to use: Daniel's voice is monotone yet slightly fast in delivery, with a very close recording that almost has no background noise.

import torch
from parler_tts import ParlerTTSForConditionalGeneration
from transformers import AutoTokenizer
import soundfile as sf

device = "cuda:0" if torch.cuda.is_available() else "cpu"

model = ParlerTTSForConditionalGeneration.from_pretrained("parler-tts/parler-tts-mini-multilingual-v1.1").to(device)
tokenizer = AutoTokenizer.from_pretrained("parler-tts/parler-tts-mini-multilingual-v1.1")
description_tokenizer = AutoTokenizer.from_pretrained(model.config.text_encoder._name_or_path)

prompt = "Salut toi, comment vas-tu aujourd'hui?"
description = "Daniel's voice is monotone yet slightly fast in delivery, with a very close recording that almost has no background noise."

input_ids = description_tokenizer(description, return_tensors="pt").input_ids.to(device)
prompt_input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)

generation = model.generate(input_ids=input_ids, prompt_input_ids=prompt_input_ids)
audio_arr = generation.cpu().numpy().squeeze()
sf.write("parler_tts_out.wav", audio_arr, model.config.sampling_rate)

You can choose a speaker from this list:

LanguageSpeaker NameNumber of occurrences it was trained on
DutchMark460066
Jessica4438
Michelle83
FrenchDaniel10719
Michelle19
Christine20187
Megan695
GermanNicole53964
Christopher1671
Megan41
Michelle12693
ItalianJulia2616
Richard9640
Megan4
PolishAlex25849
Natalie9384
PortugueseSophia34182
Nicholas4411
SpanishSteven74099
Olivia48489
Megan12

Tips:

  • We've set up an inference guide to make generation faster. Think SDPA, torch.compile, batching and streaming!
  • Include the term "very clear audio" to generate the highest quality audio, and "very noisy audio" for high levels of background noise
  • Punctuation can be used to control the prosody of the generations, e.g. use commas to add small breaks in speech
  • The remaining speech features (gender, speaking rate, pitch and reverberation) can be controlled directly through the prompt

Motivation

Parler-TTS is a reproduction of work from the paper Natural language guidance of high-fidelity text-to-speech with synthetic annotations by Dan Lyth and Simon King, from Stability AI and Edinburgh University respectively.

Contrarily to other TTS models, Parler-TTS is a fully open-source release. All of the datasets, pre-processing, training code and weights are released publicly under permissive license, enabling the community to build on our work and develop their own powerful TTS models. Parler-TTS was released alongside:

Citation

If you found this repository useful, please consider citing this work and also the original Stability AI paper:

@misc{lacombe-etal-2024-parler-tts,
  author = {Yoach Lacombe and Vaibhav Srivastav and Sanchit Gandhi},
  title = {Parler-TTS},
  year = {2024},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/huggingface/parler-tts}}
}
@misc{lyth2024natural,
      title={Natural language guidance of high-fidelity text-to-speech with synthetic annotations},
      author={Dan Lyth and Simon King},
      year={2024},
      eprint={2402.01912},
      archivePrefix={arXiv},
      primaryClass={cs.SD}
}

License

This model is permissively licensed under the Apache 2.0 license.

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

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

GPU в ailist

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

Нельзя запустить

Архитектура parler_tts неизвестна transformers в образе рантайма.

Класс архитектуры
ParlerTTSForConditionalGeneration
Ревизия весов
11b27d5

0 моделей