spectrograms

User Guide

  • Installation
    • Requirements
    • Install from PyPI
    • Install from Source
  • Quickstart
  • Audio Processing
    • Basic Spectrogram
    • Understanding the Result
    • Mel Spectrogram
  • Image Processing
    • Basic 2D FFT
    • Image Filtering
    • Understanding Image Results
    • Next Steps
  • Choosing Parameters
    • STFT Parameters
      • FFT Size (n_fft)
      • Hop Size
      • Window Function
      • Centering
    • Default Configurations
      • Speech Processing
      • Music Processing
    • Mel Scale Parameters
      • Number of Mel Bands
      • Frequency Range
    • Decibel Conversion
    • ERB Scale
    • Performance Considerations
      • Memory Usage
      • Computation Time
  • Frequency Scales
    • Linear Scale
    • Log Frequency Scale
    • Mel Scale
    • ERB Scale
    • Constant-Q Transform
    • Scale Comparison
    • Choosing a Scale
  • Batch Processing
    • Why Use Plans?
    • Basic Usage
    • Creating Plans
    • Computing Spectrograms
      • Full Spectrogram
      • Single Frame
      • Output Shape Prediction
    • Performance Comparison
    • When to Use Plans
    • Memory Considerations
  • Audio Features
    • MFCC (Mel-Frequency Cepstral Coefficients)
      • Basic Usage
      • Standard Configuration
      • Custom Configuration
    • Chromagram
      • Basic Usage
      • Output
      • Standard Configuration
      • Normalization Options
    • Constant-Q Transform (CQT)
      • Basic Usage
      • Output
      • Configuration
    • Applications
      • Speech Recognition
      • Music Analysis
      • Audio Classification
  • Image Processing with 2D FFT
    • Overview
    • Basic 2D FFT
      • Inverse 2D FFT
      • Power and Magnitude Spectra
    • Convolution
      • Gaussian Blur
      • Custom Kernels
    • Spatial Filtering
      • Low-Pass Filter
      • High-Pass Filter
      • Band-Pass Filter
    • Edge Detection
    • Image Sharpening
    • Batch Processing with Fft2dPlanner
    • Performance Considerations
    • Tips and Best Practices
    • See Also
  • Performance and Benchmarks
    • Benchmark Results
      • Summary
      • Key Findings
    • Why spectrograms is Faster
      • Pre-computed Filterbanks
      • Sparse Matrix Operations
      • Memory Efficiency
      • GIL Release
    • Optimization Tips
      • 1. Use the Planner API
      • 2. Choose Power-of-2 FFT Sizes
      • 3. Streaming for Real-Time Applications
      • 4. Batch Processing with Parallelism
      • 5. Choose the Right Backend
      • Backend Comparison
    • Measuring Your Performance
    • See Also
  • Examples
    • Audio Processing Examples
      • Basic Spectrograms
      • Window Functions
      • Batch Processing
      • Streaming
      • Audio Features
    • Image Processing Examples
      • 2D FFT Basics
      • Image Filtering
    • Performance Analysis
      • Reference Implementations
    • Running Examples
    • Example Template
    • See Also

API Reference

  • API Reference
    • Parameters
      • STFT Parameters
        • StftParams
      • Spectrogram Parameters
        • SpectrogramParams
      • Decibel Conversion
        • LogParams
      • Frequency Scales
        • Mel Scale
        • ERB Scale
        • Constant-Q Transform
      • Audio Features
        • Chromagram
        • MFCC
    • Convenience Functions
    • Audio Processing Functions
      • Linear Spectrograms
        • compute_linear_power_spectrogram()
        • compute_linear_magnitude_spectrogram()
        • compute_linear_db_spectrogram()
      • Mel Spectrograms
        • compute_mel_power_spectrogram()
        • compute_mel_magnitude_spectrogram()
        • compute_mel_db_spectrogram()
      • ERB Spectrograms
        • compute_erb_power_spectrogram()
        • compute_erb_magnitude_spectrogram()
        • compute_erb_db_spectrogram()
      • LogHz Spectrograms
        • compute_loghz_power_spectrogram()
        • compute_loghz_magnitude_spectrogram()
        • compute_loghz_db_spectrogram()
      • Audio Features
        • compute_cqt()
        • compute_chromagram()
        • compute_mfcc()
      • Low-Level Audio Functions
        • compute_stft()
    • Image Processing Functions
      • 2D FFT Operations
        • fft2d()
        • ifft2d()
        • power_spectrum_2d()
        • magnitude_spectrum_2d()
      • Frequency Shifting
        • fftshift()
        • ifftshift()
      • Kernels
        • gaussian_kernel_2d()
      • Convolution
        • convolve_fft()
      • Spatial Filtering
        • lowpass_filter()
        • highpass_filter()
        • bandpass_filter()
      • Feature Enhancement
        • detect_edges_fft()
        • sharpen_fft()
    • Planner API
      • Creating Plans
        • SpectrogramPlanner
      • Plan Classes
        • Linear Plans
        • Mel Plans
        • ERB Plans
        • LogHz Plans
        • CQT Plans
      • 2D FFT Planner
        • Fft2dPlanner
    • Results
      • Spectrogram
        • Spectrogram.T
        • Spectrogram.data
        • Spectrogram.db_range()
        • Spectrogram.duration()
        • Spectrogram.frequencies
        • Spectrogram.frequency_range()
        • Spectrogram.n_bins
        • Spectrogram.n_frames
        • Spectrogram.params
        • Spectrogram.shape
        • Spectrogram.times
    • 2D FFT Functions
      • FFT and Inverse FFT
        • fft2d()
        • ifft2d()
      • Spectral Analysis
        • power_spectrum_2d()
        • magnitude_spectrum_2d()
      • Frequency Shifting
        • fftshift()
        • ifftshift()
      • 2D FFT Planner
        • Fft2dPlanner
    • Image Processing Functions
      • Kernels
        • gaussian_kernel_2d()
      • Convolution
        • convolve_fft()
      • Spatial Filtering
        • lowpass_filter()
        • highpass_filter()
        • bandpass_filter()
      • Feature Enhancement
        • detect_edges_fft()
        • sharpen_fft()
    • Exceptions
      • SpectrogramError
      • InvalidInputError
      • DimensionMismatchError
      • FFTBackendError
      • InternalError
spectrograms
  • API Reference
  • View page source

API Reference

This section documents the complete Python API for the spectrograms library.

  • Parameters
    • STFT Parameters
    • Spectrogram Parameters
    • Decibel Conversion
    • Frequency Scales
    • Audio Features
  • Convenience Functions
  • Audio Processing Functions
    • Linear Spectrograms
    • Mel Spectrograms
    • ERB Spectrograms
    • LogHz Spectrograms
    • Audio Features
    • Low-Level Audio Functions
  • Image Processing Functions
    • 2D FFT Operations
    • Frequency Shifting
    • Kernels
    • Convolution
    • Spatial Filtering
    • Feature Enhancement
  • Planner API
    • Creating Plans
    • Plan Classes
    • 2D FFT Planner
  • Results
    • Spectrogram
  • 2D FFT Functions
    • FFT and Inverse FFT
    • Spectral Analysis
    • Frequency Shifting
    • 2D FFT Planner
  • Image Processing Functions
    • Kernels
    • Convolution
    • Spatial Filtering
    • Feature Enhancement
  • Exceptions
    • SpectrogramError
    • InvalidInputError
    • DimensionMismatchError
    • FFTBackendError
    • InternalError
Previous Next

© Copyright 2026, Jack Geraghty.

Built with Sphinx using a theme provided by Read the Docs.