# NetDecoder using InverseShortTimeFourier, InverseSpectrogram, or Audio, etc., Possible?

I'm finding it impossible to create a NetDecoder to function as the inverse equivalent of, e.g., NetEncoder["AudioSTFT"], NetEncoder["AudioSpectrogram"], etc.

NetDecoder[NetEncoder[[...]]] will create a decoder based on the parameters of an existing encoder.

But every variation of this formula I've tried has resulted only in \$Failed

I've also tried to come up with a solution using the "Function" named decoder option, e.g., NetDecoder[{"Function", InverseSpectrogram[#] &}], but whether it's because functions like ShortTimeFourier[] and InverseShortTimeFourier[] involve "data objects" incompatible with their NetEncoder equivalents or some other misunderstanding of mine about how the named "Function" decoder is supposed to work, I just can't seem to figure out how to create NetDecoders that do what I need.

If someone could help me out here, or point me toward any resources/examples where Mathematica/WLNet and its various Audio encoders are used to create something besides a classifier, I'd really appreciate it. Thanks.

• It would be helpful if you could include examples of the exact complete syntax you have tried so far. Dec 6 '19 at 14:14
• Sorry, I supposed "every variation" covered it, but, for example: NetDecoder[NetEncoder["AudioSTFT"]], enc = NetEncoder["AudioSTFT"]; NetDecoder[enc], dec = NetDecoder[{"Function", InverseSpectrogram[#] &}], dec = NetDecoder[{"Function", InverseShortTimeFourier[#] &}] (when fed `enc=NetEncoder["AudioSTFT"] yields Expecting a ShortTimeFourierData object or a numeric matrix instead of Numeric Array, etc. Dec 6 '19 at 18:12