# An Abstraction Layer Exploiting Voice Assistant Technologies for Effective Human--Robot Interaction
## 4 The Proposed Use Case  
In this section, we propose a use case implementing the abstraction layer shown in Section 3. As a robotic platform, we have chose NAO ([[https://www.softbankrobotics.com/emea/en/nao/](https://www.softbankrobotics.com/emea/en/nao/)]([https://www.softbankrobotics.com/emea/en/nao/](https://www.softbankrobotics.com/emea/en/nao/)) (accessed on 30 June 2021)). To develop the HRIC we adopted the Choregraphe suite. Note that any robotic wheelchairs can be employed for different use cases. The VAI of the Control HRIC is a peculiar interface used to communicate with the voice assistant platform. It includes a thread that records the audio coming from the robot's microphone using the command-line sound recorder for ALSA ([[http://alsa-project.org/](http://alsa-project.org/)]([http://alsa-project.org/](http://alsa-project.org/)) (accessed on 30 June 2021)) drivers with the _arecord_ command. Its output is streamed to a middle-ware layer that performs buffering and sends the audio to the voice assistant platform. Through the middle-ware, the VAI receives and parses the response sent by the voice assistant platform. An example of a response may be the name of the applicationto run. The switch is a simple module that routes the VAI output and starts the desired application of the user.  
For the VAC module, we chose to employ Google Assistant, which fulfills all the requirements mentioned in Section 3.2 (accessed on 30 June 2021). The Assistant Embedded APIs ([[https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1) alpha2]([https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1](https://developers.google.com/assistant/sdk/reference/rpc/google.assistant.embedded.v1) alpha2)) are used to send the audio to the assistant and return a response to the user. Examples are answers to simple questions (e.g., \"What time is it?\") or interactions with a Google Action. Google Assistant can be extended with Custom Device Actions ([[https://developers.google.com/assistant/sdk/guides/library/python/extend/custom-actions](https://developers.google.com/assistant/sdk/guides/library/python/extend/custom-actions)]([https://developers.google.com/assistant/sdk/guides/library/python/extend/custom-actions](https://developers.google.com/assistant/sdk/guides/library/python/extend/custom-actions)) (accessed on 30 June 2021)), which allow the robot to have special abilities not covered by the default Google Assistant's traits ([[https://developers.google.com/assistant/sdk/reference/traits/](https://developers.google.com/assistant/sdk/reference/traits/)]([https://developers.google.com/assistant/sdk/reference/traits/](https://developers.google.com/assistant/sdk/reference/traits/)) (accessed on 30 June 2021)).  
ACs are built with Actions on Google ([[https://developers.google.com/actions/](https://developers.google.com/actions/)]([https://developers.google.com/actions/](https://developers.google.com/actions/)) (accessed on 30 June 2021)) and were used to develop one application called _Mr. Chess_, which allows a user to play chess with voice commands. Actions On Google work in collaboration with Dialogflow, a user-friendly tool that allows the use of machine learning to understand the natural language of users.  
In our use case, we developed six applications. Four of them use a dedicated SSSC to perform heavy computations with an associated HRIC interface for handling the interaction with the user. The interfaces can communicate with SSSCs through REST APIs. One of them consists of an HRIC only without the support of SSSC. Another is entirely developed using the AC component.