A voice-interactive meditation assistant that creates personalized guided meditation sessions using AI. The assistant asks for your desired meditation duration, generates a custom meditation script, and guides you through the session with calming background music.
- Voice Interaction: Natural voice commands to set up your meditation session
- AI-Generated Meditations: Custom meditation scripts generated using Cerebras LLaMA 3.1 70B model
- Background Audio: Calming background music during meditation sessions
- Dynamic Timing: Automatically paces meditation instructions based on session length
- High-Quality Voice: Uses Cartesia TTS for natural-sounding meditation guidance
- Accurate Speech Recognition: Leverages Deepgram for reliable voice command interpretation
- Python 3.8+
- LiveKit Agents Framework
- Required API Keys:
- Cerebras API key
- LiveKit credentials
- Cartesia API key
- Deepgram API key
git clone <repository-url>
cd guided-meditation-assistant
python -m venv venv
source venv/bin/activate # On Windows, use 'venv\Scripts\activate'
pip install livekit-agents
pip install livekit-plugins-openai
pip install livekit-plugins-silero
pip install livekit-plugins-cartesia
pip install livekit-plugins-deepgram
Create a .env
file with the following:
LIVEKIT_URL=your-livekit-url
LIVEKIT_API_KEY=your-livekit-api-key
LIVEKIT_API_SECRET=your-livekit-api-secret
CEREBRAS_API_KEY=your-cerebras-api-key
CARTESIA_API_KEY=your-cartesia-api-key
DEEPGRAM_API_KEY=your-deepgram-api-key
agent.py
: Main application entry point and meditation session orchestrationaudio_handler.py
: Manages background audio playback during meditationassistant_functions.py
: Contains meditation script generation logic using Cerebras inference
python agent.py start
python agent.py dev
python agent.py connect --room <room-name>
- The assistant greets you and asks for your desired meditation duration
- Using the Cerebras LLaMA 3.1 70B model, it generates a custom meditation script
- The script is delivered through high-quality Cartesia text-to-speech
- Soothing background music plays throughout your session
- The assistant guides you through the meditation with perfectly timed instructions
- The session concludes with a gentle closing message
You can test the meditation assistant using the LiveKit Agents Playground:
- Visit agents-playground.livekit.io
- Connect to your LiveKit server
- Join a room where your meditation assistant is running
The application includes a serene_waters.wav
file for background ambiance. You can replace this with your own audio file by:
- Ensuring your audio file is in WAV format
- Updating the filename in
agent.py
- Adjusting volume levels in
audio_handler.py
if needed.
For support or questions, please open an issue in the repository.