synesthesiam / voice2json

Command-line tools for speech and intent recognition on Linux
MIT License
1.09k stars 63 forks source link

crash docker illegal instruction docker (can't run deepSpeech) armv7 #38

Closed charmed12 closed 3 years ago

charmed12 commented 3 years ago

Hi, i tried to run docker on imx7 (cortex A7 , linux openembedded) , on usb (/mnt ext4), but it crashs with illegal instruction error (CMU’s pocketsphinx works very well on cortex A7)

 docker un -i -v "/mnt/:/mnt/"  -w "$(pwd)" -e "HOME=/mnt/"  --user "$(id -u):$(id -g)" synesthesiam/voice2json:latest@sha256:936ed04dc459f11a32f4ac877d928f09dce5598b79aed42bfa28ed15e66cad99 --profile  /mnt/.config/voice2json/  transcribe-wav < "/mnt/.config/voice2json/test/wavenet/how_cold_is_it.wav"
TensorFlow: v1.14.0-21-ge77504a
DeepSpeech: v0.6.1-0-g3df20fe
INFO: Initialized TensorFlow Lite runtime.
/usr/lib/voice2json/bin/voice2json: line 22:    12 Illegal instruction     "${PYTHON}" -m voice2json "$@"

Also generate trie crash

 docker run -i -v "/mnt/:/mnt/"  -w "$(pwd)" -e "HOME=/mnt/"  --user "$(id -u):$(id -g)" synesthesiam/voice2json:latest@sha256:936ed04dc459f11a32f4ac877d928f09dce5598b79aed42bfa28ed15e66cad99 --profile  /mnt/.config/voice2json/  train-profile

Reading /tmp/tmp8hdn1jms
----5---10---15---20---25---30---35---40---45---50---55---60---65---70---75---80---85---90---95--100
The ARPA file is missing <unk>.  Substituting log10 probability -100.
****************************************************************************************************
SUCCESS
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/voice2json/voice2json/__main__.py", line 773, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
    return future.result()
  File "/usr/lib/voice2json/voice2json/__main__.py", line 73, in main
    await args.func(args, core)
  File "/usr/lib/voice2json/voice2json/__main__.py", line 745, in train
    await core.train_profile()
  File "/usr/lib/voice2json/voice2json/core.py", line 65, in train_profile
    await train.train_profile(self.profile_dir, self.profile)
  File "/usr/lib/voice2json/voice2json/train.py", line 326, in train_profile
    mixed_language_model_fst=mixed_language_model_fst_path,
  File "/usr/lib/voice2json/.venv/lib/python3.7/site-packages/rhasspyasr_deepspeech/train.py", line 60, in train
    make_trie(alphabet_path, lm_file.name, trie_file.name)
  File "/usr/lib/voice2json/.venv/lib/python3.7/site-packages/rhasspyasr_deepspeech/train.py", line 104, in make_trie
    subprocess.check_call(trie_command)
  File "/usr/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['generate_trie', '/mnt/.config/voice2json/model/alphabet.txt', '/tmp/tmpyypwtiwp', '/tmp/tmpnu672vly']' died with <Signals.SIGILL: 4>.

what's the solution , to run deepspeech with docker on armv7 (cortex A7) And if i need to build deepspeech from source with docker , how i do that?

Thank you

synesthesiam commented 3 years ago

This is working now in version 2.1!