Validate WebSocket and HTTP stream health for WaveCap-SDR channels. Use when debugging streaming issues, measuring latency or throughput, detecting packet loss, or verifying audio/spectrum delivery.
This skill helps validate WebSocket and HTTP streaming performance, measure metrics, and diagnose streaming issues.
Use this skill when:
Audio Streams:
GET /api/v1/stream/channels/{chan_id}.pcm?format=pcm16ws://server/api/v1/stream/channels/{chan_id}Spectrum Streams:
ws://server/api/v1/stream/captures/{capture_id}/spectrumIQ Streams:
ws://server/api/v1/stream/captures/{capture_id}.iqBefore validating streams, check server health:
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/stream-validator/validate_stream.py \
--health-check \
--port 8087
This shows:
Determine the stream endpoint:
# List captures
curl http://127.0.0.1:8087/api/v1/captures | jq
# List channels for a capture
curl http://127.0.0.1:8087/api/v1/captures/{capture_id} | jq '.channels'
Validate HTTP audio stream:
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/stream-validator/validate_stream.py \
--type audio \
--channel ch1 \
--duration 10 \
--port 8087
Validate WebSocket audio stream:
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/stream-validator/validate_stream.py \
--type audio_ws \
--channel ch1 \
--duration 10 \
--port 8087
Validate spectrum stream:
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/stream-validator/validate_stream.py \
--type spectrum \
--capture cap_abc123 \
--duration 10 \
--port 8087
Full validation with verbose audio analysis:
PYTHONPATH=backend backend/.venv/bin/python .claude/skills/stream-validator/validate_stream.py \
--type audio \
--channel ch1 \
--duration 10 \
--verbose \
--health-check \
--port 8087
| Parameter | Description | Default |
|---|---|---|
--type |
Stream type (audio, audio_ws, spectrum, iq) | audio |
--channel |
Channel ID for audio streams | ch1 |
--capture |
Capture ID for spectrum/IQ streams | (required for spectrum) |
--duration |
Seconds to monitor | 10 |
--host |
Server host | 127.0.0.1 |
--port |
Server port | 8087 |
--report |
Output JSON report | false |
--health-check |
Check server health first | false |
--verbose |
Include audio quality analysis | false |
The validator outputs:
Connection Metrics:
Data Metrics:
Quality Metrics:
Health Status:
============================================================
STREAM VALIDATION RESULTS: AUDIO
============================================================
Status: ✓ HEALTHY
Connection:
Connect time: 12.3 ms
Duration: 10.02s
Throughput:
Bytes received: 960,384
Throughput: 93.75 KB/s
Expected: 93.75 KB/s
Ratio: 100.0%
Audio Analysis:
RMS level: -18.5 dB
Peak level: -3.2 dB
============================================================
Expected throughput:
Solutions:
Expected latency:
Solutions:
Symptoms:
Solutions:
Symptoms:
Solutions:
Symptoms:
Solutions:
Use --report to get machine-readable output:
{
"type": "audio",
"channel": "ch1",
"url": "http://127.0.0.1:8087/api/v1/stream/channels/ch1.pcm?format=pcm16",
"success": true,
"status": "HEALTHY",
"connect_time_ms": 12.3,
"duration_seconds": 10.02,
"bytes_received": 960384,
"throughput_kbps": 93.75,
"expected_throughput_kbps": 93.75,
"samples_received": 480192,
"throughput_ratio": 1.0,
"audio_analysis": {
"rms_db": -18.5,
"peak_db": -3.2,
"is_silent": false,
"is_clipping": false
}
}
SKILL.md: This file - instructionsvalidate_stream.py: Stream validation and metrics scriptThe validator requires:
requests - HTTP streaming (included in WaveCap-SDR deps)websockets - WebSocket streaming (included in WaveCap-SDR deps)numpy - Audio analysis (included in WaveCap-SDR deps)