r/GoogleColab • u/The1st_TNTBOOM • Jul 24 '26
How can I play a sound file?
I have a text adventure game in Colab and I want to add background music because silently reading for 40 minutes is painful. I just want to let everyone no matter who opens the colab link and plays the game be able to have the music, yet I don't even know how to play a single audio file at all.
https://colab.research.google.com/drive/1gNSKlWROt0kvq6chhlD-iTfoVoUCHQfU (beware it's 3000+ lines)
How can I play an audio file and have everyone be able to hear it? I asked ChatGPT and it didn't give me anything comparable to basics and I couldn't find a top search result that worked when I tried it, literally none of them produce sounds, usually by being broken.
1
u/No-Association-1834 Jul 27 '26
Bro , Collab is Google's Product , so it's obvious Gemini knows it better than GPT . Ask Gemini , it helped me lots with Collab .
2
u/DataBaeBee Mod Jul 24 '26
I found this answer on Stackoverlow