SDKs
JavaScript/TypeScript
npm install @talkwire/sdk
import { TalkWireClient } from '@talkwire/sdk';
const client = new TalkWireClient({
apiKey: 'tw_live_...',
});
await client.connect();
client.on('transcript', (text) => {
console.log('User:', text);
});
client.on('response', (text) => {
console.log('AI:', text);
});
client.startListening();
Swift (iOS)
// Swift Package Manager
.package(url: "https://github.com/atlasphase/talkwire-swift", from: "1.0.0")
import TalkWire
let client = TalkWireClient(apiKey: "tw_live_...")
try await client.connect()
client.onTranscript = { text, isFinal in
print("User: \(text)")
}
client.onResponse = { text, isFinal in
print("AI: \(text)")
}
client.startListening()