{"id":30066651,"url":"https://github.com/faisal-fida/voiceflow-ai","last_synced_at":"2026-04-20T10:33:00.855Z","repository":{"id":308013948,"uuid":"1031364054","full_name":"faisal-fida/voiceflow-ai","owner":"faisal-fida","description":"VoiceFlow AI is a production-ready FastAPI microservices platform that provides real-time speech-to-text transcription and intelligent text classification, specifically optimized for insurance call center analytics.","archived":false,"fork":false,"pushed_at":"2025-08-03T15:36:36.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-03T17:26:47.686Z","etag":null,"topics":["classification-model","fastapi","machine-learning-algorithms","torch","transformers","whisper"],"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/faisal-fida.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,"zenodo":null}},"created_at":"2025-08-03T15:29:56.000Z","updated_at":"2025-08-03T15:36:41.000Z","dependencies_parsed_at":"2025-08-03T17:40:19.002Z","dependency_job_id":null,"html_url":"https://github.com/faisal-fida/voiceflow-ai","commit_stats":null,"previous_names":["faisal-fida/voiceflow-ai"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/faisal-fida/voiceflow-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faisal-fida%2Fvoiceflow-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faisal-fida%2Fvoiceflow-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faisal-fida%2Fvoiceflow-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faisal-fida%2Fvoiceflow-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faisal-fida","download_url":"https://codeload.github.com/faisal-fida/voiceflow-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faisal-fida%2Fvoiceflow-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32043050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["classification-model","fastapi","machine-learning-algorithms","torch","transformers","whisper"],"created_at":"2025-08-08T08:00:31.047Z","updated_at":"2026-04-20T10:33:00.840Z","avatar_url":"https://github.com/faisal-fida.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VoiceFlow AI\n\n🎙️ **AI-Powered Voice Analytics Platform for Insurance Industry**\n\nVoiceFlow AI is a production-ready FastAPI microservices platform that provides real-time speech-to-text transcription and intelligent text classification, specifically optimized for insurance call center analytics.\n\n## 🌟 Key Features\n\n### 🎯 **Dual-Service Architecture**\n- **Transcription Service**: High-performance speech-to-text using OpenAI Whisper\n- **Classification Service**: Intent/outcome classification using specialized DistilBERT models\n\n### 🏥 **Industry-Specialized Models**\n- **Medicare**: Optimized for Medicare-related calls and terminology\n- **ACA (Affordable Care Act)**: Healthcare marketplace conversations  \n- **Final Expense**: Life insurance and burial coverage discussions\n\n### 🧠 **Context-Aware Processing**\n- Dynamic prompts based on call type and conversation turn\n- Specialized models for different conversation stages\n- Industry-specific vocabulary and terminology handling\n\n### ⚡ **Production-Ready Features**\n- GPU acceleration with automatic CPU fallback\n- Docker Swarm deployment with health checks\n- Graceful shutdown and resource management\n- Comprehensive logging and monitoring\n- Async processing for high throughput\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Docker \u0026 Docker Compose\n- NVIDIA GPU (optional, will fallback to CPU)\n- Python 3.8+ (for development)\n\n### 🐳 Docker Deployment\n\n1. **Clone the repository**\n```bash\ngit clone \u003crepository-url\u003e\ncd voiceflow-ai\n```\n\n2. **Build the services**\n```bash\n# Build transcription service\ndocker build -f Dockerfile_transcription -t api-transcription:latest .\n\n# Build classification service  \ndocker build -f Dockerfile_classification -t api-classification:latest .\n```\n\n3. **Deploy with Docker Swarm**\n```bash\n# Initialize swarm (if not already done)\ndocker swarm init\n\n# Create external network\ndocker network create --driver overlay voiceflow-net\n\n# Deploy the stack\ndocker stack deploy -c docker-stack.yml voiceflow\n```\n\n### 🔧 Development Setup\n\n1. **Install dependencies**\n```bash\npip install -r requirements.txt\n```\n\n2. **Configure models** (Update `voiceflow_ai/core/config.py`)\n```python\n# Set your model paths\nDISTIL_MODEL = \"path/to/your/classification/model\"\nMEDICARE_MODEL_B = \"path/to/medicare/model\"\nACA_MODEL = \"path/to/aca/model\"\n# ... other model configurations\n```\n\n3. **Run services locally**\n```bash\n# Transcription service (port 8000)\nuvicorn voiceflow_ai.transcription_app:app --host 0.0.0.0 --port 8000\n\n# Classification service (port 9000)\nuvicorn voiceflow_ai.classification_app:app --host 0.0.0.0 --port 9000\n```\n\n## 📡 API Endpoints\n\n### Transcription Service (Port 8000)\n\n#### `POST /transcribe/`\nConvert audio to text with intelligent classification\n\n**Request:**\n```bash\ncurl -X POST \"http://localhost:8000/transcribe/\" \\\n  -F \"file=@audio.wav\" \\\n  -F \"uuid=unique-call-id\" \\\n  -F \"connection_id=conn-123\" \\\n  -F \"turn_number=1\" \\\n  -F \"model_type=A\" \\\n  -F \"call_type=medicare\"\n```\n\n**Response:**\n```json\n{\n  \"uuid\": \"unique-call-id\",\n  \"transcription\": \"Hello, I'm calling about Medicare benefits\",\n  \"label\": \"P\",\n  \"confidence\": 0.89,\n  \"transcription_time\": 2.1,\n  \"classification_time\": 0.3,\n  \"processed_transcribed_text\": \"hello i'm calling about medicare benefits\",\n  \"model_used\": \"mc_10.3\"\n}\n```\n\n### Classification Service (Port 9000)\n\n#### `POST /classify/`\nClassify transcribed text for call analysis\n\n**Request:**\n```bash\ncurl -X POST \"http://localhost:9000/classify/\" \\\n  -F \"transcribed_text=I'm interested in Medicare plans\" \\\n  -F \"serial_number=conn-123\" \\\n  -F \"model_type=A\" \\\n  -F \"call_type=medicare\"\n```\n\n**Response:**\n```json\n{\n  \"label\": \"P\",\n  \"confidence\": 0.92,\n  \"model_used\": \"mc_10.3\"\n}\n```\n\n### Health Checks\n- `GET /health` - Service health status\n- `POST /shutdown` - Graceful shutdown\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────┐    ┌─────────────────────┐\n│   Client/Frontend   │    │   Load Balancer     │\n└──────────┬──────────┘    └──────────┬──────────┘\n           │                          │\n           └──────────────────────────┘\n                      │\n         ┌────────────┴────────────┐\n         │                         │\n┌────────▼────────┐    ┌───────────▼──────────┐\n│ Transcription   │    │  Classification      │\n│ Service         │    │  Service             │\n│ (Port 8000)     │    │  (Port 9000)         │\n│                 │    │                      │\n│ ┌─────────────┐ │    │ ┌──────────────────┐ │\n│ │   Whisper   │ │    │ │   DistilBERT     │ │\n│ │   Model     │ │    │ │   Models         │ │\n│ └─────────────┘ │    │ │  - Medicare      │ │\n└─────────────────┘    │ │  - ACA           │ │\n                       │ │  - Final Expense │ │\n                       │ └──────────────────┘ │  \n                       └──────────────────────┘\n```\n\n## 🔧 Configuration\n\nKey configuration options in `voiceflow_ai/core/config.py`:\n\n```python\nclass Settings:\n    # Model paths\n    DISTIL_MODEL = \"path/to/base/classification/model\"\n    MEDICARE_MODEL_B = \"path/to/medicare/model\"\n    ACA_MODEL = \"path/to/aca/model\"\n    FE_MODEL_B = \"path/to/final-expense/model\"\n    \n    # Whisper configuration\n    WHISPER_MODEL = \"openai/whisper-tiny.en\"\n    \n    # Processing type\n    TYPE = True  # True for multi-class, False for 3-class classification\n```\n\n## 📊 Call Classification Labels\n\n### Medicare Calls\n- **P**: Positive/Interested\n- **N**: Negative/Not Interested  \n- **U**: Unclear/Uncertain\n- **DNC**: Do Not Call\n- **CB**: Call Back\n- **AP**: Age-related responses\n- And 70+ specialized labels...\n\n### ACA Calls\n- **ELI**: Eligible\n- **SUB**: Subsidy-related\n- **ICE**: Insurance coverage existing\n- **ACA**: ACA-specific responses\n- And 45+ specialized labels...\n\n### Final Expense Calls\n- **BENE**: Beneficiary discussions\n- **COST**: Cost-related inquiries\n- **SCAM**: Scam detection\n- And 45+ specialized labels...\n\n## 🚀 Performance \u0026 Scaling\n\n### Resource Requirements\n- **GPU**: NVIDIA GPU with CUDA support (recommended)\n- **RAM**: 8GB+ (16GB+ for production)\n- **CPU**: 4+ cores\n- **Storage**: 10GB+ for models\n\n### Scaling Configuration\n```yaml\n# docker-stack.yml\nservices:\n  transcription:\n    deploy:\n      replicas: 9  # Scale based on load\n  classification:\n    deploy:\n      replicas: 1  # Lighter classification service\n```\n\n## 🔒 Security \u0026 Compliance\n\n- Google Service Account integration for cloud services\n- Secure file handling with automatic cleanup\n- Request tracking with unique connection IDs\n- Health monitoring and graceful shutdowns\n\n## 📈 Monitoring \u0026 Logging\n\nComprehensive logging with:\n- Request/response tracking\n- Performance metrics (processing times)\n- Error handling and debugging\n- Serial number tracking for call tracing\n\n## 🛠️ Development\n\n### Project Structure\n```\nvoiceflow_ai/\n├── core/                 # Core utilities and config\n│   ├── config.py        # Configuration settings\n│   ├── dependencies.py  # Dependency injection  \n│   ├── logger.py        # Logging configuration\n│   └── transcription_processor.py\n├── routers/             # API route handlers\n│   ├── transcription_router.py\n│   └── classification_router.py  \n├── services/            # Business logic services\n│   ├── transcription_service.py\n│   └── classification_service.py\n├── classification_app.py # Classification FastAPI app\n└── transcription_app.py  # Transcription FastAPI app\n```\n\n### Adding New Models\n\n1. **Update configuration** in `config.py`\n```python\nNEW_MODEL_PATH = \"path/to/new/model\"\n```\n\n2. **Initialize in service** \n```python\nself.new_model = AutoModelForSequenceClassification.from_pretrained(NEW_MODEL_PATH)\n```\n\n3. **Add classification logic**\n```python\nif call_type == \"new_type\":\n    model = self.new_model\n    tokenizer = self.new_tokenizer\n```\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 🙏 Acknowledgments\n\n- **OpenAI Whisper** for speech recognition capabilities\n- **Hugging Face Transformers** for BERT-based classification\n- **FastAPI** for the high-performance web framework\n- **Docker** for containerization and deployment\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaisal-fida%2Fvoiceflow-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaisal-fida%2Fvoiceflow-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaisal-fida%2Fvoiceflow-ai/lists"}