Browser SDK
Drop the JS SDK into a single HTML file. The mic button captures audio, streams it to Vaani, and prints the live transcript next to the AI's spoken reply. No build tooling — just a script tag.
The SDK ships an ES module bundle. For a quick demo, point a <script type="module"> at the CDN build; for production, install with npm and bundle yourself.
<!doctype html>
<html>
<body>
<button id="talk">Hold to talk</button>
<pre id="transcript"></pre>
<script type="module">
import Converlane from "https://cdn.jsdelivr.net/npm/vaanivoice/+esm";
const vv = new Converlane({ publicKey: "vv_pub_REPLACE_ME" });
const session = await vv.textvoice.connect({ language: "hi-IN" });
session.on("transcript", (chunk) => {
document.getElementById("transcript").append(chunk.text + "\n");
});
const btn = document.getElementById("talk");
btn.addEventListener("mousedown", () => session.startListening());
btn.addEventListener("mouseup", () => session.stopListening());
</script>
</body>
</html>Replit and zip downloads are placeholders for now — bucket wiring is tracked as a follow-up.