<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[VEXYL Voice AI Engineering]]></title><description><![CDATA[VEXYL Voice AI Engineering]]></description><link>https://vexyl.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 14 Nov 2026 18:40:40 GMT</lastBuildDate><atom:link href="https://vexyl.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[FreePBX AI Receptionist: Replace Your IVR Menu with an AI Agent]]></title><description><![CDATA[Replace your FreePBX IVR menu with an AI receptionist that answers questions, transfers calls to the right extension and takes messages.]]></description><link>https://vexyl.hashnode.dev/freepbx-ai-receptionist-replace-your-ivr-menu-with-an-ai-agent</link><guid isPermaLink="true">https://vexyl.hashnode.dev/freepbx-ai-receptionist-replace-your-ivr-menu-with-an-ai-agent</guid><category><![CDATA[Freepbx]]></category><category><![CDATA[voip]]></category><category><![CDATA[AI]]></category><category><![CDATA[self-hosted]]></category><dc:creator><![CDATA[Gerhard Engel]]></dc:creator><pubDate>Sun, 08 Nov 2026 09:39:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af03f44f368be740754df35/149c7d02-ff43-49f6-bef0-2fc87b340a13.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>A <strong>FreePBX AI receptionist</strong> answers your main number, asks the caller how it can help, and then does what a good front-desk person would: answers simple questions, puts the caller through to the right extension or queue, or takes a message when no one is free. It replaces the “press 1 for sales, press 2 for support” menu with a conversation, and it runs on the FreePBX system you already have.</p>
<p>This guide focuses on the receptionist role: what it should do, how to design the call flow, how it connects to FreePBX, and how transfers to your extensions work. If you want a broader setup walkthrough first, see our post on <a href="https://vexyl.ai/vexyl-ai-as-freepbx-ai-agent-transform-your-pbx-in-minutes/">VEXYL as a FreePBX AI agent</a>.</p>
<h2>What a FreePBX AI receptionist does</h2>
<p>Think about what your best receptionist handles in a day. Most of it fits into a short list:</p>
<ul>
<li><strong>Greets and identifies the need:</strong> “Good morning, Sharma and Associates. How can I help?”</li>
<li><strong>Routes by name, department or reason:</strong> “Can I speak to Priya in accounts?” or “I have a question about my invoice.”</li>
<li><strong>Answers common questions:</strong> office hours, address, directions, which documents to bring.</li>
<li><strong>Takes messages</strong> when the person is busy or it is after hours, and sends them to the right inbox or system.</li>
<li><strong>Screens calls:</strong> asks for the caller’s name and reason before putting them through.</li>
<li><strong>Speaks the caller’s language,</strong> switching between English and Hindi, Tamil or Malayalam as needed.</li>
</ul>
<p>A FreePBX AI assistant can do all of these. What it should not do is make decisions that need authority, such as approving discounts or handling complaints. Those go to a person, quickly.</p>
<h2>AI receptionist vs a FreePBX IVR menu</h2>
<table>
<thead>
<tr>
<th></th>
<th>FreePBX IVR menu</th>
<th>FreePBX AI receptionist</th>
</tr>
</thead>
<tbody><tr>
<td>How callers choose</td>
<td>Key presses from a recorded list</td>
<td>Say a name, department or reason</td>
</tr>
<tr>
<td>Dial by name</td>
<td>Directory with spelling by keypad</td>
<td>“Put me through to Rahul in sales”</td>
</tr>
<tr>
<td>Answers questions</td>
<td>Only recorded announcements</td>
<td>Yes, from information you provide</td>
</tr>
<tr>
<td>Changing it</td>
<td>Re-record prompts, edit menu</td>
<td>Edit text instructions</td>
</tr>
<tr>
<td>After hours</td>
<td>Voicemail or closed message</td>
<td>Takes structured messages, answers FAQs</td>
</tr>
<tr>
<td>Running cost</td>
<td>Near zero per call</td>
<td>Speech and AI usage per minute</td>
</tr>
</tbody></table>
<p>For a deeper comparison of menus and conversational systems, read our guide to <a href="https://vexyl.ai/ai-ivr-system/">AI IVR systems</a>.</p>
<h2>Designing the receptionist call flow</h2>
<p>Before touching the dialplan, write the flow on paper. It will save hours of rework.</p>
<h3>1. Build the routing table</h3>
<p>List every destination the receptionist can transfer to: extensions, ring groups and queues, with the names and reasons that should lead there. For example, “accounts, billing, invoice, payment” all go to the accounts ring group. Include alternative names people use, nicknames and common misspellings of staff names.</p>
<h3>2. Write the greeting</h3>
<p>Short and open. Name the organisation, say it is an automated assistant, and ask how it can help. Do not list departments; that is what you are moving away from.</p>
<h3>3. Confirm before transferring</h3>
<p>“I’ll connect you to the accounts team. Is that right?” A one-second confirmation prevents most wrong transfers.</p>
<h3>4. Decide what happens when nobody answers</h3>
<p>If the transfer target is busy or does not pick up, the call should come back to a sensible place: a queue, voicemail or the AI taking a message. Plan this in FreePBX the same way you would for any inbound route.</p>
<h3>5. Write the after-hours behaviour</h3>
<p>Outside office hours, the receptionist can answer FAQs, take a message with name, number and reason, and tell the caller when they will hear back. FreePBX time conditions can send calls to a different bot or the same bot with after-hours instructions.</p>
<h3>6. Add the information it should know</h3>
<p>Hours, holidays, address, directions, parking, services and prices you are happy to share. Keep it short and accurate, and assign someone to update it.</p>
<h2>How the AI receptionist connects to FreePBX</h2>
<p>FreePBX runs on Asterisk, so the cleanest connection is Asterisk’s AudioSocket application, which streams call audio to a voice gateway over TCP. The steps, at a high level:</p>
<ol>
<li><strong>Install the voice gateway</strong> on the FreePBX server or a nearby one.</li>
<li><strong>Add a custom dialplan context</strong> in <code>extensions_custom.conf</code> that answers the call, creates a session ID, posts the caller’s details (number, name, channel, which bot and language) to the gateway, and hands the audio over with <code>AudioSocket()</code>.</li>
<li><strong>Create a Custom Destination</strong> in FreePBX that points at that context.</li>
<li><strong>Point an inbound route,</strong> a time condition or an IVR option at the Custom Destination.</li>
<li><strong>Configure transfers</strong> so the AI can send callers back into FreePBX extensions, ring groups or queues.</li>
</ol>
<p>The core of the dialplan looks like this:</p>
<blockquote>
<p><code>[voice-assistant]</code></p>
</blockquote>
<blockquote>
<p><code>exten =&gt; _X.,1,Answer()</code></p>
</blockquote>
<blockquote>
<p><code>same =&gt; n,Set(SESSION_UUID=${TRIM(${SHELL(uuidgen)})})</code></p>
</blockquote>
<blockquote>
<p><code>same =&gt; n,AudioSocket(${SESSION_UUID},127.0.0.1:8080)</code></p>
</blockquote>
<blockquote>
<p><code>same =&gt; n,Hangup()</code></p>
</blockquote>
<p>In production you add a step before <code>AudioSocket()</code> that posts the caller ID, channel name, bot and language to the gateway. The <a href="https://vexyl.ai/docs/06-asterisk-audiosocket.html">Asterisk AudioSocket documentation</a> has the full dialplan, firewall settings and per-number bot selection.</p>
<p>If you prefer SIP, FreePBX can also reach the gateway over a pjsip trunk, and the <a href="https://vexyl.ai/docs/05-sip-trunk.html">SIP trunk guide</a> includes the FreePBX GUI settings.</p>
<h2>How transfers to extensions work</h2>
<p>Transfers are what make an AI agent a receptionist rather than an answering machine. With AudioSocket, when the AI decides to transfer, the gateway sends an HTTP request with the call’s Asterisk channel name to a transfer endpoint you provide. That endpoint moves the channel, for example with an AMI Redirect into a queue or extension context, and replies with success. This is why the channel name must be posted with the caller details at the start of the call: without it, the transfer cannot find the call.</p>
<p>For multiple destinations, the usual pattern is to have the AI choose a destination from your routing table and pass it along, so the transfer script can redirect to the right extension, ring group or queue.</p>
<h2>Testing checklist before going live</h2>
<ul>
<li>Call from a mobile in a noisy place and ask for each department by different names.</li>
<li>Ask for staff by first name, full name and nickname.</li>
<li>Interrupt the greeting to check barge-in works.</li>
<li>Test transfers to busy and unanswered extensions.</li>
<li>Test after-hours routing and message taking.</li>
<li>Ask something the receptionist does not know and confirm it offers a transfer instead of guessing.</li>
<li>Test in every language your callers use.</li>
</ul>
<h2>How VEXYL fits</h2>
<p>The <a href="https://vexyl.ai/vexyl-voice-gateway/">VEXYL Voice Gateway</a> is built for this setup. It connects to FreePBX and Asterisk over AudioSocket (or SIP), serves different bots, languages and voices per number from one install, and supports transfers through your transfer endpoint on AudioSocket calls or SIP REFER on SIP calls. It handles barge-in, echo and line noise, and plays a short filler sound while the AI thinks so callers do not hear dead air.</p>
<p>You pick the speech providers for your callers’ languages, including Sarvam, Google, Deepgram and the self-hosted VEXYL-STT, and the LLM behind the bot. Because it runs alongside FreePBX on your own server, call audio and transcripts can stay inside your network, as described in our guide to <a href="https://vexyl.ai/self-hosted-ai-voice-agent/">self-hosted AI voice agents</a>. The free Developer edition supports 4 concurrent calls, which is enough to run a receptionist pilot on a real number.</p>
<h2>FAQ</h2>
<h3>Does FreePBX have a built-in AI receptionist?</h3>
<p>FreePBX provides IVRs, ring groups, queues and time conditions, but an AI receptionist typically comes from an external voice gateway connected through Asterisk AudioSocket or a SIP trunk.</p>
<h3>Can the AI receptionist transfer calls to FreePBX extensions?</h3>
<p>Yes. On AudioSocket calls, the gateway calls a transfer endpoint that moves the Asterisk channel to an extension, ring group or queue. On SIP calls, it can use SIP REFER.</p>
<h3>Can I keep my existing FreePBX IVR?</h3>
<p>Yes. You can add the AI receptionist as one IVR option, use it only after hours, or put it on a single inbound route while the rest stays unchanged.</p>
<h3>What does a FreePBX AI voice agent need to run?</h3>
<p>A FreePBX or Asterisk system with AudioSocket available, the voice gateway on the same or a nearby server, and API keys for the speech and AI providers you choose, unless you self-host them.</p>
<h3>How many calls can it handle at once?</h3>
<p>That depends on your licence, server and provider limits. The free Developer edition allows 4 concurrent calls; Professional allows 25.</p>
<p>Ready to give your FreePBX an AI receptionist? Download the free Developer edition, or <a href="https://vexyl.ai/pricing/#contact">talk to the VEXYL team</a> for help with setup.</p>
<hr />
<p><em>Originally published at</em> <a href="https://vexyl.ai/freepbx-ai-receptionist/"><em>vexyl.ai</em></a><em>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Voice AI Cost in India: Real Data from a Live Deployment]]></title><description><![CDATA[Real production numbers: 156 calls, 248 minutes of Malayalam voice AI at a Kerala hospital cost ₹205.88, or ₹0.83 per minute all-in.]]></description><link>https://vexyl.hashnode.dev/voice-ai-cost-in-india-real-data-from-a-live-deployment</link><guid isPermaLink="true">https://vexyl.hashnode.dev/voice-ai-cost-in-india-real-data-from-a-live-deployment</guid><category><![CDATA[AI]]></category><category><![CDATA[india]]></category><category><![CDATA[llm]]></category><category><![CDATA[startup]]></category><dc:creator><![CDATA[Gerhard Engel]]></dc:creator><pubDate>Sun, 08 Nov 2026 09:36:56 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af03f44f368be740754df35/a0fb2263-a94d-4178-b85d-61fdf34ee238.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>What does <strong>voice AI cost per minute</strong> in India when you’re running real production traffic — not a demo, not a sandbox, but live patient interactions at a hospital? In February 2026, VEXYL AI Voice Gateway processed 156 calls and 248 minutes of Malayalam conversations at a tertiary care hospital in Kerala. The total AI cost: <strong>₹205.88</strong>. That’s <strong>₹0.83 per minute, all-in</strong> — STT, LLM, and TTS combined. Cloud platforms like Vapi would have billed over ₹1,780 for the same traffic. This post breaks down exactly how we got there, what the numbers look like in production, and why the self-hosted model changes the economics of voice AI for Indian enterprises.</p>
<h2>What Does Voice AI Actually Cost in 2026?</h2>
<p>Before we get to our numbers, it’s worth understanding what you’re really paying for when you deploy voice AI. Every call involves at least five cost layers: the platform fee, speech-to-text (STT), the language model (LLM), text-to-speech (TTS), and telephony. Cloud platforms bundle these — and add margin at every layer.</p>
<p>Vapi, the most widely used voice AI platform for developers, advertises pricing starting at $0.05 per minute. But that’s just the platform fee. Once you add STT (<del>$0.01/min), LLM processing (</del>$0.02–$0.20/min depending on model), TTS (~$0.04/min), and telephony, real-world costs land between $0.13 and $0.31 per minute. At current exchange rates, that’s <strong>₹11 to ₹26 per minute</strong>. And if you’re in healthcare? HIPAA compliance costs an additional $1,000 per month — a flat fee regardless of your call volume.</p>
<p>Retell AI, often cited as a more transparent alternative, prices AI voice agents at $0.07+ per minute as a base rate. For Indian deployments requiring Indian language support, these costs go even higher because you’re forced to use whatever providers the platform supports — you don’t get to optimise the stack for your use case.</p>
<table>
<thead>
<tr>
<th>Platform</th>
<th>Base Rate</th>
<th>Effective Rate (with add-ons)</th>
<th>INR Equivalent</th>
</tr>
</thead>
<tbody><tr>
<td>Vapi AI</td>
<td>$0.05/min</td>
<td>$0.13–0.31/min</td>
<td>₹11–₹26/min</td>
</tr>
<tr>
<td>Retell AI</td>
<td>$0.07/min</td>
<td>$0.07–0.15/min</td>
<td>₹6–₹12.6/min</td>
</tr>
<tr>
<td><strong>VEXYL (self-hosted)</strong></td>
<td><strong>₹0.83/min</strong></td>
<td><strong>₹0.83/min</strong></td>
<td><strong>₹0.83/min</strong></td>
</tr>
</tbody></table>
<p>The difference isn’t marginal. It’s structural.</p>
<h2>What Do Real Production Numbers Look Like?</h2>
<p>The VEXYL cost analytics dashboard for a live healthcare deployment (Feb 1–19, 2026) shows the following:</p>
<ul>
<li><strong>Total calls processed:</strong> 156</li>
<li><strong>Total minutes:</strong> 248.1 min</li>
<li><strong>Average call duration:</strong> 1.6 minutes (95 seconds)</li>
<li><strong>Total AI cost:</strong> ₹205.88</li>
<li><strong>Cost per minute (blended):</strong> ₹0.83</li>
<li><strong>Savings vs Vapi:</strong> 88.5% (₹6.37/min cheaper)</li>
</ul>
<p>The cost split is equally revealing: Sarvam AI for STT accounts for 60% of spend (₹124.03), while Google TTS and LLM combined make up the remaining 40% (₹81.85). This breakdown tells you something important — the biggest cost driver is speech recognition, not the language model. Choosing the right STT provider for your language and use case is the single highest-leverage optimisation decision you can make.</p>
<p>What I find most significant in this data is the cost-per-minute trend line. It’s flat. Consistent at ₹0.83 across every active day in the reporting period. No usage spikes. No surprise overage charges. No end-of-month billing shock. That predictability is something cloud platforms structurally cannot offer — because their incentive is consumption, not efficiency.</p>
<h2>How Does VEXYL Achieve ₹0.83 Per Minute?</h2>
<p>There’s no magic here. The architecture makes the economics possible.</p>
<p><strong>Bring Your Own Keys (BYOK).</strong> VEXYL doesn’t proxy your API calls through our infrastructure and mark up the cost. You connect directly to Sarvam AI, Google Cloud, or whichever providers you choose using your own API keys. You pay provider rates — full stop. No platform margin, no intermediary fee.</p>
<p><strong>Provider selection for Indian languages.</strong> For Malayalam and other Indian languages, Sarvam AI delivers superior transcription quality compared to generic English-trained models. Using the right provider for the right language isn’t just about accuracy — it directly affects your STT costs per minute.</p>
<p><strong>TTS caching.</strong> A significant portion of what a voice agent says is predictable — greetings, confirmations, common responses. VEXYL caches these audio outputs. In production, we’re seeing 90%+ TTS cache hit rates, which means the majority of audio responses are served in milliseconds at near-zero marginal cost rather than being regenerated each time.</p>
<p><strong>No platform tax on compliance.</strong> For healthcare deployments requiring data sovereignty — which is essentially all healthcare deployments in India — on-premise deployment means your patient data never leaves your network. You’re not paying a cloud platform’s HIPAA compliance add-on. The compliance is architectural.</p>
<h2>Why Self-Hosted Voice AI Makes Sense for Indian Healthcare and Enterprises</h2>
<p>Indian enterprises face a set of constraints that the global voice AI market was simply not designed for. The language diversity alone — with 22 scheduled languages and hundreds of dialects — means that English-first platforms will always be a second-best fit. But the economics compound this problem further.</p>
<p>At the exchange rate of roughly ₹84 to the dollar, even “cheap” Western voice AI platforms cost ₹6–₹12 per minute at realistic usage levels. A hospital processing 1,000 minutes per month pays ₹6,000–₹12,000 monthly just in AI platform costs, before any telephony or infrastructure. At ₹0.83/min, the same hospital pays ₹830. That’s not a 20% saving. It’s a <strong>10x cost reduction</strong>.</p>
<p>For government agencies, the calculus is even sharper. Public sector organisations cannot route citizen data through US-based cloud infrastructure. Data residency is a legal requirement, not a preference. Self-hosted AI voice infrastructure deployed on-premise is the only viable path — and it also happens to be dramatically cheaper.</p>
<p>Call centres processing millions of minutes annually are looking at the difference between a voice AI deployment that costs ₹83 lakhs per year versus ₹6–₹10 crores for the equivalent cloud platform usage. At that scale, the business case for self-hosted is not a conversation — it’s arithmetic.</p>
<h2>Is Self-Hosted Voice AI Difficult to Deploy?</h2>
<p>This is the question I get asked most often, and it deserves a direct answer. VEXYL is distributed as binary executables and Docker images. Organisations with existing Asterisk or FreePBX infrastructure can integrate via the AudioSocket protocol without replacing their telephony stack. The platform runs on standard Ubuntu servers, manages up to 20–50 concurrent calls with PM2 clustering, and uses Redis for session management.</p>
<p>In my experience, a technical team comfortable with Linux and basic networking can be processing live calls within a day. That’s not a marketing claim — it’s what this production healthcare deployment looked like in practice. The complexity of managing multiple AI providers is abstracted by VEXYL’s modular provider architecture, which allows you to switch STT, LLM, or TTS providers without code changes.</p>
<p>The honest caveat: self-hosted requires ongoing operational ownership. You’re responsible for uptime, updates, and infrastructure maintenance. For organisations that want fully managed infrastructure, cloud platforms like Vapi or Retell remain valid options — but you should go in knowing what that convenience costs.</p>
<h2>What’s Next for VEXYL Cost Optimisation?</h2>
<p>The ₹0.83/min benchmark is production-validated, but it’s not the floor. Several optimisations on the roadmap should push costs lower still:</p>
<ol>
<li><strong>LLM response caching for structured conversations.</strong> Healthcare IVR flows are highly predictable — the same questions get asked and answered thousands of times. Caching LLM responses for identical inputs could reduce LLM costs by 40–60% on structured use cases.</li>
<li><strong>Pre-warmed greetings for outbound calling.</strong> Generating TTS audio before the call connects eliminates the first-response latency and removes that TTS cost from the real-time path entirely.</li>
<li><strong>Multi-provider cost routing.</strong> Dynamically selecting the cheapest provider for each request based on real-time pricing and availability — similar to how data centres use spot pricing for compute.</li>
</ol>
<p>The goal is sub-₹0.50/min for structured healthcare and government workflows within the next two quarters. I believe that’s achievable without sacrificing the Indian language quality that makes this deployment actually useful to patients.</p>
<h2>The Bottom Line</h2>
<p>The numbers from this deployment are not a projection or a whitepaper estimate. They’re 19 days of live production data from a working hospital deployment in Kerala. <strong>₹0.83 per minute. 88.5% savings versus Vapi. Flat, predictable costs. Real Malayalam conversations with real patients.</strong></p>
<p>If your organisation is evaluating voice AI and currently paying cloud platform rates, I’d encourage you to run the numbers against your actual call volume. For most Indian enterprises, the difference between cloud and self-hosted isn’t a rounding error — it’s the difference between a pilot project and a viable, scalable deployment.</p>
<p>VEXYL is open to pilot deployments for healthcare providers, government agencies, and call centres. We’ll show you what the cost analytics dashboard looks like for your own traffic — not a demo environment.</p>
<hr />
<p><em>Originally published at</em> <a href="https://vexyl.ai/voice-ai-cost-in-india-real-data-from-a-live-deployment/"><em>vexyl.ai</em></a><em>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Asterisk AI Voice Agent: Open-Source and Self-Hosted Options]]></title><description><![CDATA[How to add an AI voice agent to Asterisk: AudioSocket, SIP and ARI options, open-source projects, and what matters for Indian languages.]]></description><link>https://vexyl.hashnode.dev/asterisk-ai-voice-agent-open-source-and-self-hosted-options</link><guid isPermaLink="true">https://vexyl.hashnode.dev/asterisk-ai-voice-agent-open-source-and-self-hosted-options</guid><category><![CDATA[asterisk]]></category><category><![CDATA[voip]]></category><category><![CDATA[AI]]></category><category><![CDATA[Open Source]]></category><dc:creator><![CDATA[Gerhard Engel]]></dc:creator><pubDate>Sun, 08 Nov 2026 09:31:45 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af03f44f368be740754df35/d0d1edb7-a587-48b6-9a7d-b38a8ef7ddef.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you already run Asterisk, you have most of what you need for an <strong>Asterisk AI voice agent</strong>. Your trunks, extensions, queues and dialplan stay where they are. What you add is a piece that takes the live call audio, turns it into text, asks an AI model what to say, and plays the reply back to the caller fast enough to feel like a conversation.</p>
<p>This guide explains the three common ways to connect Asterisk to AI, looks at the open-source projects people find when they search GitHub, and lists the questions that matter once real customers start calling. It is written for teams in India who care about Indian languages, telecom costs in rupees and keeping call data on their own servers.</p>
<h2>How an Asterisk AI voice agent works</h2>
<p>Every working setup has the same five parts, whatever the project calls them:</p>
<ol>
<li><strong>Audio transport.</strong> Asterisk hands the call audio to an external process and accepts audio back.</li>
<li><strong>Speech-to-text (STT).</strong> The caller’s speech becomes text, ideally streamed while they talk.</li>
<li><strong>The AI brain.</strong> An LLM, a workflow tool or your own API decides the reply, often calling tools such as a booking system.</li>
<li><strong>Text-to-speech (TTS).</strong> The reply becomes audio in the right language and voice.</li>
<li><strong>Turn-taking.</strong> Voice activity detection, barge-in (the caller interrupting the bot) and silence handling.</li>
</ol>
<p>The transport is the Asterisk-specific part. The other four are the same problems any voice agent has to solve, and they decide most of the quality you hear on a call.</p>
<h2>Three ways to connect Asterisk to AI</h2>
<h3>1. AudioSocket</h3>
<p>AudioSocket is an Asterisk application that opens a plain TCP connection for each call and streams raw audio both ways. You add a few lines to the dialplan and point it at your AI service. It is simple to reason about: one call, one socket, 8 kHz audio in and out.</p>
<p>A typical dialplan looks like this:</p>
<p><code>exten =&gt; _X.,1,Answer()</code> <code>same =&gt; n,Set(SESSION_UUID=${TRIM(${SHELL(uuidgen)})})</code> <code>same =&gt; n,AudioSocket(${SESSION_UUID},127.0.0.1:8080)</code> <code>same =&gt; n,Hangup()</code></p>
<p>The first argument must be a proper UUID, which is why the dialplan generates one instead of using <code>${UNIQUEID}</code>. You can also post caller details (number, language, which bot to use) to the AI service before the AudioSocket line, so the agent knows who is calling from the first second. The full walkthrough is in the <a href="https://vexyl.ai/docs/06-asterisk-audiosocket.html">Asterisk AudioSocket setup docs</a>.</p>
<h3>2. ARI with external media</h3>
<p>The Asterisk REST Interface (ARI) lets an external application control calls: answer, bridge, play, record and transfer. Combined with an external media channel, it streams audio over RTP to your app. ARI gives you more call control than AudioSocket, but you write and maintain more code, and you need to handle RTP timing and codecs yourself.</p>
<h3>3. SIP trunk to an AI gateway</h3>
<p>The third option treats the AI as another SIP endpoint. Asterisk routes a call over a SIP trunk to an AI gateway, exactly as it would to a branch office or a carrier. This keeps the dialplan change tiny and works well when the AI runs on a different server or when you also have non-Asterisk PBXs to connect.</p>
<table>
<thead>
<tr>
<th>Method</th>
<th>Setup effort</th>
<th>Call control</th>
<th>Best when</th>
</tr>
</thead>
<tbody><tr>
<td>AudioSocket</td>
<td>Low: a few dialplan lines</td>
<td>Dialplan plus HTTP hooks for transfers</td>
<td>AI runs on the same host or LAN as Asterisk</td>
</tr>
<tr>
<td>ARI + external media</td>
<td>High: custom app, RTP handling</td>
<td>Full, from your code</td>
<td>You want deep custom call logic and have developers for it</td>
</tr>
<tr>
<td>SIP trunk</td>
<td>Low to medium: trunk and route</td>
<td>SIP REFER for transfers</td>
<td>AI on another server, or mixed PBX estate</td>
</tr>
</tbody></table>
<h2>Open-source Asterisk AI projects on GitHub</h2>
<p>Search for “asterisk ai agent github” and a few names come up repeatedly. Projects move quickly, so check each repository’s current README, licence and last commit before you depend on it. As of late 2026, these are the ones worth knowing about:</p>
<ul>
<li><strong>AVA (AI Voice Agent for Asterisk).</strong> An MIT-licensed project that integrates with Asterisk and FreePBX. Its README describes AudioSocket/RTP transport and ARI control, with pluggable providers.</li>
<li><strong>ictinnovations asterisk-ai-voice-agent.</strong> A self-hosted Python sidecar that bridges an AudioSocket call to an LLM, with barge-in and 20 ms frame pacing according to its listing. It describes itself as an early release.</li>
<li><strong>Agent Voice Response.</strong> A community-built, Docker-based stack that connects to Asterisk via AudioSocket, discussed on the Asterisk community forum.</li>
<li><strong>General frameworks.</strong> Pipecat and LiveKit Agents are open-source voice agent frameworks rather than Asterisk projects. You can connect them through SIP, but you assemble the telephony side yourself.</li>
</ul>
<p>These projects are good for learning and for prototypes. The gap usually shows up later: Indian language support, per-call configuration, transfers to a human, cost tracking, and someone to call when a carrier changes something at 11 pm.</p>
<h2>What to check before production</h2>
<p>Whichever route you take, test these on real calls from real phones, not from a softphone on your office Wi-Fi.</p>
<h3>Indian language recognition on 8 kHz audio</h3>
<p>Phone audio is narrowband. A model that scores well on clean 16 kHz recordings can stumble on a caller in a moving auto-rickshaw. Test Hindi, your regional languages and Hinglish or Manglish code-mixing with your actual callers. Providers built for Indian languages, such as Sarvam, often do better here than English-first engines.</p>
<h3>Streaming vs batch STT</h3>
<p>Streaming recognisers return text while the caller is still speaking. Batch recognisers wait for silence, then send the whole utterance. Batch is simpler, but it adds a noticeable pause on every turn. The <a href="https://vexyl.ai/docs/08-speech-recognition.html">speech recognition provider guide</a> lists which providers stream and which do not.</p>
<h3>Barge-in and silence</h3>
<p>Callers interrupt. If the bot keeps talking over them, the call feels robotic within seconds. Check that the agent stops speaking when the caller starts, and that it handles long silences without hanging up too early.</p>
<h3>Transfers to a human</h3>
<p>Decide how a call leaves the AI. With AudioSocket, a transfer usually means an HTTP call back to something that moves the Asterisk channel, so the agent needs the channel name. With SIP, a REFER to a queue or extension does the job.</p>
<h3>Where the audio goes</h3>
<p>Under India’s DPDP Act, a recording of a caller’s voice is personal data. Know which providers receive the audio and text, where they process it, and how long they keep it. Self-hosted STT and TTS remove most of that question.</p>
<h2>How VEXYL fits</h2>
<p>The <a href="https://vexyl.ai/vexyl-voice-gateway/">VEXYL Voice Gateway</a> sits between Asterisk and the AI. It accepts calls over AudioSocket (the default mode) or over a SIP trunk, and it also documents FreePBX and IP-PBX brands such as Panasonic, Avaya IP Office, Grandstream and Bitvoice.</p>
<p>What it adds over a DIY project:</p>
<ul>
<li><strong>Provider choice.</strong> STT from Sarvam, Google, Deepgram, Groq, Gemini or the self-hosted VEXYL-STT. TTS from Sarvam, Google, Gemini, ElevenLabs, Smallest AI, Deepgram or Azure. You bring your own API keys.</li>
<li><strong>Per-call settings.</strong> Post the caller’s number, language and bot before the call starts, or override the voice and recogniser for a single call.</li>
<li><strong>Any brain.</strong> Connect LiteBot (which works with Groq, OpenAI, Gemini, Sarvam, Ollama and others), an n8n webhook, or your own HTTP endpoint. A realtime speech-to-speech mode is also supported.</li>
<li><strong>Transfers.</strong> AudioSocket calls are transferred through your webhook; SIP calls with a REFER.</li>
<li><strong>Self-hosting.</strong> It runs as a single binary or in Docker on your own server, so call audio does not have to leave your network if you also use self-hosted speech.</li>
</ul>
<p>If you have already tried an open-source project and want a broader look at running everything on your own hardware, read our guide to a <a href="https://vexyl.ai/self-hosted-ai-voice-agent/">self-hosted AI voice agent</a>. FreePBX users can follow the <a href="https://vexyl.ai/freepbx-ai-receptionist/">FreePBX AI receptionist walkthrough</a>, and there is an older but still useful <a href="https://vexyl.ai/ai-voice-gateway-for-asterisk-a-complete-2025-setup-guide/">Asterisk gateway setup guide</a> on this blog.</p>
<h2>FAQ</h2>
<h3>Can Asterisk run an AI voice agent without a cloud platform?</h3>
<p>Yes. Asterisk handles the call, and the AI pieces can all run on your own servers: a self-hosted STT model, a local LLM through something like Ollama, and a self-hosted TTS model. Expect to need decent hardware for the LLM, and test response times carefully.</p>
<h3>Which Asterisk version do I need for AudioSocket?</h3>
<p>AudioSocket is a module that ships with newer Asterisk releases. The VEXYL docs ask for Asterisk 16 or later with the AudioSocket application loaded. Run <code>module show like audiosocket</code> on your server to confirm it is available.</p>
<h3>Is AudioSocket better than ARI for AI?</h3>
<p>For most voice agents, AudioSocket is easier because the dialplan change is small and the audio format is fixed. ARI is better when your application needs to control the whole call itself, such as complex bridging or recording logic.</p>
<h3>Does this work with FreePBX?</h3>
<p>Yes. FreePBX is built on Asterisk, so you add the AudioSocket context to <code>extensions_custom.conf</code> and route an inbound number or IVR option to it.</p>
<h3>How much does an Asterisk AI call cost in India?</h3>
<p>It depends on your STT, TTS and LLM providers and how long callers talk. One live hospital deployment in India came to about ₹0.83 per minute of AI call time, which shows the order of magnitude when you pick providers carefully.</p>
<h2>Try it on your own Asterisk</h2>
<p>The Developer edition of the VEXYL Voice Gateway is free, self-hosted and handles 4 concurrent calls, which is enough to wire it to a test extension this week. If you want help sizing a larger rollout, <a href="https://vexyl.ai/pricing/#contact">talk to the VEXYL team</a>.</p>
<hr />
<p><em>Originally published at</em> <a href="https://vexyl.ai/asterisk-ai-voice-agent-open-source/"><em>vexyl.ai</em></a><em>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Self-Hosted Indian Language STT Server: VEXYL-STT Open Source]]></title><description><![CDATA[A free speech-to-text server for 14 Indian languages that runs on CPU, streams over WebSocket and keeps audio on your own machine.]]></description><link>https://vexyl.hashnode.dev/self-hosted-indian-language-stt-server-vexyl-stt-open-source</link><guid isPermaLink="true">https://vexyl.hashnode.dev/self-hosted-indian-language-stt-server-vexyl-stt-open-source</guid><category><![CDATA[Open Source]]></category><category><![CDATA[speech to text]]></category><category><![CDATA[Speech Recognition]]></category><category><![CDATA[AI]]></category><category><![CDATA[Machine Learning]]></category><dc:creator><![CDATA[Gerhard Engel]]></dc:creator><pubDate>Sun, 08 Nov 2026 09:29:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af03f44f368be740754df35/0617af78-f590-421d-a178-b5fbd6c036dd.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you’ve ever tried to add <strong>self-hosted Indian language speech to text</strong> to a production system, you know the problem. Cloud STT APIs either don’t support Indian languages well, charge per-minute fees that kill your margins, or send audio to servers in the US — which is a non-starter for healthcare and government use cases. We built <strong>VEXYL-STT</strong> to fix this, and today we’re releasing it as open source.</p>
<p><a href="https://github.com/vexyl-ai/vexyl-stt">VEXYL-STT</a> is a free, self-hosted speech-to-text server wrapping AI4Bharat’s <strong>IndicConformer 600M multilingual model</strong>. It supports 14 Indian languages, runs on CPU (no GPU required for typical workloads), and exposes both a WebSocket streaming API and a REST batch API on a single port. Apache 2.0 licensed. No API keys. No per-minute billing. Your audio never leaves your server.</p>
<h2>What Is VEXYL-STT and Why Did We Build It?</h2>
<p>VEXYL-STT started as an internal component of the <a href="https://vexyl.ai/">VEXYL AI Voice Gateway</a> — our enterprise platform that bridges Asterisk/FreePBX telephony infrastructure with modern AI services. We needed a self-hosted STT option for deployments where cloud APIs are not viable: hospitals with patient audio data, government agencies with data sovereignty requirements, and enterprises that simply can’t afford ₹1–3 per minute of STT billing at scale.</p>
<p>We chose AI4Bharat’s IndicConformer 600M multilingual model as the backbone because, frankly, nothing else comes close for Indian languages. It’s the most capable open-source Indian ASR model available, trained on thousands of hours of Indic language audio across 22 official languages. We extracted the STT component, wrapped it in a production-ready server, and are now releasing it so the community can use it independently.</p>
<h2>Which Indian Languages Does VEXYL-STT Support?</h2>
<p>The current release supports <strong>14 Indian languages</strong> out of the box:</p>
<table>
<thead>
<tr>
<th>Language Code</th>
<th>Language</th>
<th>Language Code</th>
<th>Language</th>
</tr>
</thead>
<tbody><tr>
<td><code>ml-IN</code></td>
<td>Malayalam</td>
<td><code>mr-IN</code></td>
<td>Marathi</td>
</tr>
<tr>
<td><code>hi-IN</code></td>
<td>Hindi</td>
<td><code>pa-IN</code></td>
<td>Punjabi</td>
</tr>
<tr>
<td><code>ta-IN</code></td>
<td>Tamil</td>
<td><code>or-IN</code></td>
<td>Odia</td>
</tr>
<tr>
<td><code>te-IN</code></td>
<td>Telugu</td>
<td><code>as-IN</code></td>
<td>Assamese</td>
</tr>
<tr>
<td><code>kn-IN</code></td>
<td>Kannada</td>
<td><code>ur-IN</code></td>
<td>Urdu</td>
</tr>
<tr>
<td><code>bn-IN</code></td>
<td>Bengali</td>
<td><code>sa-IN</code></td>
<td>Sanskrit</td>
</tr>
<tr>
<td><code>gu-IN</code></td>
<td>Gujarati</td>
<td><code>ne-IN</code></td>
<td>Nepali</td>
</tr>
</tbody></table>
<p>Switch between languages at the session level — no server restart needed. Just pass the language code in your WebSocket start message or batch API request. If you pass an unknown code, it defaults to Malayalam (<code>ml</code>).</p>
<h2>How Does the API Work?</h2>
<p>VEXYL-STT runs two modes on a single port — you don’t need to run separate services for streaming vs. batch use cases.</p>
<h3>Real-Time WebSocket Streaming</h3>
<p>Connect over WebSocket, send raw 16kHz 16-bit mono PCM audio as binary frames, and receive JSON transcripts in real time. The server uses energy-based VAD to detect speech boundaries and fires a <code>final</code> message when an utterance completes. This is the right mode for telephony integrations, browser mic capture, and any scenario where you’re streaming live audio.</p>
<pre><code class="language-plaintext">// Connect and start a Malayalam session
ws.send(JSON.stringify({ type: "start", lang: "ml-IN", session_id: "abc123" }));

// Stream raw PCM audio as binary frames
ws.send(pcmBuffer);

// Receive transcript
// {"type":"final","text":"ഡോക്ടറെ കാണണം","lang":"ml-IN","latency_ms":280}
</code></pre>
<h3>Batch REST API</h3>
<p>For file-based transcription or systems with their own VAD (including our own VEXYL Voice Gateway which uses Silero VAD v5), the batch API accepts WAV, MP3, FLAC, OGG, and M4A files up to 25MB / 5 minutes. Submit a file, poll for status, retrieve the transcript. Supported formats cover almost everything you’ll encounter in the field.</p>
<pre><code class="language-plaintext">curl -X POST http://localhost:8091/batch/transcribe \
  -H "X-API-Key: your-secret" \
  -F "file=@patient-recording.wav" \
  -F "language_code=ml-IN"

# Response: {"job_id":"batch_a1b2c3","status":"queued","audio_duration":4.52}
</code></pre>
<h2>How Do I Get It Running in 5 Minutes?</h2>
<p>The quickest path is the automated setup script. You’ll need Python 3.10+, a HuggingFace account with access approved for the <a href="https://huggingface.co/ai4bharat/indic-conformer-600m-multilingual">gated IndicConformer model</a>, and about 3GB of free disk space for the model weights.</p>
<ol>
<li>Request access to the model at <code>huggingface.co/ai4bharat/indic-conformer-600m-multilingual</code> (approval is typically quick)</li>
<li>Clone the repo: <code>git clone https://github.com/vexyl-ai/vexyl-stt</code></li>
<li>Run <code>./setup.sh</code> — it handles venv creation, dependency installation, HuggingFace authentication, and model download</li>
<li>Start the server: <code>./run.sh</code></li>
<li>Open <code>test.html</code> in your browser to test live transcription from your microphone</li>
</ol>
<p>For Docker deployments, pass your HuggingFace token as a build arg and the model gets baked into the image:</p>
<pre><code class="language-plaintext">docker build --build-arg HF_TOKEN=$HF_TOKEN -t vexyl-stt .
docker run -p 8080:8080 -e VEXYL_STT_API_KEY=mysecret vexyl-stt
</code></pre>
<p>One thing worth knowing before you start: the HuggingFace gated model approval is required. If you hit a 401 or 403, run <code>huggingface-cli whoami</code> and verify your token has read access and that your access request has been approved. This catches most people out.</p>
<h2>How Does VEXYL-STT Compare to Cloud STT for Indian Languages?</h2>
<p>I’ll be direct: if you’re doing low-volume transcription with no data sovereignty concerns, Sarvam AI’s API is excellent and I’d use it. But if you’re running at scale, building in healthcare, or deploying for government — the economics and compliance picture shifts dramatically in favour of self-hosting.</p>
<table>
<thead>
<tr>
<th></th>
<th>VEXYL-STT (Self-Hosted)</th>
<th>Sarvam AI API</th>
<th>Google STT (Indian)</th>
</tr>
</thead>
<tbody><tr>
<td><strong>Cost per minute</strong></td>
<td>₹0 (infrastructure only)</td>
<td>Paid per minute</td>
<td>Paid per minute</td>
</tr>
<tr>
<td><strong>Indian languages</strong></td>
<td>14 languages</td>
<td>10+ languages</td>
<td>Limited coverage</td>
</tr>
<tr>
<td><strong>Data sovereignty</strong></td>
<td>✅ Audio stays on your server</td>
<td>❌ Sent to cloud</td>
<td>❌ Sent to Google</td>
</tr>
<tr>
<td><strong>HIPAA / healthcare</strong></td>
<td>✅ Viable</td>
<td>Requires DPA</td>
<td>Requires DPA</td>
</tr>
<tr>
<td><strong>Latency (India)</strong></td>
<td>280–400ms (same machine)</td>
<td>300–800ms (network)</td>
<td>400–1000ms (network)</td>
</tr>
<tr>
<td><strong>Offline capable</strong></td>
<td>✅ Yes</td>
<td>❌ No</td>
<td>❌ No</td>
</tr>
</tbody></table>
<p>The latency numbers above are from our production deployment at a tertiary care hospital in Kerala processing Malayalam patient interactions. On the same VPS, local WebSocket transcription consistently returns under 350ms. Cloud providers add network round-trip time on top of model inference — which matters a lot when you’re building a real-time voice assistant.</p>
<h2>CTC vs RNNT: Which Decoding Mode Should I Use?</h2>
<p>The IndicConformer model supports both CTC and RNNT decoding. VEXYL-STT defaults to CTC because it’s faster — typically 30–50% lower latency on CPU. RNNT is more accurate, especially for longer utterances and noisy telephony audio, but adds latency.</p>
<p>My recommendation: start with CTC (<code>VEXYL_STT_DECODE=ctc</code>), measure your accuracy on real audio, and switch to RNNT (<code>VEXYL_STT_DECODE=rnnt</code>) if accuracy is the limiting factor rather than latency. For most patient interaction use cases we’ve tested, CTC accuracy is sufficient and the latency advantage is worth it.</p>
<h2>Production Deployment Tips</h2>
<p>A few things we learned running this in production that aren’t obvious from the docs:</p>
<ul>
<li><strong>Use PM2 to manage the process.</strong> The repo includes PM2 setup instructions. Set <code>--restart-delay=3000</code> so a crash doesn’t hammer the model reload loop.</li>
<li><strong>The VAD silence threshold (0.015) may need tuning for telephony audio.</strong> PSTN audio often has different gain characteristics than microphone audio. If you’re getting premature cut-offs or missed utterances, adjust the <code>SILENCE_THRESHOLD</code> constant in <code>vexyl_stt_server.py</code>.</li>
<li><strong>CPU is fine up to ~10 concurrent streams.</strong> At that point, look at GPU acceleration. Swap to the CUDA PyTorch build and set <code>VEXYL_STT_DEVICE=auto</code>.</li>
<li><strong>For Asterisk use cases, bring your own VAD.</strong> The VEXYL Voice Gateway uses Silero VAD v5 which is far more accurate than energy-threshold VAD. Use the batch REST API with pre-segmented speech rather than relying on the built-in WebSocket VAD for telephony.</li>
</ul>
<h2>Get Involved</h2>
<p>VEXYL-STT is actively maintained and we welcome contributions — new language support, performance improvements, integration examples, and documentation. Star the repo if it’s useful, open an issue if you find a bug, and submit a PR if you’ve built something on top of it.</p>
<p>If you’re looking to go further — full telephony AI with Asterisk, multi-language IVR, voice bots for healthcare or enterprise — that’s what the <a href="https://vexyl.ai/">VEXYL AI Voice Gateway</a> is built for. It’s a self-hosted platform where you bring your own provider keys, with support for Indian languages over PSTN and SIP.</p>
<hr />
<p><em>Originally published at</em> <a href="https://vexyl.ai/self-hosted-indian-language-stt-server-vexyl-stt-open-source/"><em>vexyl.ai</em></a><em>.</em></p>
]]></content:encoded></item></channel></rss>