home-assistant.io/source/voice_control/voice_remote_local_assistant.markdown
c0ffeeca7 4c95772e2e
Assist: local pipeline: add step to install openWakeWord (#30391)
* Assist: local pipeline: add step to install openWakeWord

- closes #30364

* Fix markdown
2023-12-18 13:31:24 +01:00

78 lines
4.9 KiB
Markdown

---
title: "Installing a local Assist pipeline"
---
In Home Assistant, the Assist pipelines are made up of various components that together form a voice assistant.
For each component you can choose from different options. There is a speech-to-text and text-to-speech option that runs entirely local.
The speech-to-text option is [Whisper](https://github.com/openai/whisper). It's an open source AI model that supports [various languages](https://github.com/openai/whisper#available-models-and-languages). We use a forked version called [faster-whisper](https://github.com/guillaumekln/faster-whisper). On a Raspberry Pi 4, it takes around 8 seconds to process incoming voice commands. On an Intel NUC it is done in under a second.
For text-to-speech we have developed [Piper](https://github.com/rhasspy/piper). Piper is a fast, local neural text-to-speech system that sounds great and is optimized for the Raspberry Pi 4. It supports [many languages](https://rhasspy.github.io/piper-samples/). On a Raspberry Pi, using medium quality models, it can generate 1.6s of voice in a second.
## Prerequisites
- Home Assistant Operating System
## Installing a local Assist pipeline
For the quickest way to get your local Assist pipeline started, follow these steps:
1. Install the add-ons to convert text into speech and vice versa.
- Install the {% my supervisor_addon addon="core_whisper" title="**Whisper**" %} and the {% my supervisor_addon addon="core_piper" title="**Piper**" %} add-ons.
![Install the Whisper and Piper add-ons](/images/assist/piper-whisper-install-01.png)
- If you want to use a wake word, also install the {% my supervisor_addon addon="core_openwakeword" title="**openWakeWord**" %} add-on.
- Start the add-ons.
- Once the add-ons are started, head over to the integrations under {% my integrations title="**Settings** > **Devices & Services**" %}.
- You should now see Piper and Whisper being discovered by the [Wyoming integration](/integrations/wyoming/).
![Whisper and Piper integrations](/images/assist/piper-whisper-install-new-02.png)
- For each integration, select **Configure**.
- Once the setup is complete, you should see both Piper and Whisper (and, optionally, also openWakeword) in one integration.
![Whisper and Piper integration](/images/assist/piper-whisper-install-new-03.png)
- **Whisper** converts speech into text.
- **Piper** converts text into speech.
- **Wyoming** is the protocol they are both using to communicate.
2. Setup your assistant.
- Go to {% my voice_assistants title="**Settings** > **Voice assistants**" %} and select **Add assistant**.
![Enter a name for your voice assistant](/images/assist/piper-whisper-install-05.png)
- **Troubleshooting**: If you do not see any assistants here, you are not using the default configuration. In this case, you need to add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
assist_pipeline:
```
- Enter a name. You can pick any name that is meaningful to you.
- Select the language that you want to speak.
- Under **Conversation agent**, select **Home Assistant**.
- Under **Speech-to-text**, select **faster-whisper**.
- Under **Text-to-speech**, select **piper**.
- Depending on your language, you may be able to select different language variants.
- If you like, pick one of the predefined wake words.
![Select wake word](/images/assist/assist_predefined_wakeword.png)
- You can even [define your own a wake word](/voice_control/create_wake_word/). This is not difficult to do, but you will need to set aside a bit of time for this.
- Once you defined your own wake word, it will show in this pick list.
3. That's it. You ensured your voice commands can be processed locally on your device.
4. If you haven't done so yet, [expose your devices to Assist](/voice_control/voice_remote_expose_devices/#exposing-your-devices).
- Otherwise you won't be able to control them by voice.
## Fine-tuning Whisper and Piper for your setup
You would like to tweak the configuration for better performance or accuracy?
View some of the options in the video below. Explained by Mike Hansen, creator of Rhasspy, Piper, and Wyoming.
<lite-youtube videoid="Tk-pnm7FY7c" videoStartAt="1589" videotitle="Configure your local Assist pipeline for your setup"></lite-youtube>
The options are also documented in the add-on itself. Go to the {% my supervisor_addon addon="core_whisper" title="**Whisper**" %} or the {% my supervisor_addon addon="core_piper" title="**Piper**" %} add-on and open the **Documentation** page.
## Related topics
- [Create your own wake word](/voice_control/create_wake_word/)
- [Expose your devices to Assist](/voice_control/voice_remote_expose_devices/#exposing-your-devices)
- [Whisper for speech-to-text](https://github.com/openai/whisper)
- [Piper for text-to-speech](https://github.com/rhasspy/piper)