Training issue with Rhasspy 2.5: string index out of range

@synesthesiam @kaykoch @Martin_Maier

Hey guys,
after several weeks of trying to get V2.5 run the time has now come to ask for your help.

I am succesfully running a 2.4.19 master/satellite system and would like to migrate this to 2.5 now. The satellite is a Pi4 with a Matrix Voice mic array and the master an Odroid H2, where my ioBroker is running in parallel. My MQTT server is an instance of ioBroker and it is located on a separate Pi4.

No problems with 2.4.19 with this configuration.

According to the Voltron tutorial (https://rhasspy.github.io/rhasspy-voltron/tutorials.html#getting-started-guide) I pulled the latest version as of today and installed it on the satellite and on the master using the respective commands. Both installations ran strait forward and did not cause any problems.

I then configured the systems as recommended by @kaykoch here: Rhasspy 2.5 Pre-Release

Kaldi download on the master was completed succesfully.

In order to use the relevant config files from 2.4.19 I then copied kaldi_custom_words.txt, sentences.ini and the slots folder to ~/.config/rhasspy/master/de

All files were immediately available in 2.5. However the master showed the error message “string index out of range” when I copied the kaldi_custom_words.txt. Also training fails (the blue bar remains endlessly) and the log shows:

[ERROR:2020-04-07 08:15:18,696] rhasspyserver_hermes: string index out of range
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 285, in train
word_transform=word_transform,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/train.py”, line 87, in sentences_to_graph
slot_visitor=word_visitor,
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/slots.py”, line 72, in get_slot_replacements
sentence = Sentence.parse(line)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 112, in parse
parse_expression(s, text)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 333, in parse_expression
if text[next_index] == “(”:
IndexError: string index out of range
[DEBUG:2020-04-07 08:15:18,695] rhasspynlu.slots: Loading slot device_name_switch from /profiles/de/slots/device_name_switch
[DEBUG:2020-04-07 08:15:18,694] rhasspynlu.slots: Loading slot synonyms_time from /profiles/de/slots/synonyms_time
[DEBUG:2020-04-07 08:15:18,604] rhasspynlu.slots: Running program for slot rhasspy/number,5,30,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘5’, ‘30’, ‘1’]
[DEBUG:2020-04-07 08:15:18,603] rhasspynlu.slots: Loading slot device_name_blind from /profiles/de/slots/device_name_blind
[DEBUG:2020-04-07 08:15:18,602] rhasspynlu.slots: Loading slot shopping_item from /profiles/de/slots/shopping_item
[DEBUG:2020-04-07 08:15:18,601] rhasspynlu.slots: Loading slot device_name_dimmer from /profiles/de/slots/device_name_dimmer
[DEBUG:2020-04-07 08:15:18,600] rhasspynlu.slots: Loading slot device_name_thermostat from /profiles/de/slots/device_name_thermostat
[DEBUG:2020-04-07 08:15:18,511] rhasspynlu.slots: Running program for slot rhasspy/number,1,100,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘100’, ‘1’]
[DEBUG:2020-04-07 08:15:18,510] rhasspynlu.slots: Loading slot synonyms_change_command from /profiles/de/slots/synonyms_change_command
[DEBUG:2020-04-07 08:15:18,509] rhasspynlu.slots: Loading slot device_name_window from /profiles/de/slots/device_name_window
[DEBUG:2020-04-07 08:15:18,501] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-07 08:15:18,500] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-07 08:15:18,499] rhasspyserver_hermes: Loading sentences from [PosixPath(’/profiles/de/sentences.ini’)]
[INFO:2020-04-07 08:15:18,498] rhasspyserver_hermes: Starting training

Maybe it’s because I have several hundred entries in the kaldi dictionary already.

Consequently it is not possible to trigger any intents via the satellite’s command line. The log says:

[ERROR:2020-04-07 08:17:57,538] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 369, in train
timeout_seconds=self.training_timeout_seconds,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 854, 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

Just another remark: I haven’t made any UDP settings yet.
I hope with these informations I enabled you to give me any hints, how I can resolve these issues and can come to a working system.

Best
Thomas

I’m not thet sure, but try this:
remove all slots from files, restart rhasspy an train.
If it works, put the slots with GUI into the right places.
Each slot inside its own file:
slots

Thanks for your hint. I followed your proposal, deleted all files in the slot folder and reinstalled them manually via GUI. Everything worked fine with all slots, besides the error message that the slot $device_name_switch was missing. When I installed that I again got the error message “string index out of range”.

These are the log files:

A - After restarting docker:

[ERROR:2020-04-07 11:31:08,993] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 269, in parse_mqtt_message
json_payload = json.loads(payload)
File “/usr/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[ERROR:2020-04-07 11:31:08,952] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 269, in parse_mqtt_message
json_payload = json.loads(payload)
File “/usr/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[ERROR:2020-04-07 11:31:08,870] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 269, in parse_mqtt_message
json_payload = json.loads(payload)
File “/usr/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[ERROR:2020-04-07 11:31:07,779] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,770] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,759] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,747] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,736] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,726] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,716] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,705] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,695] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,685] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,674] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,654] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’
[ERROR:2020-04-07 11:31:07,643] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’

B - After creating all slots beside “device_name_switch”:

[ERROR:2020-04-07 11:33:15,523] rhasspyserver_hermes: Missing slot $device_name_switch
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 285, in train
word_transform=word_transform,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/train.py”, line 106, in sentences_to_graph
sentences, replacements=replacements, add_intent_weights=add_intent_weights
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf_graph.py”, line 393, in sentences_to_graph
count_dict=count_dict,
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf_graph.py”, line 121, in expression_to_graph
rule_grammar=rule_grammar,
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf_graph.py”, line 121, in expression_to_graph
rule_grammar=rule_grammar,
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf_graph.py”, line 200, in expression_to_graph
assert slot_values, f"Missing slot {slot_name}"
AssertionError: Missing slot $device_name_switch
[DEBUG:2020-04-07 11:33:15,406] rhasspynlu.slots: Running program for slot rhasspy/number,5,30,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘5’, ‘30’, ‘1’]
[WARNING:2020-04-07 11:33:15,405] rhasspynlu.slots: Failed to load file/program for slot device_name_switch (tried: [PosixPath(’/profiles/de/slots’), PosixPath(’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slots’)], [PosixPath(’/profiles/de/slot_programs’), PosixPath(’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs’)])
[DEBUG:2020-04-07 11:33:15,404] rhasspynlu.slots: Loading slot shopping_item from /profiles/de/slots/shopping_item
[DEBUG:2020-04-07 11:33:15,404] rhasspynlu.slots: Loading slot device_name_blind from /profiles/de/slots/device_name_blind
[DEBUG:2020-04-07 11:33:15,403] rhasspynlu.slots: Loading slot synonyms_change_command from /profiles/de/slots/synonyms_change_command
[DEBUG:2020-04-07 11:33:15,403] rhasspynlu.slots: Loading slot synonyms_temperature from /profiles/de/slots/synonyms_temperature
[DEBUG:2020-04-07 11:33:15,402] rhasspynlu.slots: Loading slot device_name_thermostat from /profiles/de/slots/device_name_thermostat
[DEBUG:2020-04-07 11:33:15,401] rhasspynlu.slots: Loading slot device_name_dimmer from /profiles/de/slots/device_name_dimmer
[DEBUG:2020-04-07 11:33:15,400] rhasspynlu.slots: Loading slot synonyms_time from /profiles/de/slots/synonyms_time
[DEBUG:2020-04-07 11:33:15,317] rhasspynlu.slots: Running program for slot rhasspy/number,1,200,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘200’, ‘1’]
[DEBUG:2020-04-07 11:33:15,239] rhasspynlu.slots: Running program for slot rhasspy/number,17,30,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘17’, ‘30’, ‘1’]
[DEBUG:2020-04-07 11:33:15,159] rhasspynlu.slots: Running program for slot rhasspy/number,1,100,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘100’, ‘1’]
[DEBUG:2020-04-07 11:33:15,158] rhasspynlu.slots: Loading slot device_name_window from /profiles/de/slots/device_name_window
[DEBUG:2020-04-07 11:33:15,158] rhasspynlu.slots: Loading slot device_state from /profiles/de/slots/device_state
[DEBUG:2020-04-07 11:33:15,157] rhasspynlu.slots: Loading slot device_name_shoppinglist from /profiles/de/slots/device_name_shoppinglist
[DEBUG:2020-04-07 11:33:15,148] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-07 11:33:15,146] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-07 11:33:15,145] rhasspyserver_hermes: Loading sentences from [PosixPath(’/profiles/de/sentences.ini’)]
[INFO:2020-04-07 11:33:15,144] rhasspyserver_hermes: Starting training

C - After insertion of content to slot “device_name_switch”:

[ERROR:2020-04-07 11:38:38,003] rhasspyserver_hermes: string index out of range
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 285, in train
word_transform=word_transform,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/train.py”, line 87, in sentences_to_graph
slot_visitor=word_visitor,
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/slots.py”, line 72, in get_slot_replacements
sentence = Sentence.parse(line)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 112, in parse
parse_expression(s, text)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 333, in parse_expression
if text[next_index] == “(”:
IndexError: string index out of range
[DEBUG:2020-04-07 11:38:38,002] rhasspynlu.slots: Loading slot device_name_switch from /profiles/de/slots/device_name_switch
[DEBUG:2020-04-07 11:38:38,001] rhasspynlu.slots: Loading slot shopping_item from /profiles/de/slots/shopping_item
[DEBUG:2020-04-07 11:38:38,001] rhasspynlu.slots: Loading slot device_name_blind from /profiles/de/slots/device_name_blind
[DEBUG:2020-04-07 11:38:38,000] rhasspynlu.slots: Loading slot synonyms_change_command from /profiles/de/slots/synonyms_change_command
[DEBUG:2020-04-07 11:38:37,999] rhasspynlu.slots: Loading slot synonyms_temperature from /profiles/de/slots/synonyms_temperature
[DEBUG:2020-04-07 11:38:37,999] rhasspynlu.slots: Loading slot device_name_thermostat from /profiles/de/slots/device_name_thermostat
[DEBUG:2020-04-07 11:38:37,998] rhasspynlu.slots: Loading slot device_name_dimmer from /profiles/de/slots/device_name_dimmer
[DEBUG:2020-04-07 11:38:37,997] rhasspynlu.slots: Loading slot synonyms_time from /profiles/de/slots/synonyms_time
[DEBUG:2020-04-07 11:38:37,910] rhasspynlu.slots: Running program for slot rhasspy/number,1,200,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘200’, ‘1’]
[DEBUG:2020-04-07 11:38:37,827] rhasspynlu.slots: Running program for slot rhasspy/number,17,30,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘17’, ‘30’, ‘1’]
[DEBUG:2020-04-07 11:38:37,742] rhasspynlu.slots: Running program for slot rhasspy/number,1,100,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘100’, ‘1’]
[DEBUG:2020-04-07 11:38:37,741] rhasspynlu.slots: Loading slot device_name_window from /profiles/de/slots/device_name_window
[DEBUG:2020-04-07 11:38:37,741] rhasspynlu.slots: Loading slot device_state from /profiles/de/slots/device_state
[DEBUG:2020-04-07 11:38:37,740] rhasspynlu.slots: Loading slot device_name_shoppinglist from /profiles/de/slots/device_name_shoppinglist
[DEBUG:2020-04-07 11:38:37,733] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-07 11:38:37,732] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-07 11:38:37,731] rhasspyserver_hermes: Loading sentences from [PosixPath(’/profiles/de/sentences.ini’)]
[INFO:2020-04-07 11:38:37,730] rhasspyserver_hermes: Starting training

I am wondering how the master knows about a missing slot… Something semes to be stored in background

Best
Thomas

Good morning,

I made a third attempt, deleted the master’s and satellite’s profile folder and the respective docker containers, pulled the latest version and installed freshly using these commands (with de instead of en of course):

Example master command:

docker run -it \
    -v "$HOME/.config/rhasspy/master:/profiles" \
    --network host \
    rhasspy/rhasspy:2.5.0-pre \
    --profile en \
    --user-profiles /profiles

Master web UI will be accessible at http://localhost:12101

Example satellite command:

docker run -it -v "$HOME/.config/rhasspy/satellite:/profiles" \
    --network host \
    --device /dev/snd \
    rhasspy/rhasspy:2.5.0-pre \
    --profile en \
    --user-profiles /profiles \
    --http-port 13202 \
    --local-mqtt-port 13183

Implementing kaldi_custom_words.txt, slots and sentences was successful.

After configuring master and satellite as depicted by @kaykoch here: Rhasspy 2.5 Pre-Release was also rather successful. Finally these errors remained at the master:

[ERROR:2020-04-08 06:19:26,347] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 285, in train
word_transform=word_transform,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/train.py”, line 37, in sentences_to_graph
intents = rhasspynlu.parse_ini(ini_file.getvalue())
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/ini_jsgf.py”, line 109, in parse_ini
sentences[sec_name].append(Sentence.parse(sentence))
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 112, in parse
parse_expression(s, text)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 435, in parse_expression
assert end_index
AssertionError
[DEBUG:2020-04-08 06:19:26,346] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-08 06:19:26,341] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-08 06:19:26,339] rhasspyserver_hermes: Loading sentences from [PosixPath(’/profiles/de/sentences.ini’)]
[INFO:2020-04-08 06:19:26,337] rhasspyserver_hermes: Starting training

And this is what the satellite’s log looks like:

[DEBUG:2020-04-08 06:25:12,850] rhasspyserver_hermes: Publishing 130 bytes(s) to rhasspy/nlu/Satellite1/train
[DEBUG:2020-04-08 06:25:12,850] rhasspyserver_hermes: -> NluTrain(id=‘9908761e-98c5-4d3b-bf27-b05d14a38739’, graph_path=’/profiles/de/intent_graph.pickle.gz’, graph_format=‘pickle-gzip’)
[DEBUG:2020-04-08 06:25:12,849] rhasspyserver_hermes: Publishing 130 bytes(s) to rhasspy/asr/Satellite1/train
[DEBUG:2020-04-08 06:25:12,849] rhasspyserver_hermes: -> AsrTrain(id=‘9908761e-98c5-4d3b-bf27-b05d14a38739’, graph_path=’/profiles/de/intent_graph.pickle.gz’, graph_format=‘pickle-gzip’)
[DEBUG:2020-04-08 06:25:12,848] rhasspyserver_hermes: Finished writing /profiles/de/intent_graph.pickle.gz
[DEBUG:2020-04-08 06:25:12,846] rhasspyserver_hermes: Writing /profiles/de/intent_graph.pickle.gz
[DEBUG:2020-04-08 06:25:12,842] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-08 06:25:12,841] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-08 06:25:12,840] rhasspyserver_hermes: Loading sentences from [PosixPath(’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/sentences.ini’)]
[INFO:2020-04-08 06:25:12,839] rhasspyserver_hermes: Starting training

These logs are looking very much cleaner now than before. It should be much easier now to overcome the remaining failures.

@Martin_Maier and @kaykoch: You are also running master /satellite systems: Did you do anything differently from my approach? Can you see anything I did wrong?

@synesthesiam: Are the commands that I took from the Voltron tutorial still valid, or has anything changed in the mean time?

To all of you: Do you have any idea what I could do now?

Thank you very much for your help in advance.

Best
Thomas

Looks like a syntax error in your sentences.ini file… Can you check this file for parenthesis/bracket/etc mismatch.

Hi @tobetobe, for the satellites I install the rhasspy-satellite venv. What I didn’t understand - why do you train your satellite ? In my master/satellite configuration the satellites are for wakeword recognition and command recording. All other functions will be done by the master.

I agree @fastjack.
There are two possibilities:
1.) Your slot entries have a mistake
2.) You Intents entries have a mistake

You should remove this intent and test it.
If fault is gone -> Intent error --> Show us your Intents
If fault remains ->Intents:OK -->remove slot entries.
–> If fault is gone-> Slot Error-> insert slot entries word by word

You can show us also your slot entries of device_name_switch

@Martin_Maier is right. You don’n need slots and intents on satellite.

@Martin_Maier @fastjack

First, thank you all for your help. I followed your hints, unfortunately without significant changes.

This is the current situation:

Yes, you were right. There were some errors. Some sentences were simply cut at the end. Don’t ask me how this can happen when copying the old slot files to the new slot folder.

However, this was not the reason.

In a previous post a couple of weeks ago I asked, whether this way of installation is mandatory. The reason to ask was, that I found contradictory information (tutorial says “docker” while another link (can’t find it at the moment) recommends “py venv”). Unfortunately I got no answer. Nevertheless, today I believe it shouldn’t make a difference, in what kind of virtual environment the satellite has been installed.

Regarding Training of satellites: I agree, I usually don’t train my satellite. In this specific situation I just thought it might help. And of course: I don’t have sentences and slots on my satellite. My existing 2.4.19 system works exactly the way you described it. And that’s of course what I intend to get again with 2.5.

@kaykoch

I checked and tested as recommended:

  1. At first I repaired the faulty sentences and got a different error message: string index out of range
  2. I deleted all of my individual sentences and slots. Finally only the initial sentences provided by default remained and no slots. That didn’t help neither
  3. I edited just one sentence and added the necessary slots: No change
  4. In each case I also restarted the docker container to see whether this helps: It did not

The LOGs are looking differently in each case. I’ll post them at the end.

There is one thing I should mention: Since I have no separate testing hardware for 2.5 I installed 2.5 in parallel to 2.4.19, but in different folders:

2.4.19 master and satellite in ~/.config/rhasspy/profiles/de
2.5 master in~/.config/rhasspy/master/de
2.5 sat in ~/.config/rhasspy/satellite/de

Of course only one instance is running at the same time on one piece of hardware. From my perspective this should not cause the error. Maybe you know better.

Here are the LOGs:

At 1 (sentences.ini repaired):

[ERROR:2020-04-08 12:08:54,146] rhasspyserver_hermes: string index out of range
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 285, in train
word_transform=word_transform,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/train.py”, line 87, in sentences_to_graph
slot_visitor=word_visitor,
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/slots.py”, line 72, in get_slot_replacements
sentence = Sentence.parse(line)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 112, in parse
parse_expression(s, text)
File “/usr/lib/rhasspy-voltron/rhasspy-nlu/rhasspynlu/jsgf.py”, line 333, in parse_expression
if text[next_index] == “(”:
IndexError: string index out of range
[DEBUG:2020-04-08 12:08:54,145] rhasspynlu.slots: Loading slot device_name_switch from /profiles/de/slots/device_name_switch
[DEBUG:2020-04-08 12:08:54,061] rhasspynlu.slots: Running program for slot rhasspy/number,1,200,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘200’, ‘1’]
[DEBUG:2020-04-08 12:08:54,060] rhasspynlu.slots: Loading slot synonyms_time from /profiles/de/slots/synonyms_time
[DEBUG:2020-04-08 12:08:53,981] rhasspynlu.slots: Running program for slot rhasspy/number,17,30,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘17’, ‘30’, ‘1’]
[DEBUG:2020-04-08 12:08:53,980] rhasspynlu.slots: Loading slot device_name_blind from /profiles/de/slots/device_name_blind
[DEBUG:2020-04-08 12:08:53,898] rhasspynlu.slots: Running program for slot rhasspy/number,1,100,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘100’, ‘1’]
[DEBUG:2020-04-08 12:08:53,814] rhasspynlu.slots: Running program for slot rhasspy/number,5,30,1: [’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘5’, ‘30’, ‘1’]
[DEBUG:2020-04-08 12:08:53,813] rhasspynlu.slots: Loading slot device_name_shoppinglist from /profiles/de/slots/device_name_shoppinglist
[DEBUG:2020-04-08 12:08:53,812] rhasspynlu.slots: Loading slot device_name_thermostat from /profiles/de/slots/device_name_thermostat
[DEBUG:2020-04-08 12:08:53,812] rhasspynlu.slots: Loading slot device_name_dimmer from /profiles/de/slots/device_name_dimmer
[DEBUG:2020-04-08 12:08:53,811] rhasspynlu.slots: Loading slot synonyms_change_command from /profiles/de/slots/synonyms_change_command
[DEBUG:2020-04-08 12:08:53,811] rhasspynlu.slots: Loading slot device_name_window from /profiles/de/slots/device_name_window
[DEBUG:2020-04-08 12:08:53,810] rhasspynlu.slots: Loading slot synonyms_temperature from /profiles/de/slots/synonyms_temperature
[WARNING:2020-04-08 12:08:53,810] rhasspynlu.slots: Failed to load file/program for slot shopping_item (tried: [PosixPath(’/profiles/de/slots’), PosixPath(’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slots’)], [PosixPath(’/profiles/de/slot_programs’), PosixPath(’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs’)])
[DEBUG:2020-04-08 12:08:53,800] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-08 12:08:53,798] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-08 12:08:53,797] rhasspyserver_hermes: Loading sentences from [PosixPath(’/profiles/de/sentences.ini’)]
[INFO:2020-04-08 12:08:53,797] rhasspyserver_hermes: Starting training
[DEBUG:2020-04-08 12:08:53,783] rhasspyserver_hermes: Writing /profiles/de/sentences.ini

At 2: (initial sentences only. no slots)

Mit leeren Slots und Standard Sentences:
[ERROR:2020-04-08 12:32:34,081] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 369, in train
timeout_seconds=self.training_timeout_seconds,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 854, 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
[ERROR:2020-04-08 12:22:34,086] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 269, in parse_mqtt_message
json_payload = json.loads(payload)
File “/usr/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[DEBUG:2020-04-08 12:22:34,086] rhasspyserver_hermes: Handling NluTrainSuccess (topic=rhasspy/nlu/Master/trainSuccess, id=78864af8-9b17-4991-85a8-5aa6beb8bc9a)
[DEBUG:2020-04-08 12:22:34,080] rhasspyserver_hermes: Handling AsrTrainSuccess (topic=rhasspy/asr/Master/trainSuccess, id=78864af8-9b17-4991-85a8-5aa6beb8bc9a)
[DEBUG:2020-04-08 12:22:34,079] rhasspyserver_hermes: Publishing 130 bytes(s) to rhasspy/nlu/Master/train
[DEBUG:2020-04-08 12:22:34,079] rhasspyserver_hermes: -> NluTrain(id=‘5474c136-f6d3-41fc-906d-df390fa218f2’, graph_path=’/profiles/de/intent_graph.pickle.gz’, graph_format=‘pickle-gzip’)
[DEBUG:2020-04-08 12:22:34,078] rhasspyserver_hermes: Publishing 130 bytes(s) to rhasspy/asr/Master/train
[DEBUG:2020-04-08 12:22:34,078] rhasspyserver_hermes: -> AsrTrain(id=‘5474c136-f6d3-41fc-906d-df390fa218f2’, graph_path=’/profiles/de/intent_graph.pickle.gz’, graph_format=‘pickle-gzip’)
[DEBUG:2020-04-08 12:22:34,078] rhasspyserver_hermes: Subscribed to hermes/error/nlu
[DEBUG:2020-04-08 12:22:34,077] rhasspyserver_hermes: Subscribed to rhasspy/nlu/Master/trainSuccess
[DEBUG:2020-04-08 12:22:34,077] rhasspyserver_hermes: Subscribed to hermes/error/asr
[DEBUG:2020-04-08 12:22:34,077] rhasspyserver_hermes: Subscribed to rhasspy/asr/Master/trainSuccess
[DEBUG:2020-04-08 12:22:34,076] rhasspyserver_hermes: Finished writing /profiles/de/intent_graph.pickle.gz
[DEBUG:2020-04-08 12:22:34,076] rhasspyserver_hermes: Writing /profiles/de/intent_graph.pickle.gz
[DEBUG:2020-04-08 12:22:34,073] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-08 12:22:34,069] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-08 12:22:34,067] rhasspyserver_hermes: Loading sentences from [PosixPath(’/usr/lib/rhasspy-voltron/rhasspy-profile/rhasspyprofile/profiles/de/sentences.ini’)]
[INFO:2020-04-08 12:22:34,065] rhasspyserver_hermes: Starting training

At 3: (with minimum set of sentences and slots)

[ERROR:2020-04-08 12:52:20,658] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/.venv/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-voltron/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1208, in api_train
result = await core.train()
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 369, in train
timeout_seconds=self.training_timeout_seconds,
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 854, 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
[DEBUG:2020-04-08 12:50:32,486] rhasspyserver_hermes: Publishing 130 bytes(s) to rhasspy/nlu/Master/train
[DEBUG:2020-04-08 12:50:32,485] rhasspyserver_hermes: -> NluTrain(id=‘5fd91773-7015-4b6b-a3eb-f4e360c337ee’, graph_path=’/profiles/de/intent_graph.pickle.gz’, graph_format=‘pickle-gzip’)
[DEBUG:2020-04-08 12:50:32,485] rhasspyserver_hermes: Publishing 130 bytes(s) to rhasspy/asr/Master/train
[DEBUG:2020-04-08 12:50:32,485] rhasspyserver_hermes: -> AsrTrain(id=‘5fd91773-7015-4b6b-a3eb-f4e360c337ee’, graph_path=’/profiles/de/intent_graph.pickle.gz’, graph_format=‘pickle-gzip’)
[DEBUG:2020-04-08 12:50:32,484] rhasspyserver_hermes: Finished writing /profiles/de/intent_graph.pickle.gz
[DEBUG:2020-04-08 12:50:32,483] rhasspyserver_hermes: Writing /profiles/de/intent_graph.pickle.gz
[DEBUG:2020-04-08 12:50:32,481] rhasspynlu.slots: Loading slot device_state from /profiles/de/slots/device_state
[DEBUG:2020-04-08 12:50:32,481] rhasspynlu.slots: Loading slot synonyms_change_command from /profiles/de/slots/synonyms_change_command
[DEBUG:2020-04-08 12:50:32,481] rhasspynlu.slots: Loading slot device_name_switch from /profiles/de/slots/device_name_switch
[DEBUG:2020-04-08 12:50:32,479] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2020-04-08 12:50:32,478] rhasspyserver_hermes: Generating intent graph
[DEBUG:2020-04-08 12:50:32,478] rhasspyserver_hermes: Loading sentences from [PosixPath(’/profiles/de/sentences.ini’)]
[INFO:2020-04-08 12:50:32,477] rhasspyserver_hermes: Starting training

At 4: (after restart, previous = by chronological means)

[ERROR:2020-04-08 13:02:57,626] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:57,584] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:57,500] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 269, in parse_mqtt_message
json_payload = json.loads(payload)
File “/usr/lib/python3.7/json/init.py”, line 348, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.7/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.7/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[ERROR:2020-04-08 13:02:56,153] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,142] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,132] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,099] rhasspyserver_hermes: on_message
Traceback (most recent call last):
same as previous
[ERROR:2020-04-08 13:02:56,083] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,073] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,063] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,053] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,042] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,032] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,022] rhasspyserver_hermes: on_message
same as previous
[ERROR:2020-04-08 13:02:56,001] rhasspyserver_hermes: on_message
Traceback (most recent call last):
same as previous
[ERROR:2020-04-08 13:02:55,990] rhasspyserver_hermes: on_message
Traceback (most recent call last):
File “/usr/lib/rhasspy-voltron/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 959, in on_message
topic, payload, self.subscribed_types
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/client.py”, line 276, in parse_mqtt_message
message = message_type.from_dict(json_payload)
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in from_dict
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/nlu.py”, line 92, in
message.slots = [Slot.from_dict(s) for s in slot_dicts]
File “/usr/lib/rhasspy-voltron/rhasspy-hermes/rhasspyhermes/intent.py”, line 101, in from_dict
slot = Slot(value=value, **object_dict)
TypeError: init() missing 1 required positional argument: ‘entity’

And finally: This is the minimum set of sentences and slots I used at 3:

[ChangeDeviceState]
($synonyms_change_command) [(die | das)] ($device_name_switch){device} ($device_state){value} (:){state:.STATE}

Slot device_state
aus:false
ein:true

Slot device_name_switch
(rechtekuechenlampe):hm-rpc.0.OEQ1234567.1

Slot synonyms_change_command
schalt:true

Sorry for asking you again. I hope we will get soon out of this mess.

Best
Thomas

Hi Thomas,
your sentences and slots are OK. I tested:
schalt die rechtekuechenlampe aus -> OK
Must be something else

Hi Kay,

That’s good news, since it confirms that my slots and sentences should work with 2.5 as well.

A different result would have been astonishing, since many users certainly have the request to reuse their previous configuration without changes.

I agree with you: It must be something different.
I just pulled the newest release of 2.5 to my master, installed it with this command:

docker run -it \
    -v "$HOME/.config/rhasspy/master:/profiles" \
    --network host \
    rhasspy/rhasspy:2.5.0-pre \
    --profile en \
    --user-profiles /profiles

and got plenty of error messages in my terminal. The installation process could not be completed and stopped without prompt.

In parallel I installed 2.5 on an old Pi3 and tthe installation process was completed with the system prompt.

I have to do some further investigations and will then come back.

Best
Thomas

Hi,

@synthesiam, @fastjack, @Martin_Maier

I have good news and maybe some interesting information that might help people who are migrating from 2.4.x to 2.5 as well.

In the meantime I did some testing with an old Pi3, which I used for several installations. I found out that there is a big difference in behaviour, whether a 2.5 stand alone Rhasspy is installed or a master or satellite is installed.

In case of a stand alone system I did the installation with this command:

docker run -d -p 12101:12101 \
   --restart unless-stopped \
   -v "$HOME/.config/rhasspy/profiles:/profiles" \
   --device /dev/snd:/dev/snd \
   rhasspy/rhasspy:2.5.0-pre \
   --user-profiles /profiles \
   --profile 

The installation process ended successfully, the session was closed and the prompt re-appeared in the terminal.

Quite different withe a master or satellite installation, using the commands from the tutorial, as mentioned above. In these cases the session remains running and does not return to the terminal prompt.

That helped me to see what happend, when I began to configure the system. At first I configured MQTT, switched to “external” and put in the MQTT IP. I immediately got plenty of error messages. So I re-configured to internal and got no more error messages.

I was then able to completely install the kaldi dictionary, my sentences and the slots as I was used to using them in V2.4.19. There were only two minor changes:

  1. It seems (I am not quite sure) that at the end of a slot’s last entry a line feed is required. If not, this results in the error message “string index out of range”.
  2. The same error message is caused, if a slot is not completely defined. This was the case in my “device_name_switch”-slot, which looked like this:

(allelampen):
(mobilesteckdose):hm-rpc.0.LEQ0476533.1

(allelampen) was just a preparation for future purposes. It was accepted by V2.4.19 but it’s not by V2.5.

So thank you for your hints. They showed me the right way.

Nevertheless the question remains open, how I can connect to my external MQTT broker now:

Am I running into the same problem as @Jorg_Baumann and others described it?
And how @kaykoch have you got your system running with an external MQTT broker?

It seems these are currently the most important questions to come to a operationable V2.5. But they are a different issue. So I will close this one.

Best
Thomas

Sorry for the late reply.
I’m using external mqtt broker with no authentication in a docker file.
Just put in Host and port.
If you have problems, try to “talk” to the broker with mosquito to the server from each raspi:

mosquitto_pub -h <broker-ip> -t "test" -m "test-message"

mosquitto_sub -h <broker-ip> -t "test"

Happy Easter at first and thank you for your response. I now had a chance to check the commands you suggested.

One my satellite they look like this:

pi@Rhasspy-Sat1:~ $ mosquitto_pub -h 192.168.13.152:1883 -t “test” -m “test-message”
Unable to connect (Lookup error.).
pi@Rhasspy-Sat1:~ $ mosquitto_sub -h 192.168.13.152:1883 -t “test”
Unable to connect (Lookup error.).
pi@Rhasspy-Sat1:~ $ netstat -tln | grep 1883
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN

while the Rhasspy-master doesn’t show any results at all:

pi@ioBroker-Master:/opt/iobroker$ mosquitto_sub -h 192.168.13.152:1883 -t “test”
Unable to connect (Lookup error.).
pi@ioBroker-Master:/opt/iobroker$ mosquitto_pub -h 192.168.13.152:1883 -t “test” -m “test-message”
Unable to connect (Lookup error.).
pi@ioBroker-Master:/opt/iobroker$ netstat -tln | grep 1883
pi@ioBroker-Master:/opt/iobroker$

Master’s IP is …155 and the MQTT broker on …152 is running of course.

I have read quite a lot in the meantime without finding a solution yet Maybe I really have to wait until Hermes is fully implemented in 2.5 and the bug synthesiam is already aware of will finally be resolved.

Best
Thomas

Hi Thomas,
if I understand well:

Master-IP: 192.168.13.155
Sat-IP:192.168.13.152

Your MQTT-Broker is the rhasspy Broker insite the satellite

Anyway:
Unable to connect (Lookup error.) means, that it is not possible to connect to this pc.
I guess, that the rhasspyMQTTBroker is only configured to listen to localhost and not to its real IP.
Create your own mqtt Broker on the server with a docker-image and try ist again:
Here is my docker-compose file:

mosquitto:
  image: vimagick/mosquitto
  hostname: mqtt-server
  container_name: mqtt-server
  restart: unless-stopped
  ports:
    - "1883:1883"
    - "8883:8883"
  volumes:
    - /opt/mqtt/mosquitto.conf:/etc/mosquitto/mosquitto.conf
    - /opt/mqtt/pwfile:/etc/mosquitto/pwfile
    - /opt/mqtt:/var/lib/mosquitto

happy easter

Hi Kay,

my setup is a bit different:

Master-IP: 192.168.13.155 with Rhasspie’s internal MQTT broker on port 12183, this IP is also my iobroker master
Sat-IP:192.168.13.157
iobroker subsystem: 192.168.13.152, running a MQTT broker/server on port 1883 (can be changed)

I can easily delete this broker on the subsystem and re-install on IP …155. So, the broker wouldn’t be in a separate docker, but at least on the system with the same IP as the Rhasspy master has it. From my perspective the way, how the MQTT broker is provided on IP …155 shouldn’t be relevant.

So I will at first test what you recommended with this setup. If it fails, I will go your way. Thank you for your kind help again.

Best
Thomas

Hi Thomas,

Does that mean, you use ioBroker and Rhasspy-Master on 192.168.13.155 / 24?
Is your MQTT broker the one in Rhasspy or in ioBroker?

I startet with iobroker. I tried to use this MQTT-Broker for my ziggbe2Mqtt.
I had NEVER done it. I think there is something different in it’s configuration. At the end I don’t use ioBroker anymore.
My Rhasspy-Master, Rhasspy-Satellites, MQTT-Server, Node Red and MaryTTS are docker containers. (Also TV-Headend and Wireguard)
But, off cause, you can install your mqtt-server without docker.

Does that mean, you use another ioBroker and Rhasspy-Satellite on 192.168.13.152 / 24?
And there is ALSO a MQTT-Broker running?

You have to:

  • create a running MQTT-SERVER (try it NOT with ioBrokers MQTT Server)
  • point ALL rhasspys (Master and all sats) to MQTT-EXTERNAL
  • point ALL rhasspys (Master and all sats) to the SAME IP-ADRESS of your new MQTT-SERVER

Why don’t use ioBoker MQTT-Server anymore?
For me with Rhasspy V2.4.19 it is working very well.
Rhasspy V 2.4.19 runs on a separate Raspi4 and communicates with the ioBroker MQTT-broker on another Raspi4.
Perhaps this issue is related to it?
Just my 2 cent
Jörg

Just I was not able to get ioBrokers mqtt-server working. Thats what I remember.
The problem here is not the rhasspy, cause Thomas could not even contact his MQTT-Broker. As long as he can not publish and subscribe from each client, rhasspy CAN not work:

This could happen when:

  • the port is wrong -> try to netstat on the server (You did already)

netstat -tln | grep 1883

  • the ip / subnet is wrong -> try to ping (I guess, you did)

ping SERVER-IP

  • the port is not allowed (firewall or only localhost is allowed) -> try nmap on the server and the client (my favorite)

nmap SERVER-IP -p 1883

Hi Kay,

Yes, you are right. My entire network is a /24-network and my ioBroker master and my Rhasspy master are both running on 192.168.13.155, which is an Odroid H2 with 16 G of RAM. The only MQTT broker on this system is the internal one provides by Rhasspy. To my knowledge, this broker can only be switched to an external instance, but cannot be stopped. I guess in external mode this broker is a client, while it is a server in internal mode.

Currently my own MQTT broker (=server) is running as ioBroker adapter on my ioBroker subsystem with IP 192.168.13.152.

And finally my Rhasspy satellite is running without any MQTT broker (beside the Rhasspy internal one) on IP 192.168.13.152.

I have never experienced any problems with this configuration with Rhasspy 2.4.19.

Following your previous post I now would have switched my own MQTT server from IP …152 to IP …155. Since it is easier for me to install and to maintain, I would have preferred to use the ioBroker MQTT adapter again.

Of course, getting a working system based on Rhasspy 2.5 is more relevant than my current preference.

So I will entirely follow your recommendations depicted here:

One thing is new for me. In one of your very early posts regarding Rhasspy 2.5 you said, that the Rhasspy satellite has to point via EXTERNAL to the master’s IP-address, while the Master is either pointing to itself (in case of INTERNAL) or to a separate MQTT server (in case of EXTERNAL). Now both systems shall point to the MQTT-servers address. This sounds much more logical to me.

Funny enough: In the official Voltron installation guide for master/sat-systems the recommended configuration of INTERNAL/EXTERNAL is exactly vice versa! Since you are reporting to have a running system, I trust you most.

OK, I’ll try and will report.

Best
Thomas

Hi Kay,

due to another project, I still had no chance to do chase the MQTT topic. However, I had a small chat with @Jorg_Baumann in the meantime, and we now have a question to you.

Both of us are familiar with ioBroker MQTT but not with an external MQTT server/broker running in docker. In ioBroker it’s rather easy to see the objects created by the MQTT broker and to address them with any kind of programming tool, either Blockly or Node Red or Javascript.

Our question thus is: How can we see and address MQTT objects, that are created by an external MQTT server/broker, by e.g. Javascript? Maybe you can show us some examples.

Thank you very much.

Best
Thomas