Hm, this exact syntax was actually the first thing I tried. Was questioning my sanity until trying again just now:
Just updated to 2.4.20 and have the same result. Trying to simplify things to reproduce the error with as few variables in play as possible:
Current sentences:
[PlayVideo]
play ($videos){video_name}
Current slots:
{
"videos": [
"(kill bill one):(Kill Bill - Vol 1)"
]
}
Resulting log:
INFO:__main__:Starting training
DEBUG:DialogueManager:asleep -> training_sentences
[2020-07-16 08:39:50,564] 192.168.1.99:49307 GET /api/unknown-words 1.1 200 2 2591
INFO:quart.serving:192.168.1.99:49307 GET /api/unknown-words 1.1 200 2 2591
DEBUG:train:Parsing ini file(s): ['/profiles/en/sentences.ini']
DEBUG:rhasspynlu.ini_jsgf:Loaded ini file
Traceback (most recent call last):
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/doit_cmd.py", line 177, in run
return command.parse_execute(args)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/cmd_base.py", line 127, in parse_execute
return self.execute(params, args)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/cmd_base.py", line 389, in execute
self, params, args)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/cmd_base.py", line 270, in load_tasks
return self._load_from(cmd, self.mod_dict, self.cmd_names)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/cmd_base.py", line 254, in _load_from
task_list = loader.load_tasks(members, cmd_list, cmd.execute_tasks)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/loader.py", line 147, in load_tasks
_process_gen()
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/doit/loader.py", line 138, in _process_gen
task_list.extend(generate_tasks(name, ref(), ref.__doc__))
File "/usr/share/rhasspy/rhasspy/train/__init__.py", line 390, in task_ini_graph
sentence = jsgf.Sentence.parse(line)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/rhasspynlu/jsgf.py", line 97, in parse
parse_expression(s, text)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/rhasspynlu/jsgf.py", line 279, in parse_expression
None, text[current_index + 1 :], end=[" "] + end, is_literal=False
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/rhasspynlu/jsgf.py", line 342, in parse_expression
assert last_group is not None
AssertionError
DEBUG:DialogueManager:training_sentences -> ready
INFO:DialogueManager:Automatically listening for wake word
DEBUG:DialogueManager:ready -> asleep
DEBUG:InboxActor: -> stopped
ERROR:__main__:Training failed:
Traceback (most recent call last):
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1471, in full_dispatch_request
result = await self.dispatch_request(request_context)
File "/usr/share/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py", line 1519, in dispatch_request
return await handler(**request_.view_args)
File "app.py", line 640, in api_train
raise Exception(f"Training failed: {result.reason}")
Exception: Training failed:
[2020-07-16 08:39:50,577] 192.168.1.99:49305 POST /api/train 1.1 500 17 22037
INFO:quart.serving:192.168.1.99:49305 POST /api/train 1.1 500 17 22037
DEBUG:InboxActor: -> stopped
[2020-07-16 08:39:50,648] 192.168.1.99:49305 GET /api/problems 1.1 200 293 3295
INFO:quart.serving:192.168.1.99:49305 GET /api/problems 1.1 200 293 3295
When I remove the parenthesis and spaces, everything works as expected. Removing just parenthesis gets rid of the error (but obviously has different meaning and doesn’t accomplish the intended outcome). Removing just the spaces still gets me a training error.
Appreciate the responses, if there’s any other info I can provide to help let me know.