<?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: Kenji</title>
    <description>The latest articles on DEV Community by Kenji (@kenjiginjo).</description>
    <link>https://dev.to/kenjiginjo</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%2F1069530%2F498db477-84c0-4d0e-92f3-6d7ee157706b.png</url>
      <title>DEV Community: Kenji</title>
      <link>https://dev.to/kenjiginjo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kenjiginjo"/>
    <language>en</language>
    <item>
      <title>Same microphone, different job</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Sat, 14 Nov 2026 22:28:28 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/same-microphone-different-job-504l</link>
      <guid>https://dev.to/kenjiginjo/same-microphone-different-job-504l</guid>
      <description>&lt;p&gt;A friend used Vocalace for a week and called it a dictionary that grades you. He already had ELSA on his phone. Both apps take a recording and return a number. After that, they are built for different jobs.&lt;br&gt;
ELSA is the app people name when they want an AI speaking coach: lessons, speaking practice, and a score for how close the accent is, for learners whose first languages are not the same. That is a real product, and a lot of people want it. We did not set out to ship a thinner copy.&lt;br&gt;
&lt;a href="https://www.vocalace.com" rel="noopener noreferrer"&gt;Vocalace&lt;/a&gt; is a practice loop for Mandarin speakers whose target is General American. You hear a model recording, you say the word, and the page marks the phoneme that went off. The word comes back on a schedule. The score is a practice signal. It is not an exam result, and we do not tell anyone they will end up sounding native. The bar we actually use is smaller: another person can make out the word, and you can hear what you changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  One first language, one accent
&lt;/h2&gt;

&lt;p&gt;Mandarin speakers miss a short list of English sounds often enough that the product can be planned around that list.&lt;br&gt;
The vowel in &lt;em&gt;cat&lt;/em&gt; stays too closed. &lt;em&gt;think&lt;/em&gt; slides toward &lt;em&gt;sink&lt;/em&gt;. American &lt;em&gt;r&lt;/em&gt; gets replaced by a Chinese &lt;em&gt;r&lt;/em&gt;, or by &lt;em&gt;l&lt;/em&gt;. &lt;em&gt;very&lt;/em&gt; picks up a &lt;em&gt;w&lt;/em&gt;. &lt;em&gt;water&lt;/em&gt; and &lt;em&gt;city&lt;/em&gt; keep a clear &lt;em&gt;t&lt;/em&gt; where American English flaps it. The vowel in &lt;em&gt;bird&lt;/em&gt; turns into something like "bo-de".&lt;br&gt;
Feedback written for every first language has to stay general at the moment it is given. Ours can name the swap Mandarin speakers actually make. The free notes on &lt;a href="https://course.vocalace.com" rel="noopener noreferrer"&gt;course.vocalace.com&lt;/a&gt; stay on that list: th, /æ/, American r, the flap.&lt;br&gt;
The dictionary, the model audio, and the score all use General American. There is a short US/UK comparison page. Daily practice does not mix the two accents. Mixing them would mean the recording and the phoneme string could disagree, and the score would be grading you against a target you did not hear.&lt;/p&gt;

&lt;h2&gt;
  
  
  The curriculum is a dictionary
&lt;/h2&gt;

&lt;p&gt;The dictionary has 68,454 entries. 15,359 of those have been checked, and only the checked ones enter daily practice. A checked entry has a General American transcription, a Chinese gloss, a model recording, and up to three example sentences.&lt;br&gt;
The recording is generated from the transcription we signed off on, so the stress and the phones match the line on the screen. Transcriptions are checked by a model first. If that check fails, a person edits the entry and it goes through review again. After the audio is generated, it is listened to again. Mismatches go to a person. Part of speech, gloss, and examples are in that same pass. An entry joins the daily queue only after that.&lt;br&gt;
New words come out by how common they are. Bands 1–10 follow BNC/COCA frequency. Band 11 is checked words that fell outside those lists. Inside a band, a weight breaks ties. Reviews that are already due come out before any new word, oldest due item first. When nothing is due, the session adds one new word.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pass line and the phoneme mark
&lt;/h2&gt;

&lt;p&gt;Daily practice, example sentences, and tongue twisters pass at 90. That number is the overall score for the attempt. Accuracy, fluency, and completeness are part of it. Phoneme marks sit beside that score and show which sound to work on, next to a mouth-shape reference. They do not decide the pass. On the page, 小 V names the one place to change.&lt;br&gt;
A word passes once that overall score reaches 90. It comes back the next day. A second 90 marks it mastered. If that confirmation attempt misses, it is due again tomorrow, and the next 90 still counts as mastered. After mastery, the gaps are 21 days, 90 days, then 365. A later miss brings it back tomorrow and, once it passes again, the 21-day gap starts over.&lt;br&gt;
We do not drop a weight or shorten an interval the way a lot of flashcard apps do. Pronunciation does not behave like a vocabulary card you either recalled or blanked on. After an attempt is settled, that word cannot show up again the same day.&lt;br&gt;
The daily goal is 30, 50, 100, or 300 words. Trial accounts stop at 30 a day. Paid accounts can go to 300. A new account gets 7 days. The plan is $5 a month or $50 a year, and it does not renew itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  A clean word still falls apart in a sentence
&lt;/h2&gt;

&lt;p&gt;Flapping, reduced function words, and linking show up once the word sits next to other words. So a mastered headword later comes back as one of its example sentences, with 90 as the pass line. After the first pass, the sentence waits 90 days and comes back once more. A miss, or a skip, brings it back tomorrow.&lt;br&gt;
Tongue twisters are a separate mode: one random line at a time, scored on the same 90 pass line, no repeat until the round is finished.&lt;br&gt;
Intensive practice is separate again. It opens after the day's word goal is done, looks through attempts, picks the phone most worth another pass, and offers three words that contain it. The pass line there is 95. Generating a set costs 5 points, one set per UTC day. If it cannot find words worth drilling, it does not charge. If the sounds from those attempts are already steady, it says so and skips the set.&lt;br&gt;
Search is there for a specific checked word. That practice spends a point and does not write into the mastery schedule. The queue and the search box are deliberately different.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we left out
&lt;/h2&gt;

&lt;p&gt;We do not run a lesson tree that tries to cover grammar, small talk, and accent in one subscription. The daily loop is short on purpose: hear the model, say the word, see which phone moved, meet the word again later.&lt;br&gt;
ELSA is the better fit if you want a coached path, speaking tasks, and an app that is not built around Mandarin. Vocalace is the better fit if you already know the word and you want the American phones, on a queue, with the recording and the transcription locked to each other.&lt;br&gt;
The site is &lt;a href="https://www.vocalace.com" rel="noopener noreferrer"&gt;www.vocalace.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>learning</category>
      <category>ai</category>
    </item>
    <item>
      <title>Shared eligibility doesn't mean shared progress</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Tue, 10 Nov 2026 07:43:02 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/shared-eligibility-doesnt-mean-shared-progress-4k2n</link>
      <guid>https://dev.to/kenjiginjo/shared-eligibility-doesnt-mean-shared-progress-4k2n</guid>
      <description>&lt;p&gt;A learner gets 90 on a sentence, tries again, and gets 94. Both attempts pass. Neither tells us whether the learner can still read that sentence 90 days later.&lt;/p&gt;

&lt;p&gt;That distinction is easy to lose when adding a second kind of practice to an existing learning system. There is already a passing score, a progress record, and a review scheduler. Reusing them sounds reasonable until “passed” starts meaning two different things.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://www.vocalace.com" rel="noopener noreferrer"&gt;Vocalace&lt;/a&gt;, our pronunciation app, sentence practice becomes available after a word reaches mastery. It then follows its own progression: pass the sentence once, wait 90 days, and pass its review. Sentence attempts must leave word mastery, word review scheduling, and daily practice-day counts untouched.&lt;/p&gt;

&lt;p&gt;The interesting engineering problem is deciding how much those two progressions should share.&lt;/p&gt;

&lt;h2&gt;
  
  
  A prerequisite isn't ownership
&lt;/h2&gt;

&lt;p&gt;A tempting abstraction would be a generic &lt;code&gt;completePractice()&lt;/code&gt; function: check the score, advance progress, schedule a review, update daily activity. Add a practice-type argument and reuse it for sentences.&lt;/p&gt;

&lt;p&gt;The trouble is that a passing score doesn't authorize the same writes in both workflows. A sentence attempt can read the word's mastery status to establish eligibility. It cannot change that status just because the same learner and vocabulary entry are involved.&lt;/p&gt;

&lt;p&gt;I find it useful to separate two questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is this learner allowed to start this activity?&lt;/li&gt;
&lt;li&gt;What state can finishing it change?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first can depend on another workflow. The second needs its own answer. This also comes up with certification after course completion, or a maintenance check after equipment approval. Sharing a prerequisite doesn't make their lifecycles interchangeable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the transition smaller than the record
&lt;/h2&gt;

&lt;p&gt;Sentence progress lives on the existing vocabulary record: a stage, the first passing day, and a skip-until day. That storage choice doesn't require a shared transition function.&lt;/p&gt;

&lt;p&gt;Keeping the fields together makes eligibility and sentence progress available on one record. The tradeoff is a weaker storage boundary: a broad update can touch unrelated progress. A separate table would make ownership more visible in the schema, at the cost of another relationship and its lifecycle. Neither layout decides which writes an attempt should be allowed to make.&lt;/p&gt;

&lt;p&gt;For the transition itself, I'd pass only sentence progress. This standalone TypeScript example shows the boundary:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;SentenceProgress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"unpassed"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"waiting"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;firstPassedDay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"complete"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;firstPassedDay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;PASS_SCORE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;REVIEW_DAYS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;advanceSentence&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;SentenceProgress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;todayUtcDay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;SentenceProgress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;PASS_SCORE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"unpassed"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"waiting"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;firstPassedDay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;todayUtcDay&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"waiting"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="n"&gt;todayUtcDay&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;firstPassedDay&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="no"&gt;REVIEW_DAYS&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;stage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"complete"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;firstPassedDay&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;firstPassedDay&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Day values here are integer UTC calendar-day numbers: milliseconds since the Unix epoch divided by &lt;code&gt;86_400_000&lt;/code&gt;, rounded down. The caller supplies today's value. The actual stored date can still be UTC midnight; the example uses day numbers to keep the arithmetic readable.&lt;/p&gt;

&lt;p&gt;There is no word review date in this function's input. Persistence should apply only the sentence fields it owns, leaving unrelated fields alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the clock part of the example
&lt;/h2&gt;

&lt;p&gt;Notice that passing while waiting doesn't replace &lt;code&gt;firstPassedDay&lt;/code&gt;. Otherwise, an enthusiastic learner who practices every day could keep postponing the review.&lt;/p&gt;

&lt;p&gt;A score below 90 also preserves that date. Failing an overdue review leaves it overdue; it doesn't start another 90-day wait.&lt;/p&gt;

&lt;p&gt;These are the boundary cases I'd test alongside the transition. Day 0 means the first passing UTC day:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Before&lt;/th&gt;
&lt;th&gt;Attempt day&lt;/th&gt;
&lt;th&gt;Score&lt;/th&gt;
&lt;th&gt;Expected&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Unpassed&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;Waiting, first pass day 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Waiting since day 0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;94&lt;/td&gt;
&lt;td&gt;Still waiting since day 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Waiting since day 0&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;89&lt;/td&gt;
&lt;td&gt;Still waiting since day 0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Waiting since day 0&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;90&lt;/td&gt;
&lt;td&gt;Complete&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;An explicit clock makes these cases ordinary inputs. No sleeping, changing the machine clock, or hoping a test doesn't cross midnight.&lt;/p&gt;

&lt;p&gt;It also makes queue selection straightforward. Waiting entries become due when today's UTC day reaches the first passing day plus 90. Due reviews come before unpassed sentences; completed entries leave the queue. Practicing again before that boundary is allowed, but cannot complete the scheduled review.&lt;/p&gt;

&lt;p&gt;When reviewing this kind of addition, I'd look beyond whether the new progress advances correctly. I'd also check what stays unchanged after every attempt: the original mastery state, its review date, and its daily counters. Those unchanged values are part of the feature's contract, even when both workflows share a database row.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>architecture</category>
      <category>testing</category>
      <category>typescript</category>
    </item>
    <item>
      <title>One weak phoneme, three words, and a model that cannot invent them</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Sun, 08 Nov 2026 08:28:45 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/one-weak-phoneme-three-words-and-a-model-that-cannot-invent-them-13mn</link>
      <guid>https://dev.to/kenjiginjo/one-weak-phoneme-three-words-and-a-model-that-cannot-invent-them-13mn</guid>
      <description>&lt;p&gt;After a practice session on &lt;a href="https://www.vocalace.com" rel="noopener noreferrer"&gt;Vocalace&lt;/a&gt; I have phoneme scores for a handful of words, and I want three words that drill the weakest sound. Ask a model for those words and it will name one that is not in the dictionary, repeat one, or add a sentence of advice. None of that is a list I can store. The model does not search the dictionary. Code chooses the sound, a query builds a short list, and the model may only fill the slots that are still empty. A parser then keeps a reply only when every token is in that list, once, at the exact length.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three words, one sound
&lt;/h2&gt;

&lt;p&gt;This is the fixture the ranker test locks in.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;word&lt;/th&gt;
&lt;th&gt;focus&lt;/th&gt;
&lt;th&gt;score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;sorry&lt;/td&gt;
&lt;td&gt;s&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;think&lt;/td&gt;
&lt;td&gt;th&lt;/td&gt;
&lt;td&gt;61&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;thing&lt;/td&gt;
&lt;td&gt;th&lt;/td&gt;
&lt;td&gt;62&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;s&lt;/code&gt; is the worse score. It still loses. Votes are one per word, and &lt;code&gt;th&lt;/code&gt; has two. A second take on &lt;code&gt;sorry&lt;/code&gt; does not add a vote: the same word keeps a single focus, the worse of the two. A recording under 40 never reaches this table. If every remaining focus is green, there is no sound to drill, and the model is not called.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;
  &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redCount&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redCount&lt;/span&gt;
  &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;minScore&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;minScore&lt;/span&gt;
  &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;localeCompare&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Count comes first. Red versus yellow is only the tie break, then the lower minimum score, then the phoneme id.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;think&lt;/code&gt; and &lt;code&gt;thing&lt;/code&gt; already exposed &lt;code&gt;th&lt;/code&gt;, so they occupy two of the three slots, lower score first: &lt;code&gt;think&lt;/code&gt;, then &lt;code&gt;thing&lt;/code&gt;. One slot is left. That is the only call.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the model is allowed to see
&lt;/h2&gt;

&lt;p&gt;The open slot comes from a query. The SAPI token has to match as a whole token, &lt;code&gt;(^| )th( |$)&lt;/code&gt;. The word needs a common part of speech. Words already seen today are removed. The query stops at 20 rows. That array is the entire set of legal answers.&lt;/p&gt;

&lt;p&gt;The prompt receives the phoneme, how many words are still missing, and those rows. It asks for words where the sound is easy to hear on its own, and for no explanation. The parser does not score that preference. A clumsy word that is actually in the list will be stored. Membership, uniqueness, and length are the whole check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;parseWordsFromAskPick&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;need&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;
  &lt;span class="nx"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="nx"&gt;need&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;
&lt;span class="p"&gt;}):&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;byWord&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;allowed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;picked&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;[&lt;/span&gt;&lt;span class="sr"&gt;|｜&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;byWord&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;picked&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;picked&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;word&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;picked&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;need&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;picked&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The parser tests use a three-word list so the failures are obvious. &lt;code&gt;allowed&lt;/code&gt; is &lt;code&gt;cat&lt;/code&gt;, &lt;code&gt;hat&lt;/code&gt;, &lt;code&gt;map&lt;/code&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;raw&lt;/th&gt;
&lt;th&gt;need&lt;/th&gt;
&lt;th&gt;result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;['cat']&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hat｜map&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;['hat', 'map']&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dog&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cat｜cat&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;dog&lt;/code&gt; was produced. It is not in &lt;code&gt;allowed&lt;/code&gt;, so the reply is discarded. &lt;code&gt;cat&lt;/code&gt; when two words were required is discarded for length. &lt;code&gt;cat｜cat&lt;/code&gt; is discarded because the second token repeats the first. Any bad piece rejects the whole reply. A trailing bar does the same: the empty piece is not in the map.&lt;/p&gt;

&lt;p&gt;On the real slot, &lt;code&gt;need&lt;/code&gt; is 1 and &lt;code&gt;allowed&lt;/code&gt; is those 20 rows. &lt;code&gt;Month&lt;/code&gt; matches &lt;code&gt;month&lt;/code&gt; only if &lt;code&gt;month&lt;/code&gt; is one of them. &lt;code&gt;thick&lt;/code&gt; matches only if &lt;code&gt;thick&lt;/code&gt; is one of them. &lt;code&gt;month because the th is clear&lt;/code&gt; is a single token after the split on &lt;code&gt;|&lt;/code&gt;, the lookup misses, and the reply is &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;null&lt;/code&gt; result is tried again, up to four times. After that the job fails. The bad text is not trimmed down to the pieces that happened to match.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>typescript</category>
      <category>ai</category>
    </item>
    <item>
      <title>Vocalace — American English pronunciation practice for Chinese speakers</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Thu, 05 Nov 2026 09:10:31 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/vocalace-american-english-pronunciation-practice-for-chinese-speakers-2d7l</link>
      <guid>https://dev.to/kenjiginjo/vocalace-american-english-pronunciation-practice-for-chinese-speakers-2d7l</guid>
      <description>&lt;p&gt;I built &lt;a href="https://www.vocalace.com" rel="noopener noreferrer"&gt;Vocalace&lt;/a&gt; for Chinese speakers who want American English words to come out clearer. Listen to a US model, record a take, Azure scores by phoneme, and 小 V marks which sound drifted. The word comes back later on a spaced schedule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who it's for
&lt;/h2&gt;

&lt;p&gt;You can already read the word. You want it cleaner at work or in class. English teachers, trade and cross-border work, remote eng and product, support and phone sales, study abroad and classroom talks, research and medical meetings, hotel front desk and guides, English voice-over. If the scene depends on someone hearing the word, use this as a practice field.&lt;/p&gt;

&lt;p&gt;The lexicon covers common words and a lot of everyday ones. Very rare proper names or client names that aren't in yet can be submitted as add-word requests.&lt;/p&gt;

&lt;h2&gt;
  
  
  How practice works
&lt;/h2&gt;

&lt;p&gt;Full lexicon: &lt;strong&gt;68,454&lt;/strong&gt; words. &lt;strong&gt;15,359&lt;/strong&gt; of those are reviewed and in daily practice.&lt;/p&gt;

&lt;p&gt;On a trial or membership you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hear the model and see IPA (multi-syllable words split). Open Chinese gloss and example sentences when you need them.&lt;/li&gt;
&lt;li&gt;Record. See phoneme scores and mouth shape. 小 V points at the piece that most needs work.&lt;/li&gt;
&lt;li&gt;Due reviews for the day go first. New words only after those are done, common ones first.&lt;/li&gt;
&lt;li&gt;Or search a word for self-select practice.&lt;/li&gt;
&lt;li&gt;Finish the daily goal you set, and you get a day report.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There's also a &lt;a href="https://www.vocalace.com/dictionary" rel="noopener noreferrer"&gt;dictionary&lt;/a&gt; (EN↔ZH IPA and gloss), a &lt;a href="https://www.vocalace.com/phonetics" rel="noopener noreferrer"&gt;US phoneme chart&lt;/a&gt;, short notes on &lt;a href="https://www.vocalace.com/phonetics/th" rel="noopener noreferrer"&gt;th&lt;/a&gt;, &lt;a href="https://www.vocalace.com/phonetics/ae" rel="noopener noreferrer"&gt;/æ/&lt;/a&gt;, &lt;a href="https://www.vocalace.com/phonetics/r" rel="noopener noreferrer"&gt;American r&lt;/a&gt;, plus a &lt;a href="https://www.vocalace.com/phonetics/us-uk" rel="noopener noreferrer"&gt;US vs UK&lt;/a&gt; comparison. Free courses on high-frequency misses and American flow: &lt;a href="https://course.vocalace.com/" rel="noopener noreferrer"&gt;course.vocalace.com&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass and mastery
&lt;/h2&gt;

&lt;p&gt;PronScore &lt;strong&gt;≥ 90&lt;/strong&gt; is one pass. Two passes in a row means mastered. After that, reviews land at &lt;strong&gt;21 / 90 / 365&lt;/strong&gt; days. Miss 90 and it shows up tomorrow.&lt;/p&gt;

&lt;p&gt;Trial and membership prices are on the &lt;a href="https://www.vocalace.com/price" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt;. Product, account, or partnership: &lt;a href="mailto:kenjiginjo@gmail.com"&gt;kenjiginjo@gmail.com&lt;/a&gt; (weekday replies). Vocalace is run by Neziva (两江新区涅智维网络科技工作室).&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Which score is the 90?
&lt;/h3&gt;

&lt;p&gt;Pass uses the overall PronScore for that take. Three parts go into it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy&lt;/strong&gt;: how close the phonemes are to the model&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fluency&lt;/strong&gt;: whether there were extra pauses&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Completeness&lt;/strong&gt;: whether the whole word got said&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sort those three low to high. Lowest gets &lt;strong&gt;60%&lt;/strong&gt;. The other two get &lt;strong&gt;20%&lt;/strong&gt; each. Phoneme scores do not decide pass. They mark which sound drifted so you can work the mouth shape.&lt;/p&gt;

&lt;p&gt;Example: accuracy 70, fluency 100, completeness 100. Sorted: 70, 100, 100.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;PronScore = 70 × 0.6 + 100 × 0.2 + 100 × 0.2 = 82&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Equal weight would have been 90. The 70 taking sixty percent pulls the total to 82.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do two passes in a row work?
&lt;/h3&gt;

&lt;p&gt;Hit 90 once, and the word comes back the next day. Hit 90 again and it is mastered. Once that settles, that word will not return earlier than the next day. If the confirm take misses 90, it is booked for tomorrow again. The next time you hit 90 still counts as mastered.&lt;/p&gt;

&lt;h3&gt;
  
  
  What if I miss 90 after mastering?
&lt;/h3&gt;

&lt;p&gt;Confirm again the next day. Pass that, and review resets from the 21-day slot, then 90, then 365.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do reviews show up?
&lt;/h3&gt;

&lt;p&gt;Open daily practice. Due words come first, oldest due first.&lt;/p&gt;

&lt;h3&gt;
  
  
  When does 小 V give tips? Can I ask about the report?
&lt;/h3&gt;

&lt;p&gt;After each word, 小 V marks the piece that most needs work. After you finish the daily goal you set, you get a day report. You can keep asking on that report.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where does the model audio come from?
&lt;/h3&gt;

&lt;p&gt;Generated from the reviewed American IPA. Stress and phonemes match the entry. IPA is checked by AI first; fails go to humans and get re-reviewed. After audio is generated it is listened to again; AI mismatches go to humans. POS, gloss, and example sentences go through the same review pass. Only then does the word enter daily practice.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can example sentences be scored?
&lt;/h3&gt;

&lt;p&gt;Scoring is per word. You can open an example to hear how the word sits in a sentence.&lt;/p&gt;

&lt;h3&gt;
  
  
  Self-select vs daily practice?
&lt;/h3&gt;

&lt;p&gt;Daily practice orders by due date and commonness, counts toward mastery and review, and is included in trial and membership. Self-select: search a reviewed word and record. Each assessment costs &lt;strong&gt;1 credit&lt;/strong&gt; and does not advance mastery. Trial and membership come with credits; you can also top up on the &lt;a href="https://www.vocalace.com/points" rel="noopener noreferrer"&gt;points page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How many words a day?
&lt;/h3&gt;

&lt;p&gt;Trial: &lt;strong&gt;30&lt;/strong&gt; a day. Membership: up to &lt;strong&gt;300&lt;/strong&gt;. Daily goal can be 30, 50, 100, or 300. Finish the day's goal and you get the report.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long is the trial? Does membership auto-renew?
&lt;/h3&gt;

&lt;p&gt;New accounts get &lt;strong&gt;7 days&lt;/strong&gt;. Membership days stack from what you buy. No auto-charge when it ends. Prices on the &lt;a href="https://www.vocalace.com/price" rel="noopener noreferrer"&gt;pricing page&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I practice unreviewed words? How long do add-word requests take?
&lt;/h3&gt;

&lt;p&gt;Daily and self-select use reviewed words. The dictionary can look up the full lexicon. Words not in yet can be submitted; track them under &lt;a href="https://www.vocalace.com/account/requests" rel="noopener noreferrer"&gt;My requests&lt;/a&gt;. Once processed, you can practice them.&lt;/p&gt;

&lt;h3&gt;
  
  
  What if an entry is wrong?
&lt;/h3&gt;

&lt;p&gt;Submit a correction for IPA, gloss, example, or model audio. Track it under &lt;a href="https://www.vocalace.com/account/corrections" rel="noopener noreferrer"&gt;My corrections&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are the courses the same system as practice?
&lt;/h3&gt;

&lt;p&gt;Courses on &lt;a href="https://course.vocalace.com/" rel="noopener noreferrer"&gt;course.vocalace.com&lt;/a&gt; are free. Course progress and on-site mastery / review are tracked separately.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long is practice data kept?
&lt;/h3&gt;

&lt;p&gt;Scores and progress stay on the account. After trial or membership ends, progress remains. After you request &lt;a href="https://www.vocalace.com/account/delete" rel="noopener noreferrer"&gt;account deletion&lt;/a&gt; there are &lt;strong&gt;7 days&lt;/strong&gt; to cancel; then practice data is deleted.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>learning</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>When the engine's phoneme and the course IPA disagree</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Fri, 30 Oct 2026 18:02:58 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/when-the-engines-phoneme-and-the-course-ipa-disagree-5d0i</link>
      <guid>https://dev.to/kenjiginjo/when-the-engines-phoneme-and-the-course-ipa-disagree-5d0i</guid>
      <description>&lt;p&gt;A user said our IPA for "cause" was wrong. We almost changed the lexicon.&lt;/p&gt;

&lt;p&gt;We run an English speaking-practice app. After someone records a word, we show a score from Azure Pronunciation Assessment and a drawer of phonemes: the sound the course expects, a short hint in Chinese, and how close that attempt was.&lt;/p&gt;

&lt;p&gt;They hit &lt;strong&gt;cause&lt;/strong&gt;. Our course IPA is /kɑːz/: an open, unrounded "ah." The drawer marked /ɔ/ and explained it as a rounded "oh." Both symbols sat on the same screen. If you are learning, that looks like the app cannot agree with itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  First wrong fix: change the lexicon
&lt;/h2&gt;

&lt;p&gt;Did we store the wrong American IPA for &lt;em&gt;cause&lt;/em&gt;? Plenty of dictionaries still print /kɔːz/. Our teaching accent is General American with the cot–caught merger, so &lt;em&gt;law&lt;/em&gt;, &lt;em&gt;thought&lt;/em&gt;, &lt;em&gt;caught&lt;/em&gt;, and &lt;em&gt;cause&lt;/em&gt; all go to ɑː. &lt;em&gt;More&lt;/em&gt; and &lt;em&gt;horse&lt;/em&gt; keep a rounded ɔː because of the following r. /kɑːz/ is the form we mean to teach. Changing the lexicon would have cleaned up one drawer by breaking the course.&lt;/p&gt;

&lt;h2&gt;
  
  
  Second wrong fix: blame Azure's ear
&lt;/h2&gt;

&lt;p&gt;Maybe Azure misheard the recording. That was wrong for this bug. Azure scores against its own phoneme set, SAPI. In SAPI, &lt;code&gt;ao&lt;/code&gt; is a rounded ɔ and &lt;code&gt;aa&lt;/code&gt; is ɑ. For &lt;em&gt;cause&lt;/em&gt; Azure often expects &lt;code&gt;k ao z&lt;/code&gt;. If the learner produced something in that neighborhood, Azure can give the vowel a decent score and still label it &lt;code&gt;ao&lt;/code&gt;. We mapped &lt;code&gt;ao&lt;/code&gt; → ɔ for display and attached our hint for ɔ. The score was about Azure's phone. The symbol and the hint were about our course.&lt;/p&gt;

&lt;p&gt;Both systems are consistent on their own terms. The bug was putting Azure's label in the slot learners read as "the sound we asked you to make."&lt;/p&gt;

&lt;h2&gt;
  
  
  Third wrong fix: remap every &lt;code&gt;ao&lt;/code&gt; to ɑː
&lt;/h2&gt;

&lt;p&gt;We looked at a global remap next: treat every &lt;code&gt;ao&lt;/code&gt; as ɑː, since that is how we teach the thought vowel without r. That fails as soon as you leave &lt;em&gt;cause&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;More&lt;/em&gt; is &lt;code&gt;m ao r&lt;/code&gt; on Azure's side and /mɔːr/ on ours. The &lt;code&gt;ao&lt;/code&gt; has to stay round because of the r. &lt;em&gt;School&lt;/em&gt; is /skuːl/ in the lexicon; some recordings come back as &lt;code&gt;s k ao l&lt;/code&gt;. Those &lt;code&gt;ao&lt;/code&gt; tokens are what Azure heard, not the target. &lt;em&gt;Your&lt;/em&gt;, &lt;em&gt;one&lt;/em&gt;, and &lt;em&gt;the&lt;/em&gt; each mismatch in a different way. A 1:1 table from SAPI onto teaching IPA cannot carry merger, rhotic vowels, and "what the user actually said" at the same time. Changing the shared SAPI→IPA map would also have recolored letters, rewritten daily-report snippets, and reinterpreted old stored SAPI strings. We left that table alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule we kept
&lt;/h2&gt;

&lt;p&gt;The lexicon's iscommon American IPA is the only target the drawer is allowed to show. Azure still computes the word score, the letter colors, and a guess at what the attempt sounded like.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If Azure's expected phone is the same sound as the lexicon token under our encoding (&lt;code&gt;ɑː&lt;/code&gt; accepts &lt;code&gt;aa&lt;/code&gt; and &lt;code&gt;ao&lt;/code&gt;; &lt;code&gt;ɔː&lt;/code&gt; only accepts &lt;code&gt;ao&lt;/code&gt;; final lax &lt;code&gt;i&lt;/code&gt; accepts &lt;code&gt;iy&lt;/code&gt;), we keep the lexicon symbol and show Azure's accuracy.&lt;/li&gt;
&lt;li&gt;If it is a different sound, we keep the lexicon symbol, hide the score, and write "this doesn't match," plus "what you sounded like" in teaching IPA.&lt;/li&gt;
&lt;li&gt;If the recording is too far gone (no IPA, or at least three accuracy-0 phones), we do not invent a phone-by-phone story. The copy tells the user we cannot point at a single sound, and to play the recording back against the model audio.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We did not change the Azure request, the score we store, or the SAPI error phones on the record. Letter spans on the word still follow Azure. The coach character uses the same aligned phones, so it talks about /ɑː/ on &lt;em&gt;cause&lt;/em&gt;, not /ɔ/. On a mismatch it says the recording does not line up with that sound, instead of calling a foreign label "inaccurate."&lt;/p&gt;

&lt;h2&gt;
  
  
  Real samples beat inventing copy
&lt;/h2&gt;

&lt;p&gt;The design only held up because we stopped inventing examples. We pulled real Azure JSON from past practice attempts, attached the iscommon US IPA for that word, and generated a side-by-side HTML sheet: old drawer versus proposed drawer. Fake copy would have looked fine. The samples did not.&lt;/p&gt;

&lt;p&gt;A few of the failures:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong POS dump.&lt;/strong&gt; Exporting every POS IPA and then picking the longest string is not what practice does. Practice uses one iscommon American form. Our first dump mixed readings, so the preview "fixed" the wrong target.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Alignment greed.&lt;/strong&gt; Same-length strings should stay one-to-one. If you insert a gap whenever a later lexicon phone could claim the current Azure phone, &lt;em&gt;believe&lt;/em&gt; steals &lt;code&gt;iy&lt;/code&gt; for a later /iː/ and marks the earlier /ɪ/ as a mismatch it did not earn. We only insert a gap when there are more lexicon phones left than Azure phones left, and a later lexicon token actually matches the current Azure phone. That is how /ˈriː.əl/ can still show the schwa when Azure returns &lt;code&gt;r iy l&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Happy vowel.&lt;/strong&gt; Word-final /i/ has to match Azure &lt;code&gt;iy&lt;/code&gt;. Mapping only &lt;code&gt;iː&lt;/code&gt; → &lt;code&gt;iy&lt;/code&gt; left &lt;em&gt;sorry&lt;/em&gt; looking like a miss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schwa + r.&lt;/strong&gt; &lt;code&gt;ax&lt;/code&gt; plus &lt;code&gt;r&lt;/code&gt; is one teaching phone, /ɚ/ or /ɝː/, not two rows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All-zero traces.&lt;/strong&gt; Forcing a pairing on &lt;em&gt;water&lt;/em&gt; or &lt;em&gt;person&lt;/em&gt; produces confident nonsense. Those go to the unmatched fallback.&lt;/p&gt;

&lt;p&gt;The preview also forced us to rewrite the Chinese. "More like /ɔ/" sounds like we are naming the target. "Your recording sounds like /ɔ/" does not, once the big symbol is already /ɑː/. We dropped "the standard pronunciation is" because the large /ɑː/ already is that. We kept the two playback controls: model audio and the user's take (&lt;code&gt;button&lt;/code&gt; elements next to each other in the drawer).&lt;/p&gt;

&lt;h2&gt;
  
  
  Index remapping was the production risk
&lt;/h2&gt;

&lt;p&gt;On the way into production the risky part was not the encoding table. It was index remapping. Azure still colors &lt;em&gt;bet&lt;/em&gt; and &lt;em&gt;ter&lt;/em&gt; from its own phones. After we group &lt;code&gt;ax r&lt;/code&gt; into one /ɚ/, the drawer rows are shorter than Azure's list. The syllable indexes have to move with the rows or a tap on &lt;em&gt;ter&lt;/em&gt; opens the wrong phones. Custom practice had been dumping every phone into the drawer regardless of which letters you tapped; it now uses the same component as daily practice.&lt;/p&gt;

&lt;p&gt;A handful of high-frequency words still have no iscommon POS in our data: &lt;em&gt;are&lt;/em&gt;, &lt;em&gt;been&lt;/em&gt;, &lt;em&gt;got&lt;/em&gt;, &lt;em&gt;was&lt;/em&gt;, &lt;em&gt;were&lt;/em&gt;, &lt;em&gt;won&lt;/em&gt;. Those trips currently hit the unmatched message. That is a data stamp, not another mapping trick. Daily-report text still talks in Azure phones; we left that for a second pass so the live drawer and the stored score could not drift together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;If you show engine phones to learners, split the jobs: the engine may score; the course owns the symbols. A translation table between those two alphabets is a display convenience, not a teaching standard. You can break the drawer. You usually should not break scoring or the rows you already saved. And a folder of real misrecognitions will find the cases a mapping table will never list: &lt;em&gt;school&lt;/em&gt; heard as &lt;code&gt;ao&lt;/code&gt;, &lt;em&gt;one&lt;/em&gt; heard as &lt;code&gt;aa&lt;/code&gt; against /ʌ/, &lt;em&gt;the&lt;/em&gt; heard as &lt;code&gt;iy&lt;/code&gt; against /ə/.&lt;/p&gt;

&lt;p&gt;Those are the cases the drawer has to survive, not the one word a user happened to screenshot.&lt;/p&gt;

</description>
      <category>pronunciation</category>
      <category>azure</category>
      <category>edtech</category>
      <category>product</category>
    </item>
    <item>
      <title>Merging itinerary planning into the same chat process (and gating tools by membership)</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Fri, 30 Oct 2026 09:40:08 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/merging-itinerary-planning-into-the-same-chat-process-and-gating-tools-by-membership-51g8</link>
      <guid>https://dev.to/kenjiginjo/merging-itinerary-planning-into-the-same-chat-process-and-gating-tools-by-membership-51g8</guid>
      <description>&lt;p&gt;We used to run chat and itinerary planning as two services. Two session stores, two deploy paths, and the same tool list for everyone. Membership did almost nothing at the chat layer.&lt;/p&gt;

&lt;p&gt;This post is how we folded planning into the chat process, kept the old stream endpoint stable, and only opened booking / itinerary tools for members.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why merge
&lt;/h2&gt;

&lt;p&gt;Chat answered questions. Planning lived elsewhere: another process, another port, another session id. The mini program had to know which backend to call. When something broke, you debugged two stacks.&lt;/p&gt;

&lt;p&gt;Worse: free and paid users saw the same tools. "Book a table" and "build a day plan" were either on for everyone or nowhere near the model.&lt;/p&gt;

&lt;p&gt;Goals:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One SSE stream for conversation&lt;/li&gt;
&lt;li&gt;Tools trimmed by a &lt;code&gt;profile&lt;/code&gt; (&lt;code&gt;standard&lt;/code&gt; | &lt;code&gt;member&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Planning as a library in the same process, not a second microservice&lt;/li&gt;
&lt;li&gt;Old clients keep working on v1&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keep v1, put new behavior on v2
&lt;/h2&gt;

&lt;p&gt;Do not change the live stream contract for clients already in production.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Endpoint&lt;/th&gt;
&lt;th&gt;Who uses it&lt;/th&gt;
&lt;th&gt;Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POST /api/chat/stream&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Old clients&lt;/td&gt;
&lt;td&gt;Same as before&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POST /api/chat-v2/stream&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;New clients&lt;/td&gt;
&lt;td&gt;Accepts &lt;code&gt;profile&lt;/code&gt;; members get extra tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POST /api/plan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Itinerary screen&lt;/td&gt;
&lt;td&gt;Sync plan; same &lt;code&gt;run_plan&lt;/code&gt; as the chat tool&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Auth stays in the BFF in front of the mini program. Chat only trusts &lt;code&gt;profile&lt;/code&gt;. Optionally require an internal header (&lt;code&gt;X-Internal-Token&lt;/code&gt;) on v2 and &lt;code&gt;/api/plan&lt;/code&gt; so random traffic cannot pick &lt;code&gt;member&lt;/code&gt; itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools by tier
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Standard:&lt;/strong&gt; wiki / FAQ lookup, transit, souvenirs, restaurant &lt;em&gt;suggestions&lt;/em&gt;, small talk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Member also gets:&lt;/strong&gt; table booking, generate / refine itinerary.&lt;/p&gt;

&lt;p&gt;A question like "is two days enough?" stays on wiki-style retrieval. It is not a planning job.&lt;/p&gt;

&lt;p&gt;In the mini program, something like &lt;code&gt;mode=pro&lt;/code&gt; plus a valid membership becomes &lt;code&gt;profile=member&lt;/code&gt; in the BFF before the stream call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing planning into the same process
&lt;/h2&gt;

&lt;p&gt;Move the planning package next to the chat app. Put model artifacts (pickles, embeddings, local embedding weights) under a data directory the process can read.&lt;/p&gt;

&lt;p&gt;Refine only when the same &lt;code&gt;session_id&lt;/code&gt; already has a stored plan. Otherwise treat the call as a fresh generate.&lt;/p&gt;

&lt;p&gt;Chat still keys sessions with &lt;code&gt;session_id&lt;/code&gt;. The itinerary page still uses &lt;code&gt;hash_id&lt;/code&gt;. Those two ids do not map to each other yet. Say that out loud in the PR; people will assume they do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mini program changes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Send &lt;code&gt;mode&lt;/code&gt; with each message; switching to Pro checks membership first&lt;/li&gt;
&lt;li&gt;BFF proxies v2 and attaches &lt;code&gt;profile&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Itinerary page calls &lt;code&gt;http://127.0.0.1:{chat_port}/api/plan&lt;/code&gt; instead of the old planning port&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Checks we ran
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Standard profile: cannot book, cannot build an itinerary&lt;/li&gt;
&lt;li&gt;Member: can book; can generate; refine needs a prior generate on the same session&lt;/li&gt;
&lt;li&gt;Known gaps logged as examples: empty session asking to "change" a plan, wanting a brand-new plan on the same session, talk ids that still differ between chat and the itinerary page&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deploy notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Upload scripts skip heavy plan assets; copy them on the server from the old tree&lt;/li&gt;
&lt;li&gt;Order on the box: ship code → rsync artifacts → &lt;code&gt;poetry install&lt;/code&gt; into the project venv → &lt;code&gt;pm2 reload&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Leave the old planning process up until you are sure nothing still hits it&lt;/li&gt;
&lt;li&gt;v1 chat should not move during this cutover&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Watch the conda vs poetry mix. We pin installs to the project &lt;code&gt;.venv&lt;/code&gt; so reload does not pick a random global env.&lt;/p&gt;

&lt;h2&gt;
  
  
  Still open
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;"Change my plan" only looks for a stored plan; it does not parse whether the user meant edit vs new&lt;/li&gt;
&lt;li&gt;Chat session and itinerary-page session stay disconnected&lt;/li&gt;
&lt;li&gt;Our refine tests only assert the tool ran, not that attractions actually swapped&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Diagrams worth drawing
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Before: mini program → BFF → chat &lt;strong&gt;or&lt;/strong&gt; planning (two paths)&lt;/li&gt;
&lt;li&gt;After: conversation on v2 + &lt;code&gt;profile&lt;/code&gt;; itinerary page on same-process &lt;code&gt;/api/plan&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Member vs standard tool tables&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What stuck
&lt;/h2&gt;

&lt;p&gt;Merge the capability into one process, freeze the old stream URL, and put membership on the tool list rather than a second chat service. Planning data can still be heavy; ship the code first and copy artifacts where they already live.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>api</category>
      <category>sse</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Confirming an English word with Enter sent the chat</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Fri, 30 Oct 2026 06:28:47 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/confirming-an-english-word-with-enter-sent-the-chat-he4</link>
      <guid>https://dev.to/kenjiginjo/confirming-an-english-word-with-enter-sent-the-chat-he4</guid>
      <description>&lt;p&gt;The chat sends on Enter. Shift+Enter inserts a newline. With a Chinese IME, Enter is how you keep an English word you typed in that mode, instead of a converted candidate. The field still receives a keydown whose key is Enter. The handler called send, and the word went out as a message.&lt;/p&gt;

&lt;p&gt;This is the &lt;code&gt;textarea&lt;/code&gt; (or &lt;code&gt;input&lt;/code&gt;) event, not a component API. &lt;code&gt;compositionstart&lt;/code&gt;, &lt;code&gt;compositionend&lt;/code&gt;, &lt;code&gt;blur&lt;/code&gt;, and &lt;code&gt;keydown&lt;/code&gt; are on the element. A React prop with the same name is just that listener.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;isComposing&lt;/code&gt; on the keydown is enough in Chromium. The keydown that confirms the composition still has it set, so the handler can return and let the IME write the string. Safari runs the events the other way. &lt;code&gt;compositionend&lt;/code&gt; happens first, and the Enter keydown after it already has &lt;code&gt;isComposing&lt;/code&gt; false. A check that only reads the event treats that keydown as a normal send.&lt;/p&gt;

&lt;p&gt;Keep a flag, set true on &lt;code&gt;compositionstart&lt;/code&gt;. On &lt;code&gt;compositionend&lt;/code&gt;, clear it with &lt;code&gt;setTimeout(0)&lt;/code&gt;, not in the listener itself. The Enter keydown is still on the stack when the timeout is queued, so the flag is true and the handler returns. The timeout runs after that turn. The next Enter is a separate keypress, and that one sends.&lt;/p&gt;

&lt;p&gt;Leave &lt;code&gt;keyCode === 229&lt;/code&gt; out of the check. During composition, 229 means the key belongs to the IME. Some Android keyboards also report 229 for a plain Enter, and then Enter would never send. &lt;code&gt;isComposing&lt;/code&gt; and the flag are the two signals.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;compositionend&lt;/code&gt; does not always arrive. Switch input method, or leave the field mid-composition, and the flag can stay true. Enter then stops sending until some later composition ends. &lt;code&gt;blur&lt;/code&gt; sets the flag false.&lt;/p&gt;

&lt;p&gt;Returning early also skips &lt;code&gt;preventDefault&lt;/code&gt;, so the IME can still commit the string. A Send button never hits &lt;code&gt;keydown&lt;/code&gt;. A click sends whatever is already in the field. Characters still in the preedit are not in that value yet. After the composition ends, Shift+Enter inserts a newline, same as before.&lt;/p&gt;

&lt;h2&gt;
  
  
  The listeners
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;composingRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;textarea&lt;/span&gt;
  &lt;span class="na"&gt;onCompositionStart&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;composingRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;onCompositionEnd&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;composingRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;onBlur&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;composingRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;onKeyDown&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;nativeEvent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isComposing&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;composingRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Enter&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shiftKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
      &lt;span class="nf"&gt;send&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without React, add the same four listeners with &lt;code&gt;addEventListener&lt;/code&gt;. Read &lt;code&gt;event.isComposing&lt;/code&gt; on the keydown. The flag is the piece Safari needs, because &lt;code&gt;isComposing&lt;/code&gt; is already false by the time that Enter arrives.&lt;/p&gt;

&lt;p&gt;I dispatched the events on a live &lt;code&gt;textarea&lt;/code&gt;. Enter during &lt;code&gt;compositionstart&lt;/code&gt; did not call &lt;code&gt;preventDefault&lt;/code&gt;. Enter in the same turn as &lt;code&gt;compositionend&lt;/code&gt; did not either. After the timeout, Enter did.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Hidden wiki pages never reached our chat until we rebuilt the index on a timer</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Thu, 29 Oct 2026 11:02:01 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/hidden-wiki-pages-never-reached-our-chat-until-we-rebuilt-the-index-on-a-timer-26md</link>
      <guid>https://dev.to/kenjiginjo/hidden-wiki-pages-never-reached-our-chat-until-we-rebuilt-the-index-on-a-timer-26md</guid>
      <description>&lt;p&gt;Chat answers from a local Milvus Lite file, not from MySQL on the request path. Editors can change a page or drop notes onto a hidden category, and the model still sees whatever was embedded last time.&lt;/p&gt;

&lt;p&gt;We use hidden pages on purpose. Some answers should not sit on the public wiki, so they go into categories that the site listing skips. Retrieval was also skipping them. One support question had a dedicated hidden FAQ in the database; the model cited an unrelated shop page and said the corpus had nothing on the topic.&lt;/p&gt;

&lt;p&gt;The fix is a small sidecar next to the API, same venv, no extra services. On process start, and then every 12 hours, it reads the wiki tables (page id, category, title, update_time, body). Hidden rows are included; we do not filter on visible. Body prefers one locale and falls back to a second. The article key keeps the original category name, hidden marker and all, so the client can still open that page.&lt;/p&gt;

&lt;p&gt;A fingerprint of id + update_time + body hash is compared with the last run. No change: exit, leave the API alone. Change: strip HTML, split chunks, embed with the same model the retriever already uses, write milvus_lite.next.db, then replace the live .db. Milvus Lite needs a path that ends in .db. After a real swap we restart the chat process, because it opens the file at boot and has no reload. Unchanged fingerprints must not restart anything; that would kill in-flight replies.&lt;/p&gt;

&lt;p&gt;First production run pulled every page with content, including the hidden FAQ. Hitting the existing chat SSE endpoint with the old support question now points at that FAQ.&lt;/p&gt;

&lt;p&gt;If someone publishes a hidden page and needs it in chat before the next 12-hour tick, restart the sidecar. It indexes once on startup.&lt;/p&gt;

</description>
      <category>rag</category>
      <category>milvus</category>
      <category>python</category>
      <category>pm2</category>
    </item>
    <item>
      <title>A passing pronunciation score still hid the broken phoneme</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Mon, 19 Oct 2026 06:27:55 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/a-passing-pronunciation-score-still-hid-the-broken-phoneme-2e3g</link>
      <guid>https://dev.to/kenjiginjo/a-passing-pronunciation-score-still-hid-the-broken-phoneme-2e3g</guid>
      <description>&lt;p&gt;Azure Speech will give a spoken word one number, PronScore. For a Chinese speaker learning American English, that number is the wrong thing to teach with. Mandarin does not have /θ/, /ð/, /æ/, or the American flap. The word can score in the 80s while one of those phonemes is the actual failure.&lt;/p&gt;

&lt;p&gt;I built Vocalace around that. The screen shows one word. The pass/fail decision and the red mark are two different scores, on purpose.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.vocalace.com" rel="noopener noreferrer"&gt;https://www.vocalace.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the assessment payload actually contains
&lt;/h2&gt;

&lt;p&gt;A successful response has RecognitionStatus: "Success" and an NBest array. I only read NBest[0]. The word score is PronScore, and I floor it. If the field is missing, the attempt scores 0. I do not average the alternatives.&lt;/p&gt;

&lt;p&gt;Inside that first hypothesis, each word has a Phonemes array. Each phoneme has its own AccuracyScore. That list is what I can mark. PronScore is what I can use to decide whether the attempt counts.&lt;/p&gt;

&lt;p&gt;The JSON is treated as unknown and parsed field by field. A missing Words array, a phoneme with no AccuracyScore, or a non-numeric score is skipped. One bad node does not throw away the rest of the attempt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two thresholds
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpyl3klk3oq3b2g60fwcl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpyl3klk3oq3b2g60fwcl.png" alt="A failed take. The word scores 10, under the pass line of 90. The phonemes stay on the card." width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A phoneme is marked when its AccuracyScore is under 60. The attempt passes only when the floored PronScore is at least 90.&lt;/p&gt;

&lt;p&gt;These are not two views of the same cutoff. A word can pass 90 and still contain a phoneme under 60, because PronScore is a whole-word score. A word can also fail 90 with no marked phoneme, when several phonemes are merely mediocre. Marking every phoneme below 90 would light up the whole transcription. Using 90 as the mark threshold and the pass threshold would make those two failures look the same.&lt;/p&gt;

&lt;p&gt;So the UI shows the sounds that were clearly off. The scheduler, not the red marks, decides whether the word is learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The attempt does not master a word
&lt;/h2&gt;

&lt;p&gt;Passing once is not mastery. The states are unseen, confirming, and mastered.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;unseen and a score of at least 90 moves the word to confirming.&lt;/li&gt;
&lt;li&gt;confirming and another score of at least 90 moves it to mastered.&lt;/li&gt;
&lt;li&gt;a miss stays where it is and comes back tomorrow. The word is not downgraded.&lt;/li&gt;
&lt;li&gt;a miss after mastered steps back to confirming and also comes back tomorrow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The next review is never later the same day. The earliest nextReviewAt is tomorrow, so two passes cannot be recorded from two takes in one sitting. After mastered, the gaps are 21 days, then 90, then 365. A further pass stays at 365.&lt;/p&gt;

&lt;p&gt;Due reviews are selected before any new word. New words come from 15,359 reviewed high-frequency words (out of a 68,454-word lexicon), more frequent bands first. If nothing is due and no new word is left, the client is told how many days until the next review. It does not invent a practice item.&lt;/p&gt;

&lt;h2&gt;
  
  
  The recording is bounded before it reaches Azure
&lt;/h2&gt;

&lt;p&gt;Assessment audio is 16 kHz, 16-bit, mono. The cap is 15 seconds, which is also the upload cap: 44 bytes of WAV header plus one second of samples times 15. Recognition failures are mapped to a short message. NoMatch, initial silence, and babble each say what to change. They do not become a score of 0 mixed in with a real attempt.&lt;/p&gt;

&lt;p&gt;The model recording is separate. It is Azure neural TTS with the target IPA written into SSML as a phoneme element, American English only. The voice the learner imitates and the score of their own take do not share a request.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would not do again
&lt;/h2&gt;

&lt;p&gt;I would not store the raw assessment document on the client and score it there. The pass line, the mark line, and the next review date are the product. They stay on the server.&lt;/p&gt;

&lt;p&gt;I would also not show AccuracyScore next to every phoneme. The learner needs the sound that failed, then another try. The number is for the scheduler.&lt;/p&gt;

&lt;p&gt;Vocalace is the app this runs in: one American English word, the missed phoneme marked, and the review rules above. A new account can practice for 7 days.&lt;/p&gt;

</description>
      <category>api</category>
      <category>azure</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>I needed audio in Bun, so I skipped fluent-ffmpeg</title>
      <dc:creator>Kenji</dc:creator>
      <pubDate>Wed, 09 Sep 2026 12:34:18 +0000</pubDate>
      <link>https://dev.to/kenjiginjo/i-needed-audio-in-bun-so-i-skipped-fluent-ffmpeg-5g83</link>
      <guid>https://dev.to/kenjiginjo/i-needed-audio-in-bun-so-i-skipped-fluent-ffmpeg-5g83</guid>
      <description>&lt;p&gt;Bun's Node compatibility layer will run &lt;code&gt;fluent-ffmpeg&lt;/code&gt;. That is the honest answer, and for a lot of apps it is good enough.&lt;/p&gt;

&lt;p&gt;I still ended up writing a tiny wrapper around &lt;code&gt;Bun.spawn&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The jobs I actually had were boring: transcode a file, pipe a stream, turn whatever the user uploaded into 16 kHz mono PCM for Whisper. &lt;code&gt;fluent-ffmpeg&lt;/code&gt; can do all of that, plus video, filters, and a fluent builder I was not going to use. In a Bun-only service I also did not want "it works through the Node compat layer" as the whole story.&lt;/p&gt;

&lt;p&gt;So &lt;a href="https://github.com/KenjiGinjo/bun-ffmpeg" rel="noopener noreferrer"&gt;bun-ffmpeg&lt;/a&gt; is intentionally small. Audio only. System &lt;code&gt;ffmpeg&lt;/code&gt; / &lt;code&gt;ffprobe&lt;/code&gt;. Typed helpers. No bundled binary.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it looks like
&lt;/h2&gt;

&lt;p&gt;Install ffmpeg yourself (&lt;code&gt;brew install ffmpeg&lt;/code&gt;, &lt;code&gt;apt install ffmpeg&lt;/code&gt;, or set &lt;code&gt;FFMPEG_PATH&lt;/code&gt; in Docker). Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun add bun-ffmpeg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;audio&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun-ffmpeg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input.mp3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;output.aac&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;codec&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aac&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;bitrate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;192k&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;channels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;sampleRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;44100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Whisper path is one function. It always emits 16 kHz, mono, &lt;code&gt;pcm_s16le&lt;/code&gt; WAV:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;audioWav&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun-ffmpeg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wav&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;audioWav&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Bun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input.mp3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;()),&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Bun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;input.16k.wav&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wav&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Streams work the same way: &lt;code&gt;ReadableStream&lt;/code&gt; in, file or chunk callbacks out. If the binary is missing you get an error that tells you to install ffmpeg instead of a raw &lt;code&gt;ENOENT&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not fluent-ffmpeg
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Need&lt;/th&gt;
&lt;th&gt;fluent-ffmpeg&lt;/th&gt;
&lt;th&gt;bun-ffmpeg&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Runtime&lt;/td&gt;
&lt;td&gt;Node, works on Bun via compat&lt;/td&gt;
&lt;td&gt;Bun only (&lt;code&gt;Bun.spawn&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Surface&lt;/td&gt;
&lt;td&gt;Video, filters, graphs&lt;/td&gt;
&lt;td&gt;Audio&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Binary&lt;/td&gt;
&lt;td&gt;Still needs ffmpeg on the machine&lt;/td&gt;
&lt;td&gt;Same&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shape&lt;/td&gt;
&lt;td&gt;Fluent builder&lt;/td&gt;
&lt;td&gt;A handful of functions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you are muxing video or building filter graphs, keep fluent-ffmpeg. This package is for the case where the runtime is Bun and the media is audio.&lt;/p&gt;

&lt;p&gt;Under the hood there is no magic: spawn &lt;code&gt;ffmpeg&lt;/code&gt;, pass &lt;code&gt;-i&lt;/code&gt;, codec, bitrate, channels, sample rate, and either a path or &lt;code&gt;pipe:0&lt;/code&gt; / &lt;code&gt;pipe:1&lt;/code&gt;. The wrapper exists so you do not re-derive those flags in every script.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it will not do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Node.js&lt;/li&gt;
&lt;li&gt;Video&lt;/li&gt;
&lt;li&gt;A fluent API&lt;/li&gt;
&lt;li&gt;Shipping ffmpeg inside the npm tarball&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;v0.3.0 added &lt;code&gt;FFMPEG_PATH&lt;/code&gt; / &lt;code&gt;FFPROBE_PATH&lt;/code&gt; for containers, and &lt;code&gt;FfmpegNotFoundError&lt;/code&gt; when the binary is not there.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/KenjiGinjo/bun-ffmpeg" rel="noopener noreferrer"&gt;github.com/KenjiGinjo/bun-ffmpeg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;npm: &lt;code&gt;bun add bun-ffmpeg&lt;/code&gt;&lt;/p&gt;

</description>
      <category>bunjs</category>
      <category>ffmpeg</category>
      <category>typescript</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
