How do play audio (playsound) in background of Python script?

前端 未结 6 799
慢半拍i
慢半拍i 2020-12-03 09:36

I am just writing a small python game for fun and I have a function that does the beginning narrative.

I am trying to get the audio to play in the background but unf

6条回答
  •  误落风尘
    2020-12-03 09:49

    from pygame import mixer
    
    mixer.music.init()
    mixer.music.load("audio.mp3") # Paste The audio file location 
    mixer.play() 
    

提交回复
热议问题