-
-
Notifications
You must be signed in to change notification settings - Fork 52
Snapcast: TTS and local files do not play to the end #2690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you provide the exact steps in detail that you are using as it looks from the video that you are doing something unusual. I don't know why you are using Piper to generate the TTS and I don't know why it looks like you are sending to a voice satellite? Hard to tell what I am seeing in the video though. |
In the video, I go to the integration. Select a player then browse media. From there go to text to speech. Enter a message that will be about 5-6 seconds and play the message |
I cannot reproduce this. Please try with a different player and let us know how you go. |
Chromecast does operate properly. So just seems to be a Snapcast player issue. |
@SantiagoSotoC I wasn’t able to replicate this with my Snapcast setup. Any ideas? |
I didn't try it now, but I remember some of this but it was when tts support was added, I can add a little delay when a ttl is finished playing, so it doesn't change stream so fast. |
Buffer size didn't help. To be clear, it also does this playing local
files. Mp3 or wav. Not just tts. It seems to play either about 75% through,
then stop.
…On Wed, Jul 31, 2024, 3:24 PM Santiago Soto ***@***.***> wrote:
I didn't try it now, but I remember some of this but it was when tts
support was added, I can add a little delay when a ttl is finished playing,
so it doesn't change stream so fast.
@rich33584 <https://github.com/rich33584> you can try changing the buffer
size and see if that affects the duration of the tts
—
Reply to this email directly, view it on GitHub
<https://github.com/music-assistant/hass-music-assistant/issues/2690#issuecomment-2261264471>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARAMJAK56HOIT2CT24FGYHDZPE2V5AVCNFSM6AAAAABLRXTPY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGI3DINBXGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
But there was no change? Increasing does not worsen the problem ? |
No, The longer the file, the longer it plays. To about 75% completion. Maybe its reporting the caching of the file as finished playing? I dont know if I am explaining what I am thinking correctly...Maybe as the file is being transferred to the device its reporting the finished transfer as finished playing? This is nowhere near my area of expertise... |
Please explain exactly how you are playing the music files. Also detail how your HA and MA installation is setup as well as information about your network setup. No one else is reporting this problem. |
Home assistant is installed on a bare metal machine. No VM or docker or
anything. Network is just a standard wireless network.
I am running v28.0 of the Snapcast client on my Wyoming satellite.
Local files I usually play with the play media in Home assistant. TTS is
handled by Chime TTS.
…On Wed, Jul 31, 2024 at 8:38 PM OzGav ***@***.***> wrote:
Please explain exactly how you are playing the music files. Also detail
how your HA and MA installation is setup as well as information about your
network setup. No one else is reporting this problem.
—
Reply to this email directly, view it on GitHub
<https://github.com/music-assistant/hass-music-assistant/issues/2690#issuecomment-2261719309>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARAMJAO3FF2GOM7IOWDJ6VTZPF7RFAVCNFSM6AAAAABLRXTPY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRG4YTSMZQHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
OK there is no working solution for a combined voice satellite and media player to my knowledge |
Ok, Ill try and figure this out. It worked well for months, then all the
sudden started this.
Thanks!
…On Thu, Aug 1, 2024 at 7:49 PM OzGav ***@***.***> wrote:
OK there is no working solution for a combined voice satellite and media
player to my knowledge
—
Reply to this email directly, view it on GitHub
<https://github.com/music-assistant/hass-music-assistant/issues/2690#issuecomment-2264228402>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARAMJAJ7R5LBGB6CKDLSO2DZPLCSLAVCNFSM6AAAAABLRXTPY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRUGIZDQNBQGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ok we will close this. If you find more info to suggest something in MA is broken we can reopen |
Ok, thanks.
…On Fri, Aug 2, 2024, 6:40 PM OzGav ***@***.***> wrote:
Ok we will close this. If you find more info to suggest something in MA is
broken we can reopen
—
Reply to this email directly, view it on GitHub
<https://github.com/music-assistant/hass-music-assistant/issues/2690#issuecomment-2266224188>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARAMJAPH34I6JN3A4GUJ3K3ZPQDF5AVCNFSM6AAAAABLRXTPY6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRWGIZDIMJYHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This does happen, I just tried to use piper and google ttl from ma and it only reprocesses the beginning. |
Ok, I was about to install HA on a PI so I could test and see if there was something in my installation causing this. Ill hold off. |
Only with the ttl from ha, I didn't test a local file, but it should be the same. it's not a snapcast problem, it's most likely because of how we handle the pause. I assume that if ffmpeg ends snapcast ends, we would have to add a delay, at least for that kind of files |
Thanks for continuing to look into this. I greatly appreciate it. |
Well, @whc2001 you can test it now, the problem of short tts is still there but it is a very special use case, most probably it will be fixed, looking for the ideal value of the idle_threshold and updating the state with a callback as it was done before |
Got it, I just realized there is a mistake in the original code, fixing it right now |
@SantiagoSotoC Does this look good to you? Haven't tested it yet gonna do it later |
It lacks some things, if you want to do the pr and I finish it |
Great thanks! |
@SantiagoSotoC @whc2001 Can this be closed or are you waiting for it to get to stable? |
I don't seem to have the permission to close it |
I will close it if you tell me it is fixed! |
Ah got it, I think maybe wait until it's released and tested a bit? |
Beta 30 has been released. |
@rich33584 Are you able to check if this is fixed in the beta? |
The automations with TTS are working good. For some reason I cant get anything to work when choosing the player in the integration and going to Browse Media. It just instantly goes to Idle. |
The text is long ? short TTS are still a problem. |
After further testing, the clips need to be around 5-6 seconds long and they play fine. Shorter ones are still an issue as you said. |
I tested the latest EDIT: Tested with Snapclient WebUI and it does not work at all. Each time the source is switched the web client is stuck until refreshed. Something is definitely still problematic... f94b7c316a009f4c46a0fc48701c27ae.mp4 |
While I was doing some tweaks for TTS yesterday I could 100% reproduce this issue with snapcast players. |
I have added a note to the docs about short announcements |
About snapweb an issue has been opened in their repo, it may take a while to fix it. |
Adding a minimum time between creating a stream and destroying it does not solve the problem ? |
I didnt look further into it, I just notice dit while testing something else. |
@rich33584 2.3.0rc1 is released. Please test again |
Now even one letter should work |
Its working! |
Tested without any problem and seems like the delay after short announcement is partially mitigated. Thanks everyone! Looking forward for this to be released so I can finally uninstall the dev version |
What version of Music Assistant has the issue?
2.1.0
What version of the Home Assistant Integration have you got installed?
2024.6.2
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
TTS and local files stop early. They only play about 75% and then stop . Files less than about 4 seconds do play to the end.
How to reproduce
You can reproduce by going to the integration and selecting a player. Browse media, then either play a local file or choose text to speech. Type in a message or play a local file that will be at least 5-6 seconds. It will stop before the entire file/message has played.
Video showing tts:
https://youtube.com/shorts/rj-SRbg7wfc?feature=share
Music Providers
Local files/TTS
Radio does not stop.
Spotify plays tracks to the end.
Player Providers
Snapcast
I have not tried other players but will try a chromecast player later and report back.
Full log output
music-assistant.log
Additional information
No response
What version of Home Assistant Core are your running
2024.7.3
What type of installation are you running?
Home Assistant OS
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)
The text was updated successfully, but these errors were encountered: