Pi. I didn’t install HA in virtual environment.
you need to verify if your username which runs hass have rights to play mp3 on vlc.
My problem was here…
another tips
for TTS you need to add your domain
http: base_url: yourdomain.duckdns.org
because i see your request is on your local ip…
I don’t expose my HA to the internet. I use VPN. So can I use my local IP as base_url?
If my hass is running on username: pi, how do I make sure VLC can play the mp3?
you need to use your domain refrenced in your certificate.
to test vlc with mp3 with pi user
go to terminal as pi and execute vlc name.mp3
I don’t have a certificate and also use pi like masterkenobi. can’t play the mp3 file via HA either.
I have put this in my config…
tts:
platform: google
cache: true
cache_dir: /tmp/tts
time_memory: 300
When I trigger the automation, nothing happen but I can see there is a MP3 file in /tmp/tts
.
Then I SSH into the HA using user pi and then I execute this…
vlc /tmp/tts/a23541254d993bf7cf67d3f69acd57e31462989f_google.mp3
It plays nicely on the speaker.
Am I right to say there is nothing wrong with the Google TTS since it managed to generate the MP3 file?
and the permission is fine too since I can execute the command in SSH under pi user?
Then what is possibly wrong?
The attributes for the media_player.vlc is this…
volume_level: 1
friendly_name: VLC
supported_media_commands: 525
media_duration: 0
is_volume_muted: false
media_position: 0
media_content_type: music
media_position_updated_at: 2016-12-22T08:08:10.513274+00:00
Is volume_level a problem?
I am not sure do these errors in my putty means anything…
I am using a self-signed certificate. Is that the cause of the issue? Maybe I will try without SSL later.
Guess what? It works after I stop using Self-signed Certificate for SSL. Now that I have narrowed the issue to this, the question is how do I make it works with self-signed cert? or do I have to stop using self-signed cert forever?
Could you do a write up how you got it to work from A-Z?
For me the user is also pi and added both pi and root to the groups per instruction but to no avail.
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…
-
Install VLC:
sudo apt-get install vlc-nox
-
Put this in your configuration.yaml
media_player:
platform: vlc
name: VLCtts:
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.
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.