Press "Enter" to skip to content

Tts Bluetooth Speaker For Home Assistant

This project provides a media player (custom component) for Home Assistant that plays TTS (text-to-speech) via a Bluetooth speaker. These custom components work together to ensure only one of them is accessing Bluetooth at any given time.

Bluetooth tracker component continually scans for devices (presence detection) Bluetooth tracker component continues scanning for devices (presence detection)

sudo apt-get install pulseaudio pulseaudio-module-bluetooth bluez mplayer sox libsox-fmt-mp3 The last part is to persist the setting for a2dp, in case your bluetooth seems to default to a different profile.

sudo bluetoothctl scan on pair 00:2F:AD:12:0D:42 trust 00:2F:AD:12:0D:42 connect 00:2F:AD:12:0D:42 quit Copy the TTS Bluetooth Speaker component (from this GitHub repo) and save it to your Home Assistant config directory. Copy the Bluetooth Tracker component and save it to your Home Assistant config directory. By this stage (after a reboot), you should be able to start using the TTS Bluetooth speaker in HA.

You need to specify the Bluetooth address of your speaker, and optionally set the volume level (must be between 0 and 1). If you find your speaker is not playing the first part of the audio (i.e. first second is missing when played back), then you can optionally add some silence before and/or after the original TTS audio hsing the pre_silence_duration and post_silence_duration options (must be between 0 and 60 seconds).

To test that it’s all working, you can use Developer Tools > Services in the HA frontend to play a TTS message through your Bluetooth speaker: Another way to test it is to add an automation that plays a TTS message whenever HA is started:

TTS on Bluetooth speaker via Raspberry Pi

I followed the guide and was able to configure my low-cost bluetooth speakers, visible on home assistant (media_player.tts_bluetooth_speaker). Now after updating home assistant (my version was very old 52.0) at the current 81.6 improvisation I no longer see the add-on and I have the following error: Error doing job: Task exception was never retrieved Error doing job: Task exception was never retrieved Traceback (most recent call last): File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step result = coro.throw(exc) File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py”, line 56, in async_setup_component return await task # type: ignore File “/usr/lib/python3.5/asyncio/futures.py”, line 380, in __iter__ yield self # This tells Task to wait for completion.

TTS on Bluetooth speaker via Raspberry Pi

Hey, followed all instructions including additional mentions in this thread, everything went well to my knowledge, but the media_player is NOT showing up under devices. Never mind the formatting, Preformatted Text doesn’t seem to apply.

Bluetooth TTS with HomeAssistant · jansblog

It is pretty well integrated and can adjust the lights, detect presence in all rooms and monitors temperature and humidity. One feature that I’ve been meaning to add for quite a while now is voice feedback using Text To Speech.

HomeAssistant is running on my server in the livingroom that doesn’t have any speakers nearby. Unfortunately, the setup on the server side wasn’t all that easy which is why I’m writing up the steps that I collected from various sources. sudo apt install pulseaudio pulseaudio-module-bluetooth vlc bluez bluez-tools Since I’m running the server headless, there are no X-sessions and therefore pulseaudio will not be started for the login user.

The last line allows the homeassistant user to access the audio devices. Since we want to allow pulseaudio to access bluetooth devices, we have to add some d-bus rules in /etc/dbus-1/system.d/pulse.conf:

This setup will continue to work as long as the server isn’t rebooted or the connection drops.

To do so, we create the script /usr/local/bin/echo-watchdog.sh (Fill in your Echo Dot’s MAC address): By enabling and starting it, we make sure that the server always tries to connect the Echo Dot when it is available:

Webcontactus.com: Find Business Contact Information

Our Business directory offers quality and professionally edited company listings, which are organized in the most relevant categories that enable customers to easily, locate businesses and businesses to easily find customers.

Use a speaker with Home Assistant on a RaspberryPi to output audio messages

For a long time I wanted to add audio to my Home Assistant Setup. My first use case is that I want Home Assistant to literally tell me when I should air my room based on the current CO2 value. It can be controlled via a web ui called ympd and from Home Assistant directly as an media_player entity. Here I used Google Translate but in future I would like to use Nabu Casas` TTS service, their voices sound very natural.

If not, make sure that you restarted Home Assistant after the configuration changes, that the add-on is running & that your speaker is on and not muted. Now you can output audio messages over your speaker from every automation by calling above service.

In my opinion it is a really easy setup but offers so much possibilities for fun and helpful automations.

Be First to Comment

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Mission News Theme by Compete Themes.