--- title: SpeakEdge - AI Sales Communication Coach emoji: 🎯 colorFrom: purple colorTo: blue sdk: gradio sdk_version: 5.49.1 app_file: app.py pinned: false license: mit hardware: zero-gpu --- # 🎯 SpeakEdge - Professional Communication Practice Platform **Master your sales conversations with AI-powered roleplay and comprehensive feedback** SpeakEdge is an advanced platform designed to help sales professionals practice and perfect their communication skills through realistic AI-powered roleplay scenarios. Get detailed feedback on your structure, delivery, and listening skills. ## ✨ Features ### 🎭 Realistic Roleplay Scenarios Practice with 9 different sales situations: - Cold call to a big shot CEO - Cold call to the secretary of a big shot CEO - Inbound customer discovery call - Demo run through with a customer - Negotiating pricing with a customer who wants unreasonable discounts - Renewal or churn reduction with an angry customer - Upselling to an existing customer - Sharing update about a good week with your Head of Sales - Sharing update about a poor week with your Head of Sales ### 🤖 AI-Powered Conversation - **Speech-to-Text (STT)**: Whisper large-v3 for accurate transcription - **Text-to-Speech (TTS)**: Parler-TTS with accent customization - **LLM**: Mistral-7B-Instruct for dynamic, context-aware responses ### 📊 Comprehensive Feedback Analysis **Structure and Clarity** - Logical Flow: Ideas follow coherent sequence - Simplicity of Language: Avoids jargon and complexity - Conciseness: Eliminates unnecessary verbosity **Delivery and Presence** - Pace & Pauses: Optimal speaking speed (WPM) - Confidence & Projection: Strong, definitive language - Energy Level: Appropriate intensity for context **Listening and Interaction** - Active Listening: Questions and curiosity - Acknowledgment: Validates others' points - Reflection: Paraphrases and mirrors ### 📈 Advanced Metrics - Words Per Minute (WPM) - Filler words count and percentage - Weak words detection - Repetition analysis - Unique AI insights (e.g., "23% of sentences started with 'And'") ### 🎨 Beautiful Dashboard Professional, visual feedback dashboard with: - Score breakdowns - Color-coded performance indicators - Actionable recommendations - Unique pattern recognition ## 🚀 Quick Start ### Prerequisites - Python 3.9+ - CUDA-capable GPU (recommended) or CPU - Hugging Face account with token ### Installation 1. **Clone the repository** ```bash git clone https://github.com/yourusername/SpeakEdge.git cd SpeakEdge ``` 2. **Install dependencies** ```bash pip install -r requirements.txt ``` 3. **Set up Hugging Face token** ```bash export HF_TOKEN=your_hugging_face_token_here ``` Or create a `.env` file: ``` HF_TOKEN=your_hugging_face_token_here ``` 4. **Run the application** ```bash python app.py ``` The app will launch on `http://localhost:7860` ## 🌐 Hugging Face Spaces Deployment This application is optimized for Hugging Face Spaces with **Zero GPU** (Dynamic H200 GPU Allocation). ### Deploy to HF Spaces 1. **Create a new Space** - Go to [Hugging Face Spaces](https://huggingface.co/spaces) - Click "Create new Space" - Choose Gradio as the SDK - Enable GPU (Zero GPU) 2. **Upload files** - Upload all Python files (`app.py`, `models.py`, `scenarios.py`, `feedback_analyzer.py`, `dashboard.py`, `config.py`) - Upload `requirements.txt` - Copy content from `README_HF_SPACE.md` to the Space's README.md 3. **Set secrets (optional)** - Go to Space settings - Add `HF_TOKEN` as a secret (optional but recommended for better rate limits) 4. **Configure Space** - The app will automatically start - Zero GPU will dynamically allocate H200 when needed ## 🎮 How to Use 1. **Select Scenario**: Choose the sales situation you want to practice 2. **Customize Bot**: - Select accent (American, British, Australian, Indian, Neutral) - Choose personality (Professional, Friendly, Skeptical, etc.) - Give your bot a name 3. **Start Roleplay**: Click "Start Roleplay" to begin 4. **Engage**: Speak naturally using your microphone 5. **Interact**: The AI bot will respond with voice and text 6. **End Session**: Click "End Roleplay" when finished 7. **Review Feedback**: Analyze your comprehensive performance dashboard ## 📁 Project Structure ``` SpeakEdge/ ├── app.py # Main Gradio application ├── models.py # STT, TTS, LLM model management ├── scenarios.py # Scenario definitions and prompts ├── feedback_analyzer.py # Feedback analysis logic ├── dashboard.py # HTML dashboard generation ├── config.py # Configuration settings ├── requirements.txt # Python dependencies ├── README.md # This file └── README_HF_SPACE.md # README for Hugging Face Spaces ``` ## 🛠️ Technical Details ### Models Used **Speech-to-Text** - Model: `openai/whisper-large-v3` - Accuracy: High - Latency: ~2-3 seconds per audio clip **Text-to-Speech** - Model: `parler-tts/parler-tts-mini-v1` - Features: Multi-accent support - Quality: Natural-sounding voices **Language Model** - Model: `mistralai/Mistral-7B-Instruct-v0.3` - Purpose: Dynamic conversation & feedback generation - Context: Last 6 messages for coherence - Advantage: No approval needed, excellent performance ### Performance Optimization - **Zero GPU Integration**: Uses `@spaces.GPU` decorator for efficient GPU allocation - **Lazy Loading**: Models load only when needed - **Mixed Precision**: FP16 for faster inference on GPU - **Model Caching**: Reuses loaded models across requests ## 🎯 Feedback Categories ### Structure and Clarity (3 sub-aspects) Analyzes logical flow, language simplicity, and conciseness of communication. ### Delivery and Presence (3 sub-aspects) Evaluates pace, confidence, and energy in speech delivery. ### Listening and Interaction (3 sub-aspects) Assesses active listening, acknowledgment, and adaptive responses. ## 💡 Unique Features - **Pattern Recognition**: Identifies sentence starter patterns - **Repetition Detection**: Highlights overused words - **Buzzword Tracking**: Warns about jargon overuse - **Contextual Insights**: AI-generated observations specific to your conversation - **Scenario-Specific Feedback**: Tailored to the sales situation ## 🔧 Configuration Edit `config.py` to customize: - Model selections - Generation parameters - Audio settings - Feedback thresholds ## 🤝 Contributing Contributions are welcome! Please feel free to submit a Pull Request. ## 📄 License This project is licensed under the MIT License. ## 🙏 Acknowledgments - OpenAI Whisper for STT - Parler-TTS for multi-accent TTS - Mistral AI for Mistral-7B-Instruct model - Hugging Face for hosting and Zero GPU infrastructure ## 📞 Support For issues, questions, or suggestions, please open an issue on GitHub. --- **Made with ❤️ for sales professionals looking to elevate their communication game**