Building a Voice Assistant from Open Source LLMs: A Home Project Case Study

weights_&_biases · Tech · 2023 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Voice assistants and LLMOps

Weights & Biases used a home-built voice assistant to show why LLM demos are easy but production systems require evaluation, reproducibility, latency discipline, and iterative model/prompt/fine-tuning improvements.

Constraints:

Architecture

The voice assistant uses Whisper for speech transcription, a local open-source LLM running through llama.cpp on consumer hardware to convert natural language into Python-like function calls, and a library of simple skills such as weather, music, math, and news. The project improved from 0% accuracy through prompt engineering, Llama chat, Mistral, synthetic examples, and QLoRA fine-tuning to 98% accuracy.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  user-speech[User Speech] --> whisper[Whisper]
  whisper --> local-llm[Local LLM]
  llama-cpp-runtime[llama.cpp Runtime] --> local-llm
  local-llm --> skill-library[Skill Library]
  skill-library --> external-apis[External APIs]
  evaluation-dataset[Evaluation Dataset] --> local-llm
  local-llm --> experiment-tracking[Experiment Tracking]
  evaluation-dataset --> experiment-tracking
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
User Speech Natural-language voice commands such as weather, music, math, and news requests. Whisper
Whisper Open-source speech-to-text model that transcribes the user's command. User Speech, Local LLM
Local LLM Open-source model converting transcribed language into exact function-call code. Whisper, Skill Library
llama.cpp Runtime Local inference runtime for Llama/Mistral-style models on cheap hardware or a MacBook. Local LLM
Skill Library Simple Python functions for weather, music, math, news, and other assistant capabilities. Local LLM, External APIs
External APIs APIs called by skills to execute requested actions. Skill Library
Evaluation Dataset Examples and synthetic data used to measure function-call accuracy and fine-tune the model. Local LLM, Experiment Tracking
Experiment Tracking Weights & Biases tracking of prompts, workflows, model runs, failures, and metrics. Evaluation Dataset, Local LLM

Data flow

A user's speech is transcribed by Whisper, passed to a local LLM that maps the request into structured Python-like function calls such as weather(location='Boston'), and then the corresponding skill function calls an API. Experiment tracking records prompts, models, datasets, failures, and metrics so future iterations can reproduce the learning.

3 supporting quotes
“the weather comes in you ask what's weather in Boston it goes through an on device LM to translate it to kind of python looking code”transcript, stated
“that says weather location equals Boston has to look like that because it's going to call that function on the weather skill”transcript, stated
“um you I think llama I and Whisper is a fantastic open source stack here llama CPP is one of the many options to to run llama on um cheap Hardware there's VM and others um and lots of companies that'll do it for you kind of wanted to”transcript, stated

Why this architecture

The architecture was driven by voice latency and privacy/local-control constraints: speech is transcribed locally, a small local model creates deterministic function-call code, and iterative evaluation determines whether prompt engineering, model switching, or fine-tuning is needed.

3 supporting quotes
“latency really matters a lot right because you're actually transcribing audio and then you're running the AUD you're running the transcription through an llm”transcript, stated
“painful so you need to go kind of small model here and you need to to run it fast on on Hardware so that's why we went with um llama 2 at the time and put it in a default prompt and it didn't work 0% accuracy and so every kind of customer goes through this journey to”transcript, stated
“to get something shipped into production and working well you end up using a whole bunch of these different um methods”transcript, stated

Models used: Whisper · Llama 2 · Llama chat · Mistral · ChatGPT · QLoRA fine-tuned model

Scale

Alternatives considered (roads not taken)

Existing Alexa behavior

Rejected because: It did not remember the child's repeated favorite-song behavior.

“she asked Alexa to play Baby shark like literally like five times a day so it's like there's no data science needed to know what the favorite song is”transcript, stated

Mycroft-style open-source Alexa alternative

Rejected because: The speaker found it out of date and not built around modern LLMs.

“there's something called micraft that's um that's out there but but um kind of out of date doesn't really use LMS”transcript, stated

Prompt engineering alone

Rejected because: It reached a promising demo but not production-ready accuracy.

“75% accuracy is incredibly annoying it it it's it's still not um it's still not going to they're going to work well”transcript, stated

Vibes-only testing

Rejected because: Vibes cannot distinguish meaningful improvements such as 75% versus 79% accuracy.

“and some things worse and The Vibes check is not going to tell you the difference between a 75% accuracy and a 79% accuracy so he never would have been able to make that switch from Lama 2 to mistol because it just wouldn't have been clear if it's better or worse and”transcript, stated

Patterns

eval-driven-development (evaluation)

Accuracy metrics guided each change from default prompt through prompt engineering, model switching, and fine-tuning.

“taking time to build an evaluation framework is really the the foundation of getting these things into production and working well”transcript, stated

structured-output-contract (tool calling)

Natural language must become exact Python-looking function calls that invoke skills.

“I need really exact accuracy because I'm generating um code function calls”transcript, stated

fine-tuning-adaptation (model adaptation)

QLoRA fine-tuning on generated and filtered examples provided the final accuracy jump.

“Laura Q Laura has made this a lot more tractable now”transcript, stated
“fine-tuning plus mol actually led to 98% accuracy”transcript, stated

synthetic-data-generation (data)

ChatGPT generated thousands of training examples from a small manually created set.

“using a larger model in this case chat gbd to create more examples worked phenomenally well”transcript, stated

observability-tracing (operations)

The lesson is to passively track experiments, prompts, workflows, failures, and metrics so the learning is reproducible.

“what you should be doing is tracking everything and the tracking needs to happen with outside processes”transcript, stated

latency-optimization (inference)

The project used small local models because voice interaction latency above a few hundred milliseconds felt painful.

“if that takes longer than a couple hundred milliseconds it's incredibly painful”transcript, stated

Tradeoffs

Inference location

Chose Small local/open-source model through llama.cpp over Larger slower remote inference for every voice request.

Rationale: Voice latency made fast local inference more important than using the largest available model.

“you need to go kind of small model here and you need to to run it fast on on Hardware”transcript, stated

Improvement path

Chose Prompt engineering, model switching, and fine-tuning together over Picking a single technique such as prompt engineering or fine-tuning alone.

Rationale: Each technique contributed incremental gains toward production accuracy.

“everything is making iterative Improvement gradually we get to the accuracy that we need”transcript, stated

Evaluation cadence

Chose Multiple eval types from fast checks to nightly tests over One vibes-based release judgment.

Rationale: Teams need fast iteration checks, must-never-fail tests, and larger nightly evaluation suites.

“very quick to run so they can they can kind of run it in real time they can test something new in 20 or 30 seconds”transcript, stated
“much bigger valuations tests that run nightly and give feedback”transcript, stated

Gotchas (what bit them)

Compelling AI demos can be much farther from production than teams expect.

Root cause: LLM behavior is experimental and non-deterministic, so a demo can hide accuracy, latency, and edge-case failures.

Resolution: Build evaluation frameworks and track experiments rather than relying on demos or vibes.

“AI is so much more easy to demo and so much harder to productionize”transcript, stated

Failed experiments become lost IP if they are not captured.

Root cause: In AI work the learning from prompts, workflows, and failures matters more than the final artifact alone.

Resolution: Passively track everything needed to reproduce runs and preserve learnings across people.

“when you're developing AI it's the learning that's your IP it's not the model that you build”transcript, stated
“if you're not saving that when the person that figured out walks out the door IP walks at the door with them”transcript, stated

Accuracy that feels okay in a demo remains annoying in daily voice use.

Root cause: A 75-79% function-call success rate produces frequent visible failures for a voice assistant.

Resolution: Continue with model switching, synthetic data, and fine-tuning until accuracy reaches production-feeling levels.

“77% accur is still really annoying trust me”transcript, stated

Metrics can fail to reflect user value if they are not connected to the experience.

Root cause: Production ML/LLMOps teams may track thousands of metrics because many failure modes affect user experience differently.

Resolution: Build application-specific eval sets and correlate metrics with the customer value being delivered.

“trying to make sure the metrics correlate with the user experience or the value that you want actually provide for your customer”transcript, stated

Evaluation

The project evaluated function-call accuracy through successive experiments, tracked all prompts/models/workflows/failures in Weights & Biases, used manually and synthetically generated examples for fine-tuning, and emphasized multiple eval suites for production applications.

Metrics: Function-call accuracy · Latency in hundreds of milliseconds · Prompt/model experiment history · Dataset quality · Fast real-time eval pass/fail · Nightly evaluation results · User-experience correlation

3 supporting quotes
“we actually kept track in W DB of of all the um the failures experiments”transcript, stated
“something that's sort of very quick to run so they can they can kind of run it in real time”transcript, stated
“people want to have you know something that's sort of very quick to run”transcript, stated

Outcomes

The case is a home project used to illustrate productionization lessons, not a commercial deployment.

“98% accuracy actually starts to feel like hey maybe we could we could ship this thing”transcript, stated
“as a surprising byproduct actually worked for other languages”transcript, stated