Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import VitsModel, AutoTokenizer
|
2 |
+
import torch
|
3 |
+
|
4 |
+
model = VitsModel.from_pretrained("facebook/mms-tts-eng")
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/mms-tts-eng")
|
6 |
+
|
7 |
+
text = "some example text in the English language"
|
8 |
+
inputs = tokenizer(text, return_tensors="pt")
|
9 |
+
|
10 |
+
with torch.no_grad():
|
11 |
+
output = model(**inputs).waveform
|