Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.44 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.44 KB

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