#TTS isn't working on my Voice PE

1 messages ยท Page 1 of 1 (latest)

grave mason
#

Hello, I received my Voice PE, set it up straight away however I've encountered an issue where TTS replies nearly always fail to play, I've had it work twice out of many many tries. I've tried using Google translate and piper and both of those work perfectly if I'm using my phone and audio plays as expected however neither of them work nearly every time I try with the Voice PE, as mentioned previously it did work a couple of times.

I've spent a couple of hours trying to figure it out however I've had no luck, I would appreciate any help if anyone is willing. ๐Ÿ™‚

I will attach logs below

#

When it fails I do get this under home assistant core logs, I'm also happy to provide any other logs if needed.

#

Logger: homeassistant
Source: components/wyoming/tts.py:126
First occurred: 13:06:56 (4 occurrences)
Last logged: 13:26:50

Error doing job: Exception in callback SpeechManager._async_get_tts_audio.<locals>.handle_error() at /usr/src/homeassistant/homeassistant/components/tts/init.py:844 (None)

ashen laurel
#

Have you got multiple assist pipelines set up? Are you sure the voice is using the right one? There's a select entity exposed on the voice PE

#

The error sounds like it's possibly timing out whilst generating the TTS audio

grave mason
#

Thanks for replying, I do have multiple setup however I have the Voice using the correct one which as far as I can tell should be working, it does work but only every 1 in 30 or so tries

It seems to not even wait for the TTS audio to be generated, the light spins as it handles each stage then when it gets to TTS it stops immediately turns off, under debug it shows it having run for 0.0 seconds as well.

ashen laurel
#

Is there anything in the logs of your piper addon? Is the voice PE on the same network as Home Assistant?

grave mason
#

I'll grab the logs for the piper add-on, however it does it even if I'm using another TTS service.

It is on the same network ๐Ÿ™‚

ashen laurel
#

It's odd that play audio is greyed out too, so HA knows it wasn't actually generated

grave mason
#

whisper log:

shows this each time it fails

grave mason
sinful kayak
#

Error would be in piper log i think not whisper. One thing you night want to try is clearing the tts cache

grave mason
sinful kayak
#

Hmm, maybe a network issue, broken pipe usually means some interconnect between processes was severed

frosty island
#

Did you try assist_satellite.announce instead? Curious if that works.

grave mason
#

I've also noticed if I used piper through media and the text to speech option it seems to work fine if that's helpful at all

sinful kayak
#

Have you tried the cloud tts to see if that works?

grave mason
sinful kayak
#

Seems allot like a network problem of some sort, hard to tell without pulling logs off the device itself though

grave mason
sinful kayak
#

Think you can see the logs by plugging it into a computer and using the esphome.io site

grave mason
# sinful kayak Think you can see the logs by plugging it into a computer and using the esphome....

ah yeah I managed to get them:

[19:13:56][D][light:036]: 'voice_assistant_leds' Setting:
[19:13:56][D][light:051]: Brightness: 66%
[19:13:56][D][light:109]: Effect: 'Replying'
[19:13:56][D][voice_assistant:641]: Event Type: 8
[19:13:56][D][voice_assistant:719]: Response URL: "http://192.168.1.236:8123/api/tts_proxy/br2ReeXwZzPjkAZD6pjGYg.flac"
[19:13:56][D][voice_assistant:516]: State changed from AWAITING_RESPONSE to STREAMING_RESPONSE
[19:13:56][D][voice_assistant:522]: Desired state set to STREAMING_RESPONSE
[19:13:56][D][media_player:080]: 'Media Player' - Setting
[19:13:56][D][media_player:087]: Media URL: http://192.168.1.236:8123/api/tts_proxy/br2ReeXwZzPjkAZD6pjGYg.flac
[19:13:56][D][media_player:093]: Announcement: yes
[19:13:56][D][voice_assistant:641]: Event Type: 2
[19:13:56][D][voice_assistant:733]: Assist Pipeline ended
[19:14:01][D][nabu_media_player.pipeline:174]: Reading FLAC file type
[19:14:01][D][voice_assistant:516]: State changed from STREAMING_RESPONSE to IDLE
[19:14:01][D][voice_assistant:522]: Desired state set to IDLE
[19:14:01][D][light:036]: 'voice_assistant_leds' Setting:
[19:14:01][D][light:047]: State: OFF
[19:14:01][D][light:109]: Effect: 'None'
[19:14:11][D][power_supply:048]: Disabling power supply.

#

that't from the end where it has the issue, I can't see anything else in the logs indicating any sort of issue

sinful kayak
#

Hmm, seems like everything should be working. Maybe silly question, but the speaker isn't muted or set to super low volume?

grave mason
#

when it does work it shows this:

[19:19:16][D][voice_assistant:516]: State changed from AWAITING_RESPONSE to STREAMING_RESPONSE
[19:19:16][D][voice_assistant:522]: Desired state set to STREAMING_RESPONSE
[19:19:16][D][media_player:080]: 'Media Player' - Setting
[19:19:16][D][media_player:087]: Media URL: http://192.168.1.236:8123/api/tts_proxy/0mTteY95-v609yl6htrj5g.flac
[19:19:17][D][media_player:093]: Announcement: yes
[19:19:17][D][voice_assistant:641]: Event Type: 2
[19:19:17][D][voice_assistant:733]: Assist Pipeline ended
[19:19:20][D][esp-idf:000][ann_read]: I (386811) HTTP_CLIENT: Body received in fetch header state, 0x3fcd62b0, 304
[19:19:20]
[19:19:20][D][nabu_media_player.pipeline:174]: Reading FLAC file type
[19:19:20][D][nabu_media_player.pipeline:186]: Decoded audio has 1 channels, 48000 Hz sample rate, and 16 bits per sample
[19:19:20][D][nabu_media_player.pipeline:211]: Converting mono channel audio to stereo channel audio
[19:19:28][D][voice_assistant:516]: State changed from STREAMING_RESPONSE to IDLE
[19:19:28][D][voice_assistant:522]: Desired state set to IDLE

grave mason
versed basin
#

what version of HA ? sorry if you've already mentioned it

grave mason
versed basin
#

ok thanks, i will have a scan through the above ๐Ÿ™‚ to catch up

grave mason
#

also tried watching the log while using assist_satellite.announce while it locks up with the spinning LED's

[19:38:43][D][voice_assistant:516]: State changed from IDLE to STREAMING_RESPONSE
[19:38:43][D][voice_assistant:522]: Desired state set to STREAMING_RESPONSE
[19:38:43][D][power_supply:033]: Enabling power supply.
[19:38:43][D][nabu_media_player.pipeline:174]: Reading FLAC file type

that's the last it shows

frosty island
#

Can you check those flac files from log? Probably they're empty?

#

It looks like there's no data in file when it doesn't work.

sinful kayak
#

Also is the power supply being used 2.0A?

grave mason
grave mason
versed basin
#

are you able to play media to the device ? and do you get the wake sound etc

grave mason
sinful kayak
#

Interesting the files aren't there for the failing ones, wonder if something is breaking When it goes to write the audio file

#

Anything in the home Assistant logs around that tts proxy?

frosty island
#

Or HA proxy, which is unlikely.

grave mason
# frosty island So it's your Piper.

I have the same issue when I'm not using piper though

not sure the best to phrase this but does it use the assist_satellite.announce action when it is supposed to play back the audio, when I manually run that action then it seems to produce issues similar and the log has stuff like this

frosty island
#

Probably, you're having cached empty responses from Piper already...

grave mason
frosty island
grave mason
#

as I said though it works perfectly if I use it on my phone

frosty island
#

Means the FLAC with data was generated 1 out of 10 times.

#

IDK how data is generated and transferred for companion app...

#

I know that HA is resampling audio for ESP32 satellites to make it easier to consume.

grave mason
#

I don't know if its relevant but it works fine if I use Piper through media and select the Voice as the target device, works every single time. partially why I was wondering about assist_satellite.announce, if I manually use that action it seems to hang most of the time but I can't find anything in the logs to indicate what is actually happening when it does though it's possible I just don't understand them enough ๐Ÿ˜… .

been messing around a bit more and I've noticed with assist_satellite.announce when it doesn't result in the endless spinning LEDs or when it doesn't work it seems to result in the exact issue I'm experiencing, the LEDs spin then go out, the ESPhome logs show it trying to play the flac file and it just returns to the idle state so it seems I can reproduce it using the assist_satellite.announce action so that might be where the issue is if that is used to provide the audio reply, I'm just not sure what the issue is.

versed basin
#

Just been doing some tests , out of curiosity , do you have any other satellites running at the same time ?

grave mason
# versed basin Just been doing some tests , out of curiosity , do you have any other satellites...

I don't, only the one satellite, I have a few Google home devices but those don't count right, they aren't counted as satellites or anything like that?

Also after trying to get it working and not having much luck I decided to try subscribing to home assistant cloud and using that instead, good news is that actually works most of the time however sometimes it will still have the same issue but it now works most of the time, same as before it seems more likely to fail with longer replies but they have to be really long it seems compared to when I was using piper.

zinc yoke
#

I think I'm having the same issue as you. Did you manage to get it to be reliable ? For me it works about 80% of the time

grave mason