Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to perform the action tts.speak. Language 'en' not supported #134067

Open
felipecrs opened this issue Dec 27, 2024 · 1 comment
Open

Failed to perform the action tts.speak. Language 'en' not supported #134067

felipecrs opened this issue Dec 27, 2024 · 1 comment

Comments

@felipecrs
Copy link
Contributor

The problem

I am having a really hard time trying to convert TTS notify actions from the (deprecated?) say to tts.speak.

I simply cannot make it pronounce in my language.

image

Tried several TTS providers. ElevenLabs, Microsoft, Google Cloud. Language is not accepted, no matter what.

What version of Home Assistant Core has the issue?

core-2024.12.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tts

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tts/

Diagnostics information

Impossible to get this information.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:315
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:36:57 PM (11 occurrences)
Last logged: 10:40:01 PM

[140420564782096] Error handling message: Language 'pt' not supported (home_assistant_error) Felipe Santos from 192.168.1.15 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36)
[140420564782096] Error handling message: Language 'pt_BR' not supported (home_assistant_error) Felipe Santos from 192.168.1.15 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36)
[140420564782096] Error handling message: Language 'pt_br' not supported (home_assistant_error) Felipe Santos from 192.168.1.15 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36)
[140420564782096] Error handling message: Language 'br' not supported (home_assistant_error) Felipe Santos from 192.168.1.15 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36)
[140420564782096] Error handling message: Language 'en' not supported (home_assistant_error) Felipe Santos from 192.168.1.15 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36)

Logger: homeassistant.helpers.script.websocket_api_script
Source: helpers/script.py:2032
First occurred: 10:36:57 PM (11 occurrences)
Last logged: 10:40:01 PM

websocket_api script: Error executing script. Error for call_service at pos 1: Language 'pt' not supported
websocket_api script: Error executing script. Error for call_service at pos 1: Language 'pt_BR' not supported
websocket_api script: Error executing script. Error for call_service at pos 1: Language 'pt_br' not supported
websocket_api script: Error executing script. Error for call_service at pos 1: Language 'br' not supported
websocket_api script: Error executing script. Error for call_service at pos 1: Language 'en' not supported

2024-12-26 22:32:43.364 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall tts.speak (c:01JG2VX4Z32NYH7D7C6YE9VCJN): message=teste, entity_id=['tts.microsoft'], media_player_entity_id=['media_player.assistente_do_escritorio'], language=pt, cache=True>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 2822, in _run_service_call_catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
        hass, entity, func, data, call.context
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 467, in async_speak
    ATTR_MEDIA_CONTENT_ID: generate_media_source_id(
                           ~~~~~~~~~~~~~~~~~~~~~~~~^
        self.hass,
        ^^^^^^^^^^
    ...<4 lines>...
        cache=cache,
        ^^^^^^^^^^^^
    ),
    ^
  File "/usr/src/homeassistant/homeassistant/components/tts/media_source.py", line 53, in generate_media_source_id
    hass.data[DATA_TTS_MANAGER].process_options(engine_instance, language, options)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tts/__init__.py", line 608, in process_options
    raise HomeAssistantError(f"Language '{language}' not supported")
homeassistant.exceptions.HomeAssistantError: Language 'pt' not supported

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (tts) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of tts can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign tts Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tts documentation
tts source
(message by IssueLinks)

@felipecrs felipecrs changed the title Failed to perform the action tts.speak. Language 'whatever' not supported Failed to perform the action tts.speak. Language 'en' not supported Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant