Skip to content

godspeed-003/slack-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Voice-to-Slack AI Pipeline

An advanced AI pipeline that converts voice messages into Slack DMs using LiveKit, Deepgram STT, Gemini AI processing, and Zapier MCP integration.

πŸš€ Features

  • 🎀 Voice Recording: Capture real-time voice input from your microphone
  • πŸ”„ Speech-to-Text: High-quality transcription using Deepgram API
  • πŸ€– AI Processing: Message cleanup and enhancement using Google Gemini
  • πŸ“€ Slack Integration: Direct message delivery via Zapier MCP
  • 🏠 LiveKit Agent: Full voice agent capabilities (optional)

πŸ“‹ Pipeline Flow

Voice Input β†’ Deepgram STT β†’ Gemini Processing β†’ Zapier MCP β†’ Slack DM

πŸ› οΈ Quick Setup

Option 1: Automated Setup (Recommended)

# Run the automated setup script
python setup.py

This will:

  • βœ… Check Python version compatibility
  • βœ… Create virtual environment
  • βœ… Install all dependencies
  • βœ… Create .env file from template
  • βœ… Test microphone access

Option 2: Manual Setup

1. Clone and Install

# Clone the repository (if from git)
git clone <your-repo>
cd livekit-mcp

# Or navigate to your existing project directory
cd d:\AI\agent\livekit-mcp

# Create virtual environment
python -m venv venv

# Activate virtual environment
venv\Scripts\activate  # Windows
# source venv/bin/activate  # Linux/Mac

# Install dependencies
pip install -r requirements.txt

2. Environment Configuration

Copy the example environment file:

cp .env.example .env

Fill in your API keys in .env:

Required API Keys:

3. Zapier Slack Setup

  1. Go to Zapier MCP
  2. Connect your Slack workspace
  3. Set up "Send Direct Message" action
  4. Copy the MCP URL to your .env file

🎯 Usage

Voice-to-Slack Pipeline (Recommended)

python voice_pipeline.py
  1. Speak your message when prompted (default 5-10 seconds)
  2. Review the processed transcript
  3. Copy the message and tell the AI assistant: "Send this to Kiruthivarma: [your message]"
  4. Message delivered! πŸŽ‰

LiveKit Agent (Advanced)

python starter_agent.py dev

Run the full LiveKit agent with voice capabilities and Slack integration.

MCP Server (Testing)

python starter_server.py

Test LiveKit room management via MCP protocol.

πŸ“ Project Structure

livekit-mcp/
β”œβ”€β”€ voice_pipeline.py          # 🎯 Main voice-to-Slack pipeline
β”œβ”€β”€ starter_agent.py           # πŸ€– LiveKit agent with Slack functions
β”œβ”€β”€ starter_server.py          # 🏠 LiveKit MCP server
β”œβ”€β”€ test_credentials.py        # πŸ”§ API credentials testing
β”œβ”€β”€ setup.py                   # πŸš€ Automated setup script
β”œβ”€β”€ requirements.txt           # πŸ“¦ Python dependencies
β”œβ”€β”€ .env.example              # πŸ”‘ Environment template
β”œβ”€β”€ .env                      # πŸ”‘ Your API keys (keep private!)
└── README.md                 # πŸ“– This file

🎀 Voice Pipeline Details

Recording

  • Duration: Configurable (default 5 seconds)
  • Quality: 16kHz, mono, 16-bit
  • Format: WAV (temporary file, auto-cleaned)

Speech-to-Text (Deepgram)

  • Model: Nova-2 (high accuracy)
  • Language: English
  • Real-time: Yes

AI Processing (Gemini)

  • Model: gemini-2.0-flash-exp
  • Purpose: Clean up transcription, fix grammar
  • Output: Natural, readable message

Slack Delivery (Zapier MCP)

  • Method: Direct Message
  • Target: Configurable user (e.g., Kiruthivarma)
  • Format: Text with microphone emoji πŸŽ™οΈ

πŸ”§ Environment Setup Guide

Windows Setup

# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Copy environment template
copy .env.example .env

# Edit .env with your API keys
notepad .env

Linux/Mac Setup

# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Copy environment template
cp .env.example .env

# Edit .env with your API keys
nano .env

Voice Recording

# In voice_pipeline.py
duration = 5  # Recording duration in seconds
sample_rate = 16000  # Audio quality

Gemini Processing

# Customize the processing prompt
prompt = "Clean up this transcription and format as a clear message..."

Slack Recipients

# Change target user in the MCP call
channel="username_here"

🚨 Troubleshooting

Voice Recording Issues

  • No microphone detected: Check sounddevice installation
  • Permission denied: Grant microphone access to terminal/IDE
  • Poor quality: Adjust sample_rate or duration

API Issues

  • 401 Unauthorized: Check API keys in .env
  • Quota exceeded: Verify API usage limits
  • Network errors: Check internet connection

Slack Integration

  • Messages not appearing:
    • Check if user exists in workspace
    • Verify Zapier app permissions
    • Look for messages from "Zapier" bot
  • Wrong recipient: Update username in MCP call

LiveKit Agent Issues

  • 401 on LiveKit: Verify LIVEKIT_API_KEY and LIVEKIT_API_SECRET
  • Connection refused: Check LIVEKIT_URL format
  • Module not found: Install missing dependencies

πŸ“Š API Usage & Costs

Service Usage Typical Cost
Deepgram STT ~5 sec audio ~$0.0004
Google Gemini Text processing ~$0.0001
LiveKit Agent hosting Variable
Zapier Message sending Free tier available

πŸ” Security Notes

  • Never commit .env to version control
  • Rotate API keys regularly
  • Use environment-specific configurations
  • Limit API key permissions where possible

πŸš€ Advanced Features

Custom Voice Commands

Extend voice_pipeline.py to recognize specific commands:

if "urgent" in transcript.lower():
    priority = "🚨 URGENT: "

Multiple Recipients

Add support for different Slack users:

recipients = {
    "kiruthivarma": "Kiruthivarma",
    "team": ["user1", "user2", "user3"]
}

Voice Assistant Integration

Integrate with LiveKit agent for two-way conversations:

await context.session.say("Message sent to Kiruthivarma!")

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add your improvements
  4. Test thoroughly
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments

  • LiveKit for real-time communication infrastructure
  • Deepgram for high-quality speech recognition
  • Google Gemini for AI text processing
  • Zapier for seamless integrations

🎊 Success Stories

"Just built a voice-to-Slack pipeline that lets me send messages by just speaking! The AI cleans up my speech and delivers it perfectly. FUCKING LEGENDARY! πŸš€πŸ”₯πŸ’ͺ" - Happy User

Ready to revolutionize your communication workflow? Start speaking to Slack today! πŸŽ™οΈβœ¨


πŸ”§ Final Setup Checklist

  • Python 3.8+ installed
  • Virtual environment created and activated
  • Dependencies installed from requirements.txt
  • .env file created and configured with all API keys
  • Microphone permissions granted
  • Zapier MCP Slack integration configured
  • Test run completed successfully

πŸ†˜ Support

If you encounter issues:

  1. Check the troubleshooting section above
  2. Verify all API keys are correctly set
  3. Ensure microphone permissions are granted
  4. Test individual components (Deepgram, Gemini, Zapier) separately

🎯 Quick Test Commands

# Automated setup (first time only)
python setup.py

# Test API credentials
python test_credentials.py

# Test voice recording only
python -c "import sounddevice as sd, numpy as np; print('Recording...'); audio = sd.rec(int(5 * 16000), samplerate=16000, channels=1); sd.wait(); print('Recording complete!')"

# Run main pipeline
python voice_pipeline.py

About

An advanced AI pipeline that converts voice messages into Slack DMs using LiveKit, Deepgram STT, Gemini AI processing, and Zapier MCP integration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages