A serverless AI assistant that can process both text and audio inputs, respond using LLM (Groq), and generate responses using a custom-cloned version of SAYED RAHEEL'S voice. Deployed on RunPod for scalable, GPU-accelerated processing. This tool enables you to create a digital clone of yourself by inputting basic information into the system prompt and cloning your voice, so the chatbot sounds just like you.
You can clone your voice and get your voice profile as JSON using the OuteTTS tool available at: https://github.com/edwko/OuteTTS. In this system, the voice profile is saved as sayed_voice.json.
-
Dual Input Processing:
- Text-based queries
- Audio input (Speech-to-Text using Whisper)
-
Advanced Language Processing:
- Uses Groq's LLaMA model for intelligent responses
- Maintains context and personality as a professional AI assistant
-
Custom Voice Synthesis:
- Uses OuteTTS for high-quality speech synthesis
- Supports custom voice cloning (with fallback to default voices)
- Real-time audio generation
Input (Text/Audio) → Processing Pipeline → Response (Text + Audio)
Text Input Path:
Text → LLM Processing → TTS Generation → Audio Output
Audio Input Path:
Audio → STT (Whisper) → LLM Processing → TTS Generation → Audio Output
- RunPod account
- Groq API key
- Docker installed locally (for testing)
- Python 3.10+
- NVIDIA GPU support (for deployment)
Create a .env file with:
GROQ_API_KEY=your_groq_api_key_here
- Clone the repository:
git clone https://github.com/yourusername/ai-voice-assistant.git
cd ai-voice-assistant- Install dependencies:
pip install -r requirements.txt- Run local tests:
python handler.py- Build Docker image:
docker build -t ai-voice-assistant .- Test locally:
docker run -p 8000:8000 --env-file .env ai-voice-assistant- Deploy to RunPod:
- Push to GitHub
- Connect GitHub to RunPod
- Deploy as serverless endpoint
POST /
{
"input": {
"type": "text",
"text": "Your question here"
}
}POST /
{
"input": {
"type": "audio",
"audio": "base64_encoded_audio"
}
}{
"user_input": {
"type": "text|audio",
"text": "transcribed_or_original_text"
},
"assistant_response": {
"text": "ai_generated_response",
"audio": "base64_encoded_audio"
}
}- Default location:
sayed_voice.json - Fallback to default male voice if custom profile fails
- Support for different voice profiles (modify
handler.py)
The system handles various error scenarios:
- Failed voice profile loading
- Audio transcription errors
- LLM API timeouts
- TTS generation issues
- GPU acceleration for TTS
- Serverless scaling on RunPod
- Temporary file cleanup
- Memory management
- Built-in health checks
- Detailed logging for debugging
- RunPod dashboard monitoring
- API key management via environment variables
- Temporary file handling
- Request validation
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
MIT License
https://www.linkedin.com/in/sayedraheel/
- RunPod for serverless infrastructure
- Groq for LLM API
- OuteTTS for voice synthesis- https://github.com/edwko/OuteTTS