prosodylab / Prosodylab-Aligner

Python interface for forced audio alignment using HTK and SoX
http://prosodylab.org/tools/aligner/
MIT License
331 stars 77 forks source link

Exec format error [Ubuntu on Windows] #52

Closed reubengann closed 8 years ago

reubengann commented 8 years ago

Hi, I am trying to get Aligner to work under the new Ubuntu under Windows (provided in the Anniversary update).

I can get all the way through the installation process (with several modifications of the instructions necessary). When running a line, I got several OOV errors, so I went and added the terms to the dictionary. Everything seemed like it was working. Once I had all the words in the dictionary and finally try to align, I get

OSError: [Errno 8] Exec format error

The first thing I checked was whether HTK was being compiled as 32 or 64 bit, and it was 32 bit. Thinking that was the issue, I recompiled it using the -m64 option. Now I am able to run HDMan from a prompt, but it seems like Aligner cannot (full error is below). The offending line is

check_call(["HDMan", "-m", "-g", temp, "-w", self.words, "-n", self.phons, self.taskdict, self.dictionary])

which is evidently throwing an error. I don't understand why Aligner still thinks this can't be run. If I run the file command on HDMan, I get

HTKTools/HDMan: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=870769dfa5d3446ffb140ffffdc66fccbca24c5e, not stripped

and therefore I would not expect it to generate this error.

I'd appreciate any advice. Thanks

Full error:

Reuben@DESKTOP-KQ1A6FT:~/Voice/Prosodylab-Aligner$ python3 -m aligner -a ../toalign File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.4/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/Reuben/Voice/Prosodylab-Aligner/aligner/main.py", line 126, in corpus = Corpus(args.align, opts) File "/home/Reuben/Voice/Prosodylab-Aligner/aligner/corpus.py", line 90, in init self._prepare_label(labelfiles) File "/home/Reuben/Voice/Prosodylab-Aligner/aligner/corpus.py", line 177, in _prepare_label self.dictionary]) File "/usr/lib/python3.4/subprocess.py", line 556, in check_call retcode = call(_popenargs, _kwargs) File "/usr/lib/python3.4/subprocess.py", line 537, in call with Popen(_popenargs, _kwargs) as p: File "/usr/lib/python3.4/subprocess.py", line 859, in init restore_signals, start_new_session) File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child raise child_exception_type(errno_num, err_msg) OSError: [Errno 8] Exec format error

kylebgorman commented 8 years ago

I have not seen that error before. I would guess it is either: something wrong with the interaction of Python's subprocess module and Ubuntu on Windows (didn't know that was a thing until now!). If you want to keep investigating this, perhaps see if subprocess.check_call ever works, and if not, maybe file a bug upstream?

reubengann commented 8 years ago

Surprisingly, it took very little to fix this. The only change I made was to add the HTKTools folder to the path. If desired, I can write up instructions to get Aligner working on Windows using this method.

Thanks

kylebgorman commented 8 years ago

Sure, perhaps as a pull request to the README, that'd be welcomed.

On Thu, Aug 18, 2016 at 9:38 PM reubengann notifications@github.com wrote:

Closed #52 https://github.com/prosodylab/Prosodylab-Aligner/issues/52.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/prosodylab/Prosodylab-Aligner/issues/52#event-760727015, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJuOQQPwG3bIdFRJCk7oxqPluflM_Z3ks5qhQj2gaJpZM4Jn74P .