ttsceleb

A TTS app where you can clone the voices of any person you wish.

https://github.com/supremolink81/ttsceleb

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary

Keywords

bark beats encodec natural-language-processing pytorch streamlit text-to-speech tts
Last synced: 6 months ago · JSON representation ·

Repository

A TTS app where you can clone the voices of any person you wish.

Basic Info
  • Host: GitHub
  • Owner: Supremolink81
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 40.7 MB
Statistics
  • Stars: 7
  • Watchers: 1
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Topics
bark beats encodec natural-language-processing pytorch streamlit text-to-speech tts
Created over 2 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

TTSCeleb

TTSCeleb Page

This is a text-to-speech project where I create a simple web app to allow people to clone the voices of various popular figures, including (but not limited to):

  • Barack Obama

  • Donald Trump

  • Ben Shapiro

This README will serve as both a description of the project, and a high level tutorial of how to reproduce it. Though, for a more comprehensive view of the concepts presented here, I would encourage readers to consult the References section at the end of this README, where I have provided sources I used to make this project.

We will first describe the task and how the text-to-speech pipeline works, and then move on to the structure of the app.

Detailed Task Description

The task is to clone the voices of a popular person (such as Barack Obama) given an audio recording of the person. It is preferable that the voice not only be recognizable for a given person, but also have tonal depth and non verbal sounds such as laughing and screaming.

Ethics DIsclaimer

Of course, voice cloning technology can be used for malicious purposes, such as misinformation. I don't claim any responsibility over any individual who chooses to use this for illegal or morally dubious purposes. The world is already chaotic enough as is; let's not make it worse.

Dataset

We will be using audio recordings of various famous individuals [1]. These recordings contain little to no background noise and others speaking, ensuring our ground truth for training is high quality.

Model Selection

Before telling you which model I selected and why, I will first detail other alternatives and why I ultimately chose not to use them.

I started at the Bark text to audio generative model in the hopes of learning how to clone with it [2]. Unfortunately, there were various complications. I was fortunate to find a user called GitMylo had created a way to clone voices with Bark using a quantizer based on HuBERT [3], but it did not produce very high quality clones (whether this was due to Bark's quality or his model specifically, I am unsure). So I decided to study his pipeline and see if I could use pretrained models to improve on it.

Here is a sample recording produced by GitMylo's method which is meant to clone Joe Biden:

Biden Recording

While it isn't terrible, I wouldn't say it would be recognizable as Joe Biden.

Though, what Mylo did provide me was a starting point. I had to generate 3 things; a semantic prompt (whatever that meant), a fine representation and a coarse representation. To do these things, I needed an audio encoder and an acoustic tokenizer (or so I thought). For an encoder, I found Encodec by Meta AI, which had been seen to do a decent job at neural audio compression from their experiments [4]. For the tokenizer, I tried BEATs, a model developed by Microsoft Research Asia for audio embedding and tokenization.

However, this had its own problems; BEATs was too large to fit on even Colab's 15 GB VRAM GPUs, so it was out the door. Furthermore, I discovered later on that you shouldn't use a tokenizer for Bark's semantic prompts (despite the fact GitMylo's model was named CustomTokenizer), and that what you needed was a quantizer. In addition, there were specific restrictions in place for generating voice clones that were difficult to untangle, and Bark has no documentation on how to voice clone (which is intentional according to them).

With all of these difficulties, I decided to try my luck on other models. I eventually found a model called Tortoise, a TTS model developed by an OpenAI employee called neonbjb [6]. His repo had what I needed; voice cloning capabilities, flexible configuration, simple API, no restrictions. And with some of the samples I had seen on websites, it seemed like a good quality model. So it is ultimately the one I chose for this project.

References

[1] https://www.kaggle.com/datasets/verracodeguacas/voices

[2] https://github.com/suno-ai/bark

[3] HuBERT: Self-Supervised Speech Representation Learning by Masked Prediction of Hidden Units: https://arxiv.org/abs/2106.07447

[4] High Fidelity Neural Audio Compression: https://arxiv.org/abs/2210.13438

[5] BEATS: Audio Pre-Training with Acoustic Tokenizers: https://arxiv.org/pdf/2212.09058.pdf

[6] Tortoise TTS repo: https://github.com/neonbjb/tortoise-tts

Owner

  • Name: Ario Zareinia
  • Login: Supremolink81
  • Kind: user

I (try to) make things.

Citation (CITATION.cff)

cff-version: 1.3.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Betker"
  given-names: "James"
  orcid: "https://orcid.org/my-orcid?orcid=0000-0003-3259-4862"
title: "TorToiSe text-to-speech"
version: 2.0
date-released: 2022-04-28
url: "https://github.com/neonbjb/tortoise-tts"

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Dependencies

requirements.txt pypi
setup.py pypi
  • einops *
  • inflect *
  • librosa *
  • progressbar *
  • rotary_embedding_torch *
  • scipy *
  • tokenizers *
  • tqdm *
  • transformers ==4.29.2
  • unidecode *