CSTR-Edinburgh / merlin

This is now the official location of the Merlin project.
http://www.cstr.ed.ac.uk/projects/merlin/
Apache License 2.0
1.31k stars 440 forks source link

slt_arctic/s2 demo: raise ValueError, "smooth only accepts 1 dimension arrays." #449

Closed mrgloom closed 5 years ago

mrgloom commented 5 years ago

Following instractions from https://github.com/CSTR-Edinburgh/merlin/tree/9df27e9309edccb6e35511ead2e832f2fe98cc15/egs/slt_arctic/s2

python run_demo.py

Traceback (most recent call last):
  File "run_demo.py", line 8, in <module>
    import scripts.label_st_align_to_var_rate as ltvr
  File "/data/my_user/external_projects/text-to-speech/merlin/egs/slt_arctic/s2/scripts/label_st_align_to_var_rate.py", line 31, in <module>
    import magphase as mp
  File "/data/my_user/external_projects/text-to-speech/merlin/tools/magphase/src/magphase.py", line 13, in <module>
    import libaudio as la
  File "/data/my_user/external_projects/text-to-speech/merlin/tools/magphase/src/libaudio.py", line 887
    raise ValueError, "smooth only accepts 1 dimension arrays."
                    ^
SyntaxError: invalid syntax
ZackHodari commented 5 years ago

This will be due to the python version. Some syntax is supported in Python 2.x but not Python 3.x and vice versa. Try creating a new environment with the version of python you are not currently using and re-run run_demo.py

ZackHodari commented 5 years ago

Alternatively change the code to use the traditional syntax

raise ValueError("smooth only accepts 1 dimension arrays.")