voiceCall.on('speech-start', () => {
console.log('Speech has started');
});
voiceCall.on('speech-end', () => {
console.log('Speech has ended');
});
voiceCall.on('call-start', () => {
console.log('Call has started');
});
voiceCall.on('call-end', () => {
console.log('Call has stopped');
});
voiceCall.on('volume-level', (volume) => {
console.log(`Companion volume level: ${volume}`);
});
voiceCall.on('transcript', (message) => {
console.log(`${message.role === "user" ? "User" : "Companion"} transcript:`);
console.log(message.transcript);
});
voiceCall.on('function-call', (function) => {
console.log(`Function ${function.name} was called with arguments ${function.arguments}`);
});
voiceCall.on('error', (e) => {
console.error(e);
});