How do I script sounds?

I’m trying to create an addon for Extra Customizable and I already got everything done except for scripting the sounds. Could anyone tell me how exactly I script sounds?