Earbud DIY mic calibration for RC and test of the new calibration file import feature

dominikz

Senior Member
Joined
Dec 31, 2024
Messages
223
Hello all,

Today I had some time to experiment with WiiM Room Correction feature, and specifically I wanted to test the new WHA microphone calibration file import feature.

First some background: when I use the built-in phone mic on my Samsung S23+ the measurements look terrible because the built-in mic has a terrible response - notice especially the peaking at about 8kHz and the rising response after that:
WHA RC - Phone mic.jpg

Measuring with REW and my Cross-Spectrum Labs calibrated Dayton Audio EMM-6 tells a different story - no peak at 8kHz and a much flatter high frequency response:
Cross-Spectrum Labs calibrated Dayton Audio EMM-6.png

I wanted a simple way to get more reliable RC results, so I started thinking about how to use the calibrated Dayton mic on my phone. This is an analogue XLR mic, so connecting it to the phone requires a USB class-compliant audio interface with phantom power and an assortment of cables and adapters. I really wanted something simpler, so I remembered I also had Samsung USB-C wired earbuds (model EO-IC100) lying around which also had a mic.

Using the mic from these earbuds for room correction gave me the following response:
WHA RC - Stock earbud mic.jpg

Now isn't this a mix of both better and worse! :D
We can see the higher frequencies look more reasonable, but there is obviously a low frequency roll-off in the mic - which results in WiiM RC boosting low frequencies by A LOT. :oops:

So naturally :LOL:, my next instinct was to use my calibrated mic to create a calibration file for the earbud mic.

To do this, I measured the response of my system 5-6 times with REW using the MMM method and RMS-averaged the measured responses. I repeated the same procedure for both the calibrated Dayton mic, and the earbud mic.
This is the comparison of averaged responses of the same system measured with both of the two mics:
Samsung EO-IC100 stock mic vs Dayton EMM-6.png
As expected, the earbud mic shows a very significant low frequency roll-off, and a wonky high frequency response.

To create a calibration curve I first used REW Trace Arithmetic function to divide the response of the earbuds with the response of the calibrated mic, thereby normalizing the response measured with the earbud mic to the calibrated mic response.

This gives a difference curve which corresponds roughly to the earbud mic frequency response curve:
Samsung USB-C Earbuds (EO-IC100) microphone calibration curve (raw).png

This is however unnecessarily precise, and experience tells me that the mid-frequency irregularity and <30Hz response is caused by noise, room nulls and measurement error.
So next step was to smooth the response (1/3 octave) and manually extend the low frequency roll-off (I estimated the slope to be about 10dB/oct).

This gave me the "final" earbud mic calibration curve:
Samsung USB-C Earbuds (EO-IC100) microphone calibration curve.png

Let's export this to a text file and do some validation with REW to see how the measurements made by the earbud mic with this "DIY" calibration file compares to a measurement made with the "officially" calibrated Dayton mic:Samsung EO-IC100 calibrated mic vs Dayton EMM-6.png

Now we're talking! This is very close indeed!

Now I repeated the WiiM RC measurement with the earbud mic and my "DIY" calibration file loaded. This was the result:
WHA RC - Calibrated earbud mic.jpg

Looking much better now!

Let's validate with REW and compare the responses without any RC, with RC calculated based on measurement with the phone built-in mic, one made with stock/uncalibrated earbud mic, and finally one made with the earbud mic calibrated with my "DIY" calibration file:
WiiM Room Correction - with and without microphone calibration.png

As we can see, when using the uncalibrated earbud mic with RC the low frequencies are boosted a lot because WiiM RC algorithm can't know that the mic is rolling-off the lows (and by how much).
With the phone built-in mic we also see some bass boost, but not as much.
When using the "DIY" calibration file we get a very nice and flat bass response. This also sounds the best (to me). :)

In all tests above I used individual channel correction and the following RC settings:
WHA RC Settings.jpg

While I'm not really sure about the unit-to-unit response consistency of Samsung USB-C EO-IC100 earbud mic response (and therefore how applicable my "DIY" calibration curve will be to others), perhaps some might still make some use of the file so I'm sharing it here:
16.000000 -25.804
18.000000 -24.654
20.000000 -23.232
22.400000 -21.667
25.000000 -20.151
28.000000 -18.589
31.500000 -16.973
35.500000 -15.489
40.000000 -13.964
45.000000 -12.524
50.000000 -11.333
56.000000 -10.232
63.000000 -9.239
71.000000 -8.376
80.000000 -7.782
90.000000 -7.376
100.000000 -6.572
112.000000 -5.634
125.000000 -4.709
140.000000 -3.760
160.000000 -3.362
180.000000 -2.591
200.000000 -2.208
224.000000 -2.780
250.000000 -2.506
280.000000 -1.903
315.000000 -2.493
355.000000 -2.493
400.000000 -0.945
450.000000 -0.262
500.000000 -0.739
560.000000 -0.919
630.000000 -0.800
710.000000 -0.769
800.000000 -0.668
900.000000 -0.251
1000.000000 -0.045
1120.000000 0.008
1250.000000 0.023
1400.000000 -0.161
1600.000000 -0.257
1800.000000 -0.071
2000.000000 0.063
2240.000000 0.334
2500.000000 0.564
2800.000000 0.760
3150.000000 1.021
3550.000000 1.314
4000.000000 1.815
4500.000000 2.552
5000.000000 3.124
5600.000000 3.165
6300.000000 2.370
7100.000000 0.980
8000.000000 -0.829
9000.000000 -2.943
10000.000000 -3.773
11200.000000 -3.045
12500.000000 -2.482
14000.000000 -2.126
16000.000000 -0.764
18000.000000 0.870
20000.000000 0.585
22400.000000 -3.401
The calibration file is also attached to the post.

Hope some will find this interesting/useful!
 

Attachments

Hello all,

Today I had some time to experiment with WiiM Room Correction feature, and specifically I wanted to test the new WHA microphone calibration file import feature.

First some background: when I use the built-in phone mic on my Samsung S23+ the measurements look terrible because the built-in mic has a terrible response - notice especially the peaking at about 8kHz and the rising response after that:
View attachment 17574

Measuring with REW and my Cross-Spectrum Labs calibrated Dayton Audio EMM-6 tells a different story - no peak at 8kHz and a much flatter high frequency response:
View attachment 17576

I wanted a simple way to get more reliable RC results, so I started thinking about how to use the calibrated Dayton mic on my phone. This is an analogue XLR mic, so connecting it to the phone requires a USB class-compliant audio interface with phantom power and an assortment of cables and adapters. I really wanted something simpler, so I remembered I also had Samsung USB-C wired earbuds (model EO-IC100) lying around which also had a mic.

Using the mic from these earbuds for room correction gave me the following response:
View attachment 17577

Now isn't this a mix of both better and worse! :D
We can see the higher frequencies look more reasonable, but there is obviously a low frequency roll-off in the mic - which results in WiiM RC boosting low frequencies by A LOT. :oops:

So naturally :LOL:, my next instinct was to use my calibrated mic to create a calibration file for the earbud mic.

To do this, I measured the response of my system 5-6 times with REW using the MMM method and RMS-averaged the measured responses. I repeated the same procedure for both the calibrated Dayton mic, and the earbud mic.
This is the comparison of averaged responses of the same system measured with both of the two mics:
View attachment 17579
As expected, the earbud mic shows a very significant low frequency roll-off, and a wonky high frequency response.

To create a calibration curve I first used REW Trace Arithmetic function to divide the response of the earbuds with the response of the calibrated mic, thereby normalizing the response measured with the earbud mic to the calibrated mic response.

This gives a difference curve which corresponds roughly to the earbud mic frequency response curve:
View attachment 17580

This is however unnecessarily precise, and experience tells me that the mid-frequency irregularity and <30Hz response is caused by noise, room nulls and measurement error.
So next step was to smooth the response (1/3 octave) and manually extend the low frequency roll-off (I estimated the slope to be about 10dB/oct).

This gave me the "final" earbud mic calibration curve:
View attachment 17581

Let's export this to a text file and do some validation with REW to see how the measurements made by the earbud mic with this "DIY" calibration file compares to a measurement made with the "officially" calibrated Dayton mic:View attachment 17583

Now we're talking! This is very close indeed!

Now I repeated the WiiM RC measurement with the earbud mic and my "DIY" calibration file loaded. This was the result:
View attachment 17585

Looking much better now!

Let's validate with REW and compare the responses without any RC, with RC calculated based on measurement with the phone built-in mic, one made with stock/uncalibrated earbud mic, and finally one made with the earbud mic calibrated with my "DIY" calibration file:
View attachment 17586

As we can see, when using the uncalibrated earbud mic with RC the low frequencies are boosted a lot because WiiM RC algorithm can't know that the mic is rolling-off the lows (and by how much).
With the phone built-in mic we also see some bass boost, but not as much.
When using the "DIY" calibration file we get a very nice and flat bass response. This also sounds the best (to me). :)

In all tests above I used individual channel correction and the following RC settings:
View attachment 17587

While I'm not really sure about the unit-to-unit response consistency of Samsung USB-C EO-IC100 earbud mic response (and therefore how applicable my "DIY" calibration curve will be to others), perhaps some might still make some use of the file so I'm sharing it here:
16.000000 -25.804
18.000000 -24.654
20.000000 -23.232
22.400000 -21.667
25.000000 -20.151
28.000000 -18.589
31.500000 -16.973
35.500000 -15.489
40.000000 -13.964
45.000000 -12.524
50.000000 -11.333
56.000000 -10.232
63.000000 -9.239
71.000000 -8.376
80.000000 -7.782
90.000000 -7.376
100.000000 -6.572
112.000000 -5.634
125.000000 -4.709
140.000000 -3.760
160.000000 -3.362
180.000000 -2.591
200.000000 -2.208
224.000000 -2.780
250.000000 -2.506
280.000000 -1.903
315.000000 -2.493
355.000000 -2.493
400.000000 -0.945
450.000000 -0.262
500.000000 -0.739
560.000000 -0.919
630.000000 -0.800
710.000000 -0.769
800.000000 -0.668
900.000000 -0.251
1000.000000 -0.045
1120.000000 0.008
1250.000000 0.023
1400.000000 -0.161
1600.000000 -0.257
1800.000000 -0.071
2000.000000 0.063
2240.000000 0.334
2500.000000 0.564
2800.000000 0.760
3150.000000 1.021
3550.000000 1.314
4000.000000 1.815
4500.000000 2.552
5000.000000 3.124
5600.000000 3.165
6300.000000 2.370
7100.000000 0.980
8000.000000 -0.829
9000.000000 -2.943
10000.000000 -3.773
11200.000000 -3.045
12500.000000 -2.482
14000.000000 -2.126
16000.000000 -0.764
18000.000000 0.870
20000.000000 0.585
22400.000000 -3.401
The calibration file is also attached to the post.

Hope some will find this interesting/useful!
Probably worth mentioning that calibration values greater than 12dB are capped at 12dB so the values in your calibration file for frequencies below 50Hz will all effectively be -12dB.
 
Probably worth mentioning that calibration values greater than 12dB are capped at 12dB so the values in your calibration file for frequencies below 50Hz will all effectively be -12dB.
This I didn't know, I just tested it and you are absolutely right.

This seems like a bug to me so I'm thinking about opening a ticket.
Has there been any communication from WiiM regarding this?
 
Great stuff! Well done, @dominikz.

In addition to the 12 dB correction limit, I'm not sure that this approach ...
... and manually extend the low frequency roll-off (I estimated the slope to be about 10dB/oct).
... is generally helpful. Yes, your reasoning behind it appears perfectly valid to me. But the "better" calibration would lead to even more correction .. if you would try to correct down low at all.

Anyway, not only your idea was top notch, the execution is great as well. (y)
 
Great stuff! Well done, @dominikz.
Anyway, not only your idea was top notch, the execution is great as well. (y)
Thanks for the kind words - appreciated! :giggle:

In addition to the 12 dB correction limit, I'm not sure that this approach ...
... is generally helpful. Yes, your reasoning behind it appears perfectly valid to me. But the "better" calibration would lead to even more correction .. if you would try to correct down low at all.
Actually, having a better approximation of the microphone low frequency roll-off in the calibration file should decrease the amount of boost RC attempts to do in low frequencies - this is assuming that WiiM RC can interpret the file correctly.

This is because calibration files are used to normalize the measured response, meaning that values below zero in the calibration file will be used to 'boost' the raw measured response by the corresponding amount to compensate.
The result should be less of the low frequency 'droop' in the measured response with calibration applied, and therefore less need for RC to boost at those frequencies.

But it is true that the earbud microphone slope and sensitivity at those very low frequencies is unknown with the measurements provided and may not even be that relevant anyway, so perhaps this part was a bit redundant.
If I gather the energy to dive into this again, I might test it out on my living room system which goes down much lower. Not making any promises, though! :D
 
This is because calibration files are used to normalize the measured response, meaning that values below zero in the calibration file will be used to 'boost' the raw measured response by the corresponding amount to compensate.
The result should be less of the low frequency 'droop' in the measured response with calibration applied, and therefore less need for RC to boost at those frequencies.
It's pretty late here right now, so I think my thoughts were ... clouded. I think you're right. ;)
 
Probably worth mentioning that calibration values greater than 12dB are capped at 12dB so the values in your calibration file for frequencies below 50Hz will all effectively be -12dB.
From your comment I assumed that the calibration files are correctly interpreted by the WiiM Home app for values between +12dB and -12dB which gives a 24dB total usable range.

Since most measurement microphone calibration files hover a few dB above or below 0dB line, that is perfectly fine.

However, less linear microphones (like the earbud mic I used) have strong bass roll-offs so may require more of this range. In a standard format of the calibration file the flat part of the response is normalized at 0dB, which reduces the usable range for the roll-off to only -12dB.

So I wanted to see it I can maximize the 24dB usable range for the calibration file interpretation in WiiM Home if I linearly scale the calibration file to set the calibration file maximum value at +12dB.

I tested this yesterday by doing the following:
  1. RC with the standard calibration file without modification. Maximum value in this file is at ~3.4dB.
  2. Manually modify the calibration file to set only the values between 2kHz and 4kHz to -24dB (i.e. well outside the minimum accepted value) and leave the rest as is. Run RC with the modified file, and we should see that the 2-4kHz region is only raised by about +12dB, due to the cap in calibration file interpretation by WiiM.
  3. Scale the file from the previous value by +8.6dB. Now the maximum value in the file is at about +12dB, and the rest is linearly scaled. Run RC with the modified file, and we should now see that the 2-4kHz region is raised by about 20dB.
The results I got confirm this theory:
WiiM Room Correction - calibration file scaling compared.png

Therefore linearly scaling the calibration file so that its maximum value is at +12dB gives you a bit more accuracy by utilizing the maximum file interpretation range (24dB), if the mic you are using has a strong low frequency roll-off.

@RyanWithWiiM In case it is not practical to increase the range for calibration file interpretation (which would be preferred), could perhaps this kind of scaling of calibration file at least be made automatic? I believe that would make the feature more user friendly. Thanks!
 
If I gather the energy to dive into this again, I might test it out on my living room system which goes down much lower. Not making any promises, though! :D
Just a short update, I fine-tuned my "DIY" calibration file for my Samsung EO-IC100 USB-C earbud mic a little (to get a slightly more accurate high frequency and very low frequency part of the response), used the above described trick to scale it and thereby maximize the full calibration file range that WiiM RC can interpret (+/-12dB), and then tested the calibrated earbud mic in my living room system which goes down to about 20Hz.

I'm happy to report that the results are IMHO a very good match to measurements done with my professionally calibrated measurement mic even down to the sub-bass range:
1740862846264.png

Red trace is a measurement done with the "DIY" calibrated Samsung EO-IC100 USB-C earbud mic, and blue trace is a measurement done with the Cross-Spectrum Labs calibrated Dayton Audio EMM-6 measurement microphone.

You can see that most of the variations are within +/-1dB, which is IMHO quite good, and perfectly usable for room EQ.

Attached to the post is the latest version of my "DIY" Samsung EO-IC100 USB-C earbud mic calibration file which should work great in WiiM Room Correction - just in case anyone else might find use for it.
Again, no guarantees that this file will work as well with any random set of these earbuds, since unfortunately I don't know how consistent the microphone frequency response is between different units of the same model.
 

Attachments

there is an effective approach concerning approaches under 1khz which should allow you to calibrate by comparison with a ref microphone ... these are the captures on a bass hp of a loudspeaker, at a very short distance from it, less than 10cm, see "in the hp" ... (with a closed speaker it is even simpler) ... this is the typical approach ..
you should be able to calibrate easily like this for the most useful frequencies in rc mode ........
(This is an approach which thus becomes rather rigorous in its result )
;-)
 
Last edited:
there is an effective approach concerning approaches under 1khz which should allow you to calibrate by comparison with a ref microphone ... these are the captures on a bass hp of a loudspeaker, at a very short distance from it, less than 10cm, see "in the hp" ... (with a closed speaker it is even simpler) ... this is the typical approach ..
you should be able to calibrate easily like this for the most useful frequencies in rc mode ........
(This is an approach which thus becomes rather rigorous in its result )
;-)
The file in my previous post was created through a combination of nearfield measurement for the <1kHz half of the response, a quasi-anechoic FDW gated measurement for the >1kHz half of the response, and referenced to the same measurements done with a professionally calibrated microphone.

The new calibration is a little more precise, but not a huge practical difference for RC compared to the file from post #1 (which was created by just dividing in-room MMM responses of both mics).
 
With the approach that I am pointing out, with your calibrated microphone and your approach, to you, you will have correct precision... in the most important frequency range in RC ;-)
 
Last edited:
With the approach that I am pointing out, with your calibrated microphone and your approach, to you, you will have correct precision... in the most important frequency range in RC ;-)
Thanks, but if I understood your post correctly, that is exactly the procedure I already did, compare:
The file in my previous post was created through a combination of nearfield measurement for the <1kHz half of the response...
under 1khz which should allow you to calibrate by comparison with a ref microphone ... these are the captures on a bass hp of a loudspeaker, at a very short distance from it, less than 10cm
In case I misunderstood what you meant, can you point me to a reference describing the procedure?
 
it is possible to use the same kind of approaches for constructing a cal file by comparison with a calibrated microphone with rew (with for example two voice loudspeaker)..using near-field captures without acoustic impact. and I was just pointing out the very well-known case used to measure the bass of speakers outside anechoic room..very efficient, reproducible and precise... no need for smoothing etc.

I don't see the description of your method.. if it's the one I'm pointing to.. I apologize in advance
 

Attachments

  • image424.jpg
    image424.jpg
    64.2 KB · Views: 6
Last edited:
It would be really useful if the Wiim chirp measurements could be easily exported in rew data format.... would allow many things...
 
Last edited:
it is possible to use the same kind of approaches for constructing a cal file by comparison with a calibrated microphone with rew (with for example two voice loudspeaker)..using near-field captures without acoustic impact. and I was just pointing out the very well-known case used to measure the bass of speakers outside anechoic room..very efficient, reproducible and precise... no need for smoothing etc.

I don't see the description of your method.. if it's the one I'm pointing to.. I apologize in advance
Yes, this is roughly the method I used for the latest version (V3) of the earbud calibration file.

But as I said, the differences compared to the MMM-based method described in post #1 in practice are quite small - the frequency range from 40Hz to about 4-5kHz is an almost perfect match, and outside it is 1-2dB difference:1000058346.png
 
in rc mode thus limiting the approach to 500hz for example max would allow to limit the cal efforts to max 1khz .. (and the idea of automatically limiting the chirps to the frequencies concerned by the rc mode would be a good thing on the wiim side)


(some images of the observations with rew of the bass with calibrated mic, your samsung mic without cal then your cal carried out? ;-) )
 
in rc mode thus limiting the approach to 500hz for example max would allow to limit the cal efforts to max 1khz .. (and the idea of automatically limiting the chirps to the frequencies concerned by the rc mode would be a good thing on the wiim side)


(some images of the observations with rew of the bass with calibrated mic, your samsung mic without cal then your cal carried out? ;-) )
If you limit the frequency range of the chirp how would the algorithm match the frequency response to a target curve? You can't ignore what happens outside the correction range.
 
If you limit the frequency range of the chirp how would the algorithm match the frequency response to a target curve? You can't ignore what happens outside the correction range.
(my point does not consider the "target curve" in fact... but personally if I had to observe under 400/500hz... I would consider flat ;-) ...personally...the answer above 1 or 2khz concerns more the design of the speakers, their choice, than the rc correction..correction in the bass being already a hellish sport ;-) )
 
(my point does not consider the "target curve" in fact... but personally if I had to observe under 400/500hz... I would consider flat ;-) )
You still need to match the level of the corrected frequencies (up to 400-500Hz) with the higher frequencies. If you don't the final result will be bass light or bass heavy.
 
Back
Top