snipsco / snips-issues

Feel free to share your bugs with us.
14 stars 5 forks source link

Unexpected output when subscribing to '/hermes/#' with mosquitto #195

Closed deniseBrise closed 4 years ago

deniseBrise commented 5 years ago

What's the issue? Unexpected output is produce in terminal, when subscribing to all existing topics that are children of '/hermes/#'. Moreover, subscribing to this topic using QMqttClient library produce endless message loop on 'hermes/audioServer/default/audioFrame'.

Use Cases Impacted When user wants to subscribe to all messages related to snips.

How to reproduce timeout 0.1 mosquitto_sub -h localhost -p 1883 -t 'hermes/#'

Expected behavior Subscribe to all topics related to snips and their children (at once).

Version and Environment

$ sam --version
0.0.55
$ sam status
OS version ................... Raspbian GNU/Linux 9 (stretch)
snips-analytics .............. (not running)
snips-asr .................... 0.63.3 (running)
snips-audio-server ........... 0.63.3 (running)
snips-dialogue ............... 0.63.3 (running)
snips-hotword ................ 0.63.3 (running)
snips-nlu .................... 0.63.3 (running)
snips-skill-server ........... 0.63.3 (not running)
snips-tts .................... 0.63.3 (running)

Logs

# There is no simultaneous output either on snips-watch or syslog 
$ timeout 0.1 mosquitto_sub -h localhost -p 1883 -t 'hermes/#'
RIFF4WAVEfmt �>}tim�R*mdatah�Z�f���:���<�:���6�b���x���f�t�N�����n������������������������n�t�2�T�V�0�D�L�x�^���������������P�����^����*����@�(�
��������h�����������>�|�����x�2��&����.���$�J�������n6@422:x��,f�������"���vvh����HJ����"�xhV������x�\�:�>�r�h���������
                     d �h�xzPLPf0J��V4H<TB`Bv���z�:F���R���"2
�B
$$&(���������6Fl@�| �Vdx������V����r�P�>����������
RIFF4WAVEfmt �>}tim�R*mdata��:�v��.������� �p�r�T�����(���0�����J���8>��������N������L
                                                                                                  f��T���(Ln���������Fpx�J������b���<�8H8�B��^��DH~��^F�|������f�P�����(��dj��0��2�����\������������X�����r������������z�*��������������f�~�N�:�������d�f���p��������������>���R���J������z����J������<�<�����f�D��,�d��������PD:j�����B�$�Z�$����6�f,",�~�"���6�n�����2b�����`&�<��Zx���^���:�n

Additional information

Workaround Subscribing to all known children topic with wildcard (like '/hermes/tts/#') is working.

cpoisson commented 5 years ago

Hi @deniseBrise,

It seems to me that it is a normal behavior.

What you are observing are the audio frame messages published on MQTT by the audio-server binded as the site default

So using the mqtt topic wildcard you will have all the sub topics of hermes/, including the audio frames.

deniseBrise commented 4 years ago

Indeed, subscribing to topic 'hermes/audioServer/default/audioFrame/#' gives the same result, which seems to be the expected one.