Energy calculator

From UCSB-NLP-Chang/Skill-Usage · View interactive version

Energy calculator is an AI agent skill from the GitHub repository UCSB-NLP-Chang/Skill-Usage. Calculate per-second RMS energy from audio files. Use when you need to analyze audio volume patterns, prepare data for silence/pause detection, or create an energy profile for audio analysis tasks.

How to use this skill

Skill file

Energy Calculator

Calculates per-second RMS (Root Mean Square) energy from audio files. Produces an energy profile that can be used for opening detection, pause detection, or other audio analysis tasks.

Use Cases

Usage

python3 /root/.claude/skills/energy-calculator/scripts/calc_energy.py \
    --audio /path/to/audio.wav \
    --output /path/to/energies.json

Parameters

Output Format

{
  "sample_rate": 16000,
  "window_seconds": 1,
  "total_seconds": 600,
  "energies": [123.5, 456.7, 234.2, ...],
  "stats": {
    "min": 45.2,
    "max": 892.3,
    "mean": 234.5,
    "std": 156.7
  }
}

How It Works

  1. Load audio file
  2. Split into 1-second windows
  3. Calculate RMS energy for each window: sqrt(mean(samples^2))
  4. Output array of energy values

Dependencies

Example

# Calculate energy from extracted audio
python3 /root/.claude/skills/energy-calculator/scripts/calc_energy.py \
    --audio audio.wav \
    --output energies.json

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.