Notifications

0 unread notifications

No unread notifications

You're all caught up!

Libraries And Sdk

@ageofai/vp-ui

UI Library

npm

@ageofai/vp-ui

A beautiful, reusable voice interface component for React. Features real-time audio visualization, transcript display, and seamless Pipecat AI integration.

React 18+
Real-time VoiceAudio VisualizationLive TranscriptionDark / Light themeTypeScript

Install the package and import VoiceUI into any React component. Connect to your Pipecat server with a single prop.

Basic Configuration

Configure essential connection settings, authentication tokens, and basic media access.

Key Properties

serverUrlPipecat server endpoint URL
systemPromptInstructions for the AI assistant
authTokenAuthentication token
enableMic / enableCamToggle microphone and camera access

Theme & Styling

Customize appearance with built-in themes and size variants. Toggle which UI elements are visible.

Available Options

theme'dark' | 'light'
size'sm' | 'md' | 'lg'
showInfo / showShare / showTranscriptToggle individual UI sections

Advanced Styling

Apply custom CSS classes to specific parts of the component and add custom event handlers.

Custom Class Props

classNameMain container element
orbClassNameVoice orb ring and shadow
controlsClassNameControl button row
transcriptClassNameTranscript scroll area

Using the Hook Separately

For fully custom interfaces, use useAgeOfAiConnect directly to manage the connection lifecycle.

Hook Returns

clientWebSocket client instance
isConnected / isConnectingConnection state booleans
transcriptArray of conversation messages
isBotSpeaking / isUserSpeakingReal-time audio activity
@ageofai/vp-sdk

Node.js SDK

API Base URLhttps://voiceai.aicoworker.tech/api/v1
npm

@ageofai/vp-sdk

Official Node.js SDK for the Scoreexl API — STT, TTS (Google Chirp3 HD & Deepgram Aura-2), RAG knowledge, analytics, credits, and notifications.

Node 16+
Full API CoverageTTS & STTRAG + AgentsAnalyticsTypeScriptError Types

Install and initialise with your API key. All API calls are async and return typed responses.

Authentication

Manage user accounts with registration, login, and logout. All subsequent API calls use the stored session token automatically.

Methods

auth.register()Create a new user account
auth.login()Authenticate an existing user
auth.logout()End the current session

Text-to-Speech

Convert text to high-quality speech using Google Chirp3 HD and Deepgram Aura-2. TTS is async — submit, poll, then download.

Workflow

tts.listVoices()Fetch all available voices
tts.synthesize()Submit a synthesis job, returns synthesisId
tts.getSynthesisStatus()Poll status: 'pending' | 'completed' | 'failed'
tts.downloadAudio()Stream the completed audio file

Speech-to-Text

Transcribe audio files asynchronously. Returns full text plus per-word segment timestamps.

Methods

stt.transcribe()Upload audio file and start transcription
stt.getTranscriptionStatus()Poll for result — includes text and segments

Credits & Analytics

Monitor API usage, manage credits, and access detailed analytics with date-range filtering.

Methods

credits.getCredits()Current balance
credits.purchaseCredits()Add credits to account
analytics.getUsageStats()Usage data with from/to date range

RAG & Agents

Use Retrieval-Augmented Generation for document Q&A, and run specialised AI agents.

Methods

rag.createSession()Start a RAG session with document list
rag.query()Ask a question against the session
agents.listAgents()Fetch available agents
agents.runAgent()Execute an agent with a prompt
Example

Minimal Voice UI

Bare-minimum setup — no info bar, no share button, compact size.

Example

Next.js Integration

Full-page Next.js route using environment variables and custom orb styling.

Example

Complete TTS Workflow

End-to-end: authenticate → list voices → synthesise → poll → download.

Example

STT with Error Handling

Robust transcription with typed error catching and status polling.

Reference

TypeScript Support

Both packages ship full TypeScript definitions. Import types alongside components for complete type safety.

Key Types

VoiceUIPropsAll props accepted by the VoiceUI component
UseAgentConnectOptionsOptions for the useAgeOfAiConnect hook
TranscriptMessageSingle message in the transcript array
Reference

Error Handling

All SDK errors extend ScoreexlError and expose message, statusCode, code, and details.

Error Types

AuthenticationErrorLogin or token issues
RateLimitErrorAPI rate limit exceeded
TranscriptionErrorSTT job failure
SynthesisErrorTTS job failure
Reference

Requirements & Configuration

System requirements and advanced client configuration options.

System Requirements

React 18+Required for the UI library
Node.js 16+Required for the SDK
Tailwind CSSRecommended for styling the UI component
Pipecat ServerRunning instance for voice processing