mt-upc / SHAS

SHAS: Approaching optimal Segmentation for End-to-End Speech Translation
MIT License
37 stars 4 forks source link

segment.py passes 5 arguments but infer.py requires 4 #1

Closed sarapapi closed 2 years ago

sarapapi commented 2 years ago

Hi all, I have successfully installed your repo and downloaded your English ckpt. When I run the segment.py script I got the error:

Traceback (most recent call last):
  File "/home/ubuntu/SHAS/./src/supervised_hybrid/segment.py", line 342, in <module>
    segment(args)
  File "/home/ubuntu/SHAS/./src/supervised_hybrid/segment.py", line 236, in segment
    probs, _ = infer(
TypeError: infer() takes 4 positional arguments but 5 were given

This is due to the fact that here the wav_path.name is also passed while being useless for the infer function. If you remove it, the script perfectly works.

johntsi commented 2 years ago

Hi @sarapapi, thanks for pointing it out. Commit c9efe6c5ecaa308f1dee563c48959c3fe007c3e2 fixes it :)