home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.34k stars 29.88k forks source link

Azure (Microsoft) TTS Multilingual Voice Issue #105684

Closed v1k70rk4 closed 5 months ago

v1k70rk4 commented 9 months ago

The problem

Hello,

I have a problem where I use Microsoft TTS's multilingual voice for reading aloud so that one voice speaks in every language in the house. It generally recognizes what language it gets perfectly, but it struggles with shorter texts and numbers.

When using the tts service, there is the lang: hu-HU option, which works with Google, but with Azure (Microsoft) reader, it simply doesn't make a sound if I type it in.

The two voices that support multilingualism: en-US-JennyMultilingualV2Neural en-US-RyanMultilingualNeural

Supported languages: ar-EG, ar-SA, ca-ES, cs-CZ, da-DK, de-AT, de-CH, de-DE, en-AU, en-CA, en-GB, en-HK, en-IE, en-IN, en-US, es-ES, es-MX, fi-FI, fr-BE, fr-CA, fr-CH, fr-FR, hi-IN, hu-HU, id-ID, it-IT, ja-JP, ko-KR, nb-NO, nl-BE, nl-NL, pl-PL, pt-BR, pt-PT, ru-RU, sv-SE, th-TH, tr-TR, zh-CN, zh-HK, zh-TW

Description: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/speech-synthesis-markup-voice

What version of Home Assistant Core has the issue?

core-12.01

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

Failed to call tts.tts_multilang_jenny. Language 'hu-HU' not supported.

Example YAML snippet

- platform: microsoft
    service_name: tts_multilang_ryan
    api_key: <<<API_KEY>>>
    language: en-us
    gender: Male
    type: RyanMultilingualNeural
    region: northeurope

  - platform: microsoft
    service_name: tts_multilang_jenny
    api_key: <<<API_KEY>>>
    language: en-us
    gender: Female
    type: JennyMultilingualV2Neural
    region: northeurope

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 9 months ago

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)

v1k70rk4 commented 9 months ago

I just reviewed to see exactly how it works. Essentially, in multi-language mode, it expects an additional XML child in the SSML:

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xml:lang="en-US">
    <voice name="en-US-JennyMultilingualV2Neural">
        <lang xml:lang="de-DE">
            Wir freuen uns auf die Zusammenarbeit mit Ihnen!
        </lang>
    </voice>
</speak>

This lang XML child does not interfere with non-multilanguage languages, so no exception needs to be made. That is, if it is not specified, then the original language can be placed there, and if it is specified, for example, in the service, then it can be placed there.

Maybe I'm being inept, but I can't find the codes in the source. Where the bot directed me, I didn't find anything like this. Where can this be found?

Viktor

issue-triage-workflows[bot] commented 6 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.