alexa_media_player: [Regression] TTS broken when using service tts.speak

Describe the bug

When using service tts.speak, Alexa responds with the following:

To send TTS, set public url in integration configuration.

I have removed and reconfigured my AMP integration and confirmed my public URL is in fact set.

To Reproduce

  1. Use a custom TTS provider, such as OpenAI TTS.
  2. Create a service call:
    service: tts.speak
    data:
      cache: true
      media_player_entity_id: media_player.sample_alexa_device
      message: This is a sample TTS voice.
    target:
      entity_id: tts.openai_alloy
    
  3. Call the service.
  4. Alexa says “To send TTS, …”

Expected behavior

Prior to the regression, the TTS audio would play correctly from the TTS service. It no longer does.

Screenshots

image

System details

  • Home-assistant (version): 2024.7.3
  • alexa_media (version from const.py or HA startup): 4.11.5
  • alexapy (version from pip show alexapy or HA startup): N/A - Default (Installed with HACS, not manually managed)
  • Amazon 2FA is enabled: Yes

Logs

Logger: custom_components.alexa_media.media_player
Source: custom_components/alexa_media/media_player.py:1423
integration: Alexa Media Player ([documentation](https://github.com/alandtse/alexa_media_player/wiki), [issues](https://github.com/alandtse/alexa_media_player/issues))
First occurred: July 27, 2024 at 4:17:57 PM (18 occurrences)
Last logged: 8:33:58 PM

To send TTS, set public url in integration configuration Please see the alexa_media wiki for details.https://github.com/alandtse/alexa_media_player/wiki/Configuration%3A-Notification-Component#use-the-notifyalexa_media-service

Additional context

This used to work recently (within 1 week ago), but I’m not sure when it broke - if it was an upgrade to the AMP component or to Home Assistant itself.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19

Commits related to this issue

Most upvoted comments

Here is a temporary work around until the fix is in:

# Edit custom_components/alexa_media/const.py make the following edit and restart home assistant

DEFAULT_PUBLIC_URL = "https://<your_url>/"

image

I noticed some updates from “public_url” to “hass_url” in #2319 , but it looks like not all logic was updated to read the new config option. I didn’t have time to dig deeper because I’m on a tight deadline for another project, so this might not be the full picture.

To send TTS, set public url in integration configuration

Let me re-examine this aspect of the integration. I may have inadvertently broken it 🥺

Am I the only one who still has this issue with 4.12.4?

After updating, you need to reconfigure the public URL in the Integration. A side effect of the bug is that it caused it to lose the previous setting. Integration --> Alexa Media Player --> Configure