# play mp3
def play_mp3():
pygame.mixer.init()
pygame.mixer.music.load('/home/pi/test.mp3')
if pygame.mixer.music.get_busy()==False:
pygame.mixer.music.play()
time.sleep(10) #停止播放
pygame.mixer.music.stop()
树莓派播放mp3
猜你喜欢
转载自blog.csdn.net/qq_44391957/article/details/88866976
今日推荐
周排行