For developers · Developer preview
Freshflo Voice SDK
Your speech recogniser gives you what people said. Freshflo gives you what they meant: fillers and stutters gone, self-corrections applied, grammar slips fixed (including Indian English), lists and emails laid out, ₹ amounts grouped the Indian way, Indian languages punctuated properly. Deterministic, offline, about 500 KB of WebAssembly (compressed).
Try it
Use it in JavaScript
import init, { clean, detect_list, punctuate, build_prompt, check } from "./freshflo_voice.js";
await init(); // loads freshflo_voice_bg.wasm
clean("um so we should push the launch to tuesday no wait wednesday", "");
// → "We should push the launch to Wednesday"
clean("send the invoice for 250000 rupees", JSON.stringify({ regional: "india" }));
// → "Send the invoice for ₹2,50,000"
detect_list("first eggs second milk third bread"); // → '{"kind":"numbered","items":3}'
punctuate("मुझे कल जाना है.", "hi"); // → "मुझे कल जाना है।"
Download: freshflo_voice.js + freshflo_voice_bg.wasm (put both next to each other).
Bring your own language model
The rules handle the common cases well, but they're rules: some phrasings only a model fixes (for example "me and him will come later" mid-sentence). For the smartest clean-up, give your model Freshflo's instructions, then check its answer. check rejects output that answered the question, summarised or invented content, so a misbehaving model never reaches your users.
const { system, user } = JSON.parse(build_prompt(raw, JSON.stringify({ tone: "formal", appName: "Gmail" })));
const reply = await yourModel({ system, user }); // any chat model
const text = check(reply, raw, false) || clean(raw, ""); // fall back to the rules
const final = polish_text(text, ""); // the deterministic last pass
Use it in Rust
use freshflo_core::{cleanup, polish, Tone};
let raw = "um the meeting is is moved to friday";
let text = polish::apply(&cleanup::rules(raw, Tone::Casual, false), &polish::Options::default());
// → "The meeting is moved to Friday"
Reference
| Function | What it does |
|---|---|
clean(raw, options) | Full rule-based clean-up of a raw transcript. |
polish_text(text, options) | Only the deterministic last pass, for text a model already cleaned. |
detect_list(text) | Whether speech is a numbered or bulleted list, and how many items. |
punctuate(text, lang) | Indian-script sentence ends: । (hi, bn, pa, ne), ۔ (ur). |
script_prompt(lang) | A sentence in the language's script, to pass as Whisper's prompt so it writes in that script. |
build_prompt(raw, options) | Freshflo's system and user messages for your own model, as JSON. |
check(output, raw, translating) | The model's text if it's a faithful clean-up, otherwise "". |
Options (JSON, all optional): tone (formal, casual, veryCasual, prompt), lists, email, profanity (cleanUp, mask, keep), regional (none, india, us, uk), dictionary (names to spell your way), language, grammar, bullet, appName, windowTitle, customInstructions, outputLanguage.
Status and licence
Developer preview: the API may change. It's the same engine as the Freshflo apps for Mac and Windows, checked against the Mac app on 1,434 cases on every build. Free for evaluation and non-commercial use; for commercial use, or an on-device Indian-language speech engine, tell us what you're building.