app.py:
The main entry point of the application, handles the routing and runs the Flask server. It sets up the / route to serve the front-end interface and /process to handle the speech recognition and classification requests.
detector.py:
This file contains the SpeechAbuseDetector class, which encapsulates the logic for:
SpeechRecognition library.templates/index.html:
The HTML template for rendering the user interface. The user interacts with the app by clicking a button to start recording their voice.
static/script.js:
JavaScript logic to make a POST request to the server when the user clicks the button, sending the speech recognition result to the backend for classification.
Before running the project, ensure you have the following dependencies installed:
pip install flask speechrecognition transformers torch
pip install flask speechrecognition transformers torch
Navigate to the project directory in your terminal.
Start the Flask application by running the following command:
python app.py
3.Open your browser and go to: http://127.0.0.1:5000/
11 commits
Python
73.1%
HTML
14.9%
JavaScript
12.0%
app.py:
The main entry point of the application, handles the routing and runs the Flask server. It sets up the / route to serve the front-end interface and /process to handle the speech recognition and classification requests.
detector.py:
This file contains the SpeechAbuseDetector class, which encapsulates the logic for:
SpeechRecognition library.templates/index.html:
The HTML template for rendering the user interface. The user interacts with the app by clicking a button to start recording their voice.
static/script.js:
JavaScript logic to make a POST request to the server when the user clicks the button, sending the speech recognition result to the backend for classification.
Before running the project, ensure you have the following dependencies installed:
pip install flask speechrecognition transformers torch
pip install flask speechrecognition transformers torch
Navigate to the project directory in your terminal.
Start the Flask application by running the following command:
python app.py
3.Open your browser and go to: http://127.0.0.1:5000/
11 commits
Python
73.1%
HTML
14.9%
JavaScript
12.0%