Comments (3)
Hi, thanks for the report! Could you provide me with the WAV file you are trying?
from dtmfdetection.
testwav.zip
Here's the "decode" loop for the received bytes:
for (int index = offset; index < sample.Length; index++)
{
short pcm = MuLawDecoder.MuLawToLinearSample(sample[index]);
byte[] pcmSample = {(byte) (pcm & 0xFF), (byte) (pcm >> 8)};
m_WaveInEvent.RaiseDataAvailable(pcmSample);
}
Here's the "encode" loop for the sent bytes:
byte[] sample = new byte[sampleRaw.Length/2];
int sampleIndex = 0;
for (int index = 0; index < sampleRaw.Length; index += 2)
{
byte ulawByte = MuLawEncoder.LinearToMuLawSample(BitConverter.ToInt16(sampleRaw, index));
sample[sampleIndex++] = ulawByte;
}
from dtmfdetection.
That does not appear to be a problem with the DtmfDetection library but rather with your decoding/encoding step.
When I feed it to the DtmfDetector test program all DMTF tones are detected correctly:
PS> .\DtmfDetector.exe C:\Users\bert\Desktop\test.wav
00.051 s (0): One key (duration: 00.103 s)
00.231 s (0): Two key (duration: 00.102 s)
00.410 s (0): Three key (duration: 00.103 s)
00.589 s (0): Four key (duration: 00.103 s)
00.769 s (0): Five key (duration: 00.102 s)
00.948 s (0): Six key (duration: 00.103 s)
01.128 s (0): Seven key (duration: 00.102 s)
01.307 s (0): Eight key (duration: 00.077 s)
01.486 s (0): Nine key (duration: 00.103 s)
01.691 s (0): Zero key (duration: 00.103 s)
01.871 s (0): Hash key (duration: 00.102 s)
02.076 s (0): Star key (duration: 00.077 s)
Here is a screenshot of test.wav
loaded in Audacity for comparison:
I'm afraid you will have to try your luck on Stack Overflow.
from dtmfdetection.
Related Issues (18)
- WaveFileReaderExtensions.cs suggestion HOT 1
- DTMF detector fails for 48KHz audio HOT 1
- LiveAudioDtmfAnalyzer seems not working HOT 5
- Consuming too much processor. HOT 2
- Detect Busy signal frequency HOT 1
- Repeating DTMF tones are not detected correctly when played too fast HOT 1
- I have 4 tones, but it only detects 2 tones HOT 15
- Identify dtmf microphone in the L and R channels separately HOT 5
- FSK CallerID decoder HOT 2
- How to implement microphone volume HOT 1
- Can the project be built on Linux? HOT 15
- How to ensure the latest NAudio version is in use? HOT 15
- Is it possible to use a named pipe (fifo) as input of NAudio? HOT 3
- Is it possible to change the detection frequency? HOT 1
- Would appreciate upgrade of NAudio dependency to version 2.X
- Identify off-hook phone HOT 1
- System.Threading.ThreadAbortException HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dtmfdetection.