Skip to content

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., your practice guide

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 browser

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

Tier 2 · Phone browser · No account

Version tested: Chromium 151.0.7922.34 (Playwright, 390×844, scale 3); fake microphone (440 Hz sine, 0.2 peak); offline reload and local records verified; Android Chrome/iOS Safari untested here. Date: 2026-09-10.

Open the lab on your phone over HTTPS, then use its permission button.

Open the phone lab (new tab)

Steps

Screens captured against Phone browser (Web APIs) Chromium 151.0.7922.34 (Playwright, 390×844, scale 3); fake microphone (440 Hz sine, 0.2 peak); offline reload and local records verified; Android Chrome/iOS Safari untested here on 2026-09-10; the tool may have moved on — the text steps are the contract.

  1. 1 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: Secure context ready and Offline copy ready appear. The manifest supplies the app name, icon and standalone start page. Orange ring marks the readout; numbered badge sits outside it.
    Step 1 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
  2. 2 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: Permission granted appears with a changing relative RMS level in dBFS. The capture uses Chromium’s fake microphone, not a room measurement. Orange ring marks the readout; numbered badge sits outside it.
    Step 2 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
  3. 3 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: Bars show energy from low to high frequencies. The readout gives the strongest bin, sample rate and FFT size; your sound will differ from the fake-microphone capture. Orange ring marks the readout; numbered badge sits outside it.
    Step 3 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
  4. 4 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: FFT 4096 appears. Bin spacing halves and the time window doubles at the same sample rate. Orange ring marks the readout; numbered badge sits outside it.
    Step 4 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
  5. 5 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: The count increases to 1 saved record. Its record includes relative level, source, time, settings, permission and context; delivery says local only. Orange ring marks the readout; numbered badge sits outside it.
    Step 5 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
  6. 6 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: Offline reload verified appears, and the saved record remains. This capture was made after Playwright disabled the network and reloaded through the service worker. Orange ring marks the readout; numbered badge sits outside it.
    Step 6 · Phone browser (Web APIs); numbered callout added to a real capture. Enlarge screenshot (new tab)
  7. 7 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: The microphone runs offline and then shows Stopped. Microphone off. Saved records stay local until you download or clear them. Orange ring marks the readout; numbered badge sits outside it.
    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.

  1. 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 check
  2. A 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

Caution

Use a gentle sound and keep the microphone uncovered. Permission can be denied or revoked. The level is relative dBFS, not calibrated dB(A) or sound pressure. No raw audio is recorded, played back or uploaded. The offline check needs a successful first load; mobile install behaviour varies. Retest after a browser, phone, placement or FFT change.

Return to Participatory Sensing · Browse Labs