This project is a FastAPI-based backend that analyzes 5–10 audio files to extract speech features and calculate a cognitive risk score. It supports file uploads, processes audio using custom utilities, and returns results via a REST API.
This API processes uploaded audio files, extracts key speech features (MFCC, ZCR, RMS), and calculates a cognitive risk score. The application is built using FastAPI and deployed on Render.
- Python 3.7 or higher
- pip (Python package installer)
- system dependencies like
ffmpegfor audio processing
-
Clone the repository:
git clone https://github.com/your-username/Audio_Analysis-API.git cd Audio_Analysis-API -
Create a virtual environment:
python -m venv venv source venv/bin/activate # For Linux/MacOS venv\Scripts\activate # For Windows
-
Install dependencies:
pip install -r requirements.txt
-
Install system dependencies (for audio processing):
- If you're using
librosafor audio processing, you may needffmpegorlibsndfile. You can installffmpegwith:sudo apt-get install ffmpeg # For Ubuntu brew install ffmpeg # For MacOS
- If you're using
To run the FastAPI server locally, use the following command:
uvicorn app.main:app --reload