vladelesin
commited on
Commit
•
ecfd58a
1
Parent(s):
dd057ae
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import numpy as np
|
|
9 |
import torch
|
10 |
|
11 |
from transformers import pipeline
|
12 |
-
from transformers import VitsModel, VitsTokenizer, FSMTForConditionalGeneration, FSMTTokenizer
|
13 |
|
14 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
15 |
|
@@ -17,7 +17,7 @@ device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
|
17 |
asr_pipe = pipeline("automatic-speech-recognition", model="asapp/sew-d-mid-400k-ft-ls100h", device=device)
|
18 |
|
19 |
# Translate en to rus text
|
20 |
-
translation_en_to_rus = pipeline("translation", model="
|
21 |
|
22 |
# Create speech from rus text
|
23 |
vits_model = VitsModel.from_pretrained("facebook/mms-tts-rus")
|
|
|
9 |
import torch
|
10 |
|
11 |
from transformers import pipeline
|
12 |
+
from transformers import VitsModel, VitsTokenizer, FSMTForConditionalGeneration, FSMTTokenizer, Wav2Vec2ForCTC, Wav2Vec2Processor, MarianMTModel, MarianTokenizer, T5ForConditionalGeneration, T5Tokenizer
|
13 |
|
14 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
15 |
|
|
|
17 |
asr_pipe = pipeline("automatic-speech-recognition", model="asapp/sew-d-mid-400k-ft-ls100h", device=device)
|
18 |
|
19 |
# Translate en to rus text
|
20 |
+
translation_en_to_rus = pipeline("translation", model="t5-small")
|
21 |
|
22 |
# Create speech from rus text
|
23 |
vits_model = VitsModel.from_pretrained("facebook/mms-tts-rus")
|