speechcatcher-asr / speechcatcher

MIT License
38 stars 8 forks source link

Any idea how to solve "ValueError: too many values to unpack (expected 4)" #9

Open github-luckow-org opened 6 months ago

github-luckow-org commented 6 months ago

I use it under Archlinux. After (let's say) 3 minutes it ended with the ValueError.

Traceback (most recent call last):
  File "/PATH/speechcatcher/sc/bin/speechcatcher", line 33, in <module>
    sys.exit(load_entry_point('speechcatcher==0.3.2', 'console_scripts', 'speechcatcher')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/PATH/speechcatcher/sc/lib/python3.11/site-packages/speechcatcher-0.3.2-py3.11.egg/speechcatcher/speechcatcher.py", line 652, in main
  File "/PATH/speechcatcher/sc/lib/python3.11/site-packages/speechcatcher-0.3.2-py3.11.egg/speechcatcher/speechcatcher.py", line 572, in recognize_microphone
  File "/PATH/speechcatcher/sc/lib/python3.11/site-packages/speechcatcher-0.3.2-py3.11.egg/speechcatcher/speechcatcher.py", line 572, in <listcomp>
ValueError: too many values to unpack (expected 4)
cocolab8 commented 2 months ago

For me, replacing line 572 in file speechcatcher.py nbests = [text for text, token, token_int, hyp in results] by nbests = results[0] solved the issue.