An advanced AI-powered speech analysis system that delivers real-time personality insights and communication feedback using NVIDIA NIM, RAG (Retrieval-Augmented Generation), and a multi-agent AI architecture.
- Overview
- Features
- Architecture
- System Requirements
- Quick Start
- Installation
- Usage
- Project Structure
- API Documentation
- Configuration
- Development
- Testing & Evaluation
- Troubleshooting
- Contributing
- License
TEAM-5 is a full-stack speech analysis pipeline that combines:
- π€ Faster-Whisper for high-accuracy speech-to-text
- π¬ Acoustic feature extraction (pitch, energy, pauses, speech rate)
- π€ Multi-agent AI system powered by NVIDIA NIM (meta/llama-3.1-70b-instruct)
- π RAG with ChromaDB for knowledge-augmented personality insights
- π‘οΈ Guardrails AI for input/output safety validation
- π LangChain Evaluators for quality assurance
Users can upload audio (any common format: WAV, WebM, MP3, OGG) via the React + TypeScript frontend, and receive structured analysis covering communication clarity, emotional confidence, and personality traits β along with actionable improvement tips.
| Feature | Details |
|---|---|
| π€ Audio Ingestion | Multi-format support (WebM, WAV, MP3, OGG); auto-converted to 16-bit PCM WAV via PyAV |
| π Speech-to-Text | High-accuracy transcription using Faster-Whisper |
| π Acoustic Analysis | Pitch variance, energy level, speech rate, pause ratio |
| π§ Multi-Agent System | Communication, Confidence, and Personality agents run in parallel (ThreadPoolExecutor) |
| π RAG System | ChromaDB + all-MiniLM-L6-v2 embeddings for expert knowledge retrieval |
| π‘οΈ Guardrails AI | Input/output validation and safety checks |
| π Evaluation Framework | LangChain-based quality assessment with optional refinement loop |
| π REST API | FastAPI v2.0 with CORS, health check, and auto-generated docs |
| Feature | Details |
|---|---|
| β‘ React 19 + TypeScript | Modern, type-safe UI with Vite 7 build tooling |
| π¨ UI Components | Radix UI primitives + Tailwind CSS v4 |
| π€ Audio Upload | Drag-and-drop or file picker for any audio format |
| π Results Visualization | Tabbed display of transcript, acoustic features, and agent analyses |
| β±οΈ Real-time Feedback | Live processing status updates |
| π± Responsive Design | Works across desktop and mobile devices |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React 19 + Vite) β
β Radix UI Β· TypeScript Β· Tailwind CSS v4 β
βββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β HTTP / REST
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Backend API (FastAPI 2.0 + Uvicorn) β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Speech Processing Pipeline β
β β
β [Audio Upload] β [PyAV Conversion] β [Preprocessing] β
β β β
β [Faster-Whisper STT] β [Acoustic Feature Extraction] β
β β β
β βββββββββββββββββββββββββββββββββββββββ β
β β Multi-Agent System β β
β β βββββββββββββββ βββββββββββββββββ β β
β β βCommunicationβ β Confidence β β β parallel β
β β β Agent β β Agent β β β
β β βββββββββββββββ βββββββββββββββββ β β
β β β combined β β β
β β ββββββββββββββββββββββββββββββββ β β
β β β Personality Agent β β β
β β ββββββββββββββββββββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββ β
β β β
β [RAG Retrieval (ChromaDB)] β [Report Generator] β
β [Guardrails Validation] β [LangChain Evaluation] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β NVIDIA NIM API β
β meta/llama-3.1-70b β
ββββββββββββββββββββββββ
| Agent | Responsibility |
|---|---|
| Communication Agent | Analyzes clarity, fluency, vocabulary, and structural coherence |
| Confidence Agent | Evaluates vocal confidence, energy, and emotional tone |
| Personality Agent | Maps communication + confidence patterns to personality traits |
Communication and Confidence agents run concurrently via
ThreadPoolExecutor. Personality agent runs after both complete.
| Requirement | Minimum |
|---|---|
| OS | Linux, macOS, or Windows 10+ |
| Python | 3.8+ |
| Node.js | 18.x+ |
| RAM | 8 GB |
| Storage | ~5 GB (models + deps) |
| Microphone | Required for live recording |
- RAM: 16 GB+
- GPU: CUDA-compatible (optional, speeds up Whisper inference)
- Storage: SSD with 10 GB+ free
# 1. Clone the repository
git clone https://github.com/dinesh9997/TEAM-05.git
cd TEAM-05
# 2. Backend setup
cd backend
python -m venv venv
# Linux/macOS:
source venv/bin/activate
# Windows:
venv\Scripts\activate
pip install -r requirements.txt
# 3. Configure environment
cp .env.example .env
# Edit .env and add your NVIDIA_API_KEY
# 4. Start backend
uvicorn api:app --reload --port 8000
# 5. In a NEW terminal β Frontend
cd ../frontend
npm install
npm run dev- Backend API: http://localhost:8000
- Frontend UI: http://localhost:5173
- API Docs: http://localhost:8000/docs
git clone https://github.com/dinesh9997/TEAM-05.git
cd TEAM-05cd backend
python -m venv venv
# Activate (Linux/macOS)
source venv/bin/activate
# Activate (Windows)
venv\Scripts\activate
pip install -r requirements.txtGet a free API key at build.nvidia.com:
cp .env.example .env
# Open .env and set:
# NVIDIA_API_KEY=your_actual_api_key_hereOptionally override defaults in .env:
NVIDIA_API_KEY=your_key_here
NVIDIA_MODEL_NAME=meta/llama-3.1-70b-instruct # default
LLM_TEMPERATURE=0.3 # 0.0β1.0
LLM_MAX_TOKENS=1024cd ../frontend
npm install# Terminal 1 β Backend
cd backend && source venv/bin/activate
uvicorn api:app --reload --port 8000
# Terminal 2 β Frontend
cd frontend
npm run devOpen http://localhost:5173, upload an audio file, and view your personality analysis report.
cd backend
python main.pyThis will:
- Record ~45 seconds of audio via microphone
- Process and transcribe speech
- Run the multi-agent analysis pipeline
- Print a comprehensive report in the terminal
import requests
with open("audio.wav", "rb") as f:
response = requests.post(
"http://localhost:8000/analyze",
files={"file": ("audio.wav", f, "audio/wav")}
)
result = response.json()
print(result["final_report"])TEAM-05/
βββ backend/ # Python backend
β βββ api.py # FastAPI app (v2.0) β REST endpoints
β βββ main.py # Standalone pipeline (mic recording)
β βββ link.py # Pipeline orchestrator (run_pipeline)
β βββ agent.py # Agent orchestrator (run_agents)
β βββ pipeline.py # Pipeline helper
β βββ llm_helper.py # LLM utility helpers
β βββ guardrails_config.py # Guardrails AI validation
β βββ speech_to_text.py # Faster-Whisper transcription
β βββ speech_features.py # Acoustic feature extraction
β βββ record_audio.py # Microphone recording
β βββ preprocess_audio.py # Audio normalization/denoising
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variable template
β β
β βββ agents/ # Multi-agent system
β β βββ communication_agent.py # Clarity, fluency, structure
β β βββ confidence_agent.py # Vocal confidence & emotion
β β βββ personality_agent.py # Personality trait mapping
β β
β βββ llm/ # LLM wrapper (agents)
β β βββ local_llm.py
β β
β βββ llm1/ # LLM config & report generation
β β βββ llm_config.py
β β βββ local_llm.py
β β βββ prompt_templates.py
β β βββ report_generator.py
β β
β βββ rag/ # RAG system
β β βββ config.py # ChromaDB settings
β β βββ retriever.py
β β βββ knowledge_base.py
β β βββ rag_pipeline.py
β β βββ documents/ # Knowledge documents
β β
β βββ evals/ # Evaluation framework
β β βββ eval_config.py
β β βββ eval_runner.py
β β βββ eval_refinement.py
β β βββ test_evals.py
β β
β βββ utils/ # Shared utilities
β βββ audio_loader.py
β βββ parser.py
β βββ feature_scoring.py
β
βββ frontend/ # React frontend
β βββ src/
β β βββ App.tsx # Root component
β β βββ components/ # UI components (Radix UI)
β βββ index.html
β βββ package.json
β βββ vite.config.ts
β βββ tailwind.config.js
β βββ tsconfig.json
β
βββ .gitignore
βββ README.md # This file
When the backend is running, interactive docs are available at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Check backend readiness and NVIDIA NIM configuration.
Response:
{
"status": "healthy",
"llm_provider": "nvidia-nim",
"nvidia_configured": true,
"model": "meta/llama-3.1-70b-instruct"
}Upload an audio file for full analysis.
Request:
POST /analyze HTTP/1.1
Content-Type: multipart/form-data
file: <audio_file> (WAV, WebM, MP3, OGG, etc.)Response:
{
"transcript": "I am confident in my ability to...",
"audio_features": {
"speech_rate": 130,
"pitch_variance": 22.5,
"pause_ratio": 0.18,
"energy_level": "medium-high"
},
"communication_analysis": { ... },
"confidence_emotion_analysis": { ... },
"personality_analysis": { ... },
"final_report": "Detailed personalized feedback..."
}Audio files are automatically converted to 16-bit PCM WAV internally, so any common format is accepted.
Configured via backend/.env:
| Variable | Default | Description |
|---|---|---|
NVIDIA_API_KEY |
(required) | Your NVIDIA NIM API key |
NVIDIA_MODEL_NAME |
meta/llama-3.1-70b-instruct |
LLM model to use |
LLM_TEMPERATURE |
0.3 |
Response creativity (0.0β1.0) |
LLM_MAX_TOKENS |
1024 |
Max response length |
| Setting | Default | Description |
|---|---|---|
CHROMA_PERSIST_DIR |
./rag/chroma_db |
Vector DB storage path |
COLLECTION_NAME |
speech_analysis_knowledge |
ChromaDB collection |
TOP_K_RESULTS |
3 |
Documents retrieved per query |
CHUNK_SIZE |
500 |
Text chunk size |
CHUNK_OVERLAP |
50 |
Chunk overlap |
| Setting | Default |
|---|---|
DURATION |
45 seconds |
SAMPLE_RATE |
16000 Hz |
CHANNELS |
1 (mono) |
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
# Dev server with hot reload
uvicorn api:app --reload --port 8000
# Code quality
black .
flake8 .
# Run tests
python -m pytestcd frontend
npm run dev # Development server (http://localhost:5173)
npm run build # Production build
npm run preview # Preview production build
npm run lint # ESLint checkcd backend
python -m evals.test_evalsCriteria evaluated:
- Helpfulness, Relevance, Coherence
- Actionability, Specificity, Accuracy
- Completeness, Constructiveness
# Test NVIDIA NIM LLM connection
python test_llm_step5.py
# Test RAG retrieval pipeline
python test_rag.py
# Run full standalone pipeline
python main.py- Get a free key at build.nvidia.com
cp backend/.env.example backend/.env- Add your key to
NVIDIA_API_KEY=... - Restart the backend
- Verify the key is valid and not expired
- Check your internet connection
- Review NVIDIA Build platform status
# Ensure virtual environment is active
source venv/bin/activate # venv\Scripts\activate on Windows
# Reinstall all dependencies
pip install -r requirements.txt# Clear the vector database and reinitialize
rm -rf backend/rag/chroma_db/
# Restart the backend β it will rebuild on next run- Reduce
LLM_MAX_TOKENSin.env - Use a smaller NVIDIA NIM model
- Close memory-heavy applications
- Upgrade to 16 GB+ RAM for smooth operation
The backend uses PyAV to convert all uploaded audio to 16-bit PCM WAV. If conversion fails:
- Ensure
avis installed:pip install av - Check that the uploaded file is a valid, non-empty audio file
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Open a Pull Request
- Follow PEP 8 for Python code
- Use TypeScript strictly for frontend code
- Add tests for new features
- Update documentation for any API or config changes
This project is licensed under the MIT License β see the LICENSE file for details.
| Library | Purpose |
|---|---|
| Faster-Whisper | Speech-to-text transcription |
| NVIDIA NIM | Cloud LLM API (LLaMA 3.1 70B) |
| LangChain | LLM evaluation framework |
| ChromaDB | Vector database for RAG |
| FastAPI | Python REST API framework |
| PyAV | Audio format conversion |
| React 19 | Frontend UI library |
| Radix UI | Accessible UI primitives |
| Vite | Frontend build tooling |
- Open an issue on GitHub
- Contact the project team through the repository
- NVIDIA NIM cloud LLM integration
- Multi-agent parallel execution
- ChromaDB RAG system
- FastAPI REST backend
- React 19 + TypeScript frontend
- Multi-format audio upload (WebM, WAV, MP3, OGG)
- Real-time streaming analysis
- Multi-language speech support
- Advanced visualization dashboards
- Docker containerization
- Mobile app
Built with β€οΈ by TEAM-5