What I want to do:
I want to encode an audio message inside a regular music file; this shall be decoded by an audio analyzer running on another machine (by listening to the audio playback from the first machine).

What I have tried so far:

  1. Change the pitch of secret audio message to D#/EB-10 (which is 19.5 KHz according to this site: http://www.flutopedia.com/pitch_to_frequency.htm). This should convert the secret audio message to something that falls outside of the human audible range.
  2. Merge this secret audio message with music file.


  1. Apply high pass filter at 19 KHz.

  2. Change pitch back to the original range (e.g. B-6)

I'm using Audacity to do the above steps.

The problems that I'm facing:
1. The "secret" message is still audible in the encoded output.
2. Decoded output is significantly different than the secret message.

I'm new to the audio dsp domain, so I'd appreciate a review of my approach and suggestions to achieve the goal that I described above.

Below is the spectrum plot for "secret" audio message generated using Audacity.

Spectrogram for "secret" audio data

Below image shows linear spectral chart for "secret" signal mixed with generated tone of 19kHz.

mixed signal

The below spectral graph is for the carrier "music" file.

carrier "music" file

  • It's hard to guess what goes wrong without exactly knowing how your signal looks like. You don't happen to have the spectrum of your "secret" file? Also, what's your audio sampling rate? – Marcus Müller Jun 11 at 6:07
  • hello! I added the picture of the spectrum of the "secret" audio message. This audio message is actually generated by another algorithm running at an earlier stage in the pipeline and can be assumed to be the same all the time. The "carrier" music file can be any song audio. Edit: Sampling rate is 48K – sircasms Jun 11 at 6:17
  • uhm, if you're trying to employ the use of steganography, do it to the LSB or two LSBs of the music signal. if you add an error signal to the music, it's gonna sound like an error signal. – robert bristow-johnson Jun 11 at 7:31
  • @robertbristow-johnson The "receiver" end where the audio decoder will be deployed, is supposed to be a recording device. It will not get the exact copy of the mixed audio. So, I'm not trying to make changes to LSB as it might require additional overhead of identifying the "start" bit for byte aligning. – sircasms Jun 11 at 7:42
  • oh, there are plenty of good ways to align it. so is the receiver getting a digital bit stream or is it getting an analog signal? because if it is the former, you're going about this wrong. if the receiver is receiving an analog signal, and you wanna embed a "watermark" of some kind, you have a problem. – robert bristow-johnson Jun 11 at 7:52

So, your unmixed secret signal has energy content in a frequency range of ca -6 kHz to +6 kHz.

As far as I understand, you mix that with a real cosine of ca 19 kHz, so that it now has signal content in -25 kHz to -13 kHz, and +13 kHz to +25 kHz. All things are still nice and symmetric – so if you mix it back down to 0 Hz, you'd still have the original spectrum.

Only that your 48 kHz sampling rate doesn't even allow your to unambigously represent a signal above 24 kHz – it instantly aliases into the lower end, and vice versa, so you have distortion in your signal of interest (still shouldn't be hearable).

But then you high-pass filter at 500 kHz above the frequency you shifted to – but that cuts off 5.5 kHz of your signal! So, afterwards, your signal is no longer symmetrical in spectrum, and mixing it back down will produce non-constructive aliases.

So, to understand what's happening here, plot your secret signal's spectrum after being shifted up. Don't use the logarithmic frequency axis, but simply linear frequency.

  • Thank you! I added the chart that you asked for. Could you please take a look at it. – sircasms Jun 11 at 7:39
  • well, does that look like it would not interfere with your audible "public" signal? Look at that signal's spectrum, too! – Marcus Müller Jun 11 at 7:42
  • It does have some overlap with the public signal. And there is a considerable amount of "noise" (secret signal) in the public signal. Could there be a way to maybe muffle or eliminate the secret signal in the range where it overlaps with the public signal? (+ public signal spectral graph attached) – sircasms Jun 11 at 7:51
  • or maybe I should be more careful in the selection of the public audio(its frequency range)? Because the public audio is eventual inconsequential to the project. – sircasms Jun 11 at 7:53

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.