Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
neonbjb authored Mar 9, 2023
1 parent f688ba9 commit c9951ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ Cool application of Tortoise+GPT-3 (not by me): https://twitter.com/lexman_ai

### Colab

Colab is the easiest way to try this out. I've put together a notebook you can use here:
https://colab.research.google.com/drive/1wVVqUPqwiDBUVeWWOUNglpGhU3hg_cbR?usp=sharing
The original colab no longer works by a combination of Google's tendency to forward-break things and Python's package management system. I do not intend to keep fixing it so it has been removed. Apologies!

### Local Installation

Expand Down

2 comments on commit c9951ac

@aduchon
Copy link

@aduchon aduchon commented on c9951ac Apr 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really too bad. This breaks a whole workflow for me. I hope you or someone can help me lock the versions to get it working in colab again.

@aduchon
Copy link

@aduchon aduchon commented on c9951ac Apr 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, this sequence works in Google Colab. There are still issues with scipy, numpy and llvmlite. But generation works.

models_path = MYDRIVE_PATH / "AI" / "models"

%cd {str(models_path)}
!git clone https://github.com/neonbjb/tortoise-tts.git
%cd tortoise-tts

!pip install -U scipy

# Imports used through the rest of the notebook.
!pip install llvmlite==0.39.1
!pip install torchaudio==0.13.1
!pip install torchvision==0.14.1
!pip install torchtext==0.14.1
!pip install torchdata==0.5.1

!pip install transformers==4.19.0

!pip install tqdm
!pip install rotary_embedding_torch
!pip install tokenizers
!pip install inflect
!pip install progressbar
!pip install einops==0.4.1
!pip install unidecode
!pip install scipy==0.10.1
!pip install librosa==0.9.1
!pip install numba==0.48.0
!pip install ffmpeg
!pip install numpy==1.20.0
!pip install numba==0.48.0
!pip install threadpoolctl
!pip install appdirs


!python3 setup.py install


import torch
import torchaudio
import torch.nn as nn
import torch.nn.functional as F

import IPython

from tortoise.api import TextToSpeech
from tortoise.utils.audio import load_audio, load_voice, load_voices

# This will download all the models used by Tortoise from the HuggingFace hub.
print("Downloading models from HuggingFace")
tts = TextToSpeech()

# generate test
voice_list = ['tom', 'daniel',] 
voice_samples, conditioning_latents = load_voices(voice_list)
preset = "fast" # for testing

gen = tts.tts_with_preset("They used to say that if man was meant to fly, he’d have wings. But he did fly. He discovered he had to.", 
                        voice_samples=voice_samples, conditioning_latents=conditioning_latents, 
                        preset=preset)
torchaudio.save('/tmp/captain_kirkard.wav', gen.squeeze(0).cpu(), 24000)
IPython.display.Audio('/tmp/captain_kirkard.wav')

Please sign in to comment.