Skip to main content
Glama

tts-audio-mcp

MCP server that analyzes TTS audio recordings — enabling Claude Code, OpenCode, and Qwen Code to debug voice call center audio the same way they debug code errors.

Feed it an audio file, get back a structured report with transcription, quality scores, pacing analysis, and mispronunciation detection.

What It Does

Audio File (.wav/.mp3/.m4a)
       |
       v
+-------------------------------+
|     tts-audio-mcp server      |
|                               |
|  transcribe   -> whisper.cpp  |
|  quality_score -> librosa     |
|  compare_tts  -> whisper+diff |
|  analyze_tts  -> all combined |
|                               |
|  Transport: stdio (MCP)       |
+-------------------------------+
       |
       v
  Structured report -> LLM reasons about fixes

Related MCP server: Augent

Tools

transcribe

Transcribe audio to text with word-level timestamps.

Input: audio_path (string), language (string, default: "en")

Output: Full transcription text, per-word timestamps (start_ms, end_ms), segments, detected language, duration.

quality_score

Analyze speech quality — pitch variation, energy dynamics, silence ratio.

Input: audio_path (string)

Output:

  • Pitch: mean/std/range Hz, monotone risk flag, interpretation

  • Energy: RMS level, dynamic range dB, interpretation

  • Silence ratio: percentage of audio that is silent

  • Overall assessment with list of detected issues

compare_tts

Compare TTS output against expected text to find mispronunciations.

Input: audio_path (string), expected_text (string), language (string, default: "en")

Output: Word Error Rate (WER), substitutions, insertions, deletions with positions.

analyze_tts

Full composite analysis — runs all of the above and returns a single structured report.

Input: audio_path (string), expected_text (string, optional), language (string, default: "en")

Output: Combined report with transcription, quality scores, pacing analysis (WPM, rushed words, long pauses), and pronunciation diff.

Example Output

TTS Analysis Report
File: /tmp/tts-test-speech.wav
Duration: 4.15s | Words: 13 | Rate: 195 WPM

--- Transcription ---
Hello. Thank you for calling Acme Support. How can I help you today?

--- Quality Scores ---
Pitch: mean 258.5Hz, std 61.1Hz, range 264.3Hz
  Good variation — expressive
Energy: RMS 0.0912, dynamic range 80dB
  Wide dynamic range
Silence ratio: 37.3%
Overall: Minor issues detected (1)
  ! Very wide dynamic range — may clip

--- Pacing Analysis ---
Speaking rate: 195 WPM (natural: 120-180)
Minor pacing issues
Rushed words:
  "How" spoken in 40ms
  ! Speaking rate too fast: 195 WPM (natural: 120-180)
  ! 1 rushed word(s) detected (<80ms)

--- Pronunciation Check ---
Expected: Hello. Thank you for calling Acme Support. How can I help you today?
Got:      Hello. Thank you for calling Acme Support. How can I help you today?
WER: 0.0%
Perfect match — no mispronunciations detected

--- Issues Summary ---
1. Very wide dynamic range — may clip
2. Speaking rate too fast: 195 WPM (natural: 120-180)
3. 1 rushed word(s) detected (<80ms)

Prerequisites

  • whisper.cpp with Metal acceleration: brew install whisper-cpp

  • Whisper model: ggml-large-v3-turbo.bin (~1.5 GB) in models/

  • Python 3.12 with librosa: .venv/bin/python3 with pip install librosa

  • ffmpeg for audio format conversion: brew install ffmpeg

  • Node.js 18+

Installation

git clone https://github.com/reactiongears/tts-audio-mcp.git
cd tts-audio-mcp

# Node dependencies
npm install

# Python venv for audio analysis
python3.12 -m venv .venv
.venv/bin/pip install librosa 'setuptools<82'

# Download whisper model
mkdir -p models
curl -L -o models/ggml-large-v3-turbo.bin \
  https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin

# Build
npm run build

Integration

Claude Code

Add to ~/.claude/.mcp.json:

{
  "mcpServers": {
    "tts-audio": {
      "command": "node",
      "args": ["/path/to/tts-audio-mcp/dist/index.js"]
    }
  }
}

OpenCode

Add to ~/.config/opencode/opencode.json under "mcp":

"tts-audio": {
  "type": "local",
  "command": ["node", "/path/to/tts-audio-mcp/dist/index.js"],
  "enabled": true
}

Qwen Code

Add to ~/.qwen/settings.json under "mcpServers":

"tts-audio": {
  "command": "node",
  "args": ["/path/to/tts-audio-mcp/dist/index.js"]
}

Environment Variables

Variable

Default

Description

WHISPER_BINARY

whisper-cli

Path to whisper.cpp binary

WHISPER_MODEL_PATH

~/Documents/_dev/tts-audio-mcp/models/ggml-large-v3-turbo.bin

Path to Whisper model file

TTS_PYTHON_BIN

.venv/bin/python3

Python binary with librosa installed

Usage

Once the MCP server is configured in your coding assistant, the tools are available automatically. You talk to your assistant in natural language — it decides when to call the tools and interprets the results for you.

Quick Start

Generate a test audio file to try it out:

# macOS — use the built-in TTS engine
say -o /tmp/test-greeting.wav --data-format=LEI16@16000 \
  "Hello. Thank you for calling Acme Support. How can I help you today?"

Then in Claude Code, OpenCode, or Qwen Code:

> Analyze the audio at /tmp/test-greeting.wav

The assistant calls analyze_tts behind the scenes and returns a full report with transcription, quality scores, pacing, and issues.

Debugging TTS Problems

"It sounds robotic" — Check pitch variation and monotone risk:

> Run quality_score on /recordings/agent-greeting.wav — customers say it sounds robotic

The report shows pitch std < 20 Hz = monotone risk. You know to increase prosody variation in your TTS config.

"Words are getting swallowed" — Compare against expected script:

> Compare /recordings/transfer-prompt.wav against the expected text:
> "Thank you for your patience. I'll transfer you to a specialist now."

The tool transcribes the audio, diffs it against your script, and reports substitutions ("specialist" → "specialist's"), deletions, and WER. You know exactly which words the TTS is mangling.

"It's talking too fast / has weird pauses" — Check pacing:

> Analyze /recordings/ivr-menu.wav — callers are complaining it's too fast

The report flags speaking rate (natural range: 120-180 WPM), individual rushed words (< 80ms), and unnatural pauses (> 500ms). You know where to add SSML breaks or adjust rate.

"Something is off but I'm not sure what" — Full analysis:

> Run a full analysis on /recordings/hold-message.wav
> The expected text is: "Your call is important to us. Please hold and an agent will be with you shortly."

Returns everything: transcription, quality metrics, pacing analysis, pronunciation diff, and a prioritized issues summary.

Batch Debugging

You can analyze multiple recordings in a conversation:

> Compare these three recordings against their scripts and tell me which one has the most issues:
> 1. /recordings/greeting.wav — "Welcome to Acme Support"
> 2. /recordings/hold.wav — "Please hold while I look that up"
> 3. /recordings/goodbye.wav — "Thank you for calling. Have a great day!"

The assistant calls compare_tts for each file and summarizes which recordings need attention.

Using Individual Tools

You can also ask for specific analysis:

What you want

What to ask

Just the transcription

"Transcribe /path/to/audio.wav"

Just quality metrics

"Check the audio quality of /path/to/audio.wav"

Just pronunciation accuracy

"Compare /path/to/audio.wav against 'expected text here'"

Everything at once

"Full TTS analysis on /path/to/audio.wav"

Supported Audio Formats

  • .wav — processed directly (best performance)

  • .mp3 — auto-converted to WAV via ffmpeg

  • .m4a — auto-converted to WAV via ffmpeg

Interpreting Results

Quality Scores:

Metric

Good

Concerning

Pitch std

25-80 Hz (natural variation)

< 15 Hz (monotone/robotic)

Dynamic range

10-50 dB

< 10 dB (flat) or > 70 dB (may clip)

Silence ratio

10-50%

> 50% (too much dead air) or < 10% (no breathing room)

Pacing:

Metric

Natural range

Flag

Speaking rate

120-180 WPM

Outside range

Word duration

> 80ms

< 80ms = rushed

Inter-word gap

< 500ms

> 500ms = unnatural pause

Pronunciation (WER):

WER

Interpretation

0%

Perfect match

1-5%

Minor issues (articles, contractions)

5-15%

Noticeable mispronunciations

> 15%

Significant problems

Real-World Workflow

A typical voice call center debugging session:

  1. Customer reports: "The bot sounds weird when it says the account number"

  2. You pull the call recording: /recordings/call-1234-segment.wav

  3. You know the expected script: "Your account number is 7 8 4 2 0 1 3"

  4. In Claude Code:

    > Compare /recordings/call-1234-segment.wav against "Your account number is 7 8 4 2 0 1 3"
    > What's wrong and how should I fix the TTS config?
  5. Claude calls compare_tts, sees the TTS is running digits together ("seven eight four" → "seventy-eight four"), and suggests adding SSML <say-as interpret-as="digits"> tags or inter-digit pauses to your TTS configuration

The LLM doesn't just report the numbers — it reasons about the root cause and suggests specific fixes to your TTS code or configuration.

License

MIT

Available Tools

4 tools
analyze_ttsA

Full TTS audio analysis — transcription, quality scores, pacing analysis, and optional mispronunciation detection. Returns a comprehensive report for debugging TTS issues.

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage code (default: en)en
audio_pathYesPath to the TTS audio file
expected_textNoOptional: the text that was supposed to be spoken (enables mispronunciation detection)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must shoulder the burden of behavioral disclosure. It states that the tool returns a comprehensive report and that mispronunciation detection is optional, but does not mention potential side effects, performance implications, or any constraints. The read-only nature is implied but not explicitly stated, and no error/edge-case behavior is disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, front-loaded with the key phrase 'Full TTS audio analysis,' and efficiently enumerates capabilities without fluff. It is a single well-structured sentence that conveys all essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema and no annotations, the description provides a reasonable overview of what the tool returns ('comprehensive report') and the optional input that triggers extra functionality. It lacks details on report structure, error handling, or prerequisites (e.g., dependencies), but given the simple parameter set and the presence of sibling tools for narrow tasks, it is sufficiently complete for initial selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with clear descriptions for each parameter (audio_path, language, expected_text). The description adds no extra parameter information beyond what the schema already offers, such as the relationship between expected_text and mispronunciation detection, which is already in the schema. Thus, the description does not add value beyond the schema, warranting the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Full TTS audio analysis — transcription, quality scores, pacing analysis, and optional mispronunciation detection.' It enumerates specific output components and a use case ('for debugging TTS issues'), distinguishing itself from sibling tools like transcribe and quality_score by combining multiple analyses into one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a usage context ('for debugging TTS issues') but does not explicitly contrast this tool with its siblings. It provides clear context for when to choose this comprehensive analysis over individual tools, but lacks explicit 'when not to use' or alternative recommendations, preventing a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

compare_ttsA

Compare TTS audio output against expected text — identifies mispronunciations, inserted/deleted words, and Word Error Rate (WER)

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage code (default: en)en
audio_pathYesPath to the TTS audio file
expected_textYesThe text that was supposed to be spoken

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the analytical outputs (mispronunciations, inserted/deleted words, WER), giving insight into what the tool returns. It does not explicitly state whether the tool is read-only or mention side effects, but the comparison nature implies non-destructive use.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the action and then lists the key outputs. There is no unnecessary information or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, with all parameters documented in the schema and no output schema present. The description explains what the tool identifies but does not specify the return format or potential limitations. However, given the straightforward purpose and the listed output types, it provides sufficient context for an agent to decide when to invoke it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully describes all three parameters (audio_path, expected_text, language) with 100% coverage. The description adds no additional parameter semantics beyond what the schema already provides, so it stays at the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: comparing TTS audio output against expected text, and specifies the exact outputs (mispronunciations, inserted/deleted words, WER). This distinguishes it from sibling tools like `transcribe` (which does not compare) and `quality_score` (which does not use expected text).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when you have a TTS audio file and the expected text to compare, providing clear context. It does not explicitly mention alternatives or say when not to use it, but the purpose is distinct enough to guide tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

quality_scoreA

Analyze speech quality metrics of an audio file — pitch variation, energy, pacing, silence ratio. Detects robotic tone, monotone speech, and audio issues.

ParametersJSON Schema
NameRequiredDescriptionDefault
audio_pathYesPath to the audio file (.wav, .mp3, .m4a)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full transparency burden. It details what metrics are analyzed and what issues are detected, but it does not disclose the output format (e.g., scores, thresholds, reports) or any behavioral constraints (e.g., supported audio duration, processing side effects). This lacks key information for an agent to anticipate the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose followed by concrete details. Every word adds value, with no redundancy or filler. It is highly efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has moderate complexity, no output schema, and no annotations. The description explains what it does and what it detects, but it omits the return format and any usage limitations. Compared to sibling tools, it lacks differentiation cues and could benefit from explicitly stating output criteria. Overall sufficient but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers 100% of the single parameter (audio_path) with a description of the path and accepted file types. The tool description adds context that the audio is analyzed for speech quality, but no additional semantics beyond the schema. Baseline of 3 applies since schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes speech quality metrics of an audio file, listing concrete metrics (pitch variation, energy, pacing, silence ratio) and outcomes (detects robotic tone, monotone speech, audio issues). It uses a specific verb and resource, distinguishing it from sibling tools like transcribe (speech-to-text) and compare_tts (comparison).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: if you need to evaluate speech quality, this tool is appropriate. However, it does not explicitly state when to use it versus alternatives like analyze_tts or compare_tts, nor does it mention any exclusions or prerequisites. Guidance is implied but not explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

transcribeA

Transcribe an audio file to text with word-level timestamps using Whisper

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoLanguage code (default: en)en
audio_pathYesPath to the audio file (.wav, .mp3, .m4a)

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosure. It does state the output type ('text with word-level timestamps') and the engine ('Whisper'), but it fails to mention side effects, permissions, network requirements, or whether the tool is read-only. For a tool that processes files, this lack of safety/behavioral detail is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no unnecessary words. It efficiently conveys the action, output details, and underlying model, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no output schema), the description covers the core purpose and output. However, it does not specify the exact return format (e.g., whether it returns a plain text string with timestamps or a structured object), and with no output schema, this ambiguity could confuse an agent. It is not fully complete for invocation but is adequate for a basic tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both 'audio_path' and 'language' described in the schema. The description adds no additional parameter meaning, so the baseline score of 3 applies. It neither enhances nor detracts from the schema's clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's verb and resource: 'Transcribe an audio file to text with word-level timestamps using Whisper'. It is specific about the output (text with word-level timestamps) and the method (Whisper), distinguishing it from sibling tools like quality_score and compare_tts which focus on evaluation and comparison, not transcription.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: when you need to convert an audio file to text, use this tool. However, it does not explicitly state when to use it vs. alternatives, nor any exclusions or prerequisites. No mention of sibling tools or scenarios is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv0.1.0
    • First observedanalyze_tts
    • First observedcompare_tts
    • First observedquality_score
    • First observedtranscribe

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: transcribe focuses solely on speech-to-text, quality_score on speech metrics, compare_tts on TTS-to-text alignment, and analyze_tts explicitly as a comprehensive bundle. The descriptions make the boundaries clear despite analyze_tts overlapping with the others.

Naming Consistency4/5

Tool names mostly follow snake_case verb-noun pattern (transcribe, compare_tts, analyze_tts), but quality_score deviates by using a noun-noun form rather than a verb. Overall still readable and predictable, with only minor inconsistency.

Tool Count5/5

Four tools is a well-scoped count for an audio analysis server. Each tool earns its place, offering both specialized operations and a comprehensive aggregate, without unnecessary bloat.

Completeness5/5

The domain of TTS audio analysis is fully covered: transcription, quality scoring, comparison against expected text, and a full-analysis option. There are no obvious gaps for a debugging workflow, as analyze_tts bundles all core features.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server that converts videos, audio, and meeting recordings into structured transcripts and summaries with multi-backend ASR and automatic fallback.
    MIT