Joserzapata
commited on
Commit
•
9016537
1
Parent(s):
301c110
update language to fr
Browse files
app.py
CHANGED
@@ -20,11 +20,11 @@ vocoder = SpeechT5HifiGan.from_pretrained("microsoft/speecht5_hifigan").to(devic
|
|
20 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
21 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
22 |
|
23 |
-
model_mms = VitsModel.from_pretrained("Matthijs/mms-tts-
|
24 |
-
tokenizer_mms = VitsTokenizer.from_pretrained("Matthijs/mms-tts-
|
25 |
|
26 |
def translate(audio):
|
27 |
-
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "
|
28 |
return outputs["text"]
|
29 |
|
30 |
|
|
|
20 |
embeddings_dataset = load_dataset("Matthijs/cmu-arctic-xvectors", split="validation")
|
21 |
speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze(0)
|
22 |
|
23 |
+
model_mms = VitsModel.from_pretrained("Matthijs/mms-tts-fra").to(device)
|
24 |
+
tokenizer_mms = VitsTokenizer.from_pretrained("Matthijs/mms-tts-fra")
|
25 |
|
26 |
def translate(audio):
|
27 |
+
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "transcribe", "language": "fr"})
|
28 |
return outputs["text"]
|
29 |
|
30 |
|