Offline fitting tool

Neo
Posts: 3
Joined: Wed Aug 10, 2022 5:19 am

Offline fitting tool

Post by Neo » Wed Aug 10, 2022 5:33 am

I was trying out the offline fitting tool (https://github.com/HoerTech-gGmbH/openM ... _offline.m) and by following the steps after running the mfile, I am able to apply the preset fitting rules to my .wav file and generate an output .wav file. I had the following doubts:

1) What is the exact role of the acoustic input level in dB SPL that I have to enter?
2) I applied different preset fitting rules but every output .wav file has the same sound level i.e. I couldn't observe any difference in the output files generated by applying different fitting rules. Also, the amplitude for the output was very low. So what is the exact role of the fitting rules?
3) When I applied the 'CRvar_NALRP' fitting rule, I had to enter a compression ratio. Again I couldn't observe any difference in the output files for different compression ratios. So what is the compression ratio used for?

tobiasherzke
Posts: 119
Joined: Mon Jun 24, 2019 12:51 pm

Re: Offline fitting tool

Post by tobiasherzke » Wed Aug 10, 2022 9:30 am

What is the exact role of the acoustic input level in dB SPL that I have to enter?
peaklevel_in.PNG
peaklevel_in.PNG (3.44 KiB) Viewed 43873 times
In this dialog you're giving the physical sound level that shall correspond to 0 dB re full scale in your sound files.

E.g. if you enter value 90 here and one of your sound files has an RMS level of -23 dB FS, then the acoustic input level of that sound file is treated by openMHA to be 67 dB SPL (as you are asked to acknowledge in the next dialog).
Also, the amplitude for the output was very low
This is explained in the next dialog: the output peak level is set 50 dB higher than the input peak level as a preemptive measure to avoid cllipping in the output files. If you can do so without producing clipping, then you could amplify the output sound files yourselves by 50 dB again after they have been produced and compare them against the unaltered input files without needing to adjust your sound card volume settings.

Neo
Posts: 3
Joined: Wed Aug 10, 2022 5:19 am

Re: Offline fitting tool

Post by Neo » Fri Aug 12, 2022 8:41 am

Thank you Tobias! What about the other queries that I posted? Also, the duration of the output .wav file has doubled than the input. For eg if the input file has a duration of 3 sec then the output is of 6 sec where the audio is flipped for the first 3 sec. Can someone tell me why this is happening?

tobiasherzke
Posts: 119
Joined: Mon Jun 24, 2019 12:51 pm

Re: Offline fitting tool

Post by tobiasherzke » Fri Aug 12, 2022 3:35 pm

Hi Neo, if you need more help, then please post more details:
  • What exact steps have you performed
  • What was the expected result
  • What was the actual result
  • What analysis methods did you employ
Please make any wav files and audiograms that you have used accessible to forum participants, or use wav files that are part of the openMHA installation.

Neo
Posts: 3
Joined: Wed Aug 10, 2022 5:19 am

Re: Offline fitting tool

Post by Neo » Tue Aug 16, 2022 6:05 am

I followed all the necessary steps after running the offline fitting tool (https://github.com/HoerTech-gGmbH/open ... offline.m).

I am using the wav file which is available in the example for dynamic compression as the input. https://github.com/HoerTech-gGmbH/openM ... ompression

I entered 50 as the input acoustic level. I applied all the gain prescription rules one by one and obtained a first fit every time. I am getting two output wav files. One of them has a reduced amplitude than the input wav file, and it is named the same as that of the input i.e. '1speaker_diffNoise_2ch.wav'. The second has doubled in duration as I mentioned in my previous post and it is named as 'temp_compressor_input_signal.wav'.

I am not able to upload the wav files or the screenshots of the audiogram here.

Thank you

tobiasherzke
Posts: 119
Joined: Mon Jun 24, 2019 12:51 pm

Re: Offline fitting tool

Post by tobiasherzke » Tue Aug 16, 2022 1:23 pm

Thanks for providing more information. Could you please add which audiogram you chose.

And then it would be good to concentrate on just one prescription rule, let's say CRvar_NALRP with compression ratio 3, which compresses the dynamic range by the given ratio while it IIRC applies NAL-RP gains at 65 dB LTASS input.

I can say so far:
  • The offline fitting tool should have deleted the temporary wav file again but apparently fails to do so. This may be an incompatibility with recent Octave versions. I'm seeing the same on a fresh Windows,openMHA,Octave installation. We will fix it but it has low priority.
  • your 50dB input peak level is unusually low. This places the 1speaker_diffNoise_2ch.wav input signal at 27-28dB SPL, only a few dB above typical hearing aid microphone noise level. For fitting rules that apply a noise gate, this signal will be completely inside the noise gate range.

jva3046
Posts: 3
Joined: Wed Aug 17, 2022 11:30 am

Re: Offline fitting tool

Post by jva3046 » Thu Aug 18, 2022 6:14 am

Hello,
I am facing similar problem.
I have tried running offline fitting matlab file and tried applying different gain rules but I can not see changes in the wav file.
For every Gain Rule there should be different output wav file right? E.g. if I apply Linear40 rule then I should get output wav file according to that gain rule (40dB gain should get applied) and for Nogain rule, wav file should remain as it is (0 dB gain).
But for both the rules, I am getting similar output.
What procedure should I follow to get different wav files (according to the gain rules)?

Please help me out as I have been trying this for a long time.

tobiasherzke
Posts: 119
Joined: Mon Jun 24, 2019 12:51 pm

Re: Offline fitting tool

Post by tobiasherzke » Fri Aug 19, 2022 4:04 pm

Hi Jva, please share with us what exact steps you have executed, what sound files you have used, and what audiogram(s) you and Neo have used.
E.g. if I apply Linear40 rule then I should get output wav file according to that gain rule (40dB gain should get applied)
No, this is not the case. Please see the help text in https://github.com/HoerTech-gGmbH/openM ... linear40.m which you can also see from Matlab or Octave with "help gainrule_linear40". Linear40 is sort-of a half-gain rule, only that it applies 40% instead of 50%.

jva3046
Posts: 3
Joined: Wed Aug 17, 2022 11:30 am

Re: Offline fitting tool

Post by jva3046 » Mon Aug 22, 2022 8:26 am

Hi,
I run mhagui_fitting_offline.m matlab file through octave. Then I put acoustic level as 100dB and selected input wav file (2speaker_diffNoise_2ch.wav) from Audio Files provided with openMHA project. Then selected directory where output wav file will be saved.
I have created new profile along with the Audiogram using some random values and selected that to apply gain rule in Fitting tool. I can apply the gain manually (gain option on the bottom of each channel) and can observe the change in wav file. But I want to apply gain rule and see the change.
Please guide me.

tobiasherzke
Posts: 119
Joined: Mon Jun 24, 2019 12:51 pm

Re: Offline fitting tool

Post by tobiasherzke » Tue Aug 23, 2022 7:48 am

(2speaker_diffNoise_2ch.wav)
I cannot find any file with this name in openMHA. I suspect you mean 1speaker_diffNoise_2ch.wav from the 01-dynamic-compression example directory.

When peak level is set to 100 dB for this file, then this file contains the following acoustic levels: left channel: 76.9 dB, right channel: 78.0 dB. This is already quite loud, but with linear fitting rules used only we should see the expected amplification in the output.

Since you did not disclose the exact audiogram that you used, I will choose one myself that you and others can reproduce:

In the audiogram database, I choose the example patient 'TT123456' and from that patient, I choose the audiogram 'flat40', a pantonal hearing loss of 40 dB HL at all audiometric frequencies.

With this hearing loss, I expect the "nogain" fitting rule to provide no amplification, and the "linear40" fitting rule to provide 16 dB gain across all frequencies. (40% of 40 is 16).

When I try this and compute the RMS of the output files taking into account the 50 dB higher output peak level as explained in a previous post, then this is exactly the level difference that I see for these two fitting rules: 0 dB gain for nogain and 16 dB gain for linear40. The fitting rules behave as expected for me.

If you find a case where they do not behave as expected, then you need to share what exactly you did to perform your processing and also your analysis of the input and output, so that someone reading the forum can reproduce what you did exactly. So far you have not described how you arrived at your analysis result "But for both the rules, I am getting similar output." Please share every single detail of what you did and what your criteria are, otherwise it is very difficult to help you.

Post Reply