A lightweight voice analysis service that extracts features, transcribes audio, scores responses, and returns insight metrics for interview-style audio recordings.
app/— FastAPI application entry and API routes (app/main.py).app/api/routes/analyze.py— primary analysis endpoint (app/api/routes/analyze.py).services/— domain services (transcription, scoring, sentiment, features).schemas/— request/response Pydantic schemas.
- Upload audio files and receive transcription, sentiment, scoring, and insights.
- Modular services so you can swap models or feature extractors.
- Docker-ready for easy deployment.
- Python 3.10+ (recommended)
- See
requirements.txtfor full dependency list.
- Create and activate a virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1- Install dependencies:
pip install -r requirements.txt- Run the app (development):
uvicorn app.main:app --reload --port 10000The API will be available at http://localhost:10000. Automatic API docs (Swagger UI) live at http://localhost:10000/docs.
POST /api/analyze
- Description: Analyze an uploaded audio file and return transcription, sentiment, scores, and insights.
- Endpoint implementation: app/api/routes/analyze.py
- Request:
multipart/form-datawithfile(audio file, e.g., WAV/MP3) and optional JSON fields specified in schemas/request_schema.py. - Response: JSON described by schemas/response_schema.py.
POST /api/v1/analyze- unified speech intelligence dashboard.POST /api/v1/communication/analyze- communication-focused analysis.POST /api/v1/emotion/timeline- emotion timeline analysis.WS /ws/emotion-stream- live emotion stream for PCM audio chunks.
The React frontend expects the service to be reachable at http://localhost:10000 by default. Override that with VITE_AUDIO_MODEL_URL in the frontend environment if needed.
curl -X POST "http://localhost:10000/api/v1/analyze" \
-F "file=@/path/to/answer.wav" \
-H "accept: application/json"- Build image locally:
docker build -t voice-analyzer:local .- Run with docker-compose:
docker-compose up --build- Core configuration is in core/config.py.
- Services live under
services/(e.g.,services/transcription_service.py,services/scoring_service.py). - Add or replace ML models in the services directory; keep interfaces consistent.
- Open issues or PRs. Follow typical Python project conventions.
- Add your license of choice here.
- Tell me if you want a longer README, badges, or CI instructions.