Back to Blog
Engineering15 minJune 18, 2025
Building Your First Voice AI Application with the ALPANDIA SDK
From npm install to live voice analysis in under 15 minutes. A step-by-step tutorial for getting started with the ALPANDIA TypeScript SDK.
D
Dev Kim
Developer Advocate
This tutorial walks you through building a complete voice AI application using the ALPANDIA TypeScript SDK — from installation to live transcription and translation in a single Node.js application.
Prerequisites
- Node.js 18+
- An ALPANDIA API key (get one at alpandia.com/developers)
- Basic TypeScript knowledge
Installation
bash
npm install @alpandia/sdk
Initialize the Client
typescript
import Alpandia from '@alpandia/sdk';
const client = new Alpandia({
apiKey: process.env.ALPANDIA_KEY,
region: 'ap-southeast-1',
});Start a Voice Stream
typescript
const session = await client.voice.stream({
language: 'auto-detect',
features: ['translate', 'sentiment', 'scam-detect'],
onTranscript: (data) => {
console.log(`[${data.speaker}]: ${data.text}`);
console.log(`Translation: ${data.translation}`);
console.log(`Sentiment: ${data.sentiment.label}`);
},
onScamAlert: (alert) => {
if (alert.severity === 'high') {
triggerSupervisorAlert(alert);
}
}
});
// Connect your audio source
await session.connect(audioInputStream);That's all it takes to get live transcription, translation, and fraud detection running. The stream handles reconnection, buffering, and error recovery automatically.
Full API reference and additional examples are available in the ALPANDIA Developer Portal.
More in Engineering