Page 1 of 1

reduce buffer / low-latency switch

Posted: Mon Sep 03, 2018 3:11 pm
by chopwood
Hi,
First of all, this is a great tool. Very nicely done!

The application I am trying to create is an Arduino driven doorbell / security system which uses my google home(s) as the chime (or speaks where the intrusion has been detected).

Using Cast, the quickest response I've achieved is around 5-6 seconds. That's using a locally stored mp3 file and specifying the IPs of the devices (which I'd rather not do in case they change).
The delay is more like 10 seconds if I use device /group names instead of IP.
For a short doorbell sound-byte, that's just too long.

Would it be possible to include a buffer size or low latency switch, for such circumstances where the quality and sync is far less critical than the latency?

No doubt easier said than done, but got to be worth asking the question.

Thanks!

Re: reduce buffer / low-latency switch

Posted: Mon Sep 03, 2018 8:11 pm
by jony
Seconded.

But I suspect this might be a Google Home issue that you can't do too much about [other than to submit as feedback to Google].

P.S. Thanks for the tip about the mp3 file. I hadn't considered casting a super-compressed pre-existing audio file to shave a few seconds off!

Edit: You don't have to use the IP address. You can use the device name with the flag -device [name of device]. Works great. (And if for some reason that doesn't work, you can hard-set your device to always grab the same IP address in your router config. That's what I did before I realized the -device flag existed. :)

Re: reduce buffer / low-latency switch

Posted: Mon Sep 03, 2018 10:05 pm
by RobLatour
Thanks for your kind words.

The quickest you can get is if you use a pre-recorded sound file and specify only one ip address.

Using the -device flag works around the issue that your device's ip address may change - in fact that's why it is there. However, it does mean that it will take longer as Cast will have to look up the device's ip address in real time.

A jony suggests, if your router supports fixing the ip address of your connected device then that is something you may want to look into.