Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download TTS models #15

Open
1 task
howardbaek opened this issue May 9, 2023 · 2 comments
Open
1 task

Download TTS models #15

howardbaek opened this issue May 9, 2023 · 2 comments

Comments

@howardbaek
Copy link
Member

howardbaek commented May 9, 2023

RStudio crashes when attempting to use a new model. When tts is using a new model (that doesn't exist in /Users/howardbaek/Library/Application Support/tts), it needs to download the model to that folder:

Screenshot 2023-05-09 at 2 56 45 PM

I think this download process causes RStudio to crash for some reason.

The Python TTS API seems to deal with this by setting up (initializing) the model first before converting text to speech.

Task

  • Figure out a way to download the model in the user system (for ex. /Users/howardbaek/Library/Application Support) without crashing RStudio.
@howardbaek howardbaek added the bug Something isn't working label May 9, 2023
@howardbaek howardbaek changed the title RStudio Crashes when using a model for the first time Download new models May 11, 2023
@howardbaek
Copy link
Member Author

howardbaek commented May 11, 2023

Proposed Solution

Whenever you run the tts command, it checks whether the model_name & vocoder_name exists in the /Users/howardbaek/Library/Application Support/tts folder. If it does exist, it starts converting text-to-speech, and if it doesn't exist, then it downloads the model and vocoder to /Users/howardbaek/Library/Application Support/tts.

We need a function (for ex. check_model()) that peeks inside /Users/howardbaek/Library/Application Support/tts and see if model X (and vocoder Y) exist, and if it doesn't exist, then downloads the model from the Internet (using curl). The URL that contains these models are listed in this JSON file. I just need to parse this JSON and look for the github_rls_url field.

Parsing JSON:

library(jsonlite)

url <- "https://raw.githubusercontent.com/coqui-ai/TTS/dev/TTS/.models.json"
read_json(url)

Say I want to use tacotron2-DDC_ph. In Terminal,

# Download zip file containing model
curl -LO https://coqui.gateway.scarf.sh/v0.6.1_models/tts_models--en--ljspeech--tacotron2-DDC.zip
# Unzip
unzip tts_models--en--ljspeech--tacotron2-DDC

Then, move this folder into /Users/howardbaek/Library/Application Support/tts.

@cansavvy
Copy link
Contributor

For now, it is not crashing, but let's keep an eye on this.

@howardbaek howardbaek removed the bug Something isn't working label May 11, 2023
@howardbaek howardbaek changed the title Download new models RStudio crashes May 11, 2023
@howardbaek howardbaek changed the title RStudio crashes RStudio Crash May 11, 2023
@howardbaek howardbaek changed the title RStudio Crash Download TTS models Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants