wrinkly_cow
07/18/2024, 4:49 PMwrinkly_cow
07/18/2024, 4:49 PMVapi
07/18/2024, 4:50 PMVapi
07/18/2024, 4:50 PMVapi
07/18/2024, 4:51 PMwrinkly_cow
07/18/2024, 4:57 PMwrinkly_cow
07/18/2024, 5:19 PMwrinkly_cow
07/18/2024, 6:32 PMShubham Bajaj
07/18/2024, 8:07 PMwrinkly_cow
07/18/2024, 8:07 PMShubham Bajaj
07/18/2024, 8:07 PMShubham Bajaj
07/18/2024, 8:09 PMwrinkly_cow
07/18/2024, 8:10 PMrgb(93, 254, 202),
type: "round",
icon: https://unpkg.com/lucide-static@0.321.0/icons/audio-lines.svg,
},
loading: {
color: rgb(93, 124, 202),
type: "round",
icon: https://unpkg.com/lucide-static@0.321.0/icons/audio-lines.svg,
},
active: {
color: rgb(255, 0, 0),
type: "round",
icon: https://unpkg.com/lucide-static@0.321.0/icons/phone-off.svg,
},
};
(function (d, t) {
var g = document.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = "https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g, s);
g.onload = function () {
console.log("Vapi SDK loaded");
const vapi = window.vapiSDK.run({
apiKey: apiKey,
squad: assistant,
config: buttonConfig,
});
vapiInstance = vapi;
// Event listeners
vapiInstance.on('speech-end', () => {
console.log('Speech has ended');
});
vapiInstance.on('call-start', () => {
console.log('Call has started');
});
vapiInstance.on('call-end', () => {
console.log('Call has stopped');
});
vapiInstance.on('volume-level', (volume) => {
console.log(Assistant volume level: ${volume});
});
vapiInstance.on('message', (message) => {
console.log(message);
});
vapiInstance.on('error', (e) => {
console.error(e);
});
};
})(document, "script");Shubham Bajaj
07/18/2024, 8:12 PMwrinkly_cow
07/18/2024, 8:13 PMShubham Bajaj
07/18/2024, 8:18 PMShubham Bajaj
07/18/2024, 8:18 PMwrinkly_cow
07/18/2024, 8:21 PMShubham Bajaj
07/18/2024, 8:22 PMShubham Bajaj
07/18/2024, 8:22 PMShubham Bajaj
07/20/2024, 10:41 PMShubham Bajaj
07/22/2024, 6:37 PM