Probally looking at a Pi and then analogue audio into the line in.
If you tell us what you are trying to achieve with making it wifi enabled we might be able to offer a better solution.
What is Chromecast Audio?
Chromecast Audio is a small media streaming device that plugs into the AUX input of your speaker, making your speaker Wi-Fi enabled.
Once set up, simply use your iPhone®, iPad®, Android phone or tablet, Mac or Windows laptop, or Chromebook to cast your favourite tunes to the best speakers in the house.
Supports rca, 3.5mm and optical according to the blurb

What is Chromecast Audio?
Chromecast Audio is a small media streaming device that plugs into the AUX input of your speaker, making your speaker Wi-Fi enabled.
Once set up, simply use your iPhone®, iPad®, Android phone or tablet, Mac or Windows laptop, or Chromebook to cast your favourite tunes to the best speakers in the house.
Supports rca, 3.5mm and optical according to the blurb

What is Chromecast Audio?
Chromecast Audio is a small media streaming device that plugs into the AUX input of your speaker, making your speaker Wi-Fi enabled.
Once set up, simply use your iPhone®, iPad®, Android phone or tablet, Mac or Windows laptop, or Chromebook to cast your favourite tunes to the best speakers in the house.
Supports rca, 3.5mm and optical according to the blurb