Stopwolf commited on
Commit
594c7cc
1 Parent(s): a57914c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,7 +31,7 @@ def synthesise(text):
31
 
32
  with torch.no_grad():
33
  output = model(**inputs)
34
- output = output.waveform
35
  # inputs = processor(text=text, return_tensors="pt")
36
  # speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
37
  return output.cpu()
@@ -65,7 +65,7 @@ file_translate = gr.Interface(
65
  fn=speech_to_speech_translation,
66
  inputs=gr.Audio(source="upload", type="filepath"),
67
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
68
- # examples=[["./example.wav"]],
69
  title=title,
70
  description=description,
71
  )
 
31
 
32
  with torch.no_grad():
33
  output = model(**inputs)
34
+ output = output.waveform[0]
35
  # inputs = processor(text=text, return_tensors="pt")
36
  # speech = model.generate_speech(inputs["input_ids"].to(device), speaker_embeddings.to(device), vocoder=vocoder)
37
  return output.cpu()
 
65
  fn=speech_to_speech_translation,
66
  inputs=gr.Audio(source="upload", type="filepath"),
67
  outputs=gr.Audio(label="Generated Speech", type="numpy"),
68
+ examples=[["./example.wav"]],
69
  title=title,
70
  description=description,
71
  )