Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Play Mp3 Files With Python Using the pygame Package

# If you don’t have pygame package installed on your system,
# you can install it with the command.

"""
$ pip install pygame
"""

import pygame

pygame.mixer.init()
pygame.mixer.music.load('sample.mp3')
pygame.mixer.music.play()
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Play #Files #With #Python #Using #pygame #Package
ADD COMMENT
Topic
Name
5+7 =