Pic2wav
Encode an image to sound (WAV file) and view it as a spectrogram. Optimized Python 3 version.
Install / Use
/learn @unreal79/Pic2wavREADME
pic2wav - Spectrogram from picture
Encode an image to sound (WAV file) and view it as a spectrogram in audio player.
Example
python3 pic2wav.py picture.png -d8 -r200
Source picture:
<img src="picture.png" alt="drawing" width="300"/>Spectrogram of created WAV file:
<img src="picture.png.wav.spectrogram.png" alt="drawing" width="300"/>Options
pic2wav.py [[-p] <picture>] [-w <output.wav>] [-d <seconds>] [-r <resolution>] [-e] [-i]
Options:
-p - input picture file name (PNG, JPEG, etc.) (default is 'picture.png')
-w - output WAV file name (default is 'input picture file' + '.wav')
-d - output sound file duration in seconds (float) (default is 2)
-r - spectrogram resolution (height) in pixels; affects work time (default is 256)
-e - equalize image (enhances contrast)
-i - invert image colors
Optimisation
The code is optimized for pefromance in Python 3 with math and Pillow (PIL) libraries.
I recommend running it under PyPy -- this gives about 30% speedup.
Thanks
- Based on alexadam's img-encode (MIT license)
Related Skills
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
50PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
pm
PM Agent Rule This rule is triggered when the user types `@pm` and activates the Product Manager agent persona.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
