WasuratS commited on
Commit
90b7e3e
1 Parent(s): 264ed77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -25,7 +25,9 @@ def translate(audio):
25
 
26
  def synthesise(text):
27
  inputs = processor(text=text, return_tensors="pt")
28
- speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
 
 
29
  return speech.cpu()
30
 
31
  def speech_to_speech_translation(audio):
 
25
 
26
  def synthesise(text):
27
  inputs = processor(text=text, return_tensors="pt")
28
+ input_ids = inputs["input_ids"]
29
+ input_ids = input_ids[0:1, :200]
30
+ speech = model.generate_speech(input_ids.to(device), speaker_embeddings.to(device), vocoder=vocoder)
31
  return speech.cpu()
32
 
33
  def speech_to_speech_translation(audio):