# Fill the record from your words

> Deepgram workshops › Field inspection logger workshop › Fill the record from your words
> Web version: https://workshops.deepgram.com/events/field-inspection-logger/fill-the-record

### Get ready for step 4 {#first-step}

**Goal:** Say an inspection out loud and watch the page fill in the inspection record: equipment ID, condition, severity, and a note.

We're building a web page that listens to you talk and writes your inspection report for you.

**Step 4 of 7.** Done: steps 1 to 3. Now: step 4, fill the record. Still to come: steps 5 to 7.

**So far:** a page that listens harder for your equipment names.

**In this step, you'll:**

- Say an inspection out loud.
- Watch the page fill in the inspection record.

An inspection record is one inspection report. Deepgram writes down what you say. Then a small set of plain rules on the page reads those words and fills in the record. The same words always give the same record.

**Switch to this step.** Skip this if the label at the top of the page already names step 4.

- **Codespace or your own computer.** In the app terminal, press Ctrl+C. Run `npm run step 4`, then `npm start`.
- **Docker.** In your second terminal, run `docker compose run --rm app npm run step 4`. Wait about 10 seconds. Reloading the page is enough this time.

The terminal prints `You are on step 4: Fill the record.` If the page looks stuck after you switch, [restart the app](/events/field-inspection-logger/setup#if-something-looks-wrong) and reload the page.

### Say an inspection {#say-a-record}

1. Reload the page. The label at the top names step 4. You'll see a new **Inspection record** panel, with every field showing `(waiting)`.
2. Click **Start talking**. Say: "Pump P-101. Condition corroded. Severity high. Note seal weeping at the flange." Read the tag aloud as "pump, P, one oh one". You'll see the **Inspection record** show `P-101`, `corroded`, `high`, and `seal weeping at the flange.`
3. Click **Clear**. You'll see the words clear and every field go back to `(waiting)`. The page keeps listening.
4. Say: "Pump one oh one is leaking, high severity." You'll see `P-101`, `leaking`, and `high`. The note holds the whole sentence, because you didn't say "note".
5. Click **Stop**. You'll see **Start talking** and **Ready** again.

The record is rebuilt every time the words change, so it can change while you talk. The page holds one record at a time. Click **Clear** between records, or the second one piles into the first one's note. Nothing is saved yet.

**You should see:** the **Inspection record** show `P-101`, `corroded`, `high`, and `seal weeping at the flange.` If you don't, use the fixes below.

### Fix what looks wrong {#if-something-looks-wrong}

- **The ID stays `(waiting)`.** The page knows a tag only if its letters start a tag in the **Keyterms** box, such as `P` in `Pump P-101`. For a tag with new letters, type it on a new line, such as `Valve V-9`, and click **Apply to this stream**. If you emptied the box in step 3, reload the page.
- **The ID has the wrong digits.** Say the tag more slowly, the letter and then each digit, such as "P, one, zero, one". Then check **What Deepgram hears**.
- **The condition or severity is empty.** Use a word the page knows. Conditions: corroded, leaking, cracked, vibrating, worn, loose, overheating, damaged, fouled, or normal. Severities: critical, high, medium, or low.

For anything else, find what you see in the [Start here](https://github.com/deepgram-devs/field-inspection-logger-workshop/blob/main/docs/troubleshooting.md#start-here) table. Never paste your key.

### See why it works (optional) {#under-the-hood}

A small file of rules looks for a tag, a condition word, and a severity word. There's no second AI model, so the rules can be tested without a microphone.

The keyterm list teaches the rules what a tag looks like. From the line `Pump P-101`, the rules learn that `P` starts a tag and that "pump" means `P`. So "pump one oh one" becomes `P-101`, and `P-103` works with no line of its own.

The rules are in `public/extract.js`. To check them with no microphone, run `npm test` in a second terminal in the project folder, or `docker compose run --rm app npm test` with Docker. A line that says `fail 0` means everything passed. The kit's [step 4 page](https://github.com/deepgram-devs/field-inspection-logger-workshop/blob/main/docs/step-4.md) has more.
