Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.1.0
metadata
title: Voice Assistant - Multi-language Division Matching & Contact Search
emoji: ποΈ
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 4.0.0
app_file: app.py
pinned: false
license: mit
ποΈ Voice Assistant Demo
A powerful multi-language voice assistant that helps users find divisions and contacts within an organization using natural language queries.
π Features
π£οΈ Multi-language Voice Input
- 99+ languages supported (auto-detected)
- Automatic speech-to-text using OpenAI Whisper
- Arabic-to-English translation for seamless processing
- Works with various audio formats
π― Smart Division Matching
- Semantic search using sentence embeddings
- Confidence-based routing with intelligent thresholds
- Department-level expansion (searches all divisions in a department)
- Fast matching (~50ms) using
all-MiniLM-L6-v2
π€ Name Extraction
- Extracts person names from queries using GLiNER
- Supports English and Arabic names
- Zero-shot NER for robust extraction
π Contact Search
- 500+ contacts across 23 departments and 67 divisions
- Intelligent matching combining name and division
- Confidence scoring with match reasoning
- Fuzzy name matching for typos and variations
π How to Use
Division Matching (Text)
Find the right division for your query:
"I need help from IT Security"
"Find someone in Finance"
"Connect me to Human Resources"
Division Matching (Voice)
Speak your query in any language - it will be transcribed and processed automatically.
Contact Search (Text)
Search for specific people or teams:
"Find Dima in Information Technology"
"Ahmed Al-Malek"
"I need to talk to someone in Legal"
Contact Search (Voice)
Speak your contact search query in any language.
π Example Queries
Department-Level Queries
These queries search across ALL divisions in a department:
- β "Find someone in Information Technology" β Searches 8 IT divisions
- β "I need help from Finance" β Searches all Finance divisions
- β "Connect me to Human Resources" β Searches all HR divisions
Division-Level Queries
These match specific divisions:
- β "Find Ahmed in App Dev" β Applications Development & Integrations
- β "I need help from IT Security" β IT Security Implementation & Operations
- β "Connect me to Legal" β Legal divisions
Name-Only Queries
- β "Find Dima" β Searches all contacts named Dima
- β "Ahmed Al-Malek" β Exact name match
- β "I need to talk to Rashed" β Fuzzy name matching
Combined Queries (Name + Department/Division)
Priority given to division accuracy:
- β "Find Dima in Information Technology" β Perfect match (confidence: 1.00)
- β "Find Ahmed in App Dev" β Shows App Dev team members
π§ Technical Details
Models Used
- Embeddings:
sentence-transformers/all-MiniLM-L6-v2- Fast, lightweight semantic search - Name Extraction:
urchade/gliner_small-v2.1- Zero-shot NER for person names - Speech-to-Text:
openai/whisper-base- Optimized for CPU with good accuracy
Confidence Scoring
| Score | Meaning | Example |
|---|---|---|
| 1.00 | Perfect match (name + division) | Dima in IT |
| 0.95 | Exact name match | Ahmed Al-Malek |
| 0.66 | Strong division match | People in requested division |
| 0.59 | Good division match | Close division match |
| < 0.30 | Low confidence | Wrong division penalty |
Match Reasons
name_and_division_match- Both name AND division match βdivision_match- Division/department matches (no name match)exact_name_match- Exact name match (100%)fuzzy_name_match- Partial name match (75%+)name_match_wrong_division- Name matches but WRONG division β οΈ
π¦ Database Stats
- 500 contacts across the organization
- 23 departments (Information Technology, Finance, HR, etc.)
- 67 divisions (specific teams and units)
- Multi-language support (English + Arabic names)
π Supported Languages
The voice assistant supports 99+ languages including:
- English
- Arabic (Ψ§ΩΨΉΨ±Ψ¨ΩΨ©)
- Spanish, French, German, Italian
- Chinese (δΈζ), Japanese (ζ₯ζ¬θͺ), Korean (νκ΅μ΄)
- Hindi, Urdu, Bengali
- And many more...
Language is automatically detected - just speak naturally!
β‘ Performance
- Division Matching: ~50ms per query
- Name Extraction: ~100-200ms per query
- Voice Processing: ~1-3 seconds (depends on audio length)
- Contact Search: ~100-300ms per query
π οΈ Built With
- Gradio - Interactive web interface
- FastAPI - Backend API (original implementation)
- Sentence Transformers - Semantic search
- OpenAI Whisper - Speech recognition
- GLiNER - Named Entity Recognition
- PyTorch - Deep learning framework
π License
MIT License
π Acknowledgments
- OpenAI for Whisper
- Hugging Face for model hosting
- URCHADE for GLiNER
- Sentence Transformers team
Version: 4.0.0 Status: β Production Ready Demo Type: Interactive Gradio Demo