Bark TTS is a Text-To-Speech component for Home Assistant that allows you to generate audio using AI-generated voices supported by Bark. It provides language support and the ability to choose different announcer speakers.
To use Bark TTS, you need to run the Bark API either in a self-hosted environment or through a cloud-based solution. Here are the steps to set it up:
If you have an NVIDIA GPU, run the following command:
docker run --gpus=all --name=suno-ai-bark -p 5000:5000 --restart=unless-stopped --detach=true r8.im/suno-ai/bark@sha256:b76242b40d67c76ab6742e987628a2a9ac019e11d56ab96c4e91ce03b79b2787
If you don't have an NVIDIA GPU, use the following command:
docker run --name=suno-ai-bark --env=SUNO_USE_SMALL_MODELS=True -p 5000:5000 --restart=unless-stopped --detach=true r8.im/suno-ai/bark@sha256:b76242b40d67c76ab6742e987628a2a9ac019e11d56ab96c4e91ce03b79b2787
Cloud-based deployment options are still in development and coming soon.
The Docker image is authored by Replicate.
To install the custom component, you can use HACS (Home Assistant Community Store). Follow the steps below:
- Go to the HACS panel.
- Select Integrations.
- On the top right corner, click the three dots menu and choose Custom Repositories.
- Copy the URL
https://github.com/difelice/barktts
and paste it into the Repository field. - Select Integration as the category.
Add the following configuration to your configuration.yaml
file:
url
: The URL of the Bark API server, including the/predictions
endpoint.lang
: The language for TTS. Optional. Defaults to the speakerannouncer
.
Replace
192.168.1.100
with the IP address of your Bark API Docker service mentioned above.
tts:
- platform: barktts
url: http://192.168.1.100:5200/predictions
lang: en