Overview
Ravi provides a full media pipeline: generate audio from text (TTS), transcribe audio to text, generate images from prompts, analyze videos, and send any media file through connected channels. Each capability is available as a CLI command and as an agent tool.Audio Generation (TTS)
Generate speech from text using the ElevenLabs Text-to-Speech API.Environment Variables
Models
CLI Usage
Options
Voice Note (PTT) Mode
When--send is used, the audio is automatically converted to OGG/Opus format for WhatsApp Push-to-Talk (voice note) delivery. This requires ffmpeg installed on the system.
The conversion pipeline:
- ElevenLabs generates MP3
- ffmpeg converts to OGG/Opus (64kbps, 48kHz, mono)
- Original MP3 is deleted
- OGG file is sent as a voice note
Output
--send is used, Ravi now calls omni send directly and only reports success after the channel delivery request is accepted. The JSON output includes the resolved instanceId, optional threadId, and delivery metadata such as messageId when available.
Audio Transcription
Transcribe audio files to text using Groq (preferred) or OpenAI Whisper.Environment Variables
At least one of
GROQ_API_KEY or OPENAI_API_KEY must be configured. Groq is preferred when both are available due to faster inference.Provider Selection
Supported Formats
Auto-Chunking for Long Audio
Audio files longer than 10 minutes (600 seconds) are automatically split into overlapping chunks for transcription:- Chunk duration: 10 minutes each
- Overlap: 15 seconds between chunks (prevents word loss at boundaries)
- Splitting tool: ffmpeg (required for chunking)
- Duration detection: ffprobe
CLI Usage
Output
Inbound Auto-Transcription
Voice messages received through WhatsApp, Telegram, or other channels are automatically transcribed. The transcript is included in the agent’s prompt:Image Generation
Generate images from text prompts using the configured image provider. Ravi supports Gemini and OpenAI image models. There is no automatic provider fallback: if the selected provider fails, the command fails. Retry explicitly with another--provider if needed.
Environment Variables
Models
OpenAI can be selected with
--provider openai --model gpt-image-2 or via defaults.
CLI Usage
Options
Defaults
Configure an instance default so agents in that instance do not need to pass provider/model flags:Source Image Editing
Pass an existing image with--source to use it as a reference for editing. Supported input formats: PNG, JPEG, WebP, GIF.
Output
--send is used, Ravi delivers the generated image through omni send directly instead of queueing a background NATS event. Success now means the send request reached Omni successfully.
Video Analysis
Analyze videos from YouTube URLs or local files using Google Gemini. Extracts title, summary, topics, full transcript, and timestamped visual descriptions.Environment Variables
The default model is
gemini-2.5-flash.
CLI Usage
Supported Formats
YouTube: Public videos only (private and unlisted are not supported). Local files:
Local files are uploaded to the Gemini Files API before analysis.
Output Structure
The analysis is saved as a markdown file with these sections:- Title — Video title or auto-generated descriptive title
- Duration — Estimated duration in MM:SS format
- Summary — 2-3 paragraph comprehensive summary
- Topics — Bullet list of main topics covered
- Transcript — Complete transcription of spoken content with speaker labels
- Visual Description — Timestamped descriptions of visual content (
[MM:SS-MM:SS]format)
Limitations
- YouTube videos must be public
- Videos longer than 1 hour may exceed token limits or take a long time
- Analysis quality depends on video clarity and audio quality
Sending Media
Send any media file (image, video, audio, document) through a connected channel.ravi media send is synchronous and uses omni send under the hood, so it returns a real delivery ack/error instead of only queueing ravi.media.send.
CLI Usage
Options
Supported File Types
The media type is auto-detected from the file extension:Sticker Library
Ravi has an official typed sticker catalog for channels that explicitly support stickers. Initial outbound support is WhatsApp only. The sticker catalog is stored outside the system prompt at:Enable Stickers For An Agent
Sticker prompt instructions are opt-in per agent:runtimeSessionParams.stickers.enabled=true.
Manage Stickers
Send A Sticker
From a routed WhatsApp session:Inbound Media
When a message arrives with media (images, videos, documents, stickers, audio), ravi automatically downloads the file and includes the local path in the agent’s prompt.Download Behavior
- Download location: Agent’s
attachments/directory under its CWD (e.g.,~/ravi/main/attachments/) - Max file size: 20 MB (larger files are skipped with a note)
- Naming convention:
{timestamp}-{messageId}.{ext} - Supported types: Images, videos, PDFs, documents, audio, stickers
Prompt Format
Downloaded media appears in the agent’s prompt with the local file path:Environment Variables Summary
*At least one of
GROQ_API_KEY or OPENAI_API_KEY is required for transcription. Both audio generation and image generation require their respective API keys independently.System Dependencies
Install with:
brew install ffmpeg (macOS) or apt install ffmpeg (Linux).