secretsauceai / voice-assistant-protocol

A bus for voice assistants, including benchmarks.
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Internally tagged vs externally tagged #1

Open sheosi opened 2 years ago

sheosi commented 2 years ago

When making the structure in a message you need to tell the receiver what is it, this is tagging. Should it be done internally?

{
    "language": [
        {
            "lang": "en",
            "text": "hello"
        },
        {
            "lang": "es",
            "text": "hola"
        }
    ]
}

Or externally?

{
    "language": {
        "en": {
            "text": "hello"
        },

        "es": {
            "text": "hola"
        }
    }
}

Or both?

sheosi commented 2 years ago

I personally prefer external tagging, and it is very useful for the cases where the tagging can't be repeated (like in the example here), which is a common case in the protocol. However, internal tagging seems to be better for scripting language guys, and is the one used by Hermes, Alexa and Google (I think Google uses both).