{"id":9,"date":"2026-11-11T06:11:40","date_gmt":"2026-11-11T06:11:40","guid":{"rendered":"https:\/\/rosafprint.shop\/?page_id=9"},"modified":"2026-11-11T06:11:40","modified_gmt":"2026-11-11T06:11:40","slug":"call","status":"publish","type":"page","link":"https:\/\/rosafprint.shop\/?page_id=9","title":{"rendered":"call"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\t\t<div id=\"air-demo\" style=\"max-width:640px;border:1px solid #d9e4e3;border-radius:12px;padding:16px;font:16px\/1.5 system-ui,sans-serif\">\n\t\t\t<div style=\"display:flex;justify-content:space-between;align-items:center;gap:12px\">\n\t\t\t\t<strong>Rosaf receptionist<\/strong>\n\t\t\t\t<span id=\"air-status\" style=\"color:#5d7476;font-size:14px\">Ready<\/span>\n\t\t\t<\/div>\n\t\t\t<div id=\"air-transcript\" aria-live=\"polite\" style=\"min-height:180px;max-height:360px;overflow:auto;margin:12px 0;display:flex;flex-direction:column;gap:8px\"><\/div>\n\t\t\t<button id=\"air-btn\" type=\"button\" style=\"padding:10px 16px;border-radius:8px;border:0;background:#0e7c7b;color:#fff;font-weight:600;cursor:pointer\">Start call<\/button>\n\t\t\t<p style=\"color:#5d7476;font-size:13px;margin:10px 0 0\">Your browser will ask to use the microphone. This is a live AI call; bookings made here are real.<\/p>\n\t\t<\/div>\n\t\t<script type=\"module\">\n\t\timport Vapi from \"https:\/\/cdn.jsdelivr.net\/npm\/@vapi-ai\/web\/+esm\";\n\t\tconst C = {\"key\":\"1ac92b90-1369-4319-86d6-156298d3ca55\",\"assistant\":\"bfa3dfd2-efb6-4264-8c59-f0a031abd058\"};\n\t\tconst vapi = new Vapi(C.key);\n\t\tconst btn = document.getElementById(\"air-btn\"), st = document.getElementById(\"air-status\"), box = document.getElementById(\"air-transcript\");\n\t\tlet live = false;\n\t\tconst add = (who, text) => {\n\t\t\tconst d = document.createElement(\"div\");\n\t\t\td.textContent = text;\n\t\t\td.style.cssText = \"padding:8px 12px;border-radius:12px;max-width:85%;\" + (who === \"assistant\" ? \"background:#dff1ef;align-self:flex-start\" : \"background:#eef0f2;align-self:flex-end\");\n\t\t\tbox.append(d); box.scrollTop = box.scrollHeight;\n\t\t};\n\t\tconst note = t => { const d = document.createElement(\"div\"); d.textContent = t; d.style.cssText = \"font-size:13px;color:#5b4bb7;border:1px dashed #5b4bb7;border-radius:8px;padding:6px 10px\"; box.append(d); box.scrollTop = box.scrollHeight; };\n\t\tvapi.on(\"call-start\", () => { live = true; st.textContent = \"Connected\"; btn.textContent = \"End call\"; btn.disabled = false; });\n\t\tvapi.on(\"call-end\", () => { live = false; st.textContent = \"Call ended\"; btn.textContent = \"Start call\"; btn.disabled = false; });\n\t\tvapi.on(\"speech-start\", () => st.textContent = \"Receptionist speaking\");\n\t\tvapi.on(\"speech-end\", () => st.textContent = \"Listening\");\n\t\tvapi.on(\"error\", e => { console.error(e); st.textContent = \"Error. Check the console and your keys.\"; btn.disabled = false; btn.textContent = \"Start call\"; });\n\t\tvapi.on(\"message\", m => {\n\t\t\tif (m.type === \"transcript\" && m.transcriptType === \"final\") add(m.role, m.transcript);\n\t\t\tif (m.type === \"tool-calls\") note(\"Tool called: \" + ((m.toolCalls || m.toolCallList || []).map(t => (t.function && t.function.name) || t.name).join(\", \") || \"tool\"));\n\t\t});\n\t\tbtn.addEventListener(\"click\", () => {\n\t\t\tbtn.disabled = true;\n\t\t\tif (live) { vapi.stop(); return; }\n\t\t\tbox.innerHTML = \"\"; st.textContent = \"Connecting\";\n\t\t\tvapi.start(C.assistant);\n\t\t});\n\t\t<\/script>\n\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-9","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rosafprint.shop\/index.php?rest_route=\/wp\/v2\/pages\/9","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rosafprint.shop\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rosafprint.shop\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rosafprint.shop\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rosafprint.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9"}],"version-history":[{"count":1,"href":"https:\/\/rosafprint.shop\/index.php?rest_route=\/wp\/v2\/pages\/9\/revisions"}],"predecessor-version":[{"id":11,"href":"https:\/\/rosafprint.shop\/index.php?rest_route=\/wp\/v2\/pages\/9\/revisions\/11"}],"wp:attachment":[{"href":"https:\/\/rosafprint.shop\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}