TTS solutions for lesser common languages?

Has anyone figured out a good setup to use TTS with lesser common languages, for example ‘nl’ for Dutch is Dutch spoken in The Netherlands, not in Belgium. You can compare it to UK and US English.

I have yet to find a service (Google or other) that provides nl-BE or Flemish voices. It does exist in Waze for example.

This integration should do the trick for you. With a bit of luck you can use neural voice too, which sounds much more natural than default. I use it for Slovenian, which is also not a common language and it works great :).

I tried MS TTS but could not get it to work.
Could you paste your configuration and an example of a service call so I can use it as a reference?

Sure,
my config:

tts:
  - platform: microsoft
    api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    region: westeurope
    gender: Female
    language: sl-si
    type: PetraNeural

and service call from Developer tools to test it:

service: tts.microsoft_say
data:
  entity_id: media_player.googlenestmini
  message: This is a test message

You get API key from your Azure subscription and you have to choose appropriate streaming device from your lsit of available devices in HA (Google Nest mini in my case).

1 Like

Great, thanks for sharing, works fine with westeurope and nl-be using DenaNeural

Great, glad it worked.

To have even better voice quality, I also edited one of HA files:
/usr/src/homeassistant/homeassistant/components/microsoft/tts.py

I changed the
DEFAULT_OUTPUT = “audio-16khz-128kbitrate-mono-mp3”
to
DEFAULT_OUTPUT = “audio-48khz-192kbitrate-mono-mp3”
and the improvement is huge (at least to my ears) :slight_smile:

Unfortunately you have to do that after each HA update, as the update overwrites the files…

Have you made a pull request on Github to incorporate this change? Would be great for everyone if this was updated in the extension.

I tried (and also someone else did even before me), but we’ve been told, that the team no longer allows integrations to add or change a platform YAML configuration (see here and here). Refractoring the integration is out of my reach, unfortunately…

Is Azure subscription service free?

Well, yes and no :).
It’s pay as you go, so, certain rate is free, but if you exceed it, you have to pay for the extra usage. You need to register, provide your credit card etc, but as long as you don’t exceed the limit, you are not charged (still, you receive a bill for 0,00€ by email:) ).

1 Like

For regular daily use, I’ve never had to pay, I also never receive an invoice of 0 euro’s by the way.

1 Like

I’am now have azure subscription. Is there any good instruction how to obtain api key?