# Echo hiding technique

I'm trying to figure out how to use DSP techniques in order to both add artificial echoes to a sound file, but more importantly to be able to detect these echoes. I've been reading about it here: http://www.snotmonkey.com/work/school/405/methods.html#echo

Can someone point me to possibly some example code using Apple's Accelerate framework for being able to detect hidden echoes in sound coming from the microphone? Also, for detecting the echoes, it is important that the application doesn't need to have knowledge of the original sound, meaning it should be detectable in any sound that's being played that has these echoes.

Thank you for any information.

Adding echoes to a signal is pretty easy as this process just adds a delayed version of the signal back to itself. You probably want to use a gain factor $f_\text{gain}$ for the additional signal that is smaller than one, $f_\text{gain} \leq 1$, to avoid having an echo that is louder than the original sound. In DSP terms this process corresponds to FIR filtering with an impulse response that consists of a delta impulse at time zero ($\delta[n]$) and a time-shifted and weighted delta impulse: $$\mathbf{b} = \delta[n] + f_\text{gain}\cdot \delta[n-L_\text{delay}],$$ with $L_\text{delay}$ the delay time in samples and $$\mathbf{a} = 1$$ because it's an FIR filter. To get multiple echoes simply use more than one delayed delta impulses.