How to create simple music player using python | Playsound

preview_player
Показать описание
In this video ,I am going to show how can we create a python program to play audio file using Python. .mp3, .wav extension.

👉Project description
Pure Python, cross platform, single function module with no dependencies for playing sounds.

Installation
Install via pip:

pip install playsound

Step 1. Open CMD
than type command " pip install playsound "

Step 2. Open your editor and then type the code given below:-

from playsound import playsound

👉Documentation
The playsound module contains only one thing - the function (also named) playsound.

It requires one argument - the path to the file with the sound you’d like to play. This may be a local file, or a URL.

There’s an optional second argument, block, which is set to True by default. Setting it to False makes the function run asynchronously.

On OS X, uses AppKit.NSSound. WAVE and MP3 have been tested and are known to work. In general, anything QuickTime can play, playsound should be able to play, for OS X.

On Linux, uses GStreamer. Known to work on Ubuntu 14.04 and ElementaryOS Loki. Support for the block argument is currently not implemented.

👉Requirements
it should work on Windows XP thru 10 at least, OS X 10.5 and newer, all versions of Linux, and Python 2.3 and newer.
Рекомендации по теме
Комментарии
Автор

One more request, please made such a program in which we can change song according to our choice🙏🙏🙏

codewithvirus
Автор

Thanks bro For such a awesome video 😍😍😍

codewithvirus
visit shbcf.ru