Skip to content

Okaneeee/soundPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soundPlayer

Custom module to play .wav file in python

✍️ Author:

📋 Table of contents:

  1. Modules/Libraries
  2. Developed
  3. How to use
  4. Copyrights

📚 Modules/Libraries:

  • threading for multi-threading
  • wave for parsing & opening WAVE file
  • pyaudio for PortAudio supports & audio streams

👨‍💻 Developed:

  • soundPlayer.py Main class to play .wav file
  • FileExtensionException Subclass in soundPlayer to handle extension errors

🌠 How to use:

Download requirements.txt
Install requirements: pip install -r requirements.txt

Download the file soundPlayer.py and put it in the directory where you want to use it

from soundPlayer import SoundPlayer

sound = 'path_to_wav_file'
player = SoundPlayer(sound)

# Play a sound:
player.play()

# Stop the sound being played
player.close()

©️ Copyrights:

All the musics used for testing were done by Kevin MacLeod and are under the Creative Commons licenses.

Check LICENSE.md

About

Custom module to play wav file in python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages