-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have 4 tones, but it only detects 2 tones #26
Comments
Could you provide the audio file in question? |
Hi, Robert,
Thanks for your nice reply, here is the audio, it contains 4 tones.
Bill
…On Tue, Sep 15, 2020 at 1:37 PM Robert Hofmann ***@***.***> wrote:
Could you provide the audio file in question?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDHXSOAKXYZ7C4AZE22MNLSF7GAZANCNFSM4RNUWTKA>
.
|
Hi @billsheh, unfortunately the audio file you attached to the mail didn't make its way into GitHub. I think you'll have to upload it somewhere and post the link here. |
Sorry for not realizing that, please download the audio file here
https://www.dropbox.com/s/hiur1bel0yr18j3/dmtf-test.wav?dl=1
I also tested it via TAPIEx, it can detect 4 tones. Very appreciate that
you can take a quick look.
…On Tue, Sep 15, 2020 at 11:27 PM Robert Hofmann ***@***.***> wrote:
Hi @billsheh <https://github.com/billsheh>, unfortunately the audio file
you attached to mail didn't make its way into GitHub. I think you'll have
to upload it somewhere and post the link here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDHXSMCPX7D5D5P5PKIC43SGBLGLANCNFSM4RNUWTKA>
.
|
That's odd. The file seems normal. |
Disabling the normalization also helps, but I wouldn't recommend it. Let me know when you need further assistance with the detector configuration. |
Sounds great, I will try to use a lower detection threshold, the tones can
be clearly seen from wave form such that it can easily compare the result
from your library. Very appreciate your great work, thanks again,
Bill
…On Wed, Sep 16, 2020 at 2:38 AM Robert Hofmann ***@***.***> wrote:
Disabling the normalization
<https://github.com/bert2/DtmfDetection#disabling-goertzel-response-normalization>
also helps, but I wouldn't recommend it.
Let me know when you need further assistance with the detector
configuration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDHXSISXQVFKDSLFNRNBR3SGCBSXANCNFSM4RNUWTKA>
.
|
Hi, Robert,
Your code does not work with .NET framework 4.72, can you make it work with
that?
Thanks,
Bill
…On Wed, Sep 16, 2020 at 10:41 AM Bill Xie ***@***.***> wrote:
Sounds great, I will try to use a lower detection threshold, the tones can
be clearly seen from wave form such that it can easily compare the result
from your library. Very appreciate your great work, thanks again,
Bill
On Wed, Sep 16, 2020 at 2:38 AM Robert Hofmann ***@***.***>
wrote:
> Disabling the normalization
> <https://github.com/bert2/DtmfDetection#disabling-goertzel-response-normalization>
> also helps, but I wouldn't recommend it.
>
> Let me know when you need further assistance with the detector
> configuration.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#26 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADDHXSISXQVFKDSLFNRNBR3SGCBSXANCNFSM4RNUWTKA>
> .
>
|
You could make it work with net472, but I'm using a couple netstandard2.1 features. So it can't be done without changing the source and recompiling. You can try one of the older versions before the 1.0.0 rewrite (e.g 0.9.2), because those still use net47. A word of warning: back then this library had a shitty interface. You can't even change the detector config without using reflection, because I made its property setters private. I must have had a serious episode of braindeadness or something. Anyway here is the README for 0.9.2. |
Hi, Robert,
Thanks for your nice reply, I will check the 0.9.2 version, never mind
using reflection to change the config value, very appreciate your hard work.
Bill
…On Thu, Sep 17, 2020 at 12:25 AM Robert Hofmann ***@***.***> wrote:
You could make it work with net472, but I'm using a couple netstandard2.1
features. So it can't be done without changing the source and recompiling.
You can try one of the older versions before the 1.0.0 rewrite (e.g 0.9.2
<https://www.nuget.org/packages/DtmfDetection.NAudio/0.9.2>), because
those still use net47.
A word of warning: back then this library had a shitty interface. You
can't even change the detector config without using reflection, because I
made its property setters private. I must have had serious episode of
braindeadness or something. Anyway here is the README
<https://github.com/bert2/DtmfDetection/blob/0827801bbdb142f5517b530cdf07f98fdeb0e7d9/README.md>
for 0.9.2.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDHXSP5FWZ65ABERQYFKVDSGG2YJANCNFSM4RNUWTKA>
.
|
Hi, Robert,
It is a little hard to know how to use your code, will you be able to put
0.9.2 source code to github?
Thanks,
Bill
…On Thu, Sep 17, 2020 at 1:16 PM Bill Xie ***@***.***> wrote:
Hi, Robert,
Thanks for your nice reply, I will check the 0.9.2 version, never mind
using reflection to change the config value, very appreciate your hard work.
Bill
On Thu, Sep 17, 2020 at 12:25 AM Robert Hofmann ***@***.***>
wrote:
> You could make it work with net472, but I'm using a couple netstandard2.1
> features. So it can't be done without changing the source and recompiling.
>
> You can try one of the older versions before the 1.0.0 rewrite (e.g 0.9.2
> <https://www.nuget.org/packages/DtmfDetection.NAudio/0.9.2>), because
> those still use net47.
>
> A word of warning: back then this library had a shitty interface. You
> can't even change the detector config without using reflection, because I
> made its property setters private. I must have had serious episode of
> braindeadness or something. Anyway here is the README
> <https://github.com/bert2/DtmfDetection/blob/0827801bbdb142f5517b530cdf07f98fdeb0e7d9/README.md>
> for 0.9.2.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#26 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADDHXSP5FWZ65ABERQYFKVDSGG2YJANCNFSM4RNUWTKA>
> .
>
|
Hey Bill, thanks to Git it's all still here. You just have to checkout the right commit: PS> git clone http://github.com/bert2/DtmfDetection
PS> cd DtmfDetection
PS> git checkout 0827801 # checkout last commit of 0.9.2 It's a VS 2017 solution though. If you have a specific question, feel free to ask it here. |
The problem is actually the Goertzel response normalization. For each DTMF tone in the sample file the high frequency is about twice as strong as the low frequency. For the first two tones (phone keys 5 and 6) the high frequency is even a little bit stronger (factor ~2.2). The normalization simply accumulates the total signal energy including both the high and low frequencies of a DTMF tone. When one of the two is much stronger than the other then the lower one will be suppressed by the higher. The workaround for now is to disable the normalization. For a fix I'll have to find a way to exclude the frequencies that are part of a DTMF tone from the total signal energy. If this even makes sense, I'm not sure yet. |
Hello @bert2 Jumping back in almost two years later. Is there a way to adjust the detection threshold when reading a wav/mp3 file? As per your example in the readme, the below code is working
I found that the following entry point takes an optional Config argument (defaulting to Config.Default):
But in the above case, is it possible to use |
If you provide the parameter name explicitly, other optional parameters can be skipped: var dtmfs = audioFile.DtmfChanges(config: Config.Default.WithThreshold(42)); |
No description provided.
The text was updated successfully, but these errors were encountered: