<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gabriel Luis Pacheco</title>
    <description>The latest articles on DEV Community by Gabriel Luis Pacheco (@gabriel_luispacheco_6835).</description>
    <link>https://dev.to/gabriel_luispacheco_6835</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4236011%2F88c2def4-76b3-4e71-96c5-688ff7b2b862.png</url>
      <title>DEV Community: Gabriel Luis Pacheco</title>
      <link>https://dev.to/gabriel_luispacheco_6835</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gabriel_luispacheco_6835"/>
    <language>en</language>
    <item>
      <title>Building a turn-based voice conversation tutor in the browser — and what we refuse to score</title>
      <dc:creator>Gabriel Luis Pacheco</dc:creator>
      <pubDate>Mon, 30 Nov 2026 22:34:55 +0000</pubDate>
      <link>https://dev.to/gabriel_luispacheco_6835/building-a-turn-based-voice-conversation-tutor-in-the-browser-and-what-we-refuse-to-score-d2i</link>
      <guid>https://dev.to/gabriel_luispacheco_6835/building-a-turn-based-voice-conversation-tutor-in-the-browser-and-what-we-refuse-to-score-d2i</guid>
      <description>&lt;p&gt;I built a browser app, BataTalk, where someone practices a spoken conversation with an AI character: they listen, they answer out loud, and if they freeze, a coach can prompt the beginning of the sentence.&lt;/p&gt;

&lt;p&gt;This article was drafted with AI assistance and fact-checked against our public product pages and privacy policy (version 2026-11-17.1). I am the founder, and I can stand behind the architecture described below. Anything that is not in those public documents is left out on purpose.&lt;/p&gt;

&lt;p&gt;This is not a “real-time voice agent” write-up in the WebRTC sense. I do not claim a low-latency duplex stream, because I am not going to describe an unpublished pipeline. What the product actually does, in public terms, is &lt;strong&gt;turn-based spoken practice&lt;/strong&gt; in the browser: the microphone starts when the person presses a button, their reply is recorded, it is transcribed, and the tutor answers.&lt;/p&gt;

&lt;h3&gt;
  
  
  The job, not the stack
&lt;/h3&gt;

&lt;p&gt;The design constraint is social, not technical. A lot of learners can read English and still freeze when it is their turn to speak. The session has to feel like a situation (a cafe, a check-in, an interview), not like a dictation box. The coach, Tato, is allowed to prompt the first words of a reply, with support language defaulting to Portuguese.&lt;/p&gt;

&lt;p&gt;Two product decisions follow from that job, and they simplify the engineering more than any library choice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We do &lt;strong&gt;not&lt;/strong&gt; give a pronunciation or accent score. Automatic transcription over-flags Brazilian accents. A confident number would be easy to ship and dishonest. The product page is explicit about this: intelligibility and task completion matter; a phonetic score is left to dedicated pronunciation tools.&lt;/li&gt;
&lt;li&gt;We do &lt;strong&gt;not&lt;/strong&gt; keep the user’s audio file. The privacy policy states that the utterance is processed in memory and is not saved by BataTalk in a file, a database, or an error log. The server sends the audio to OpenAI for transcription; the resulting text is what the model uses to reply and to evaluate the turn. Short excerpts of that transcript may appear in saved corrections for later review. Text calls use &lt;code&gt;store: false&lt;/code&gt;, and we still do not promise how long the provider retains its own processing logs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are building a similar tutor, those two decisions — no vanity accent score, no audio archive — will conflict with “engagement” dashboards. That is the point.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens on a turn
&lt;/h3&gt;

&lt;p&gt;At the level we can document:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The browser only opens the microphone after the person presses “Começar” and grants permission. If they refuse the mic, practice can continue; that attempt is simply not transcribed or scored.&lt;/li&gt;
&lt;li&gt;Each spoken reply is recorded and sent to OpenAI for speech-to-text, then evaluated so Tato can respond.&lt;/li&gt;
&lt;li&gt;Synthesized speech for the tutor may be generated by OpenAI. ElevenLabs is used only when it is configured as the voice provider; otherwise the voice is OpenAI. That is the public operator list, not a marketing comparison.&lt;/li&gt;
&lt;li&gt;In free conversation, the chat history stays in the open tab and is resent with each message so the coach keeps context; it is not written to our database. Automatic moderation is applied to block inappropriate content.&lt;/li&gt;
&lt;li&gt;Auth, confirmation email and the database for the account and progress sit on Supabase. We do not see or store the password; Supabase Auth does.&lt;/li&gt;
&lt;li&gt;Subscriptions go through Stripe. We store the plan and the Stripe identifiers, not the card number.&lt;/li&gt;
&lt;li&gt;Cloudflare serves the site and, with Turnstile, challenges signup, login and public forms.&lt;/li&gt;
&lt;li&gt;Transactional email goes through Resend.&lt;/li&gt;
&lt;li&gt;The service is hosted on Render. Technical errors may go to Sentry when that is configured; we do not deliberately send audio or conversation content in those error reports.&lt;/li&gt;
&lt;li&gt;The privacy policy also states that we do &lt;strong&gt;not&lt;/strong&gt; currently use an Azure Speech integration to assess pronunciation. An environment variable sitting in a repo would not, by itself, mean that a vendor is processing data. I mention this because “we could hook Azure later” is the kind of sentence that should stay out of a privacy document until it is true.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The official “how it works” page is here, including the learning loop after the turn (a short scene, a suggested more natural reply, later review with spaced repetition): &lt;a href="https://batatalk.com.br/como-funciona" rel="noopener noreferrer"&gt;How BataTalk practice works&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why the browser, and what that costs you
&lt;/h3&gt;

&lt;p&gt;The app is a website. There is no app-store client. That is convenient for a first spoken line, and it puts you inside the browser permission model: a user who denies the mic, a mobile browser that suspends a tab, a flaky network in the middle of an upload.&lt;/p&gt;

&lt;p&gt;I will not invent a latency budget I have not published. The practical consequence is obvious from the turn-based design: you are not shipping a phone call. You are shipping a complete utterance, a transcription, a model turn, and audio back. Each of those steps can fail in a different way (permission, empty recording, unintelligible audio, provider timeout, TTS failure). The honest UI is to say that the attempt could not be transcribed, not to invent a grade.&lt;/p&gt;

&lt;h3&gt;
  
  
  What I would tell myself before storing voice
&lt;/h3&gt;

&lt;p&gt;If you are copying this shape, a short checklist from the policy we actually published:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start the mic on an explicit gesture, not on page load.&lt;/li&gt;
&lt;li&gt;Be able to describe, in one paragraph, where the bytes go, who transcribes them, and whether you write the file down. If you cannot, you are not ready to ask for the mic.&lt;/li&gt;
&lt;li&gt;Separate “text we need so the person can review a correction” from “audio we feel tempted to keep for future models”. We keep short correction excerpts; we do not keep the audio.&lt;/li&gt;
&lt;li&gt;Do not confuse &lt;code&gt;store: false&lt;/code&gt; on a provider API with “nobody retains anything”. Write that difference down, the way a user would read it.&lt;/li&gt;
&lt;li&gt;Ranking, friends and XP can exist without exposing transcripts. Our public ranking shows a display name, an avatar and XP, never what someone said.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What this article is not
&lt;/h3&gt;

&lt;p&gt;It is not a vendor tutorial, not a benchmark, and not a claim that an AI tutor replaces a teacher. The model will be wrong sometimes. The product is practice, not a certificate.&lt;/p&gt;

&lt;p&gt;If you are building something in the same neighbourhood, I am interested in a narrow discussion: how you tell a learner that a turn failed, without turning the failure into a fake pronunciation score.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>speech</category>
      <category>privacy</category>
    </item>
    <item>
      <title>Building a voice English-practice app in the browser (what broke first)</title>
      <dc:creator>Gabriel Luis Pacheco</dc:creator>
      <pubDate>Mon, 09 Nov 2026 23:08:03 +0000</pubDate>
      <link>https://dev.to/gabriel_luispacheco_6835/building-a-voice-english-practice-app-in-the-browser-what-broke-first-4ncf</link>
      <guid>https://dev.to/gabriel_luispacheco_6835/building-a-voice-english-practice-app-in-the-browser-what-broke-first-4ncf</guid>
      <description>&lt;p&gt;&lt;em&gt;I'm Gabriel Luis Pacheco, founder of &lt;a href="https://batatalk.com.br" rel="noopener noreferrer"&gt;BataTalk&lt;/a&gt; — a Brazilian product for spoken English practice with AI characters and an in-scene coach (Tato). This is a build post, not a growth flex.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The product in one breath
&lt;/h2&gt;

&lt;p&gt;BataTalk helps Brazilians who understand English but freeze when it's their turn to speak. Practice happens by voice in the browser: AI characters in everyday scenes (café, airport, interview), and Tato cues the start of the sentence when you blank. Levels A1–C2. Free plan: one guided conversation per day, no card. Paid plans are priced in BRL on &lt;a href="https://batatalk.com.br/planos" rel="noopener noreferrer"&gt;/planos&lt;/a&gt;. Honest limits: AI can err; not a certificate; not a live teacher; no accent score theater.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack in one paragraph
&lt;/h2&gt;

&lt;p&gt;Node 24+, vanilla JS for the app shell, marketing pages SSR'd as HTML, Supabase Auth + Postgres (service role on the API, RLS as second layer), Stripe, Resend, Cloudflare Turnstile, Render + Cloudflare. Voice path: browser mic → our API → transcription / model reply. We intentionally &lt;strong&gt;do not&lt;/strong&gt; store the audio file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Constraint that shaped everything
&lt;/h2&gt;

&lt;p&gt;The target user will not "just prompt ChatGPT every day." So the product ships &lt;strong&gt;scenes with goals&lt;/strong&gt; and a coach for the freeze moment. That kills tempting features: social feed, streak theater, fake certificates, pronunciation grades based on flaky ASR text.&lt;/p&gt;

&lt;p&gt;Browser-first matters in Brazil: cold start on mobile Chrome during a work break beats "download our app first."&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke first
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Guest voice trial vs abuse
&lt;/h3&gt;

&lt;p&gt;"First line without signup" is great UX and catnip for bots. We gate with Turnstile + daily caps + health checks on transcription. When any dependency is down, the client must fail with a &lt;em&gt;specific&lt;/em&gt; reason. Mapping "browser has no SpeechRecognition" to the same bucket as "trial off" poisoned our analytics and made us chase the wrong incident.&lt;/p&gt;

&lt;p&gt;Lesson: error taxonomy is product infrastructure. If you collapse distinct failures into one string, you will "fix" the wrong thing for a week.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Signup friction vs fraud
&lt;/h3&gt;

&lt;p&gt;Password minimum length, email confirmation, Turnstile, IP rate limits. Funnel math is brutal: many client-side &lt;code&gt;signup_started&lt;/code&gt; events versus few completed accounts. Instrument failure reasons &lt;em&gt;before&lt;/em&gt; you simplify auth into oblivion. Also: mobile layout that pushes the CTA below the fold is a silent killer — we shipped a CSS order fix after measuring absurd scroll height on small screens.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. SEO vs app shell
&lt;/h3&gt;

&lt;p&gt;If marketing content only exists after JS hydration, you lose search and LLM citation. We keep substantive copy in SSR HTML for landings, FAQ, and compare pages, and we publish &lt;code&gt;/llms.txt&lt;/code&gt; with stable facts (what it is, what it is not, pricing page link, privacy posture). &lt;code&gt;robots.txt&lt;/code&gt; allows major AI crawlers on purpose — GEO needs third-party mentions too, but blocking bots while asking to be cited is self-owning.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Cost of "just one more minute of voice"
&lt;/h3&gt;

&lt;p&gt;Voice is not a free client-side feature. Quotas (daily + rolling 30-day) and plan gates are core product. The free tier teaches the loop; it is not infinite GPT with your brand on top. Day boundary at 21:00 America/Sao_Paulo surprised early testers who thought "midnight" — document clock skew in the UI, not only in the terms.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Cannibalized content clusters
&lt;/h3&gt;

&lt;p&gt;Shipping many thin intent landings (interview ×3, airport ×2) diluted authority. Consolidation with 301s toward one strong URL per intent is boring editorial work and better SEO than another 400-word page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture notes worth copying
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server owns money and affiliates.&lt;/strong&gt; Anything that can pay or payout stays off the anon key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RLS is belt; server role is suspenders.&lt;/strong&gt; Do not pretend RLS alone is your authz story for billing RPCs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;First-party analytics.&lt;/strong&gt; A simple events pipeline beat installing three pixels we would later regret for LGPD and for debugging.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public health endpoint.&lt;/strong&gt; Expose whether onboarding trial is actually ready (captcha keys + transcription). The marketing site should not promise a mic demo the API cannot honor today.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Product decisions I'd repeat
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cue the sentence start instead of only scoring the utterance after silence.&lt;/li&gt;
&lt;li&gt;Say "AI can err" in the FAQ in plain Portuguese.&lt;/li&gt;
&lt;li&gt;Keep audio off durable storage unless you have a clear teaching reason and a retention policy you can defend.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Product decisions I'd rethink earlier
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Onboarding voice failure instrumentation on day one.&lt;/li&gt;
&lt;li&gt;A single compare hub plus deep "vs" pages beat a swamp of near-duplicate landings.&lt;/li&gt;
&lt;li&gt;Brand collisions: "BataTalk" alone is a messy query internationally; plan content around qualified phrases early.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it / roast it
&lt;/h2&gt;

&lt;p&gt;Site: &lt;a href="https://batatalk.com.br" rel="noopener noreferrer"&gt;https://batatalk.com.br&lt;/a&gt; — first spoken line can work without an account. If you're building similar voice UX, I'm especially interested in how you handle guest quotas without training a fraud dataset on your credit card, and how you explain mic permission inside in-app browsers (Instagram/TikTok WebViews are hostile).&lt;/p&gt;

&lt;p&gt;Comments welcome — especially dissenting UX takes from people who teach English for a living.&lt;/p&gt;

&lt;h2&gt;
  
  
  Appendix: local clock and support copy
&lt;/h2&gt;

&lt;p&gt;Support tickets often start with "my free conversation disappeared." Nine times out of ten it is the Brasília day boundary, a Turnstile failure inside a WebView, or the user opening the site through Instagram's in-app browser where the mic never appears. Write those three cases into the UI empty-states. Your future self will spend fewer nights re-explaining the same incident.&lt;/p&gt;

&lt;p&gt;If you ship voice in production, budget for: transcription spend, captcha fails, and the emotional cost of a demo that works on your laptop and dies on a mid-range Android Chrome tab with three other media tabs open.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>startup</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
