Skip to content
audio-quality-checker logo

Audio Quality Checker for WaveCap-SDR

audio-quality-checker

Analyze the WaveCap-SDR audio stream to assess tuning quality, detect silence, noise, proper audio, or distortion. Use when checking if SDR channels are properly configured or debugging audio issues.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Audio Quality Checker for WaveCap-SDR

This skill helps analyze the audio stream from WaveCap-SDR channels to determine if they are properly tuned and producing usable audio.

When to Use This Skill

Use this skill when:

  • User asks to check if an SDR channel is "well tuned" or working properly
  • User wants to verify audio quality or detect issues
  • User asks if they're getting "real sound" vs "just noise" vs "nothing"
  • Debugging why audio playback isn't working as expected
  • Validating SDR configuration changes

How It Works

The skill captures a sample of the audio stream and analyzes it to detect:

  1. Silence - No signal, near-zero amplitude (broken/​stopped channel)
  2. Noise - Random signal with no structure (poor tuning, no carrier)
  3. Proper Audio - Structured signal with meaningful content (well-tuned FM station)
  4. Clipping/​Distortion - Signal hitting limits (gain too high, overmodulation)

Usage Instructions

Step 1: Identify the Server and Channel

First, determine:

  • Server port (default: 8087, check backend/​config/​wavecapsdr.yaml or environment variables)
  • Channel ID to test (e.g., "ch1", "ch2", etc.)
  • Server bind address (default: 127.0.0.1)

You can find active channels by checking:

curl http://127.0.0.1:8087/​api/​v1/​captures | jq '.[] | .channels'

Step 2: Capture Audio Sample

Use the provided analyze_audio_stream.py script to capture and analyze:

PYTHONPATH=backend backend/​.venv/​bin/​python .claude/​skills/​audio-quality-checker/​analyze_audio_stream.py \
  --port 8087 \
  --channel ch1 \
  --duration 3

Parameters:

  • --port: Server port (default: 8087)
  • --channel: Channel ID to test (default: ch1)
  • --duration: Seconds of audio to capture (default: 3)
  • --host: Server host (default: 127.0.0.1)
  • --format: Audio format, pcm16 or f32 (default: pcm16)

Step 3: Interpret Results

The script outputs a detailed analysis including:

Signal Level Metrics:

  • RMS Level (dB): Overall signal strength (-inf = silence, -20 to 0 dB = good)
  • Peak Level (dB): Maximum amplitude (near 0 dB may indicate clipping)
  • Crest Factor: Peak-to-RMS ratio (high = dynamic, low = compressed/​noise)

Spectral Analysis:

  • Spectral Flatness: How "flat" the spectrum is (high = noise-like, low = tonal)
  • Spectral Centroid: "Center of mass" of the spectrum in Hz
  • Zero Crossing Rate: How often signal crosses zero (higher for noise/​high-freq content)

Signal Classification: The script will classify the signal as:

  • SILENCE: RMS < -60 dB
  • NOISE: High spectral flatness (> 0.7) and low RMS
  • CLIPPED: Peak level > -0.5 dB
  • GOOD AUDIO: Structured signal with moderate levels

Step 4: Recommendations

Based on the results:

If SILENCE detected:

  • Check if channel is started: curl -X POST http://127.0.0.1:8087/​api/​v1/​channels/​{chan_id}/​start
  • Verify capture is running
  • Check SDR device connection

If NOISE detected:

  • Adjust channel frequency (offset_hz) - may not be tuned to a station
  • Check antenna connection
  • Try different frequencies known to have active broadcasts
  • Verify modulation mode matches the signal (wbfm, nbfm, am, ssb, p25, dmr supported)

If CLIPPED detected:

  • Reduce SDR gain settings
  • Check for overmodulation from the broadcaster
  • Adjust RF gain in device configuration

If GOOD AUDIO:

  • Channel is properly tuned and working correctly
  • Can fine-tune squelch_db if needed to reduce noise during silent periods

Example Workflow

# 1. Check what channels exist
curl http://127.0.0.1:8087/​api/​v1/​captures | jq

# 2. Start a channel if needed
curl -X POST http://127.0.0.1:8087/​api/​v1/​channels/​ch1/​start

# 3. Analyze the audio quality
PYTHONPATH=backend backend/​.venv/​bin/​python .claude/​skills/​audio-quality-checker/​analyze_audio_stream.py \
  --channel ch1 --duration 3

# 4. If noise detected, try adjusting frequency
# (Update channel configuration and restart)

Technical Details

Audio Stream Format:

  • Endpoint: GET /​api/​v1/​stream/​channels/​{chan_id}.pcm?format=pcm16
  • Sample Rate: 48000 Hz (default, configurable)
  • Channels: Mono (1 channel)
  • Format: 16-bit signed little-endian PCM
  • Streaming: Continuous, no headers

Analysis Metrics:

  1. RMS Level: 20 * log10(sqrt(mean(signal^2)))

    • Measures average signal power
    • Typical good audio: -20 to -6 dB
  2. Spectral Flatness: Geometric mean / Arithmetic mean of power spectrum

    • Near 1.0 = white noise (flat spectrum)
    • Near 0.0 = tonal (structured frequencies)
  3. Zero Crossing Rate: Count of sign changes / total samples

    • High ZCR = noisy or high-frequency content
    • Low ZCR = low-frequency or tonal content
  4. Crest Factor: Peak / RMS

    • High (>4) = dynamic audio (speech, music)
    • Low (<3) = compressed or noise-like

Files in This Skill

  • SKILL.md: This file - instructions for using the skill
  • analyze_audio_stream.py: Python script to capture and analyze audio
  • requirements.txt: Python dependencies (numpy, scipy, requests)

Notes

  • The skill uses the Python environment at backend/​.venv
  • Ensure the WaveCap-SDR server is running before analysis
  • For best results, capture at least 2-3 seconds of audio
  • The analysis is statistical and works best with steady signals
  • Some transient issues may not be detected in short samples

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View