AI Stream SDK

Create intelligent streaming agents with voice synthesis and AI

Overview

The AI Stream SDK is a powerful toolkit for creating autonomous streaming agents that can think, speak, and stream content intelligently.

TTS

Multiple voice providers

AI

LLM integration

Streaming

RTMP/WebRTC support

Modular

Easy to extend

Quick Start

Get up and running in minutes:

npm install cp env.example .env # Add your API keys to .env npm run test:demo

Features

  • Multiple TTS Providers
  • LLM Integration (OpenAI, Claude)
  • RTMP Streaming
  • Docker Support
  • Comprehensive Docs
  • Example Scripts

System Status

TTS Ready
LLM Ready
Stream Ready

Interactive Demo

Basic Usage
AI Features
Streaming
Advanced

Basic Agent Creation

const { Agent } = require('ai-stream-sdk'); const agent = new Agent({ id: 'my-bot', persona: { name: 'My AI Bot' } }); // Generate speech const audioPath = await agent.speak('Hello, world!'); console.log('Audio generated:', audioPath);

AI-Powered Features

// AI thinking const response = await agent.think('What should I talk about today?'); // AI thinking and speaking const audioPath = await agent.thinkAndSpeak('Tell me about AI'); // AI-powered streaming await agent.startAIStream({ imagePath: '/path/to/image.png', prompt: 'Give a 30-second intro about AI', rtmpUrl: 'rtmp://your.stream.url' });

Streaming Configuration

// Start streaming const ffmpegProcess = await agent.startStream({ imagePath: '/path/to/image.png', text: 'Welcome to my stream!', rtmpUrl: 'rtmp://live.twitch.tv/app/YOUR_KEY' }); // Stop streaming agent.stopStream();

Advanced Configuration

// Custom TTS provider process.env.TTS_PROVIDER = 'elevenlabs'; process.env.ELEVENLABS_API_KEY = 'your-key'; // Custom LLM provider process.env.LLM_PROVIDER = 'openai'; process.env.OPENAI_API_KEY = 'your-key'; // Advanced agent with custom options const agent = new Agent({ id: 'advanced-bot', persona: { name: 'Advanced Bot' }, defaults: { resolution: '1920x1080', framerate: 60 } });
Ready to run demos...

Documentation

API Reference

Complete API documentation

Setup Guide

TTS and LLM configuration

Troubleshooting

Common issues and solutions

Examples

Ready-to-run code examples