DEV Community

Savindu Thathsara
Savindu Thathsara

Posted on

Hey Hearthlen Opened YouTube Without a Cloud Model

Hey Hearthlen Opened YouTube Without a Cloud Model

“Play Shape of You on YouTube” opened the watch page in 4.2 seconds. Deciding that this was a YouTube request took 9 microseconds.

Savindu Thathsara, savithathsara.me. This is a Hearthlen note from the ThinkPad, after the desktop was already installed.

The slow part is not the decision

The assistant has a fixed list of skills. Each one is ordinary code: play a video, open an app, change the volume, search, take a screenshot. A sentence goes through one function, match(), which returns a skill name and a few slots. On this laptop that function took 9.0 microseconds per sentence. The numbers are in docs/benchmarks/assistant-react.txt.

“Play shape of you on youtube” then took 4221 ms end to end and opened https://www.youtube.com/watch?v=JGwWNGJdvx8. Most of that wait is the search that turns a title into a watch id. The spoken “Playing shape of you” starts before that search finishes. The decision never asked a language model, and the model is not allowed to return a shell command. An app name that is not on the list is refused.

Wi-Fi off is the risky one. It asks for a yes before it runs.

Voice stays small until someone speaks

The listener is a user service. Before the first utterance it was 15.6 MB. It is waiting for “hey Hearthlen” with pocketsphinx and a pronunciation written for that made-up name. A trained wake-word network can replace that class later. The rest of the program only sees “the phrase was heard”.

Speech-to-text is faster-whisper tiny.en at int8. On a clip of the YouTube sentence it took 364 ms once the model was already loaded, and the transcript was “Play Shape of you on YouTube.” Keeping that model loaded costs 459,932 kB in the bench process. That is over the 150–250 MB always-on budget, so the listener does not load it until the first command. Loading it on every sentence would be the slower choice. Reaction time won that trade, and the number is written down so it can be revisited.

Piper, a small British English voice, spoke a short line in 2048 ms including the playback. The words themselves take most of that.

The language model only talks

If the sentence is not a skill, a 360M model (4-bit, through llama.cpp) answers and the process exits. One of those replies took 758 ms: “What do you call a person with no friends? A loner.” The text is spoken. It is not run.

English is the only filled-in language row. Sinhala is an empty row in the same manifest, so a later voice does not require a new pipeline.

Wake-to-action, timed from a person actually saying the phrase, is not in the file yet. The service is listening. The next check is that spoken trip, against the memory budget in An 8GB Laptop Has to Run YouTube and a Local AI Assistant.

Savindu Thathsara builds practical AI and automation in London. This series is the public log of an offline AI operating system he is writing and learning at the same time.

Top comments (0)