vladelesin
commited on
Commit
•
cbeee19
1
Parent(s):
bcc1813
Update app.py
Browse files
app.py
CHANGED
@@ -37,9 +37,8 @@ def synthesise(text):
|
|
37 |
speech = model.generate(**tokenizer(translated_text, return_tensors="pt"))
|
38 |
return speech.to("cpu")
|
39 |
|
40 |
-
def speech_to_speech_translation(
|
41 |
-
|
42 |
-
synthesised_speech = synthesise(translated_text)
|
43 |
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
44 |
return 16000, synthesised_speech[0]
|
45 |
|
|
|
37 |
speech = model.generate(**tokenizer(translated_text, return_tensors="pt"))
|
38 |
return speech.to("cpu")
|
39 |
|
40 |
+
def speech_to_speech_translation(text):
|
41 |
+
synthesised_speech = synthesise(text)
|
|
|
42 |
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
43 |
return 16000, synthesised_speech[0]
|
44 |
|