Expected Chromecast Audio Delay?

Viewed 664

My 10 year old and I are implementing a project which calls for audio to be played by a Chromecast Audio after a physical button is pressed.

She is using python and pychromecast to connect up to a chromecast audio.

The audio files are 50k mp3 files and hosted over wifi on the same raspberry pi running the button tools. They are hosted using nginx.

Delay from firing the play_media function in pychromecast to audio coming out of the chromecast is at times in excess of 3 seconds, and never less than 1.5 seconds. This seems, anecdotally, to be much slower than casting from spotify or pandora. And, it's definitely too slow to make pushing the button 'fun'.

File access times can matter on the pi, but reading the entire file using something like md5sum takes less than .02 seconds, so we are not dealing with filesystem lag.

Average file download times for the mp3 files from the pi is 80-100ms over wifi, so this is not the source of the latency.

Can anyone tell me

  1. What the expected delay is for the chromecast audio to play a short file
  2. If pychromecast is particularly inefficient here, and if so, any suggestions for go, python or lisp-based libraries that could be used.
  3. Any other tips for minimizing latency? We have already downconverted from wav files thinking raw http speed could be an issue.

Thanks in advance!

1 Answers
Related