Skip to content

Commit

Permalink
Merge pull request #138 from MKhalusova/vits-update
Browse files Browse the repository at this point in the history
MMS update
  • Loading branch information
MKhalusova authored Sep 12, 2023
2 parents d22cf81 + f0a8cba commit 7765b1d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions chapters/en/chapter6/pre-trained_models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,10 @@ Like Bark, there's no need for a vocoder, as waveforms are generated directly.

<Tip warning={true}>

MMS model has been added to 🤗 Transformers very recently, so the API may still slightly change. At the time of this Unit's
release, the MMS for TTS is scheduled to be merged in Transformers `main` in a couple of days.
Once it's merged, you will have to install the library from source. Meanwhile, if you're eager to try the following inference
example, you can install the model from the PR's branch:
MMS model has been added to 🤗 Transformers very recently, so you will have to install the library from source:

```bash
pip install git+https://github.com/hollance/transformers.git@6900e8ba6532162a8613d2270ec2286c3f58f57b
pip install git+https://github.com/huggingface/transformers.git
```

</Tip>
Expand All @@ -389,7 +386,8 @@ text_example = (
)
```

To generate a waveform output, preprocess the text with the tokenizer, and pass it to the model:
To generate a waveform output, preprocess the text with the tokenizer, and pass it to the model:

```python
import torch

Expand All @@ -400,7 +398,7 @@ input_ids = inputs["input_ids"]
with torch.no_grad():
outputs = model(input_ids)

speech = outputs.audio[0]
speech = outputs["waveform"]
```

Let's listen to it:
Expand Down

0 comments on commit 7765b1d

Please sign in to comment.