Skip to main content

Printing and viewing spectrograms of audio files in command line

Project description

inspec

View spectrograms of audio data files in the terminal as ascii characters. Provides printing to stdout, a terminal gui built on curses, and importable functions.

install

pip install inspec

cli

Invocation of inspec uses the entrypoint python -m inspec.cli.

inspec open

Usage: inspec open [OPTIONS] [FILENAMES]...

  Open interactive gui for viewing audio files in command line

Options:
  -r, --rows INTEGER  Number of rows in layout
  -c, --cols INTEGER  Number of columns in layout
  -t, --time FLOAT    Jump to time in file
  --cmap TEXT         Choose colormap (see list-cmaps for options)
  --help              Show this message and exit.

inspec open demo

inspec show

Usage: inspec show [OPTIONS] FILENAME

  Print visual representation of audio file in command line

Options:
  --cmap TEXT           Choose colormap (see list-cmaps for options)
  -d, --duration FLOAT
  -t, --time FLOAT
  --amp                 Show amplitude of signal instead of spectrogram
  --help                Show this message and exit.

inspec show demo

importing in python

The code can be imported so renders can be done dynamically in other programs. This is the current gist but would be nice to make a simpler way to do this.

from inspec.plugins.audio.spectrogram_view import BaseAsciiSpectrogramPlugin

# Printing to stdout
plugin = BaseAsciiSpectrogramPlugin()
plugin.set_cmap("plasma")
plugin.read_file(FILENAME)
plugin.render()

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

inspec-0.2.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

inspec-0.2-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file inspec-0.2.tar.gz.

File metadata

  • Download URL: inspec-0.2.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

File hashes

Hashes for inspec-0.2.tar.gz
Algorithm Hash digest
SHA256 6a5e3dc77b9d7f4e764a2e2cc79d792a7a3d27c167d33ed42a544ca9fbe8ab33
MD5 fb0be9bc2228494fa813bbbc3ef2428a
BLAKE2b-256 06abcf623dc87d5b5b5e0510bd91e00c77c4481ea04d12442522bfde110ffc14

See more details on using hashes here.

File details

Details for the file inspec-0.2-py3-none-any.whl.

File metadata

  • Download URL: inspec-0.2-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

File hashes

Hashes for inspec-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 304388b52a8d3f8c8e96dbf9e072100e507aa1aef9e76882dfff2407a739c859
MD5 dc18b08b99604fe159918cf12836af97
BLAKE2b-256 a3927fb860831ec23be0ac2b5c95a88f1090e604a7efb032396a950fd1c7e791

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