Skip to main content

Bidirectional spectrogram-based audio-image converter

Project description

Audio-Image-Converter

Converts audio to and from a picture representing the frequency-time domain, remaining perceptually lossless. When converting to .webp, achieves slightly better compression ratio than an equivalent .flac. (Note that this format is not intended to compete with preeexisting audio formats/codecs, and is mostly designed as a novelty, enabling users to visually see the contents of audio files. Slight albeit unnoticeable quality loss is often unavoidable due to the conversions between several data types and representations.)

The image's aspect ratio approximately corresponds to the audio's duration in minutes (with each 1588x1588 square representing 1 minute of audio), and its pixel data represents the fourier transform of the audio, with X axis representing time (left/right channels interleaved), Y axis representing frequency (default nyquist at 21000Hz), hue representing phase, and amplitude being represented as a floating-point number, where lightness is the exponent and saturation the fraction. There is slight redundancy between lightness and saturation to accomodate for the more sparse regimes of the HSL colourspace's domain.

Usage

usage: soundcrystal [-h] [-V] [-sr [SAMPLE_RATE]] [-f [FORMAT]] input [output]

Bidirectional spectrogram-based audio-image converter

positional arguments:
  input                 Input filename
  output                Output filename

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -sr, --sample_rate [SAMPLE_RATE]
                        Sample rate; defaults to 42000
  -f, --format [FORMAT]
                        Output format; defaults to opus or webp depending on input

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audioptic-1.0.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audioptic-1.0.0-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file audioptic-1.0.0.tar.gz.

File metadata

  • Download URL: audioptic-1.0.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.8

File hashes

Hashes for audioptic-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3946b5d4fb9c1b0daacaca9c02f6bd729bf3f0e54c55c1e2cf3193cf63098d80
MD5 8f773b86cffcf7295ba9e4f21ad79bae
BLAKE2b-256 737482389ee9d7061413cfd73ba72b3158367b357f33d98d5ad280c5fea190d6

See more details on using hashes here.

File details

Details for the file audioptic-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: audioptic-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.8

File hashes

Hashes for audioptic-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53c31c508a7e81c69261634581bea48916ee5ffde111c8d9851e84947af3b48e
MD5 1d4e1692a63aeae5566727645516cd28
BLAKE2b-256 bdc009179a049c41c7e9f87ae91996912346813ad1e77f8a837ce22db176ca46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page