Skip to content

Broken python example #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
the01 opened this issue Feb 26, 2024 · 1 comment
Closed

Broken python example #6

the01 opened this issue Feb 26, 2024 · 1 comment

Comments

@the01
Copy link
Contributor

the01 commented Feb 26, 2024

When I try to run the python example it fails with

concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
  File "C:\Users\flo\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\process.py", line 246, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "E:\data\p\projects\env310\lib\site-packages\speechcatcher\speechcatcher.py", line 421, in recognize_segment
    segment_text, prev_lines = batch_recognize_inner_loop(speech_chunk, i, prev_lines,
  File "E:\data\p\projects\env310\lib\site-packages\speechcatcher\speechcatcher.py", line 459, in batch_recognize_inner_loop
    prev_lines = progress_output(nbests[0], prev_lines)
NameError: name 'nbests' is not defined
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "E:\data\p\projects\src\dev\run_speechcatcher.py", line 214, in <module>
    rec2()
  File "E:\data\p\projects\src\dev\run_speechcatcher.py", line 177, in rec2
    complete_text, paragraphs = speechcatcher.recognize(
  File "E:\data\p\projects\env310\lib\site-packages\speechcatcher\speechcatcher.py", line 332, in recognize
    paragraphs_raw.append(r.result())
  File "C:\Users\flo\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 451, in result
    return self.__get_result()
  File "C:\Users\flo\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result
    raise self._exception
NameError: name 'nbests' is not defined

I believe it should be results[0][0] in speechcatcher.py line 459

@bmilde
Copy link
Contributor

bmilde commented Feb 27, 2024

Thanks!

@bmilde bmilde closed this as completed Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants