hopkira / k9-chess-angular

Angular JS K9 robot controller, designed primarily for use on a iPad or Android touch device as a virtual joystick. Also visualizes the robot's surroundings using camera and sensor data.
http://k9-build.blogspot.co.uk/
The Unlicense
14 stars 10 forks source link

Sending Transcription to conversation and getting response. #39

Closed DrTardis1963 closed 6 years ago

DrTardis1963 commented 6 years ago

(Excuse my poor writing its late) So how would I send the output of the transcription to Watson Conversation and then get the reply back as a string?

DrTardis1963 commented 6 years ago

Sorry to be a pain but im still getting this error Traceback (most recent call last): File "/home/pi/K9/k9-chess-angular-master/python/richard.py", line 91, in answer = results.group(1) AttributeError: 'NoneType' object has no attribute 'group'

DrTardis1963 commented 6 years ago

Same output on conversation test

{u'entities': [], u'intents': [{u'confidence': 0.3141396760940552, u'intent': u'about_VA'}], u'output': {u'text': [u'Hello I am K9.'], u'log_messages': [], u'nodes_visited': [u'Start And Initialize Context']}, u'context': {u'musiconoff': u'off', u'appl_action': u'', u'heateronoff': u'off', u'lightonoff': u'off', u'system': {u'dialog_stack': [{u'dialog_node': u'root'}], u'dialog_request_counter': 1, u'dialog_turn_counter': 1, u'branch_exited': True, u'_node_output_map': {u'Start And Initialize Context': [0, 0, 1, 2]}, u'branch_exited_reason': u'completed'}, u'default_counter': 0, u'volumeonoff': u'off', u'conversation_id': u'846f7031-8bb8-434f-a18c-f3beb76a2807', u'wipersonoff': u'off', u'AConoff': u'off'}, u'input': {u'text': u'what is your purpose'}}

Traceback (most recent call last): File "/home/pi/K9/k9-chess-angular-master/python/richard test.py", line 31, in answer = results.group(1) AttributeError: 'NoneType' object has no attribute 'group'

DrTardis1963 commented 6 years ago

same again this has got me confused

{u'entities': [], u'intents': [{u'confidence': 0.3141396760940552, u'intent': u'about_VA'}], u'output': {u'text': [u'I am K9. Who are you?'], u'log_messages': [], u'nodes_visited': [u'Start And Initialize Context']}, u'context': {u'musiconoff': u'off', u'appl_action': u'', u'heateronoff': u'off', u'lightonoff': u'off', u'system': {u'dialog_stack': [{u'dialog_node': u'root'}], u'dialog_request_counter': 1, u'dialog_turn_counter': 1, u'branch_exited': True, u'_node_output_map': {u'Start And Initialize Context': [0, 2, 0, 1]}, u'branch_exited_reason': u'completed'}, u'default_counter': 0, u'volumeonoff': u'off', u'conversation_id': u'11b5e10a-9129-4614-9d15-bd845bb9b37b', u'wipersonoff': u'off', u'AConoff': u'off'}, u'input': {u'text': u'what is your purpose'}} None

Traceback (most recent call last): File "/home/pi/K9/k9-chess-angular-master/python/testcode2.py", line 34, in answer = results.group(1) AttributeError: 'NoneType' object has no attribute 'group'

DrTardis1963 commented 6 years ago

Got this now

{u'entities': [], u'intents': [{u'confidence': 0.3141396760940552, u'intent': u'about_VA'}], u'output': {u'text': [u'K9 is ready.'], u'log_messages': [], u'nodes_visited': [u'Start And Initialize Context']}, u'context': {u'musiconoff': u'off', u'appl_action': u'', u'heateronoff': u'off', u'lightonoff': u'off', u'system': {u'dialog_stack': [{u'dialog_node': u'root'}], u'dialog_request_counter': 1, u'dialog_turn_counter': 1, u'branch_exited': True, u'_node_output_map': {u'Start And Initialize Context': [0, 1, 0, 2]}, u'branch_exited_reason': u'completed'}, u'default_counter': 0, u'volumeonoff': u'off', u'conversation_id': u'b73cc841-2562-4974-8324-39cfe5cc88a8', u'wipersonoff': u'off', u'AConoff': u'off'}, u'input': {u'text': u'what is your purpose'}} <_sre.SRE_Match object at 0x750b19a0> ./tts K9 is ready.

DrTardis1963 commented 6 years ago

Nevermind I fixed it by giving execute permission to anyone in properties of tts. Thank You!!!! Everything works now!!!! I couldn't be happier right now!