When I run the second play_media… it doesn’t play (with enqueue: next). If I try to just play it (enqueue: play)… it plays over the top of the previous one. I’ve put delays in between as well.
Anyone know the secret to playing audio files to media players in sequence?
I might try that. When I’ve tried to play files in sequence, music assistant does not play the file I have specified… instead it finds a podcast it thinks I want to play and plays that instead.
This is something I have really struggled with for a while now. Tried all sorts of things, including wait conditions (for the player to go idle), enqueue options, delays but nothing really seems to work. But I’ll give this a try.
I see there are two options within music assistant:
The problem I have found with creating a playlist in music assistant is there does not seem to be a way to play files in sequence, ie the order they should be played. There only seem to options to sort the items within the playlist by artist, album etc. Though there is a sort by position. Perhaps that relates to the order in which the files are added to the playlist.
I think this may be the go. Seems pretty obvious now you’ve mentioned it. One draw back is that there seems no way to re-order the tracks once they are in there. But for my purposes this looks very promising.
Thanks for taking the time to explain the ‘bleedin obvious’ to me . Been very useful.
Not sure that works… think it only affects the displayed sort order rather than the play order. I’ve found I need place them into the list in sequence.
What i am trying to do is something like:
Play an intro music clip / jingle,
Run a TTS announcement with the weather details and forecast,
Run an mp3 file containing the latest news bulletin that has been downloaded, and then,
Go to a radio stream.
One after the other in sequence, without one over playing the audio clip(s) earlier in the sequence. Thought the enqueue in the play media action would help with that.
Got 1 & 2 working through chimeTTS, 3 & 4 remain challenging. I want the TTS to end before it goes onto playing the news clip and then the radio stream. Tried using the wait function (for the media player to go to idle before progressing to playing the news.mp3 file.
Thought about generating an mp3 file from 1 & 2 through chimeTTS say_url, renaming that in an automation (through a shell command) and putting that in a playlist. Problem is that chimeTTS outputs the file but does not return its name so that it could be renamed. Was going to try to add the stream to the playlist I created but the radio station I want is not in the browse / radio browser in Music Assistant, even though I have added it to the Radio section and can be found in the Home Assistant Radio Browser (probably explains why it can’t be played through a music assistant play media action).