TTS update

Hello guys. TTS supported Portuguese Language? pt-PT female ? Or pt-br?
I have already instaled oxmplayer in my raspberry pi and i ear some mp3 through one speaker that is connected on my Rpi.

My question is if i can ear Portuguese voice on my rpi for omxplayer or if i have to install another thing.

It’s very strange because i run TTS with SSL and it works for me …
Have you test with base_url in http component ?

OK. This is really weird. IT IS NO LONGER WORKING.

This is what I have in http component…

http:
  api_password: !secret http_password
  base_url: 192.168.1.111:8123

I believe there is a note on last update for tts to not use a port in base_url …
Have you the last update for HA ?

I speak very bad …
I mean that the last update fix a bug where ha combined port and base_url (having a port declared).
With the last update it seems corrected.

erm… I don’t know why, but it seems to be working again after I remove base_url from the config. Will monitor for few more days keeping my finger cross.

@dennisaion, I believe it depends on your system. In mine, I am using Raspberry Pi 3 + Raspbian Lite and install it using sudo pip3 install homeassistant (not on virtual env).

Basically, this is what I did…

  1. Install VLC: sudo apt-get install vlc-nox

  2. Put this in your configuration.yaml

    media_player:
    platform: vlc
    name: VLC

    tts:
    platform: google
    cache: true
    cache_dir: /tmp/tts
    time_memory: 300

Then reboot your system: sudo reboot

To make use of it in your automation, put this under your action…

  action:
    - service: tts.google_say
      data:
        message: "Hello World"

If it is not working, make sure you are not using SSL and remove the base_url under the http component (for the time being).

I have the exact same setup as you. Configuration also the same.
Removing the base_url made it work over VLC finally. Thanks for that.

Only remaining problem is the mp3 files not playing over any of the other mediaplayers.

@dennisaion tts works with omxplayer?

Don’t know. I was actually referring to not being able in pushing the tts output to squeezeplayer or any connected wifi speaker.
Kodi and local VLC no problem.

omxplayer is not yet a media_player component in HA. So, TTS cannot be used on omxplayer.

@dennisaion, it seems not all media_player can be used for TTS. I am wondering is there any list of media players that is supported by TTS?

Here I was thinking MP3 could be pushed to any mediaplayer that can play it and is supported by HA.

@masterkenobi but i can for HA create automation, and HA plays mp3. i tested it and works.
anyway, can i hear de sound tts, when i have connected one speaker direclty on my RPI?

Yes. It is possible to play an MP3 file using omxplayer via command line. But not via TTS. I wished it can but it is not at the moment. Please correct me if I’m wrong.

@masterkenobi i am very close.

when i call TSS service command from component
{“message”:hello this is a test"} the mp3 “hello this is a test” is saved on my folder /home/ass/.homeassistant/tts

BUT

the name of this mp3 is like this: 70b105d66b68590a493232d276be03d6aa5ccb6d_google.mp3

if i create
shell_command:
play_sound: omxplayer /home/ass/.homeassistant/tts/70b105d66b68590a493232d276be03d6aa5ccb6d_google.mp3

and automation:

  • alias: teste
    trigger:
    platform: time
    after: ‘22:00:00’
    action:
    service: shell_command.play_sound

Works like a charm, perfect

BUTTTTTTT

if i erased mp3 file from folder TTS, and record new mp3 the name is OTHER… and doesn´t work, because i need a specific NAME.mp3

how can solve that?

ok i solved with new line on shell_command:
renamegooglemp3: mv /home/hass/.homeassistant/tts/. /home/hass/.homeassistant/tts/teste.mp3

now i only need : always that mp3 file is created, after plays… need to erase file…

ok solved again with new line on shell command:
removemp3file: rm /home/hass/.homeassistant/tts/teste.mp3

next step is how record file for says temperature i make this Test:

{“message”:“hello the temperature is: {{ states.sensor.dark_sky_temperature.state}}”}

but i ear "hello the temperature is bla bla bla states,sensor bla bla…
and not
the temperature is 10 degress

any solution?

erm… why not just install VLC and use it? So much simpler.

did you try this:

base_url: xxx.duckdns.org:8123

But with vlc its possible ear on my speaker that is connected directly on my rpi?

Yes correct