My pc as media player

Hello,
I want to no if I can use my pc as a media player, from home assistant point of view.
I would like to be able to play mp3 file from home assistant.
My home assistant is on docker ubuntu and my pc is on Window.
Many thanks for your help !!
best regards
Thierry

1 Like

Maybe something like this?


I have not tried but am interested.
1 Like

Many thanks for your reply,
but in finality I would like to be able to play with text to speech.
What kind of windows software I can install on the pc to play with tts (text to speech)
Many thanks !
Best regards
Thierry

TTS is separate home assistant integration that will play through any configured media player.

thanks for your reply,
I have one Windows Pc and one linux machine (hass.io on docker)
What kind of software I can install in the pc to be a media player from point of view of home assistant ?

Best regards

As long as you have home assistant open in a web browser on the device you could use this:

Do we need to say it louder? music player daemon. https://www.musicpd.org/doc/html/user.html#compiling-for-windows

TTS typically returns an mp3 ( in my experience) therefor any media player daemon will work, such asā€¦MPD.

Other than Music Player Daemon, are there any other that will run on a PC? MPD is not really that straight forward on Windows. E.g. Getting errors about ā€˜wildmidiā€™ is unavailable. Trying to get TTS working on a regular PC speaker as Iā€™m not liking the fact I cannot disable the Playback Sounds on my Google Home/Mini like I can on my Chromecast Audio. Super annoying!

Have you considered this?

I did see this in earlier in the thread, but was looking for something that ran more like a service and didnā€™t rely on the browser running on that PC all the time.

Are you looking for full media player services or just for tts? Thinking of building a small python program to play a url via mqtt.

In my case, just for TTS notifications.

I am working on a python program that uses vlc for audio, It runs on a windows system and perform this function (along with others).
I currently have it supporting the following MQTT messages (currently). Would you be willing to test it?

    Examples
    {"command": "pause"}
    {"command": "stop"}
    {"command": "play"}
    ("volume": 100}
    {"play":"http://192.168.0.250:8123/local/mp3/horn.mp3"}
    {"tts": "The quick Brown Fox Jumped Over the Lazy Dog"}

image

Sure thing, Iā€™m willing to test. Iā€™m assuming Iā€™ll be able to just run VLC as a service as in the link below?

https://wiki.videolan.org/Windows_service/

@Sireone (and any other brave souls).
I have created a build for my windows pc based notification app (HApyAudio).
Program is capable of running in the system tray (not really a service so use the windows startup apps)
This is built in Python and all the code is available for review here [be kind ;-)]

  1. Make sure you have VLC installed (I am using 3.0.11).
  2. Make sure you have an MQTT broker available.
  3. Extract the Release Zip file to a suitable location.
  4. Edit the settings.json file and update with your Broker.
  5. Run the program and your MQTT control topic to be shown in the gui window.
  6. Send some sample MQTT messages and see how it goes.
    Feedback and Ideas are welcome.
    Good Luck!

jumps, not jumped (otherwise there is no ā€œsā€)

LOL, I will open an issue. :rofl:

So I got the program running and pointed it to my Home Assistant MQTT broker, with VLC installed (v. 3.0.16) It does show Published!, Connected! & Subscribed! with my topic MERCURY/HApyAudio/control.

I tried to publish a packet in HA with the topic name above and {ā€œttsā€: ā€œThe quick Brown Fox Jumped Over the Lazy Dogā€}, but I hear nothing. I also tried playing the mp3 file, nothing. Jumped over to Node-Red, setup an mqtt out node with an Inject node which included the msg.payload (json/string) {ā€œttsā€: ā€œThe quick Brown Fox Jumped Over the Lazy Dogā€} and msg.topic (string) MERCURY/HApyAudio/control. Added a debug node which showed the results, but no sound.

Is there any VLC configuration needed? What am I missing?

Try issuing a volume command. {ā€œvolumeā€: 80} then try the tts again.