Latency question (bone conduction hearing-aid)

robedney

Member
Hi All,
I've just about finished up building a prototype bone conduction hearing-aid system. At the moment is consists of a pair of mics, mic pre-amps, 5 watt amplifier and bone conduction transducers. I have single-sided deafness and a hearing deficit in the good ear (age related). This thing allows me to hear things from the deaf side (the "sound shadow") for the first time in a couple of decades. Commercially made bone conduction systems for hearing impairment are outrageously expensive, and not covered by my insurance. Once I've got this dialed in I hope to offer it to others as a low cost alternative.

I've worked with Teensy before and I've reviewed the great stuff available for audio projects. I want to add digital EQ to allow adjusting the system to a hearing profile, along with providing other digital enhancements. It looks like 7 channels of EQ are available and that should suffice. I need advice about latency, however. Is the Teensy (with the audio adapter) going to be fast enough to avoid noticeable latency? In other words, it's confusing to see a speaker forming words and hearing those words with noticeable latency.

Thanks.
 
The stock latency with an unmodified audio library is about 6.4ms. That’s using the PJRC audio adaptor, as you are. The good news is that adding extra processing does not increase the latency, except in fairly unusual topologies which you probably won’t need. What does happen is the CPU load goes up, but Teensy 4.x is a beast so you’ll have to go some to overwhelm it. If 6.4ms is too long, then you can delve a little into the internals and drop the AUDIO_BLOCK_SAMPLES value from 128 to, say, 32.

There‘s a discussion here of audio latency. There’s also this thread which may be relevant to your interests, though I’ve not scanned it to see if they moved on from the Teensy 3.6, which is now unobtainable.

Good luck!
 
Hi All,
I've just about finished up building a prototype bone conduction hearing-aid system. At the moment is consists of a pair of mics, mic pre-amps, 5 watt amplifier and bone conduction transducers. I have single-sided deafness and a hearing deficit in the good ear (age related). This thing allows me to hear things from the deaf side (the "sound shadow") for the first time in a couple of decades. Commercially made bone conduction systems for hearing impairment are outrageously expensive, and not covered by my insurance. Once I've got this dialed in I hope to offer it to others as a low cost alternative.

I've worked with Teensy before and I've reviewed the great stuff available for audio projects. I want to add digital EQ to allow adjusting the system to a hearing profile, along with providing other digital enhancements. It looks like 7 channels of EQ are available and that should suffice. I need advice about latency, however. Is the Teensy (with the audio adapter) going to be fast enough to avoid noticeable latency? In other words, it's confusing to see a speaker forming words and hearing those words with noticeable latency.

Thanks.
I am very interested in one of those. I too have age related hearing problems.
 
Hi!

I'm associated with the "Tympan" project, which is what was referenced in one of the links above. Our mission is to produce an open platform for developing algorithms for hearing aid research, a platform that is approachable by nontraditional hearing aid researchers (ie, individual people with a strong interest).

Yes, the Tympan hardware moved from Teensy 3.6 to Teensy 4.1 quite a while ago. Unfortunately, now our problem is that our Bluetooth unit went EOL and is now unavailable. Annoying. We're now swapping to another BT unit, but it's gonna take a bit more time to re-engineer and validate the system.

But, the software portion of our system -- the hearing aid algorithms -- might still be interesting to you. The library has filter banks and dynamic range compressors and other fundamental building blocks of hearing aid processing. So, it might interest you.


The Tympan Library is an extension of the Teensy Audio library, with the major difference being that the Tympan library uses floating point math instead of the fixed-point math used in the Teensy Audio Library. We were able to make this choice because the Teensy 3.5 and higher all do floating point natively. The Tympan is a Teensy 4.1 along with an audio codec and a few other secondary hardware features (like Bluetooth). You can, however, use the algorithms in the library with a regular Teensy plus the teensy audio board, as long as your sketch doesn't try to access any of the other Tympan-specifc hardware features (ie, from the Tympan example sketches, you'd strip out the references to the Tympan class, which is how one accesses the Tympan-specific hardware).

Relevant to your question of latency, most of the literature says that a hearing instrument should keep the latency below 10 msec. As said above, the default Teensy Audio library has a software latency of 2*128/44100 = 0.0058 sec (ie 5.8 msec) and a hardware latency of something like 10-40 samples, which is another 0.2-0.5 msec. So, relative to the 10msec target, you're doing fine.

If you wanted shorter latency, you have to shorten the audio blocks from the default 128 points. You can do this in the Teensy library, but it's a bit of a pain. By contrast, the Tympan Library let's you change the audio block size right there in your sketch. Either way, if you shrink the block size from the Teensy/Tympan default of 128 to a smaller value like 16, you would reduce your latency by 2*(128-16)/44100 = 5 msec. That's a nice improvement!

As long as you're not doing FFT-based audio processing, however, the default Teensy latency is already less than 10 msec, so I wouldn't worry too much about latency.

Chip
 
Last edited:
What great information! The Tympan Library looks amazing, and is a massive time saver when it comes to coding/debugging. I figured I'd be at that for a long while and that would have been just the basics. I'll definitely be back with more questions, and I'll open source the whole thing and post progress as I go. For those who are interested, my testing so far demonstrates bone conduction works quite well even for a situation where there is intact conductive hearing. The ear canal can remain fully open and function normally (unlike a typical hearing aid) and the transducer can add amplification and high end frequencies into the mix (allowing for clear consonants and increased speech intelligibility).
 
Back
Top