Guides
Embed the voice widget
Put your published agent on any website with one script tag.
The voice widget lets visitors of your own website talk to your published agent — no Diska account needed on their side.
Prerequisites
- The agent has a published version (drafts are never served to visitors).
- The public link is enabled in Publishing Settings → Public link.
Get the embed code
Open Publishing Settings → Widget. Two variants are offered:
Script (recommended) — paste before </body>. The loader renders the floating launcher (or an inline card, per your widget settings) and handles open/close:
<script src="https://diska.ai/widget/v1.js" data-diska-token="pub_…" async></script>
Iframe (no JavaScript) — for sites that block third-party scripts. A fixed-position frame with no loader:
<iframe id="audio_iframe" src="https://diska.ai/widget/pub_…"
allow="microphone" width="400px" height="550px" scrolling="no"
style="position: fixed; bottom: 0; right: 0; background: transparent;
border: none; z-index: 999"></iframe>
Keep the
allow="microphone" attribute (the script variant sets allow="microphone; autoplay" on the iframe it creates). Without it the browser refuses microphone access inside the cross-origin frame and the call can never start.Appearance
Everything visual — colors, texts, floating vs inline, the visualizer — is configured in the Widget tab and applies live; you never need to re-paste the snippet. The widget always speaks with the published version of the agent.
Troubleshooting
- Nothing renders on the page — the widget hides itself rather than break your site. Open the browser console:
[diska-widget] indisponívelmeans the public link is disabled or the agent has no published version; a network error names the API host the loader tried. - Different API host — self-hosted or staging deployments can point the loader elsewhere with
data-api-base="https://api.example.com/api/v1"on the script tag. - Mic prompt never appears — check the
allowattribute above, and that your site is served over HTTPS (browsers block microphone access on insecure origins).

