veluchs commited on
Commit
fa1abef
1 Parent(s): 617fdb5

detach synthesized speech tensor to call numpy

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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