Toni dtmf9/27/2023 Use highestPowers.Frequency and highestPowers.Frequency to If (highestPowers.All(result => result.Power > adjustedMeanPower)) Var highestPowers = sortedPowers.Take(2).ToList() įloat seconds = bufferPos / (float)16000 Var sortedPowers = powers.OrderByDescending(result => result.Power) Var adjustedMeanPower = AdjustmentFactor*powers.Average(result => result.Power) Power = CalculateGoertzel(sampleBuffer, f, 8000) Public static double CalculateGoertzel(short sample, double frequency, int samplerate) Short sampleBuffer = new short īuffer.BlockCopy(buffer, 0, sampleBuffer, 0, read/2) Ĭonsole.WriteLine(CalculateGoertzel(sampleBuffer,8000,16)) Int read = reader.Read(buffer, 0, buffer.Length) WAV file into it (using NAudio to read the file, which is a 8KHz mono 16-bit PCM WAV): using (WaveFileReader reader = new buffer = new byte I've grabbed a Goertzel code snippet and I've tried shoving a. I understand the DTMF uses a combination of frequencies, and a Goertzel algorithm can be used. However, I'm really struggling to understand how this can be done. Following on from my earlier question, my goal is to detect DTMF tones in a WAV file from C#.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |