Measure phone audio and test an offline PWA
Compare relative microphone levels and frequency bins, then verify that the app and its records survive an offline reload.

Physics Phoebe: I want the sound, placement and permission notes together before you compare the records.
Predict the reading, then compare it with the measurement.
Phone browser (Web APIs)
Phone browserCompare relative microphone levels and frequency bins, then verify that the app and its records survive an offline reload.
Open the lab on your phone over HTTPS, then use its permission button.
Open the phone lab (new tab)Steps
Step 1
- Do
- Open the prepared phone page over HTTPS while online. Wait for Offline copy ready. Install it from the browser menu if offered, or keep the tab.
- You will see
- Secure context ready and Offline copy ready appear. The manifest supplies the app name, icon and standalone start page.
- Why it matters
- The app shell must be cached before it can open without a network. Installation alone does not prove offline operation.

Step 1 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab) Step 2
- Do
- Tap Start microphone and allow access. Keep the microphone uncovered in a quiet room.
- You will see
- Permission granted appears with a changing relative RMS level in dBFS. The capture uses a steady 440 Hz, 0.2-peak test tone through Chromium’s fake microphone, not a room measurement.
- Why it matters
- The input goes through a real microphone stream and Web Audio analyser. This uncalibrated number is relative level, not dB(A) sound pressure.

Step 2 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab) Step 3
- Do
- Make a gentle hum at a fixed distance and watch the spectrum. Read the strongest bin and sample rate.
- You will see
- The spectrum shows a peak near 440 Hz in this test-tone capture. The readout gives the strongest bin, sample rate and FFT size; your sound will differ.
- Why it matters
- A spectrum can distinguish broad frequency changes, but the phone and placement must stay comparable, as the host chapter explains.

Step 3 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab) Step 4
- Do
- Change FFT size from 2048 to 4096, keeping the phone and sound unchanged.
- You will see
- FFT 4096 appears. Bin spacing halves and the time window doubles at the same sample rate.
- Why it matters
- Finer frequency bins take a longer window. The result needs both settings; a dense grid is not proof that nearby tones are resolved.

Step 4 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab) Step 5
- Do
- Write the phone placement and the sound comparison in the note. Tap Save a snapshot and inspect the latest record.
- You will see
- The count increases to 1 saved record. Its record includes relative level, source, time, settings, permission and context; delivery says local only.
- Why it matters
- The contribution record must survive a later review. No raw audio or claimed upload is needed for this bounded comparison.

Step 5 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab) Step 6
- Do
- Stop the microphone. Turn off Wi-Fi and mobile data, then reload this same page.
- You will see
- Offline reload verified appears, and the saved record remains. This capture was made after Playwright disabled the network and reloaded through the service worker.
- Why it matters
- The reload tests the cached app shell and local record storage together. A service worker does not make the measurement valid.

Step 6 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab) Step 7
- Do
- While still offline, tap Start microphone and allow access if asked. Verify a level, save a second snapshot, then tap Stop microphone. Reconnect, download your JSON if needed, and clear the records.
- You will see
- The microphone runs offline and then shows Stopped. Microphone off. Saved records stay local until you download or clear them.
- Why it matters
- Network access and microphone consent are separate. Stopping closes the input tracks and marks the last reading as no longer live.

Step 7 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
Chapter checks
These questions refer to the chapter’s examples. Use the return links to review their answers.
A participatory noise survey receives phone readings with no location context or permission state. How should the dataset treat them?
Return to the chapter’s knowledge checkA class collects phone-based sound observations, but some records lack timestamp, access state, and phone placement notes. What is the strongest review feedback before comparing the submissions?
Return to the chapter’s knowledge check