MPD on Raspberry Pi

HA installed in QNAP docker.
Two MPD players, first on RPi, second on native QNAP partition, same NAS as HA container
Google TTS test works properly on QNAP MPD.
On the RPi (wired connection) there is a delay where the first word of the test text is not played. The rest of the sentence plays correctly.
There is some lag and it would be nice to find some way to work around this on the Raspberry Pi.
Does anyone have any ideas? Below are the player definitions,

media_player:
  - platform: mpd
    host: 192.168.0.25
    name: MPD-RPi
    password: <pass>
  - platform: mpd
    host: 192.168.0.7
    name: MPD-MEDIA
    password: <pass>

I’ve seen something similar using chromecasting, so here’s some ideas to try:

  • reverse the order of device broadcasting
  • Play a fixed jingle WAV before the TTS - can cache the connection.
  • Play fixed text first on a TTS string - some short blocks of text seem to be cached without a processing delay.
  • Save a TTS intro “Hello…” as a fixed WAV file, again removing processing delay.
  • Prefix the TTS string with something that is disposable - “hello” might work again.

Yep, I use such workarounds but generally the problem looks like unresolvable.

Wondering if anyone can point me in the right direction. I set up a HA voice assistant on a raspberry pi 0 2 W & got it to work. I then added MPD to as it want to be able to stream to it. I have ip ban enabled on HA but HA keeps banning the IP address of the RPi02W. I temporarily disable the ip ban & both the voice assistant & MPD media player work.

I see the following in the MPD logs:
exception: CURL failed: The requested URL returned error: 401 Unauthorized

In the HA logs, I see 4 warnings for each type of image file it’s trying to retrieve like this:
WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from xx.x.x.xx (xx.x.x.xx). Requested URL: '/media/music/Billy%20Joel/The%20Stranger/cover.bmp'. (Music Player Daemon) 0.22.6)

Does anybody have an idea on what I can do/change to eliminate these warnings so I can keep ip ban enabled? I have no idea what user/password MPD is using to retrieve cover images or where I can change them. I saw some mention in the mpd.conf file of a user (but no password) but the comments in the file lead me to believe that was the user MPD ran under on the RPi02W.

Thanks for any insight/advice anyone can give.

As you are using both MPD and HASS Voice, and your issues are unrelated to MPD delay, this looks like a different issue.

I’d suggest starting a new thread.