Skip to main content
Glama

nbrain-arabic-media-asr-qc — Arabic Clinical/Financial ASR Safety Scorer, UAX#9 RTL Subtitle Fixer & Broadcast WAV/MP4 QC + MCP Server

License: MIT Python 3.10+ MCP Registry

Engineered by Eng. Nadeem Mohamed Badr El-Din at NBrain (منظومة إن برين — nbra.in) for Arabic medical dictation, Whisper/ASR benchmarking, streaming subtitle localization, and broadcast media pipelines.

Modules

  1. Arabic & Clinical ASR Safety Evaluator (WER, CER + High-Risk Entity Error Rate HREER):Orthographic/diacritic-normalized Levenshtein alignment PLUS safety-critical entity verification for dosages/numbers, anatomical laterality (يمين/يسار, right/left), and clinical negation (لا يوجد/بدون/no)—catching lethal transcription flips that hide behind <5% WER!

  2. Streaming Arabic SRT Timed-Text Auditor & UAX#9 RTL BiDi Punctuation Fixer: Enforces <= 17.0 CPS, <= 42 CPL, duration bounds (833ms..7000ms), and injects U+200F (RLM) around trailing weak/neutral punctuation so . / ! / ? / % never jump to the wrong side of Arabic subtitle lines.

  3. Broadcast RIFF/WAV PCM Loudness & Peak Inspector + MP4/ISOBMFF moov Faststart Verifier: Pure-stdlib binary inspection of PCM sample peaks, clipping, DC offset, RMS loudness (dBFS/LUFS proxy), and MP4 progressive-streaming moov-before-mdat atom layout.

Related MCP server: MCP Arabic Toolkit

Quick Verification

PYTHONPATH=src python -m unittest discover -s tests -v

Available Tools

4 tools
audit_and_fix_arabic_srt_subtitlesCInspect

Audit Arabic SRT subtitles against broadcast CPS/CPL/duration standards and inject UAX#9 RLM markers to fix trailing RTL punctuation.

Inputs: srt_content (required), max_cpl, max_cps.

evaluate_arabic_clinical_asr_safetyBInspect

Compute normalized Arabic WER/CER and detect lethal clinical/financial ASR hallucinations (dosage numbers, right/left laterality, negation flips).

Inputs: reference (required), hypothesis (required).

inspect_mp4_isobmff_faststartBInspect

Verify top-level MP4/ISOBMFF box order (ftyp, moov before mdat) for progressive web streaming.

Inputs: mp4_base64 (required).

inspect_wav_pcm_broadcast_qcBInspect

Inspect base64-encoded 16-bit PCM WAV audio for sample peak dBFS, clipping, DC offset, and integrated LUFS approximation.

Inputs: wav_base64 (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct artifact and concern: WAV audio QC, Arabic ASR safety/WER evaluation, SRT subtitle auditing/fixing, and MP4/ISOBMFF streaming checks. There is no meaningful overlap in selection intent despite all being media QC operations.

    Naming Consistency4/5

    All names use snake_case and begin with an action verb, making the set predictable. The only minor deviation is the conjunction in audit_and_fix_arabic_srt_subtitles, which still reads clearly.

    Tool Count5/5

    Four tools is well-scoped for a media ASR QC server: each covers a separate QC layer (audio, ASR output, subtitles, container) and no tool feels redundant. The count stays within the ideal 3–15 range.

    Completeness4/5

    The surface covers the core QC domains for Arabic media/ASR workflows: audio integrity, ASR accuracy/safety, subtitle compliance, and MP4 streaming readiness. Minor gaps exist, such as only SRT subtitle handling and no broader video/audio sync validation, but agents can work around them.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server exposing Arabic text utilities: normalisation, tashkeel stripping, transliteration, heuristic dialect detection, and token counting.
      5
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP clients to use Arabic-centric AI for chat, cited Islamic Q&A, Qur'an and hadith quotation checks, deep research, Arabic-English translation, speech-to-text and text-to-speech, image generation, poetry, and safety moderation.
      12
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables transcription and subtitling of Tunisian Derja mixed with French and English, speech and voiceover generation, translation, and Arabizi–Arabic script conversion inside MCP clients. It also supports speaker diarization, subtitle translation, transcript search, and audio editing.
      16
      58 npm
      MIT