Mycroft Community Forum

Does anyone know if there are any pre-built json messages for the mycroft message bus?

I am trying to build a little cl tool, and I am thinking that loading a json skeleton message than having the utility fill it out (based on imputed options and eviron vars) would be the best way to go about it, but I don’t know all of the options that could be included in all the message types., hence the hope there are some pre-built json files with all of the fields possible.

@gez-mycroft wrote in the chat

(https://chat.mycroft.ai/community/pl/q5yncsu3mi8g5cugj9ff6s8chy)

Hey, have you already seen this page in the docs? https://mycroft-ai.gitbook.io/docs/mycroft-technologies/mycroft-core/message-types I tried to outline what the JSON looks like for all the messages that take a payload however I’m sure it could be improved so if you have questions about any please flag them and we can clarify and update the docs

Message Types

Messages are used to communicate information between Mycroft services and other components. This list of Message types outlines the details and provides sample code for each.

1 Like

Ok so after some digging (thanks to the lead :slight_smile: ) I think I found what I was wanting.

The JSON format is:
‘’’{“type”: TYPE, “data”:{ATTRIBUTES: ATTRIBUTE_DATA}}’’’

For example:
for mycroft speak (sending data for mycroft to speak, in this a simple hello):

‘’’{“type”: “speak”, “data”:{“utterance”: “hello”}}’’’

I am not sure if there are other attributes that type “speak” can have, as in can I choose the model to use (and thus the voice), can I choose the language encoding, etc.

Started a little git repo for storing these: https://github.com/FruityWelsh/mycroft-json-messages

1 Like