A Go-based bot that can automatically join Google Meet sessions, enable microphone, and provide text-to-speech functionality through a web interface.
- Automated Google Meet joining: Join meetings via URL
- Microphone control: Enable/disable microphone programmatically
- Text-to-Speech: Generate and play audio through virtual microphone
- Web interface: Control the bot through a simple web UI
- Screenshot capability: Take screenshots of the current meeting
- Docker support: Containerized deployment with all dependencies
- Go 1.24.4 or later
- Playwright browsers
- PulseAudio (Linux/macOS)
- espeak-ng and sox for TTS
- X11 display server (for headless browser)
- Docker
- Docker Compose (optional)
-
Clone and setup environment:
git clone <repository-url> cd meetbot-go-2 cp .env.example .env # Create from template if available
-
Configure credentials: Edit
.envfile with your Google account credentials:GOOGLE_EMAIL=your-email@gmail.com GOOGLE_PASSWORD=your-password -
Build and run:
./build.sh
-
Access the web interface: Open http://localhost:8080 in your browser
-
Install Go dependencies:
go mod download
-
Install system dependencies (Ubuntu/Debian):
sudo apt update sudo apt install -y \ pulseaudio \ espeak-ng \ sox \ xvfb \ chromium-browser
-
Install Playwright browsers:
go run github.com/playwright-community/playwright-go/cmd/playwright install
-
Setup virtual microphone:
./setup.sh
-
Run the application:
go run main.go
- Initialize Bot: Click "Initialize Bot" to start the browser session
- Join Meeting: Enter a Google Meet URL and click "Join Meeting"
- Enable Microphone: Click "Enable Microphone" to unmute
- Text-to-Speech: Enter text and click "Generate TTS" to speak
- Take Screenshot: Click "Screenshot" to capture current view
- Leave Meeting: Click "Leave Meeting" to exit gracefully
GET /- Web interfacePOST /init-bot- Initialize the botPOST /join-meeting- Join a meeting (requiresmeetUrlparameter)POST /leave-meeting- Leave current meetingPOST /enable-microphone- Enable microphonePOST /generate- Generate TTS (requirestextparameter)GET /screenshot- Take screenshotGET /bot-status- Check bot initialization statusPOST /clear-popups- Clear browser popups
Create a .env file with:
# Google Login Credentials
GOOGLE_EMAIL=your-email@gmail.com
GOOGLE_PASSWORD=your-app-password
# Optional: Browser settings
HEADLESS=false
DISPLAY=:99The bot uses a virtual microphone to inject TTS audio into Google Meet:
- PulseAudio Configuration: Automatically configured by
setup.sh - Virtual Microphone: Creates
/tmp/virtmicFIFO pipe - TTS Pipeline: espeak-ng → sox → virtual microphone
The build uses a two-stage approach:
- Base image (
Dockerfile.base): Contains Playwright and system dependencies - App image (
Dockerfile): Contains the Go application
- Headless browser: Runs Chromium in Xvfb
- Audio support: PulseAudio with virtual microphone
- Port mapping: Exposes port 8080
- Shared memory: 2GB for browser stability
# Build and run
./build.sh
# Development build (rebuilds base image)
./build-dev.sh
# View logs
docker logs -f meetbot-go-container
# Debug container
docker exec -it meetbot-go-container /bin/bash
# Stop container
docker stop meetbot-go-container-
Login failures:
- Use app-specific passwords for Google accounts with 2FA
- Ensure credentials are correct in
.env
-
Audio not working:
- Check PulseAudio is running:
pactl info - Verify virtual microphone:
pactl list sources short
- Check PulseAudio is running:
-
Browser crashes:
- Increase shared memory:
--shm-size=2gb - Check display server:
echo $DISPLAY
- Increase shared memory:
-
Permission errors:
- Clear browser popups: Use
/clear-popupsendpoint - Check microphone permissions in browser
- Clear browser popups: Use
- Application logs: Check console output or Docker logs
- Browser debugging: Screenshots available via
/screenshot - Audio debugging: Check PulseAudio with
pactl list
- Credentials: Never commit
.envfile to version control - Network: Bot requires internet access for Google Meet
- Permissions: Requires microphone and camera permissions
- Container: Runs with necessary privileges for audio/video
├── main.go # HTTP server and main application
├── bot/ # Bot implementation
│ └── bot.go # Playwright automation logic
├── index.html # Web interface
├── setup.sh # Audio and display setup
├── keepalive.sh # Process monitoring
├── Dockerfile # Application container
├── Dockerfile.base # Base image with dependencies
├── build.sh # Build and run script
└── build-dev.sh # Development build script
- New endpoints: Add handlers in
main.go - Bot actions: Extend
bot/bot.gowith new methods - UI updates: Modify
index.htmlfor new controls - Audio features: Update TTS pipeline in
generateAndSendTTS()