Embed the voice widget
The voice widget lets visitors to your website talk to the agent in the browser, without a Diska account. The widget always talks to the agent's published version.
Prerequisites
- The agent has a published version — see Publish and receive calls.
- The public channel is enabled. Under Publicação → Widget (Publishing → Widget), click Ativar canal público (Enable public channel) — it is the same channel as the Link público (Public link).
Enabling the public channel requires the Owner, Administrator or Member role.
Get the code
Under Publicação → Widget, the Código incorporável (Embed code) section has two variants. Use the copy button next to each.
Script (Recomendado — Recommended) — paste before </body>. The loader draws the button and handles position and open/close:
<script src="https://diska.ai/widget/v1.js" data-diska-token="pub_…" async></script>
Alternativa sem JavaScript (No-JavaScript alternative) — for sites that block third-party scripts: a fixed iframe in the bottom-right corner, without the 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>
allow="microphone" attribute on the iframe. Without it, the browser refuses the microphone inside the frame and the call never starts. The script variant sets it for you.Customise the look
The settings live in the same tab and are saved automatically (A guardar… → Guardado, Saving… → Saved). They apply to the widget already installed — you do not need to paste the code again.
| Section | Options |
|---|---|
| Visualizador (Visualiser) | Esfera (Sphere) or Imagem (Image — enter an https:// image URL), shown while the agent speaks. |
| Paleta de cores (Colour palette) | Visualiser, card background, button text, button background and text (hex colours). |
| Personalização de texto (Text customisation) | Call button, availability, starting call, during the call and end of call (up to 60 characters). |
| Widget flutuante (Floating widget) | Ativar widget flutuante (Enable floating widget) shows a fixed button in a corner of the site; when off, the widget appears where you pasted the code. In floating mode you can also Mostrar nome do agente quando recolhido (Show agent name when collapsed), Expandir ao carregar a página (Expand on page load), choose the Posição (Position — bottom/top, right/left) and an Atraso (ms) (Delay) of up to 60,000. |
The Pré-visualização do widget (Widget preview) next to it is live: you can start a call with the published version from it.
Update the agent
The widget always uses the latest published version. To change what the agent says or does, edit it and publish again — the code on your site does not change.
If you use Gerar novo link (Generate new link) on the Link público tab, the token changes and codes already pasted stop working: copy the code again.
Troubleshooting
- Nothing appears on the page. The widget hides itself rather than breaking your site. Open the browser console:
[diska-widget] indisponívelmeans the public channel is off or the agent has no published version; a network error means the browser could not reach Diska. - The microphone prompt never appears. Check the
allowattribute (iframe variant) and that your site is served over HTTPS — browsers block the microphone on insecure pages. - Is the call recorded? Only if Gravar chamadas (Record calls) is on for the agent — see Record calls.

