Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,8 +35,8 @@ pipe = pipeline("automatic-speech-recognition",
|
|
35 |
# Load the model checkpoint and tokenizer
|
36 |
#model = VitsModel.from_pretrained("Matthijs/mms-tts-fra")
|
37 |
#tokenizer = VitsTokenizer.from_pretrained("Matthijs/mms-tts-fra")
|
38 |
-
|
39 |
-
|
40 |
|
41 |
|
42 |
# Define a function to translate an audio, in english here
|
@@ -53,7 +53,7 @@ def synthesise(text):
|
|
53 |
input_ids = inputs["input_ids"]
|
54 |
|
55 |
with torch.no_grad():
|
56 |
-
outputs =
|
57 |
|
58 |
return outputs.audio[0]
|
59 |
|
|
|
35 |
# Load the model checkpoint and tokenizer
|
36 |
#model = VitsModel.from_pretrained("Matthijs/mms-tts-fra")
|
37 |
#tokenizer = VitsTokenizer.from_pretrained("Matthijs/mms-tts-fra")
|
38 |
+
model2 = VitsModel.from_pretrained("facebook/mms-tts-fra")
|
39 |
+
tokenizer = VitsTokenizer.from_pretrained("facebook/mms-tts-fra")
|
40 |
|
41 |
|
42 |
# Define a function to translate an audio, in english here
|
|
|
53 |
input_ids = inputs["input_ids"]
|
54 |
|
55 |
with torch.no_grad():
|
56 |
+
outputs = model2(input_ids)
|
57 |
|
58 |
return outputs.audio[0]
|
59 |
|