Libraries And Sdk
@ageofai/vp-ui
A beautiful, reusable voice interface component for React applications. Features real-time audio visualization, transcript display, and seamless integration with Pipecat AI servers.
Basic Configuration
Configure your voice interface with essential connection settings, authentication tokens, and basic features like microphone and camera access.
Key Properties:
- •
serverUrl- Pipecat server endpoint - •
systemPrompt- AI assistant instructions - •
authToken- Authentication token - •
enableMic/enableCam- Media permissions
Theme & Styling
Customize the appearance with built-in themes, size variants, and control which UI elements are visible to match your application's design.
Available Options:
- •
theme- 'dark' | 'light' - •
size- 'sm' | 'md' | 'lg' - •
showInfo/showShare/showTranscript- UI toggles
Advanced Styling
Apply custom CSS classes to different parts of the component and add custom event handlers for sharing and info actions.
Custom Classes:
- •
className- Main container - •
orbClassName- Voice orb styling - •
controlsClassName- Control buttons - •
transcriptClassName- Transcript area
Using the Hook Separately
For advanced use cases, use the useAgeOfAiConnect hook independently to build completely custom voice interfaces.
Hook Returns:
- •
client- WebSocket client instance - •
isConnected/isConnecting- Connection state - •
transcript- Message history - •
isBotSpeaking/isUserSpeaking- Audio state
@ageofai/vp-sdk
The official Node.js SDK for the Scoreexl API—a secure audio AI platform providing Speech-to-Text (STT), Text-to-Speech (TTS) with Google Chirp3 HD & Deepgram Aura-2, RAG-based knowledge, analytics, credits, and notifications.
Authentication
Manage user accounts with registration, login, and logout functionality. All API calls require authentication.
Available Methods:
- •
register()- Create new user account - •
login()- Authenticate existing user - •
logout()- End user session
Text-to-Speech (TTS)
Convert text to high-quality speech using Google Chirp3 HD and Deepgram Aura-2 voices. Support for multiple languages and voice styles.
TTS Workflow:
- 1. List available voices
- 2. Submit synthesis request
- 3. Poll for completion status
- 4. Download generated audio
Speech-to-Text (STT)
Transcribe audio files to text with high accuracy. Supports multiple audio formats and provides detailed segment information with timestamps.
STT Features:
- • Multiple audio format support
- • Detailed segment timestamps
- • High accuracy transcription
- • Async processing with status polling
Credits & Analytics
Monitor your API usage, manage credits, and access detailed analytics. Track consumption patterns and optimize your usage.
Management Features:
- • Real-time credit balance
- • Usage analytics and reporting
- • Credit purchase system
- • Historical usage data
RAG & Agents
Leverage Retrieval-Augmented Generation (RAG) for document-based Q&A and run specialized AI agents for various tasks.
Advanced AI Features:
- • Document-based RAG sessions
- • Specialized AI agents
- • Context-aware responses
- • Multi-document querying
Minimal Voice UI
A clean, minimal voice interface setup perfect for simple applications or prototyping.
Next.js Integration
Full-featured Next.js page with environment variables, custom styling, and responsive design.
Complete TTS Workflow
End-to-end text-to-speech implementation with authentication, voice selection, synthesis, and audio download.
STT with Error Handling
Robust speech-to-text implementation with comprehensive error handling and status polling.
TypeScript Support
Both the UI library and SDK provide comprehensive TypeScript definitions for better development experience and type safety.
Available Types:
- •
VoiceUIProps- Component props - •
UseAgentConnectOptions- Hook options - •
TranscriptMessage- Message structure
Error Handling
All SDK errors extend a base ScoreexlError and include message, statusCode, code, and details properties for comprehensive error handling.
Error Types:
- •
AuthenticationError- Login/auth issues - •
RateLimitError- API rate limiting - •
TranscriptionError- STT failures - •
SynthesisError- TTS failures
Requirements & Configuration
System requirements and advanced configuration options for both the UI library and SDK.
System Requirements:
- • React: 18.0.0 or higher
- • Node.js: 16.0.0 or higher
- • Tailwind CSS: For styling (recommended)
- • Pipecat Server: Running instance for voice processing