Piper "TRY VOICE" `Unable to load example. Response error: 500` error

Hi Guys;

I am having trouble with Installing a local Assist pipeline - Home Assistant

More specifically, the part that “Under Text-to-speech, select piper.”

I have follow through installed all the addons (Whisper, Piper, openWakeWord, Wyoming) and everything was fine.

But at the “Settings > Voice assistants”, every time when I click “TRY VOICE” and “PLAY”, it got Unable to load example. Response error: 500 error

have already tried “save and then retry”, “reboot, retry”… etc.

also I have noticed the Piper addon config default voice is “en_US-lessac-medium”
so I tried setting the same voice in settings and/or changing the Piper config

but same result :crying_cat_face:


After many attempt… I have noticed there are some errors in the log, which I assume it was triggered by the “fail”

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: █████ (1 occurrences)
Last logged: █████
Error handling request

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 1017, in post
    base = get_url(self.tts.hass)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/network.py", line 208, in get_url
    raise NoURLAvailableError
homeassistant.helpers.network.NoURLAvailableError

Was wondering if anyone got this issue as well?
Or is it me only?

P.S.:
I am using Home Assistant OS on Yellow

I have had this on occasion when trying the voices while away from home (so not on same network).

Sadly, in my case… I am on the same local network.

And I just cannot get it to work. :crying_cat_face:

I’m having the same problem, supervised setup on a mini PC (installed/upgraded from a pi3 yesterday).

The error 500 comes up if I select Piper or Google translate.

OMG… guys.

I think I have solved this myself (sort of). :scream:


Short version (TL;DR)

from: https://www.home-assistant.io/integrations/tts/#troubleshooting (troubleshooting)

  • external_url

Full version

I have noticed the above error that I quoted (from the log) is NoURLAvailableError,
and from base = get_url(self.tts.hass)

So, I have searched and searched online, source code… etc. for where does that tts come from.

And finally, I found the troubleshooting section in integrations/tts

did actually mentioned “Depending on your setup, you might need to set an external URL (external_url) inside the configuration.”
 

I have tried to add external_url to the configuration.yaml (in the front-end UI should also work), restart…
And bam! Piper is talking to me now. :heart_eyes_cat:


Thing is… I want everything to be local.

Which means, I do not want anyone knowing my actual domain for the Yellow (assume ha, esp32… will phone home :imp:)

I tried to put in different things as the external_url

and… final solution (for now), this is what I use for the external_url

external_url: "https://homeassistant.local:8123"

I basically reference the internal_url from the Setup basic information - Home Assistant tutorial

  • https is important
  • .local domain (ref.: https://en.wikipedia.org/wiki/.local)

This way will not cause the error (original post),
and also (in theory), even device know the external_url, it should just work locally.

 
P.S.:

  • ( I have only tested saying “testing” :stuck_out_tongue: )

  • TRY VOICE is working :white_check_mark:

  • my newly setup ATOM Echo is working :white_check_mark:
    (just a bit slow… but that should be something else)

  • Android app voice assistant is tested… working (both local network & external) :white_check_mark:

  • not sure what else to try for now… :question:

1 Like