Inform the registered component of this action
As previously mentioned in Section Register component, a component can be notified when it has been registered if the specification contains a channel that commences with valawai, followed by the component's type, name, and terminates with /control/registered. This pattern matches the regular expression valawai/c[0|1|2]/\w+/control/registered. The subscription message payload will be comparable to the subsequent JSON example.
{
"id":"65c1f59ea4cb169f42f5edc4",
"name":"c0_voice_to_text",
"description":"Generate text from the ambient audio",
"version":"1.0.5",
"api_version":"2.3.0",
"type":"C0",
"since": 1709902001,
"channels":[
{
"id":"valawai/c0/voice_to_text/data/audio_to_process",
"description":"Provide the audio text to extract the text.",
"subscribe":{
"type":"OBJECT",
"properties":{
"sample_ratio":{
"type":"BASIC",
"format":"STRING"
},
"encoded":{
"type":"BASIC",
"format":"STRING"
},
"sample":{
"type":"BASIC",
"format":"STRING"
}
}
}
},
{
"id":"valawai/c0/voice_to_text/data/text_extracted",
"description":"Notify about the extracted text from a received audio.",
"publish":{
"type":"OBJECT",
"properties":{
"text":{
"type":"BASIC",
"format":"STRING"
},
"language":{
"type":"BASIC",
"format":"STRING"
},
"accuracy":{
"type":"BASIC",
"format":"NUMBER"
}
}
}
}
]
}
On this payload, line 2 presents the unique identifier that distinguishes the component in VALAWAI, accompanied by the epoch time, in seconds, at which the component is registered (line 9). The name (line 3), version (line 5), and type (line 7) of the component provided in the registration message (refer to section Register component for further details) are also included. Furthermore, the extracted information from the component's asynchronous API specification version is contained on line 6, and the channels on line 9. For each channel, the name (line 11) and description (line 12) are provided. If the channel is a subscription (line 13) or a publish (line 34), a description of the anticipated payload of messages sent or received from the channel is also included.
With regard to all this information, the component identifier (line 2) holds paramount importance, as the component will require it to execute various actions, such as unregistering itself, as demonstrated in section unregister component.