Rhasspy 2.5 Pre-Release

Just started playing with 2.5-pre and I can’t get it to recognize any intent. I am reusing my 2.4 profile that I copied over and renamed, installed via docker and then installed pip3 into the docker so I can install the requirements for my slot_programs.

This is the error:

[ERROR:2020-05-29 21:26:21,607] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy/lib/python3.7/site-packages/quart/app.py”, line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/lib/rhasspy/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy/lib/python3.7/site-packages/rhasspyserver_hermes/main.py”, line 1337, in api_text_to_intent
user_entities=user_entities,
File “/usr/lib/rhasspy/lib/python3.7/site-packages/rhasspyserver_hermes/main.py”, line 2438, in text_to_intent_dict
result = await core.recognize_intent(text, intent_filter=intent_filter)
File “/usr/lib/rhasspy/lib/python3.7/site-packages/rhasspyserver_hermes/init.py”, line 453, in recognize_intent
handle_intent(), messages, message_types
File “/usr/lib/rhasspy/lib/python3.7/site-packages/rhasspyserver_hermes/init.py”, line 901, in publish_wait
result_awaitable, timeout=timeout_seconds
File “/usr/lib/python3.7/asyncio/tasks.py”, line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

If have just created an add-on for the 2.5 pre-release.
This is to test with Hassio.

You have to change Google Wavenet if you have set this, because that is not yet supported.
Other than that, it should work with your existing profile, but backup to be safe

1 Like

Okay, this error just vanished overnight without me changing anything at all, next thing was that my intents that worked on 2.4 with fuzzywuzzy were not recognized at all, I then switched to fsticuff and it recognized my intents correctly. The big problem I have now is that rhasspy just does not call my custom_command script at all. Since I copied over my 2.4 profile the path should still work. I also saw the paths to the wav files use brackets so I tried it with those but still nothing about my script being run in the rhasspy log or any new entry in my script log.

The script itself runs fine if I execute it in the rhasspy docker and the relevant part of the config seems like it should work.

“handle”: {
“command”: {
“program”: “${RHASSPY_PROFILE_DIR}/custom_command/custom_commands.py”
},
“forward_to_hass”: true,
“system”: “command”
},

This is the relevant part of my config.

Is there any known problem with custom command systems? I saw that the documentation did not change from 2.4 for that part and it ran with 2.4.19 and 2.4.20 (after I fixed the missing pip to install my requirements) so I assume something in rhasspy changed. I would expect some kind of log entry that actually calls the script but after the intent detection nothing happens at all.

[DEBUG:2020-06-01 00:06:12,251] rhasspyserver_hermes: Sent 383 char(s) to websocket
[DEBUG:2020-06-01 00:06:12,243] rhasspyserver_hermes: Handling NluIntent (topic=hermes/intent/GetWeatherForecast, id=e89590b6-19b9-4b27-9ff0-730227084670)
[DEBUG:2020-06-01 00:06:12,243] rhasspyserver_hermes: <- NluIntent(input=‘wie wird das wetter’, intent=Intent(intent_name=‘GetWeatherForecast’, confidence_score=1.0), site_id=‘pi-hime’, id=‘0d5a3c66-5229-4a49-ab8e-b57126914e21’, slots=[], session_id=‘0d5a3c66-5229-4a49-ab8e-b57126914e21’, custom_data=None, asr_tokens=[[AsrToken(value=‘wie’, confidence=1.0, range_start=0, range_end=3, time=None), AsrToken(value=‘wird’, confidence=1.0, range_start=4, range_end=8, time=None), AsrToken(value=‘das’, confidence=1.0, range_start=9, range_end=12, time=None), AsrToken(value=‘wetter’, confidence=1.0, range_start=13, range_end=19, time=None)]], asr_confidence=None, raw_input=‘wie wird das wetter’, wakeword_id=None)
[DEBUG:2020-06-01 00:06:12,030] rhasspyserver_hermes: Publishing 194 bytes(s) to hermes/nlu/query
[DEBUG:2020-06-01 00:06:12,030] rhasspyserver_hermes: -> NluQuery(input=‘wie wird das wetter’, site_id=‘pi-hime’, id=‘0d5a3c66-5229-4a49-ab8e-b57126914e21’, intent_filter=None, session_id=‘0d5a3c66-5229-4a49-ab8e-b57126914e21’, wakeword_id=None)
[DEBUG:2020-06-01 00:06:12,027] rhasspyserver_hermes: Subscribed to hermes/error/nlu

I do see it sending stuff out via mqtt for the intent handling and I know that I can actually plug into there to catch my intent (and I might do so in the future) but for right now I am trying to get my command script to work again.

If someone knows anything about that, if it was removed or changed or if it is a known bug that I just did not read about yet, I would be happy for input in that.

Daenara

venv doesn’t work at all on pi anymore due to dependency issues, see https://github.com/rhasspy/rhasspy/issues/58

Fresh install on a one week old raspberry pi (buster).

Not sure if related, I also get the following when trying to open settings:

[ERROR:2020-06-14 18:11:28,988] rhasspyserver_hermes: expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1821, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1869, in dispatch_request
    return await handler(**request_.view_args)
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/rhasspyserver_hermes/__main__.py", line 2413, in page_settings
    "settings.html", page="Settings", **get_template_args()
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/quart/templating.py", line 91, in render_template
    return await _render(template, context)
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/quart/templating.py", line 109, in _render
    rendered_template = await template.render_async(context)
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 65, in render_async
    return self.environment.handle_exception()
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 25, in concat_async
    await collect()
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/jinja2/asyncsupport.py", line 22, in collect
    async for event in async_gen:
  File "/home/pi/rhasspy/.venv/share/rhasspy/templates/settings.html", line 1, in top-level template code
    {% extends "layout.html" %}
  File "/home/pi/rhasspy/.venv/share/rhasspy/templates/layout.html", line 157, in top-level template code
    {% block body %}{% endblock %}
  File "/home/pi/rhasspy/.venv/share/rhasspy/templates/settings.html", line 882, in block "body"
    <li>Base Language Model FST: <tt>{{ profile.read_path(profile.get("speech_to_text.pocketsphinx.base_language_model_fst")) }}</tt> </li>
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/rhasspyprofile/profile.py", line 125, in read_path
    full_path = profiles_dir.joinpath(self.name, *path_parts)
  File "/usr/lib/python3.7/pathlib.py", line 898, in joinpath
    return self._make_child(args)
  File "/usr/lib/python3.7/pathlib.py", line 688, in _make_child
    drv, root, parts = self._parse_args(args)
  File "/usr/lib/python3.7/pathlib.py", line 642, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
[ERROR:2020-06-14 18:11:29,168] rhasspyserver_hermes: NotFound(404)
Traceback (most recent call last):
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1821, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/home/pi/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1863, in dispatch_request
    raise request_.routing_exception
quart.exceptions.NotFound: NotFound(404)

@rickmini can you share your settings for the matrix voice? I can’t get the Matrix Voice to work with 2.5 from upgrading from 2.4.20. Is there anything that needs to be changed within Rhasspy or from an ALSA perspective?