Function Repository Resource:

SpectrogramEncode

Source Notebook

Hide a string in a spectrogram

Contributed by: Aster Ctor

ResourceFunction["SpectrogramEncode"][str]

encode the string str within an audio spectrum.

ResourceFunction["SpectrogramEncode"][string,sr]

conceals the string with sample rate sr.

Details and Options

The following option is available:
"Duration"10total duration time of audio in seconds

Examples

Basic Examples (2) 

Hide a string in an Audio object:

In[1]:=
audio = ResourceFunction["SpectrogramEncode"]["Wolfram"]
Out[1]=

Hidden information can be displayed via Spectrogram:

In[2]:=
Spectrogram@audio
Out[2]=

Scope (2) 

Lowering the sampling rate will make the sound deeper:

In[3]:=
audio = ResourceFunction["SpectrogramEncode"]["Wolfram", 1000]
Out[3]=

Display hidden information:

In[4]:=
Spectrogram@audio
Out[4]=

Neat Examples (4) 

Get some audio ("One small step for man, one giant leap for mankind"):

In[5]:=
Apollo11 = ExampleData[{"Sound", "Apollo11SmallStep"}]
Out[5]=

Hide the secret string at extremely high frequencies:

In[6]:=
audio = ResourceFunction["SpectrogramEncode"]["Wolfram", 64000, "Duration" -> Duration@Apollo11]
Out[6]=

Lower the volume so that the secret string is the same as the noise:

In[7]:=
secret = AudioChannelCombine[{Apollo11, Apollo11, 0.01 audio}]
Out[7]=

Show the secret string:

In[8]:=
show = Spectrogram[#, ColorFunction -> "Rainbow", PlotRange -> {All, All, Automatic}] &;
show@secret
Out[8]=

Publisher

Aster Ctor (MoeNet)

Version History

  • 1.0.0 – 13 December 2019

Related Resources

License Information