This link[
^] might help. It was the first result of a search on "software generate spectrogram". There are many others. It's a standard way to analyze sound, so I think you need to use them.
If you need source code, searching on "software generate spectrogram source code" turned up
this post[
^], which has a number of links to such software.