My DIY hearing test

Cochlear implant image

If you're old enough to remember the days of cathode-ray tube (CRT) television sets and monitors, you might, if your hearing was good, also remember the high-pitched 15 kHz squeal emitted by the electron beam's horizontal oscillator. I always found that annoying in my youth, to the point of getting a headache from hearing it.

Now there are no more CRT televisions, but I hear it all the time.

This is known as tinnitus, a ringing in the ears. I started noticing it about 10 years ago, and it has been getting worse. My own tinnitus sounds like an old CRT television set. It's maddening. I estimate it's 12–15 kHz in my case, and multiple different tones in that range in each ear. And it's permanent. I have to live with it.

It's pronounced "TIN-it-us", by the way. Audiologists have thanked me for not mispronouncing it "tin-AI-tus" like most people do.

20 years ago, I didn't have this problem. In a silent or anechoic room, I heard nothing except my own heartbeat and the blood flowing through the vessels in my ears. Sometime along the way, tinnitus developed, and over the last year it has become impossible to ignore. I'm getting fitted for hearing aids in a week, to help mask the ringing by restoring some high-frequency hearing loss, although no hearing aids go up as high in frequency as the ringing I hear. I am told it should help, though.

According to this 2013 study, the predominant pitch matched by people suffering from tonal tinnitus ranged from 13 kHz to 14 kHz. On the other hand, The Ear Lab claims that most people experience tinnitus in the 4–8 kHz range. This seems to be the dominant view among audiologists, who thought my estimate of 12–15 kHz was unusual. The Ear Lab also includes a crude test for determining where your range is.

My objective here is to make a better test. Not "better" in the sense of "more accurate" but rather in the sense of "you can test any frequencies with a good user interface." Developing this tool was my first experience in vibe coding using Claude.ai. I had done some vibe coding in the past with ChatGPT, and that was a different experience in that the AI and I could collaborate by editing in the same code panel. With Claude, I would give it a prompt, it would generate code that I couldn't edit, I tested the code, and if anything needed to change I had to give it another prompt. It took a few days of this back-and-forth before I was satisfied with the tool.

And here it is. It lets you test as many frequencies as you want. When you click the "play left" or "play right" buttons, it plays random-duration bursts of the selected frequency to ensure that you aren't imagining it. When you click the "record" button, it plots a point on the graph. You can use this tool in these ways:

  • Plot the frequency response of each ear (the main purpose of this tool).
  • If you wear hearing aids, plot the frequency response with the hearing aids in, to see where they affect your hearing and by how much.
  • Try to match the tinnitus tones you hear, in frequency and amplitude.
  • Set it to play a continuous tone while you sweep the frequency slider up and down to listen for any drop-outs in your hearing.

For testing frequency response, move the volume slider around until you can just barely detect the sound, then click the "record" button. The frequency slider has preset buttons for standard audiometric test frequencies: 125 Hz, 250 Hz, 500 Hz, 1 kHz, 2 kHz, 3 kHz, 4 kHz, 6 kHz, and 8 kHz, as well as additional frequencies 750 Hz and 1500 Hz that are included in a standard Hearing Level (HL) spectrum.

Threshold tone test

This is an informal listening tool for exploring your relative hearing threshold across frequencies. It is neither a calibrated audiometer nor a diagnostic device. Levels are relative to maximum device volume (dBFS), not measured SPL.

Be in a quiet environment. With the output set to "Bursts", set your device's own volume to maximum before starting; the on-screen level control always starts at minimum when a tone begins, so you raise it from silence yourself. Use headphones, preferably unity-gain powered headphones, to avoid amplitude degradation from your computer's audio output having to drive the speakers. At each frequency, set the volume until the bursts are barely audible, and record each point in the graph. You can export the data to a CSV file when you're done.

Remember to turn down your device volume after you finish.

Continuous tone test

This is just a listening test. You don't need the data plotting. With the output set to "Continuous", set your device's own volume to mid-level or whatever you normally use. Sweep the frequency control up or down and listen for drop-outs. Raise the volume only if you need to, but be careful: If you raise the volume at a frequency where you have difficulty hearing, it may be too loud at another frequency.

Frequency1000 Hz
Hz
Level-100.0 dB

Slider: 0 = −100 dBFS, 100 = 0 dBFS (full scale). Locked until a tone is playing; only ■ returns it to minimum.

Output
Plot0 points

Raise the level from silence until the tone is just barely audible, then plot the value in the graph below. Plotting again at a frequency you've already plotted (same ear) replaces the old value.

Audiogram
#FrequencyLevelChannelHL corr. (HP)HL corr. (EB)
No points plotted yet

About the three plot modes:

  • Raw dB is decibels relative to the maximum volume, where 100 on the volume slider is 0 dBFS and 0 on the slider is -100 dBFS. There is no acoustic meaning to this in terms of dB SPL or dB HL.
  • HL – Headphones is the raw dB profile adjusted for the human hearing level (HL) spectrum measured on Telephonics Corporation TDH 39 headphones, as described in ANSI S3.6–1996 (see below). This isn't dB HL as audiologists would plot, it's just an adjustment to the shape of the human hearing level spectrum, to match the shape of an audiologist's dB HL plot. It is assumed that you have studio-quality headphones with similar characteristics; that is, a flat response and no built-in EQ or manual volume control. The column in the table labeled HL corr. (HP) shows the correction added to the raw dB to make the HL headphone profile.
  • HL – Earbuds is the raw dB profile adjusted for HL on in-the-canal earphones as described in the ANSI standard, although your earbuds wouldn't have the same characteristics. Again, this isn't a dB HL spectrum, it's an adjustment to the raw dB profile to the shape of the HL spectrum. The column in the table labeled HL corr. (EB) shows the correction added to the raw dB to make the HL earbud profile.

The tone bursts have a 0.1 second sine-squared rise and fall envelope, creating a smooth ramp to avoid the broadband clicks generated by an on/off transition.


How this tool adjusts for dB HL

This hearing test tool uses dB relative to full scale (dBFS) digital volume. It isn't measuring decibels relative to a standard sound pressure level (SPL) of 20 μPa. An audiogram generated by an audiologist would show dB HL, or decibels relative to standard human hearing level (HL). There is a correspondence between dB SPL and dB HL depending on the listening device, but we can't solve for it in general, because there are four unknown or uncalibrated links in the chain from a digital waveform to the eardrum:

  • Computer or operating system (OS) volume curve is often non-linear, and "max" is capped differently depending on the OS or device.
  • At maximum volume, the computer's digital-to-audio converter, and headphone-jack output voltage, varies significantly across different devices and interfaces.
  • Adjustable powered headphones, or headphones with onboard DSP/active EQ, can skew results due to nonlinear amplifier gain. Non-adjustable headphones with unity-gain amplifiers designed to reproduce the input voltage work best; the amplifier drives the speakers and decouples the speakers from having to be driven by the computer's audio. A powered headphone spec sheet or manual should have language like "unity gain" or "flat response, no DSP".
  • Headphone transducers vary in sensitivity (varying dB SPL per mW or per volt); consumer headphones can span roughly 85–120 dB SPL/mW, a 30+ dB range. This means that two identical volume settings on two different headphones can differ by tens of dB SPL.

Real audiometers use specific calibrated transducers with a physical coupler calibration, rather than any device-volume convention as this tool uses. If you're interested in a more calibrated hearing test you can do at home, you can try the pure-tone audiometry by the Australian Future Hearing Initiative, which is calibrated for a MacBook Pro and either Google Pixel Buds or Apple AirPods Pro 2.

So, is there anything useful we can do with just a laptop and headphones having unknown properties?

Well, ANSI S3.6–1996 defines the measured human hearing threshold equivalents in dB SPL corresponding to 0 dB HL, for a range of frequencies from 125 Hz to 8 kHz, calibrated to specific devices ("transducers"). There's a 2025 version the standard (ANSI S3.6-2025) that costs nearly $200. There's a good table showing equivalent dB SPL values for 0 dB HL at different frequencies, apparently based on the 1996 standard for Telephonics Corporation TDH 39 headphones, at Center for Hearing Loss Help (read the link, it's a good article). I also found a table of values in a 1999 update, which I could access and should be close to the modern standard. It lists the devices as TDH-series over-the-ear headphones, in-the-canal earphones, loudspeakers 1 meter away at three different angles (both binaural and monaural measurements), or a bone conduction device having a plane circular tip with a specific area and headband application force.

I reproduce the 1999 updated table here, showing equivalent dB SPL levels for human hearing thresholds for different transducers:

Freq Supra-aural Earphonea Insert Earphoneb Loudspeaker (sound-field)c Bone Vibratord
TDH 39TDH 49/50Bin 0°Mon 0°Mon 45°Mon 90°
12545.047.526.022.024.023.523.0
25025.526.514.011.013.012.011.067.0
50011.513.55.54.06.03.01.558.0
7508.08.52.02.04.00.5-1.048.5
10007.07.50.02.04.00.0-1.542.5
15006.57.52.00.52.5-1.0-2.536.5
20009.011.03.0-1.50.5-2.5-1.531.0
300010.09.53.5-6.0-4.0-9.0-6.530.0
40009.510.55.5-6.5-4.5-8.5-4.035.5
600015.513.52.02.54.5-3.0-5.040.0
800013.013.00.011.513.58.05.5
Speech19.520.212.514.516.512.511.055.0

ain dB re: 20 μPa using NBS 9A coupler specified in ANSI S3.7–1995.
bin dB re: 20 μPa for Etymotic ER–3A or EARtone 3A using HA–2 coupler with rigid tube specified in ANSI S3.7–1995.
cin dB re: 20 μPa at least 1 m from loudspeaker at measurement reference point.
din dB re: 1 μN, mastoid placement of Radioear B–71 using a mechanical coupler specified in ANSI S3.13–1987 (R 1993).

Assuming you have dB SPL values from a calibrated test, to convert dB SPL values to dB HL, you would add the appropriate values (say, for headphones) to the negative numbers in the graph. However, this doesn't really work with this tool because it's uncalibrated and doesn't measure dB SPL, it uses dBFS, which isn't an equivalent reference. For example, if my audiogram shows −21.5 dB at 3 kHz, then (using the first column in the table) I would add 10 dB to convert that to −11.5 dB HL. But that works only if I started out with dB SPL, not dBFS. At best, the most one can do is correct the profile of the spectrum, not the actual dB HL values.

So that's what this does. The two HL plot modes (headphones and earbuds) show the likely shape of the dB HL plot. It shows values relative to each other, but not the actual dB HL values. Because you can measure frequencies outside the ANSI-defined range of 125 Hz to 8 kHz, the corrections used outside that range are clamped to the endpoints of the published corrections. Frequencies inside the ANSI range are interpolated if needed, using log-frequency linear interpolation of the dB values.

My own measurements

Testing myself, I found that my tinnitus sounded higher than the highest frequency I could detect during this test, confirming what I already knew. However, the tinnitus still made testing difficult. It was distracting even when testing low frequencies, because the ringing in my ears is much louder than the minimum levels of other tones I was trying to hear.

I tested myself with four different modes of headphones, all of which have specs claiming a frequency range of 20 Hz to 20 kHz:

  • Cisco 730 wireless headset with noise cancellation (powered on)
  • Bose QC25 wired headphones with noise cancellation (powered on)
  • Bose QC25 wired headphones without noise cancellation (passive, unpowered)
  • Pupgis Wired Studio Monitor Headphones

Here are all the tests, overlaid onto the lab test from my audiologist:

Observations:

  • The lab test (red squares and green diamonds) involved sounds in 5 dB increments. My test can do 0.5 dB increments, which results in measurement variation per test; each time I did a test over, the measurements varied a few dB from the last one although 500-1000 Hz were pretty consistent.
  • While the vertical scale is dB HL, this applies only to the lab test. The other tests were dBFS with the profile adjusted for dB HL as described in the previous section.
  • The audiologist measured a fairly flat frequency response between 250 Hz and 1.5 kHz. My tests show much greater sensitivity at low frequencies. Some headphones advertise reproducing bass sounds, which may be a cause of the higher bass response, although I believe the headphones I used try to be flat in their response. My laptop may have a nonlinear amplifier that tries to compensate for the poor bass quality laptops tend to produce. Or, my hearing may just be more sensitive at the low end, especially in my right ear. All headphones measured better hearing in my right ear, even when I flipped the headphones around so the left speaker played into my right ear.
  • Between my headphones, while there is about 20 dB variation at some frequencies, they all cluster together at about the same value in the 750–1000 Hz range, about +2.4±2 dB. If that is typical of most headphones, that tells me I can shift the all the results 7.4 dB lower, and then rounding to the nearest 5 dB, to correct the results further and bring them more in line with the lab test. However, this would be a valid thing to do only for my laptop. Different laptops would have different audio characteristics.
  • The audiologist did not measure as high as I could hear, but as high as hearing aids generally can go, which is up to 8 kHz. In the past I did have a test where the audiologist tried 10 kHz and 12 kHz, and the results were way down below -40 dB, consistent what I plotted above.
  • I was surprised that my high-frequency hearing loss, although severe (more than 80 dB down from maximum), was nearly 20 dB better on the right than on the left. Again, this difference could be due to equipment too, but I don't dispute the values.

I was unable to turn the volume all the way up at the highest frequencies without harmonics suddenly jumping in. Above 14 kHz, 95 dB was the highest I could turn up the volume, and I still couldn't hear anything distinguishable from my tinnitus. I do know my laptop and headphones can produce higher frequencies because my teenage son could hear up to 19 kHz using my equipment (he tried with the Cisco headset) at a lower volume, so I know it can go up that high, but he couldn't hear 20 kHz. In any case, the response falloff is so steep in that region that I can confidently say I am effectively deaf to external frequencies higher than 15 kHz (which was almost inaudible in my right ear but I could still hear it). My tinnitus occupies that high range and above. Some tinnitus frequencies I hear in my left ear may be around 12 kHz but it is hard to match frequencies that high, especially when multiple tones are involved and I can't block the tinnitus from the right ear to listen in the left. The tones in that range "feel" similar in the left ear.

If you find this tool useful, please let me know in a comment.

Comments

Popular posts from this blog

Syncing Office 365 Outlook to Google calendar using Power Automate

Whose hands are biggest? You may be surprised.

Elliptical-blade NACA airfoil propeller