ElevenLabs embed · Vanilla HTML
This is the hello-world integration. Fork it, run locally, and drop the same embed into your product shell.
From the repo root, ./start runs all examples (or ./start sveltekit / ./start nextjs / ./start react-vite for those frameworks). To run only this one:
cd examples/elevenlabs-embed/vanilla
npx serve . -l tcp://localhost:4006
# http://localhost:4006 Local URL: http://localhost:4006
The demo uses a single public experience id
(exp_01EXAMPLES_COFFEE_BARISTA) written directly in the page.
Load the CDN script and mount the web component with one experience id:
<script src="https://cdn.liforma.ai/sdk/v2/client.js"><\/script>
<liforma-experience experience-id="exp_01EXAMPLES_COFFEE_BARISTA"></liforma-experience> helloByo.js — copy the npm pattern from docs —
vanilla wraps bridge.jsapp.js — demo scaffolding onlybridge.js — CDN port of the SDK helperserver.mjs — demo mint / proxyUse the Liforma ElevenLabs embed example as source material to build a vanilla HTML app. Source repo folder: examples/elevenlabs-embed/vanilla Copy `helloByo.js` (`startByoSpeech`) — thin wrapper over `bridge.js` / `connectElevenLabsAgent`. `app.js` is demo scaffolding only. Prefer `@liforma/client/elevenlabs` in bundled apps. Preserve: - CDN script: https://cdn.liforma.ai/sdk/v2/client.js - `Experience.startSession` in presenter mode with `speechInputMode: 'off'` - ElevenLabs → Liforma bridge (mute ElevenLabs speaker; pipe PCM into createUtterance) - local signed-URL proxy pattern (never ship ElevenLabs API keys to production browsers) Adapt: - branding - experience id - your ElevenLabs agent - production signed-URL backend