Answers for "play music in python and stop the program"

14

play music from python

from playsound import playsound
playsound('audio.mp3')
Posted by: Guest on May-06-2020
0

how to play and stop music python

import soundfile as sf
import sounddevice as sd

data, fs = sf.read(path, dtype='float32')  
sd.play(data, fs)
input("Write anything to stop.")
sd.stop()
Posted by: Guest on August-27-2021

Browse Popular Code Answers by Language