DD4WH
Well-known member
let me try to summarize what I have understood how the threshold works:
1.) highpass filter the incoming audio block: aux(t) = (data(t) - data(t -1)) * (data(t) - data(t -1))
2.) determine maximum value of all the samples in the block --> MaxVal
3.) if MaxVal is larger than threshold --> haveSignal is set to the number of blocks to be sent (MIN_BLOCKS). From my understanding this would determine the length of the recording after a triggered recording is started, does it? [so three blocks means only roughly 8msec at 48ksps sample rate!?]
4.) as long as haveSignal is larger/equal to 0, audio block of the preceding round is transmitted, the recent audio block will be sent next round. This ensures that an audio snippet that triggers the recorder, will not be lost, but preserved (one audio block is 128 samples, so using a sample rate of 48ksps, we have a pre-trigger time of 128/48000, that is 2.7msec)
5.) out blocks are released. Does this ensure that audio is thrown away, if threshold is not met?
6.) out1 = tmp1 --> save recent audio for potential transmit in next round
Would be nice to have comments / additions to that .
Best regards,
Frank
1.) highpass filter the incoming audio block: aux(t) = (data(t) - data(t -1)) * (data(t) - data(t -1))
2.) determine maximum value of all the samples in the block --> MaxVal
3.) if MaxVal is larger than threshold --> haveSignal is set to the number of blocks to be sent (MIN_BLOCKS). From my understanding this would determine the length of the recording after a triggered recording is started, does it? [so three blocks means only roughly 8msec at 48ksps sample rate!?]
4.) as long as haveSignal is larger/equal to 0, audio block of the preceding round is transmitted, the recent audio block will be sent next round. This ensures that an audio snippet that triggers the recorder, will not be lost, but preserved (one audio block is 128 samples, so using a sample rate of 48ksps, we have a pre-trigger time of 128/48000, that is 2.7msec)
5.) out blocks are released. Does this ensure that audio is thrown away, if threshold is not met?
6.) out1 = tmp1 --> save recent audio for potential transmit in next round
Would be nice to have comments / additions to that .
Best regards,
Frank