{"id":27884579,"url":"https://github.com/axlerquiza/mental-state-recognizer","last_synced_at":"2025-05-05T06:38:04.527Z","repository":{"id":276268324,"uuid":"927623968","full_name":"axlerquiza/mental-state-recognizer","owner":"axlerquiza","description":"A web-based/gui-based mental state recognizer that analyzes audio recordings and predicts the user's mental state using ML models trained on speech features like MFCC.","archived":false,"fork":false,"pushed_at":"2025-02-07T07:54:04.000Z","size":626,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T08:26:58.667Z","etag":null,"topics":["audio-processing","deep-learning","machine-learning","mental-health","python","speech-analysis"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axlerquiza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T09:12:47.000Z","updated_at":"2025-02-07T07:41:38.000Z","dependencies_parsed_at":"2025-02-07T08:37:26.030Z","dependency_job_id":null,"html_url":"https://github.com/axlerquiza/mental-state-recognizer","commit_stats":null,"previous_names":["axlerquiza/mental-state-recognizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axlerquiza%2Fmental-state-recognizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axlerquiza%2Fmental-state-recognizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axlerquiza%2Fmental-state-recognizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axlerquiza%2Fmental-state-recognizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axlerquiza","download_url":"https://codeload.github.com/axlerquiza/mental-state-recognizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252454942,"owners_count":21750508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-processing","deep-learning","machine-learning","mental-health","python","speech-analysis"],"created_at":"2025-05-05T06:38:04.066Z","updated_at":"2025-05-05T06:38:04.519Z","avatar_url":"https://github.com/axlerquiza.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Mental State Recognizer\n\nThis project predicts a person's mental state based on their speech using a deep learning model. It utilizes a hybrid model combining **BiLSTM** and **CNN** to analyze features extracted from audio files. You can read more about the published paper [here](https://ieeexplore.ieee.org/document/10690712).\n\n## Technologies Used\n\n- **Python**: Primary language for development\n- **Flask**: For backend and serving the model\n- **TensorFlow**: For model building and inference\n- **librosa**: For audio processing (MFCC extraction)\n- **NumPy, SciPy**: For mathematical operations\n- **scikit-learn**: For evaluation and metrics\n\n## Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/axlerquiza/mental-state-recognizer.git\n   cd mental-state-recognizer\n   ```\n\n2. **Set up a virtual environment** (optional but recommended):\n   ```bash\n   python -m venv venv\n   source venv/bin/activate  # For Windows, use `venv\\Scripts\\activate`\n   ```\n\n3. **Install the required dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Run the Flask server**:\n   ```bash\n   python server.py\n   ```\n\n5. Open your browser and navigate to `http://127.0.0.1:5000/` to start using the web interface.\n\n## Project Structure\n\nThe project follows this directory structure:\n\n```\n/mental-state-recognizer\n├── /assets\n│   ├── /scripts            # JavaScript functionalities\n│   │   ├── app.js\n│   ├── /styles\n│   │   ├── style.css       # CSS styling\n├── /models                 # Folder containing the trained models\n├── /mfcc_images            # Folder for storing MFCC images (generated from audio)\n├── /preprocessed_audio     # Folder with sample preprocessed audio files\n│   ├── 308_AUDIO_processed.wav  # Level 4 example\n│   ├── 346_AUDIO_processed.wav  # Level 1 example\n├── /uploads                # Folder for storing uploaded audio files\n├── index.html              # Main HTML file for the web interface\n├── server.py               # Flask backend server script\n└── requirements.txt        # List of dependencies\n```\n\n## Usage\n\n1. **Upload an audio file** (preferably a 10-second speech recording) via the web interface (`index.html`).\n2. The backend processes the audio file, extracting MFCC features and passing them through the trained model.\n3. The model predicts the mental state, and the result is displayed on the webpage.\n\n## Example\n\n1. Click the \"Upload Audio\" button on the web interface.\n2. Choose a 10-second audio file (preferably a speech recording).\n3. Wait for the model to process the file and display the predicted mental state.\n\n### Sample Audio Files\n\nThe `/preprocessed_audio` directory contains sample audio files:\n\n- `308_AUDIO_processed.wav`: A **Level 4** example (indicating a specific mental state).\n- `346_AUDIO_processed.wav`: A **Level 1** example (indicating a different mental state).\n\nThese files can be used for testing the system or understanding different levels of mental states.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxlerquiza%2Fmental-state-recognizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxlerquiza%2Fmental-state-recognizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxlerquiza%2Fmental-state-recognizer/lists"}