openhab / openhab-webui

Web UIs of openHAB
Eclipse Public License 2.0
214 stars 236 forks source link

[Main UI] Voice support #2275

Open GiviMAD opened 6 months ago

GiviMAD commented 6 months ago

Hello,

I want to add to the UI a client for the websocket protocol added by these PR https://github.com/openhab/openhab-core/pull/4032 to use the voice features from the UI.

I upgraded Webpack to v5 in these PR #2267 due to the its improved asset handling and over it I have created a functional POC that I will publish as a WIP PR so you can take a look to the code added.

The highlight design:

I have a class AudioMain, this class is responsable for:

I need a lot of feedback.

Initially I have placed the mentioned code under src/js/voice and I have added the options to the src/components/theme-switcher.vue. Also I have created a src/components/dialog-mixin.js for the src/components/app.js and from there the initialization is done when the option is enabled.

I will like to add some kind of icon that inform the user about the recording state and also that can be used to trigger the dialog by clicking on it, but I don't know where to place it or what kind of design I should use.

I will open the WIP PR when I have a moment and mention these issue because I think it will be easier to comment over what it's done.

Best Regards

GiviMAD commented 6 months ago

POC mobile video: https://github.com/openhab/openhab-webui/assets/9007708/987e3fac-2ea8-43ae-98f3-83e646add580