Bell works with the speech-to-text you already use. Sign up with your email to get an API key and 60 free minutes.
const bell = new WebSocket("wss://api.rabellabs.com/v1/conversation");
bell.onopen = () =>
bell.send(JSON.stringify({ key: process.env.RABEL_API_KEY }));
// your speech-to-text's words so far, each time it has new ones
stt.on("words", (text) =>
bell.send(JSON.stringify({ type: "heard", text })));
// its final words, when it ends the turn
stt.on("endOfTurn", (text) =>
bell.send(JSON.stringify({ type: "end_of_turn", text })));
bell.onmessage = (e) => {
const m = JSON.parse(e.data);
if (m.type === "ready") stt.start();
// start your reply on Bell's guess
if (m.type === "guess") reply.start(m.text);
// the guess that matched, or null
if (m.type === "end_of_turn") reply.keep(m.guess_id);
};
URL = "wss://api.rabellabs.com/v1/conversation"
async with websockets.connect(URL) as bell:
await bell.send(json.dumps({"key": os.environ["RABEL_API_KEY"]}))
# your speech-to-text's words so far, each time it has new ones
async def on_words(text):
await bell.send(json.dumps({"type": "heard", "text": text}))
# its final words, when it ends the turn
async def on_end_of_turn(text):
await bell.send(json.dumps({"type": "end_of_turn", "text": text}))
async for msg in bell:
m = json.loads(msg)
if m["type"] == "ready":
stt.start(on_words, on_end_of_turn)
elif m["type"] == "guess":
reply.start(m["text"]) # start your reply on Bell's guess
elif m["type"] == "end_of_turn":
reply.keep(m["guess_id"]) # the guess that matched, or None
Measured
670 ms
sooner to the agent’s reply with Bell, the median in the Pipecat example.
Bell takes your speech-to-text’s words, not audio.
A conversation is one WebSocket. Each turn is three messages.
See the examples-
You send
heardThe words so farSend the turn’s words each time your speech-to-text has new ones.
-
Bell sends
guessA guess at the whole turnBell guesses the turn’s words while the caller is still talking. Start your reply on the guess.
-
You send, and Bell answers
end_of_turnThe end of the turnSend the final words when your speech-to-text ends the turn. Bell answers with the guess that matched, so you keep that reply.
Any speech-to-text that sends its partial words as they come fits. Bell has been run with Deepgram’s streaming speech-to-text and with Deepgram Flux.
Start in three steps.
You don’t have to talk to us or agree to a pilot first. A code from us adds free minutes to your account.
Get API key-
Sign up with your email
We email you a link. It works once, for 24 hours.
-
Open the link to see your key
Your API key is shown once. Copy it and store it somewhere safe.
-
Make your first request
The first example sends a sample turn’s words to Bell and prints its guesses.
Each key has a few limits during the beta.
Limits can change during the beta. If you need more, contact us.
Contact usWorks with the stack you already run.
Rabel APIBeta
Bell, at $0.005 a minute, billed by the second while a conversation is open. Every account starts with 60 free minutes.
Contact us
Leave your email and we’ll set you up.
Thanks. We’ll be in touch.