Check Arabic audio quality before shipping. Silence gaps, clipping, noise, sample rate — all caught.
14 checks across 5 categories. Quality score 0-100 per file. Zero dependencies — pure Python stdlib.
$pip install samt
Chapter I
The Problem
Arabic TTS is booming — but who checks the quality?
13+ models competing on the Arabic TTS Arena. Teams ship audio with silence gaps, clipping, low volume, background noise, and wrong sample rates. Everyone builds ad-hoc scripts to catch the same problems. samt runs 20 checks on any WAV file and gives you a single quality score. Offline. No API. Pure Python stdlib.
Chapter II
20 Checks
Five categories. Every audio problem caught.
Silence (4)
Leading silenceDead air at the start of the file
Trailing silenceDead air at the end of the file
Internal gapsLong silence gaps mid-utterance
Silence ratioToo much total silence relative to audio length
Quality (4)
ClippingSamples hitting max amplitude — distorted peaks
Bit depthUnusual bit depths (expects 16-bit or 24-bit PCM)
Arabic (2)
Duration rangeUtterances too short or too long for TTS
Timing densitySpeech-to-silence ratio outside normal Arabic patterns
Timing (2)
Click detectionPops and clicks from bad edits or recording artifacts
DC offsetWaveform not centered on zero
Chapter III
Quality Score
One number. 0 to 100. Weighted across all 20 checks.
Score
Rating
Meaning
90-100
Excellent
Ship it
75-89
Good
Minor issues, likely fine
50-74
Fair
Review before shipping
25-49
Poor
Significant quality problems
0-24
Bad
Do not ship
Demo
See It
Chapter IV
Commands
5 commands. Zero config.
check Run all 20 checks on a WAV file. Shows quality score and flagged issues.
scan Recursively scan a directory. Summary table with per-file scores.
info Display audio metadata — duration, sample rate, channels, bit depth.
compare Compare two audio files side by side. Highlights quality differences.
explain Show what each check does, thresholds, and scoring weights.
Chapter V
Zero Dependencies
Only Python stdlib. No librosa, no numpy, no scipy.
samt uses only wave and struct from the Python standard library. No heavy audio processing frameworks required. Install and run anywhere Python runs.
Chapter VI
Get Started
# Install$ pip install samt# Check a single file$ samt check recording.wavScore: 87/100 (Good) WARN Leading silence: 1.2s PASS No clipping detected# Scan a directory$ samt scan audio/# Compare two outputs$ samt compare tts1.wav tts2.wav# Learn about the checks$ samt explain