The last thing I wrote about my Tagalog trainer ended on a promise. Pitch contour comparison, for the stress pairs that transcript matching is structurally blind to. I shipped it Friday night, and the interesting part turned out to be nothing I planned.
Here’s the hole it was filling. Say “baka” with the stress on the first syllable and you said cow. Move the stress to the second syllable and you said maybe. Whisper hands back the same four letters either way. My whole judge is built on comparing what I meant against what the recognizer heard, so on that pair it’s not a lenient grader, it’s a blind one. No amount of threshold tuning fixes a signal that was never in the transcript to begin with.
So the new panel doesn’t read words at all. It takes my recording and the native reference clip, runs both through parselmouth for a pitch track, and draws the two curves on top of each other with a dot marking where each voice peaked.
The thing I had to get right first was that my voice and the reference voice have nothing in common. The references are Google’s fil-PH-Neural2-D, and I’m a guy talking into a laptop mic. Comparing raw hertz would only tell me I’m not a synthesized Filipino man, which I already knew. So the contour gets converted to semitones relative to each speaker’s own median, and the timeline gets stretched to fit the voiced span. Now it’s shape against shape. Where the melody rises and falls, not how high it sits.
That part worked on the first try. Then I hit the actual design question, which is how much of what I just measured I’m willing to say out loud.
Peak position is a decent proxy for stress placement on a two or three word phrase. On “Magandang umaga po” the pitch peak is doing real lexical work. On a seven word phrase it isn’t. It’s intonation, the natural arc of a question or a statement, and it would wander around on a native speaker too. If I let the tool announce “your stress landed on the wrong syllable” every time I said a long sentence, it would be confidently wrong on a regular basis, and I’d learn to tune it out right about the time it started being right.
So the verdict stops at three words. Longer phrases still get the overlay, both curves with their peak dots, and no claim attached to it. Look at the picture and draw your own conclusion. The tool shows its work and keeps its mouth shut.
Don’t get me wrong, I’m not pretending that’s rigorous. The number that decides whether two peaks count as the same syllable is 0.2, and the comment I left next to it in the code says “uncalibrated guess, tune on real data.” I shipped it with that comment in it, because it’s an honest label on a dial I picked by feel and haven’t turned since.
Looking at the whole thing now, none of it came from a roadmap. Forty travel phrases with a native clip for every one, a local large-v3 on the desktop in the other room that takes about nine seconds to judge a recording, worst-first ordering so the phrases I keep failing come back around, a shadow mode that opens the mic by itself once the native audio finishes. Every one of those exists because I was using the trainer and something about it annoyed me. The stress panel is the same story, just further down. I practiced until I hit the edge of what a transcript could tell me, and then I had to go build a different kind of ear.
The 0.2 is still sitting there untuned, though. Using the tool is what generates the recordings that would calibrate it, and I’ve been using the tool, so that one is on me now.