kchang2 / soundboardapp

Soundboard App using Kivy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Soundboard app for Windows

Made with love from Kivy and Python.

Versions

Version 2.0.0

  • Early stage face recognition to suggest identity. OpenCV!
  • Fluid manual tab.
  • Dynamic tab structure for adding faces (not for board).

Version 1.0.0

  • Standalone App that's manual
  • Stable soundboard with fixed number of entries for a single tab.

Important Information

Structure

Training data is contained in the data/training/ folder. The structure comes from this specific approach"

  • Name_From_<songs.dat>
    • #.png
    • #.png
    • #.png
    • #.png ...

To Run (Use)

Click on the desired version under the Tags. A zip file containing all the necessary files should be in there, with the executable.

  1. Go into the dist folder
  2. Go into the run folder
  3. Look for the LADSoundboard Application (LADSoundboard.exe)
  4. Double click -- ready to go! Optional: Pin to taskbar or make shortcut, so you do not have to enter the folder each time. Optional: Put into Programs folder, as a real program.

To Build (Development)

Must have a working kivy version. I've managed to build the .spec by using the KivyInstaller.bat file in my Python27 folder. Note the spec file won't build properly off of Anaconda python because of gstream. It will compile fine, however running the program yields errors. The only external modules you will need to have are:

  • Kivy
  • Pandas
  • NumPy
  • OpenCV (cv2)

Simply run the following command in a folder that you desire the application to have:

python -m PyInstaller runApp.spec

This should create a build and dist folder for you, where the executable is in the dist folder. More information can be found: https://kivy.org/docs/guide/packaging-windows.html

Algorithm

I use an LBPH (local binary pattern histogram) algorithm, provided by OpenCV, to determine identifies and respective faces. For more information on local binary patterns, check out:

https://towardsdatascience.com/face-recognition-how-lbph-works-90ec258c3d6b

How to update the songs:

The songs get updated and referenced through songs.data. The data structure is used when generating the soundboard values and faces, but the music doesn't come from this table and respective URLs. Rather, this data structure is used to extract music from youtube through the extract_music.py file.

To update songs (and add or remove people), do the following:

  1. Fill in the songs.dat with your Name, groupid, YouTube URL, Start Time, and End Time
    • The name will be reflective on the soundboard, so I recommend you keep it short (like an office or team nickname)
    • The groupid pertains to which tab the row belongs to. In a future update, there will be capabilities for 2 groups, so this will apply there. For now, you should put down 1 to show up on the first group, and any number for otherwise (hidden).
    • YouTube URLs do not have to be the shortened version like I have put as example. It just seems easier to look that way.
    • Start time is not necessary -- default is 0:00. The structure is MM:SS. There is no HH, so pick a YouTube video < 60 min long.
    • End time is also not necessary -- default is 10 seconds after start time. The structure is MM:SS.
    • Combinations apply for start and end times (ie. start time of 1:23 with no end time is esssentially [1:23, 1:33].
  2. Run the extract_music.py file.

Now, you should expect to find songs appropriately named with the correct length / section in the audio folder.

Icon

To Vin Scully, the best announcer that ever lived. Live. Breathe. Blue.

About

Soundboard App using Kivy


Languages

Language:Python 82.0%Language:Jupyter Notebook 18.0%