1668A, 14th Main Rd, Sector 7, HSR Layout, Bengaluru, Karnataka 560102
+91 99459 30733 (9am - 6pm IST, Tuesday - Sunday)
1. How to play a song?
A. There are a few options available in Python to play song but the best is mixer that comes with Pygame.
from pygame import mixer
mixer.init()
mixer.music.load(current_song)
mixer.music.set_volume(current_volume)
mixer.music.play()
except Exception as e:
print(e)
2. How to choose song file from file system A. Use filedialog
from tkinter import filedialog
filename=filedialog.askopenfilename(initialdir="/Users/dhananjay",
title="Please select a song")