Skip to content

python library which can play all kinds of audio using FFmpeg.

Notifications You must be signed in to change notification settings

yllgl/playaudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository forks simpleaudio. The original simpleaudio repository can only play .wav file, so I use ffmpeg that could play all kinds of audio files.

playaudio Package

The playaudio package provides cross-platform audio playback capability using ffmpeg for Python 3 on OSX, Windows, and Linux.

Installation

if you are on Ubuntu,first you should run this code in order to prevent compile errors.:

sudo apt-get install libasound2-dev

Download this repository and reach the directory, run

python setup.py build
python setup.py install

Important! Install FFmpeg

on Windows: download ffmpeg and add ffmpeg.exe path to environment variables.

on MacOS:

brew install ffmpeg

on Ubuntu:

sudo apt install ffmpeg

run this code to check if you have installed ffmpeg successfully.:

ffmpeg -version

Simple Example

import playaudio as sa

wave_obj = sa.WaveObject.from_wave_file("path/to/file.wav")
play_obj = wave_obj.play()
play_obj.wait_done()

Big Thanks To ...

Jonas Kalderstam

Christophe Gohlke

Tom Christie

Many others for their contributions, documentation, examples, and more.

About

python library which can play all kinds of audio using FFmpeg.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published