Skip to content

aTrapDeer/Detect-BPM-Python-Streamlit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python BPM Detection System

Streamlit App - Easy Deployment

  • Deploy this to your own AWS account to use it as a Streamlit app. *

Requirements

  • Python 3.x
  • Streamlit
  • boto3
  • numpy
  • scipy
  • librosa
  • pywt
  • wave
  • array
  • math
  • tempfile

Setup

  1. Create a new AWS account if you don't already have one.
  2. Create a new S3 bucket in the same region as your AWS account.
  3. Create a new IAM user with programmatic access and attach the following policy to it:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::YOUR_BUCKET_NAME",
                "arn:aws:s3:::YOUR_BUCKET_NAME/*"
            ]
        }
    ]
}
  1. Replace the placeholders in the .env file with your AWS credentials and S3 bucket name.
  2. Run the app locally by running the following command in your terminal:
streamlit run app.py
  1. Deploy the app to your AWS account by running the following command in your terminal:
streamlit run app.py --server.port 8080 --server.address 127.0.0.1 --server.headless true
  1. Open your browser and navigate to http://127.0.0.1:8080 to access the app.

Usage

  1. Upload an audio file (MP3, FLAC, or WAV) to detect its BPM.
  2. The app will upload the file to your S3 bucket and run the detection algorithm on it.
  3. The app will display the detected BPM and provide a link to the file in your S3 bucket.
  4. You can also download the file from your S3 bucket by clicking on the link.
  5. Train your own model for BPM detection using Pytorch CUDA and Librosa

Limitations

  • The app is designed to work with audio files that are less than 100 MB in size.
  • The app is designed to work with MP3, FLAC, and WAV audio files.
  • BPM detection for audio files that are longer (greater than 30 seconds) may take a long time

Future Improvements

  • Improving the model on a larger dataset
  • Create a more user-friendly interface for the app.
  • Add more audio file formats to the app.
  • Improve detection algorithms to the app.
  • Add more features to the app.
  • Add more error handling to the app.
  • Add more documentation to the app.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages