How to Build an AI Medical Scribe: The Architecture
If you are working out how to build an AI medical scribe, the answer is a chain of six parts: audio capture, speech recognition, speaker attribution, note generation from a template, a clinician review screen, and write-back to the patient record. The models are the parts you can buy; the review screen, the evaluation set and the retention rules are the parts you have to design yourself.
This guide is for the health-tech team or hospital IT lead scoping that build. It goes layer by layer, says which decision each layer forces on you, and ends with what our founders learned building MedSlay, an AI clinical documentation product for Indian clinics.
Key takeaways
- Speech models can invent words: the Careless Whisper study found hallucinated text in 1.4% of 13,140 audio segments, often during pauses, and 38% of those inventions were harmful (Koenecke et al., FAccT 2024).
- Missing facts are a bigger problem than invented ones: in a UC Davis pilot of 356 reviewed notes, omissions turned up in 18% and hallucinations in 11.5% (JMIR Medical Informatics, 2026).
- On real primary-care conversations, medical speech recognition has measured word error rates of 8.8% to 10.5%, and speaker-attribution error up to 13.9% (Tran et al., AMIA 2022).
- In the UK, the MHRA's July 2026 guidance says a scribe's intended purpose decides whether it is a medical device, and automated action without clinician review stays regulated (MHRA).
What are the parts of an AI medical scribe?
An AI medical scribe is a pipeline of six parts, and each one can fail on its own. Scope them separately, because a vendor quote that says "AI scribe" usually prices two of them.
- Capture. A phone, a desk microphone or the audio track of a video call records the consultation, after consent.
- Speech recognition (ASR). A model turns audio into text. This is where drug names and doses are won or lost.
- Speaker attribution (diarization). The transcript is split into who said what: doctor, patient, relative.
- Note generation. A large language model turns the attributed transcript into a note in the clinic's template, such as SOAP.
- Review and sign-off. The clinician reads the draft, corrects it and signs. Until then it is only a draft.
- Write-back and audit. The signed note goes into the record system, with a trail showing what the AI drafted and what the doctor changed.
The open-source Berta project, published in 2026, follows the same shape: a speech model transcribes, then a language model drafts a structured note from configurable templates, with both models swappable and the whole system able to run inside a hospital's own infrastructure (Berta, arXiv). That is a useful reference design to read before you draw your own.
| Layer | Buy or build | The decision it forces | What goes wrong |
|---|---|---|---|
| Capture | Build (thin) | Where audio lives, and for how long | Background noise, two people talking at once |
| Speech recognition | Usually buy, or host an open model | Cloud API with a data agreement, or self-hosted | Wrong drug names; text invented in silences |
| Speaker attribution | Buy with the ASR, then tune | How many speakers, and which roles | Patient's words filed as the doctor's findings |
| Note generation | Buy the model, build the prompts and templates | One template per specialty, or one for all | Omissions; confident additions nobody said |
| Review screen | Build | What the doctor must look at before signing | Doctors approving without reading |
| Write-back and audit | Build | Which record system, and which route | Note filed against the wrong visit |

Which speech recognition model should an AI scribe use?
Use the model that scores best on your own consultations, measured on medical terms rather than on overall word error rate. A model that gets 95% of words right can still get the one dose wrong that matters.
Plain word error rate counts "the" and "metformin" the same. Newer benchmarks score medical terms separately: one open benchmark built on the PriMock57 consultations reports a medical-term error rate alongside the overall rate, and a diarization-aware rate for multi-speaker output (Omi Health benchmark). Copy that idea when you test.
The hosting choice matters as much as accuracy:
- Cloud speech API. Fastest to start. In the US you need a business associate agreement before real patient audio goes in; in India and the UK you need a data processing agreement and a clear answer on where the audio is processed.
- Self-hosted open model. You control the data and the cost per minute, and you take on GPUs, updates and monitoring.
- Both. A common pattern is a streaming model for a live draft and a second, full-context pass when the consultation ends.
Whichever you choose, guard against invented text. The Careless Whisper researchers found that Whisper produced whole sentences nobody said, mostly during non-speech stretches (Koenecke et al.). Trimming silence before transcription, and flagging transcript segments with no matching audio energy, are cheap defences.
Does an AI scribe need speaker diarization?
Yes. Without speaker attribution, a patient's "I stopped taking it" and a doctor's "keep taking it" land in the note with nobody's name on them, and the model has to guess which was the plan.
Diarization is less accurate than transcription. In the AMIA study of 36 primary-care conversations, word-level diarization error ranged from 1.8% to 13.9% across systems (Tran et al.). Three things help:
- Use separate channels where you have them. A video consultation already gives each side its own audio stream, which removes most of the problem.
- Label roles, not just speakers. "Speaker 1" is not enough; the note generator needs "clinician" and "patient".
- Pass labelled turns to the model, not raw text. The note generator should see who said each line, so it can tell a symptom the patient reported from a finding the doctor made.
How does an AI scribe turn a transcript into a clinical note?
A language model rewrites the attributed transcript into the clinic's note template, section by section, under instructions that forbid adding anything not said. The template and those instructions are where most of your engineering time goes, not the model choice.
Practical rules that hold across models:
- One template per note type. A GP consultation, an orthopaedic follow-up and a discharge summary need different sections. Start with one.
- Ask for structure, then render text. Have the model return sections and fields first, then format the note. Structured output is easier to check and to write back.
- Keep a link from every sentence to the transcript. If the review screen can show which lines a sentence came from, the doctor can check it in seconds.
- Tell the model what not to write. A diagnosis the doctor did not say, a dose that was not mentioned, a normal examination that was not done: these should be left blank, not filled in.
- Mark what the model inferred. Anything not said word for word, such as a duration worked out from "since last Tuesday", should be highlighted for review.
Language is where builds for India, the UAE or any multilingual market get harder. Consultations switch between English and a local language mid-sentence, and drug names are spoken in English inside them. Test on recordings that sound like your clinics, not on a clean English benchmark.
How do you stop an AI scribe from inventing things?
You cannot stop it entirely, so you design for catching it: measure errors on your own consultations before launch, show the doctor where to look, and never let a draft reach the record without a signature.
The published numbers are sobering. A 2025 study of 97 encounters across five specialties found hallucinations in 31% of ambient-scribe notes against 20% of physician-written notes, while rating the AI notes more thorough (Palm et al., Frontiers in AI). The UC Davis pilot found omissions more often than inventions (JMIR Medical Informatics). A scribe tested only for hallucination will pass while dropping allergies.
So build the evaluation set as a deliverable, alongside the code:
| Error type | What it looks like | How to catch it |
|---|---|---|
| Omission | An allergy or a stopped medicine is said aloud but missing from the note | Checklist of must-capture items per template; compare against the transcript |
| Hallucination | A symptom, finding or dose nobody said | Sentence-to-transcript links; flag sentences with no source |
| Misattribution | Patient's report written as the doctor's finding | Role labels from diarization; reviewer checks on a sample |
| Wrong section | Plan written under history | Template validation before display |
| Wrong patient or visit | A correct note filed in the wrong chart | Show the patient's name and visit beside the Sign button |
Run the set on every model or prompt change. A new model version that writes better prose can still drop more medicines, and you will only know if you count.
Should an AI scribe store the audio?
Only if you have a reason you can defend, because it is an architecture decision, not a privacy toggle. Keeping audio makes re-processing and debugging easy; deleting it shrinks what can leak and what you must justify holding under HIPAA, UK GDPR or India's DPDP Act.
Products in the market take different positions. SimplePractice says its note taker deletes the audio as soon as the transcript is generated (SimplePractice); other scribe tools keep recordings for weeks or months.
If you decide not to store audio, three things follow:
- You cannot re-transcribe later. A better speech model next year cannot fix last year's notes, so the review at sign-off is the only correction point.
- Your test set must come from somewhere else. Collect consented, purpose-recorded consultations for evaluation, kept separately and under their own rules.
- Debugging moves to the transcript. Log the transcript, the model's draft and the doctor's edits, so you can see where errors entered without the recording.
Is an AI scribe a medical device?
It depends on the market and on what the scribe claims to do. A scribe that drafts documentation for a clinician to review is treated differently from one that suggests diagnoses or acts without review.
In the UK, NHS England's April 2025 guidance said a scribe that only transcribes is likely not a medical device but one that uses generative AI to summarise likely is (NHS England). The MHRA's guidance of 29 July 2026 refined that: the product's intended purpose decides, and products intended to support diagnosis or treatment, or that take automated action without clinician review, remain under device regulation (MHRA). Both keep the clinician responsible for checking the output.
The practical lesson is the same everywhere: write the intended purpose before you write code, and keep features that drift into diagnosis, such as suggested codes or treatment prompts, behind a separate decision. In India, our guide to whether AI-generated clinical notes are legally valid in India covers consent, the DPDP Act and the medical record.
How does the finished note reach the patient record?
By the route the record system's vendor offers, which is rarely yours to choose: a modern FHIR interface the scribe opens from inside the chart, an older HL7 v2 message carrying the document, the vendor's own endpoint, or, failing all of those, the doctor pasting the note in. Find out which one applies before the design is fixed.
We covered the routes, and the questions to ask the vendor, in our guide to connecting an AI scribe to an existing EMR. Two architecture points belong here. Keep the draft and the audit trail in the scribe, because many record systems cannot hold an unsigned note. And check which patient and visit the note belongs to a second time at the moment of writing, because a doctor can open another chart while the draft is being produced.
Should you build an AI scribe or buy one?
Build when the scribe is part of your product or has to fit workflows, languages or record systems that products do not serve; buy when you are a clinic that needs notes written next month. For a clinic, buying is almost always right.
| Situation | Better choice | Why |
|---|---|---|
| A clinic or hospital wanting notes written | Buy | Products exist; your money is better spent on rollout |
| A health-tech product that needs documentation inside it | Build, on bought models | The scribe is your feature; you need control of the workflow |
| A hospital system with an unusual record system or languages | Build or extend | Products may not reach your EMR or your consultations |
| A pilot to see whether doctors will use it | Buy or a thin build | Learn the edit rate before committing |
Vendor estimates for a production build run from about $300,000 for one specialty, one language and one EHR (ScienceSoft) to $2 million at the top of one integrator's range (Lushbinary). A narrower build, one note type inside an existing product, costs far less; our guide to what AI clinical documentation costs in a hospital system breaks down the lines.
What we've seen at DECK IT
DECK IT has built software from Ahmedabad since 2017, and our founders built MedSlay, AI clinical documentation for Indian clinics, which is owned by our sister company Slaya Technologies. Two of its design decisions shaped everything else in the architecture.
The first was that MedSlay does not store consultation audio. That makes privacy simpler to explain to doctors and patients, and it moves the burden onto everything after transcription. With no recording to go back to, the transcript, the draft and the doctor's edits are the whole history, and the sign-off screen is the only place an error can be caught. Evaluation has to rely on test recordings made for that purpose, not on live consultations.
The second was that the AI's output is advisory: a draft for the doctor, never a decision. That rule sounds like policy, but it is mostly interface work. The review screen has to show what the AI inferred, put medicines, doses and allergies where the doctor's eye lands, and make signing a deliberate act. We bring the same approach to client builds through our healthcare software development work, whether the scribe sits inside a health-tech product or alongside a hospital's own system.

Frequently asked questions
How do you build an AI medical scribe?
Chain six parts: audio capture, speech recognition, speaker attribution, note generation from a template, a clinician review screen and write-back to the record. Buy the speech and language models, and build the templates, review screen, evaluation set and integration yourself.
What is the architecture of an AI scribe?
It is a pipeline. Audio is transcribed, split by speaker, rewritten by a language model into the clinic's note template, reviewed and signed by the clinician, then written to the record with an audit trail. Each stage fails differently, so each needs its own tests.
Can you build an AI scribe with Whisper and an LLM?
Yes, for a prototype, and the open-source Berta project shows the pattern. For production you also need speaker attribution, defences against text invented during silences, a review screen, an evaluation set and a data agreement or self-hosting for patient audio.
Do AI scribes need speaker diarization?
Yes. Without it the note cannot tell what the patient reported from what the doctor found or decided. Use separate audio channels where you have them, such as a video call, and pass role-labelled turns to the language model.
Should an AI scribe store the audio?
Only with a reason you can defend. Deleting audio after transcription reduces privacy risk, but it means you cannot re-transcribe later, so the clinician's sign-off becomes the only correction point and your test recordings must be collected separately.
Is an AI scribe a medical device?
It depends on the market and the scribe's intended purpose. UK guidance from the MHRA in July 2026 says intended purpose decides, and features that support diagnosis or act without clinician review stay under device regulation. Define the intended purpose before you build.
How do you stop an AI scribe from inventing things?
You cannot remove the risk entirely, so you design to catch it. Link each sentence to the transcript, flag anything inferred, count omissions as well as hallucinations on your own consultations, and never write a draft to the record before the clinician signs.
Conclusion
Draw the six layers before you choose a model, and decide the three things no vendor decides for you: what the review screen shows, what your evaluation set counts, and whether you keep the audio. Those choices decide whether doctors trust the drafts.
If you are building a scribe into a health-tech product or a hospital system, tell us where it has to run and which record system it has to reach, and we will tell you which layers to buy and which to build.
Last updated: