Spaces:
Runtime error
Runtime error
detach synthesized speech tensor to call numpy
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ def synthesise(text):
|
|
31 |
def speech_to_speech_translation(audio):
|
32 |
translated_text = translate(audio)
|
33 |
synthesised_speech = synthesise(translated_text)
|
34 |
-
synthesised_speech = (synthesised_speech.numpy() * 32767).astype(np.int16)
|
35 |
return 16000, synthesised_speech
|
36 |
|
37 |
|
|
|
31 |
def speech_to_speech_translation(audio):
|
32 |
translated_text = translate(audio)
|
33 |
synthesised_speech = synthesise(translated_text)
|
34 |
+
synthesised_speech = (synthesised_speech.detach().numpy() * 32767).astype(np.int16)
|
35 |
return 16000, synthesised_speech
|
36 |
|
37 |
|