chaanks commited on
Commit
ddab44e
1 Parent(s): 7902af3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -59,10 +59,10 @@ hifi_gan_unit = UnitHIFIGAN.from_hparams(source="speechbrain/tts-hifigan-unit-hu
59
 
60
  # Running the S2UT model
61
  codes = s2ut.translate_file("speechbrain/s2st-transformer-fr-en-hubert-l6-k100-cvss/example-fr.wav")
62
- codes = torch.IntTensor(codes)
63
 
64
  # Running Vocoder (units-to-waveform)
65
- waveforms = hifi_gan_unit.decode_unit(codes)
66
 
67
  # Save the waverform
68
  torchaudio.save('example.wav',waveforms.squeeze(1), 16000)
 
59
 
60
  # Running the S2UT model
61
  codes = s2ut.translate_file("speechbrain/s2st-transformer-fr-en-hubert-l6-k100-cvss/example-fr.wav")
62
+ codes = torch.IntTensor(codes[:-1])
63
 
64
  # Running Vocoder (units-to-waveform)
65
+ waveforms = hifi_gan_unit.decode_unit(codes.unsqueeze(-1))
66
 
67
  # Save the waverform
68
  torchaudio.save('example.wav',waveforms.squeeze(1), 16000)