Giter VIP home page Giter VIP logo

py-stress-detector's Introduction

Stress Detector

CircleCI

Install dependencies

If you are using Ubuntu, you will need to install the following packages: python3-pip libfreetype6-dev libfreetype6 libpng-dev pkg-config To do that, run: "sudo apt-get install -y python3-pip libfreetype6-dev libfreetype6 libpng-dev curl pkg-config"

If you are using MacOS, install brew and then run the following commands: "brew install freetype; brew install pkg-config; brew install libpng"

Using Python 3, run "pip3 -r requirements.txt --user" without the quotes

If you're using a Mac with Apple Silicon, you might need to install a nightly build of scipy

"pip3 install --pre -i https://pypi.anaconda.org/scipy-wheels-nightly/simple scipy"

Run tests

To run unit and functional tests, just run "pytest".

WebService

To run it just go to the folder and type "export FLASK_APP=StressDetectorWS.py; python3 -m flask run" without the quotes It will run as a http service listening to port 5000

If you prefer to run it using docker, here is how:

Build docker image: "docker build -t py-stress-detector:latest ."

Run using docker: "docker run -t -p 5000:5000 -d py-stress-detector:latest"

Check if container is running: "docker ps"

Kill (all) docker images: "docker kill $(docker ps -q)"

To send a test request just run "curl -F "file=@rain_man_driver_8000.wav" http://localhost:5000/api/isunderstress"

Desktop

To run it just go to the folder and type "python3 StressDetectorDesktop.py -i inputfile" without the quotes It will verify stress level for the input file passed by argument.

If you want to run it inside the docker container, just run: "docker exec -it containerIdOrName bash" then Run it as it was in your local machine... python3 StressDetectorDesktop.py...

Tested only with 8000KHz sample rate WAV files

py-stress-detector's People

Contributors

maxmousee avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

py-stress-detector's Issues

Proper WAV file API support

Support for receiving WAV files via POST API instead of the current JSON hack.
Using post to send a 8KHz Sample RATE file of 1 second length and go from there.

Refactor WebService

Web Service API could be cleaner and some of the code still can be moved to utils.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.