python pygame播放音频文件
pip install pygame
import pygame # Initialize pygame pygame.init() # Load the MP3 file pygame.mixer.music.load("1.mp3") # Play the MP3 file pygame.mixer.music.play() # Wait for the MP3 file to finish playing while pygame.mixer.music.get_busy(): pygame.time.Clock().tick(10) # Clean up pygame.quit()
########################
标签:python,mixer,音频文件,music,pygame,file From: https://www.cnblogs.com/herd/p/17255490.html