📜  如何播放和停止音乐python代码示例

📅  最后修改于: 2022-03-11 14:46:48.597000             🧑  作者: Mango

代码示例1
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()