+ 6
How do i play a audio file in python?
13 Answers
+ 6
import winsound
winsound.PlaySound('sound.wav', winsound.SND_FILENAME)
https://stackoverflow.com/questions/307305/play-a-sound-with-JUMP_LINK__&&__python__&&__JUMP_LINK
+ 5
+ 4
I don't have any other things. Maybe you can find something here https://wiki.python.org/moin/Audio/
+ 3
Mert Yazıcı im not using linux, im using Windows
+ 3
Mert Yazıcı do you know of any cross platform friendly ways to do it?
and do i put the path in the SND_FILENAME area?
+ 3
pygame should do it
https://nerdparadise.com/programming/pygame/part3
+ 2
Mert Yazıcı i think that only works with python 2
+ 2
pygame works fine for just that !
+ 1
CodeIt in the example they use 'foo.mp3' would i put the path of the song in the quotes instead.
+ 1
yes, please replace that in sample to include both path and filename