Vue SDK for ItanniX Voice AI platform
npm install @itannix/vueVue SDK for the ItanniX Voice AI platform. Add real-time voice interactions to your Vue app with a simple composable or component.
``bash`
npm install @itannix/vue
` Status: {{ status }} {{ msg.role }}: {{ msg.text }}vue
`
` Status: {{ status }}vue
client-id="your-client-id"
client-secret="your-client-secret"
@status-change="handleStatusChange"
@transcript="handleTranscript"
@assistant-message="handleAssistantMessage"
/>
`
| Option | Type | Required | Description |
|--------|------|----------|-------------|
| clientId | string | Yes | Your ItanniX client ID |clientSecret
| | string | Yes | Your client secret |serverUrl
| | string | No | API server URL (default: https://api.itannix.com) |onTranscript
| | (text: string) => void | No | Called when user speech is transcribed |onAssistantMessage
| | (text: string, done: boolean) => void | No | Called with assistant response (streaming) |onFunctionCall
| | (name, args, callId) => void | No | Called when assistant invokes a function |onError
| | (error: Error) => void | No | Called on connection errors |
| Property | Type | Description |
|----------|------|-------------|
| status | Ref | Current connection status (reactive) |connect
| | () => Promise | Start voice connection |disconnect
| | () => void | End voice connection |sendFunctionResult
| | (callId, result) => void | Send function call result back to assistant |
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| clientId | string | Yes | Your ItanniX client ID |clientSecret
| | string | Yes | Your client secret |serverUrl
| | string | No | API server URL |
| Event | Payload | Description |
|-------|---------|-------------|
| statusChange | ConnectionStatus | Connection status changed |transcript
| | string | User speech transcribed |assistantMessage
| | { text: string, done: boolean } | Assistant response (streaming) |functionCall
| | { name: string, args: object, callId: string } | Function call from assistant |error
| | Error | Connection or runtime error |
Access via template ref:
`vue
``
MIT