Library for working with sound files of the format: MP3
, WAV
, OGG
,FLAC
, MIDI
.
pip install playsoundsimple.py
In order to play MIDI files you need to install FluidSynth:
- Windows: Releases
- Download a zip file suitable for your version of Windows.
- Unpack the archive anywhere, but it is recommended to put it in a folder
C:\Program Files\FluidSynth
- Next, open
Settings
>System
>About the system
>Additional system parameters
>Environment variables
>[Double click on Path]
>Create
>[Enter the full path to the folder with FluidSynth]
- That's it, FluidSynth is installed!
- Linux:
- Ubuntu/Debian:
sudo apt-get install fluidsynth
- Arch Linux:
sudo pacman -S fluidsynth
- Ubuntu/Debian:
- MacOS
import playsoundsimple as pss
s = pss.Sound("main.wav")
s.play()
s.wait()