|
| 1 | +# @ariontalk/widget |
| 2 | + |
| 3 | +Drop-in voice AI widget for any website — powered by Gemini Live with interactive highlights. |
| 4 | + |
| 5 | +## CDN (quickest) |
| 6 | + |
| 7 | +```html |
| 8 | +<ariontalk-widget lang="en" settings></ariontalk-widget> |
| 9 | +<script type="module" src="https://cdn.jsdelivr.net/npm/@ariontalk/widget@latest/dist/ariontalk.js"></script> |
| 10 | +``` |
| 11 | + |
| 12 | +## Install |
| 13 | + |
| 14 | +```bash |
| 15 | +npm install @ariontalk/widget |
| 16 | +``` |
| 17 | + |
| 18 | +## Usage |
| 19 | + |
| 20 | +```html |
| 21 | +<ariontalk-widget |
| 22 | + lang="en" |
| 23 | + engine="gemini" |
| 24 | + token-server="https://your-server.com/api/token" |
| 25 | + settings |
| 26 | + interactive-highlights |
| 27 | +></ariontalk-widget> |
| 28 | + |
| 29 | +<script type="module"> |
| 30 | + import '@ariontalk/widget'; |
| 31 | +</script> |
| 32 | +``` |
| 33 | + |
| 34 | +### Attributes |
| 35 | + |
| 36 | +| Attribute | Default | Description | |
| 37 | +|-----------|---------|-------------| |
| 38 | +| `lang` | `"en"` | Language code (`auto`, `en`, `es`, `ja`, `fr`, …) | |
| 39 | +| `engine` | `"local"` | `"local"` (browser) or `"gemini"` (cloud) | |
| 40 | +| `token-server` | — | Token endpoint URL (required for Gemini) | |
| 41 | +| `position` | `"bottom-right"` | `"bottom-right"` or `"bottom-left"` | |
| 42 | +| `theme` | `"light"` | `"light"` or `"dark"` | |
| 43 | +| `settings` | `false` | Show settings panel | |
| 44 | +| `interactive-highlights` | `false` | Scroll-and-highlight during speech (Gemini) | |
| 45 | +| `log-level` | `"disabled"` | `"disabled"` \| `"error"` \| `"warning"` \| `"info"` \| `"debug"` | |
| 46 | + |
| 47 | +### Barge-in plugins |
| 48 | + |
| 49 | +```js |
| 50 | +import '@ariontalk/widget'; |
| 51 | +import { SileroVadDetector } from '@ariontalk/plugin-silero-vad'; |
| 52 | + |
| 53 | +const widget = document.querySelector('ariontalk-widget'); |
| 54 | +widget.bargeInPlugins = [ |
| 55 | + { id: 'silero-vad', label: 'Smart VAD', create: () => new SileroVadDetector() }, |
| 56 | +]; |
| 57 | +``` |
| 58 | + |
| 59 | +### Events |
| 60 | + |
| 61 | +- `at-session-start` — fired when a voice session begins |
| 62 | +- `at-session-end` — fired when a voice session ends (includes `detail.duration`) |
| 63 | + |
| 64 | +## License |
| 65 | + |
| 66 | +MIT — see [LICENSE](https://github.com/luixaviles/ariontalk/blob/main/LICENSE) |
| 67 | + |
| 68 | +## Links |
| 69 | + |
| 70 | +- [ariontalk.com](https://ariontalk.com) |
| 71 | +- [GitHub](https://github.com/luixaviles/ariontalk) |
0 commit comments