Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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()
 
PREVIOUS NEXT
Tagged: #play #stop #music #python
ADD COMMENT
Topic
Name
9+8 =