Skip to main content
Glama

klattsch-mcp šŸŽ¤

An MCP (Model Context Protocol) server that gives any AI model the ability to speak and sing using klattsch formant speech synthesis — a late-70s/early-80s style parallel-formant synthesizer.

Think retro robot voices, singing, dramatic narration, and more — all rendered as WAV audio.

What It Does

Your AI writes ARPAbet phoneme strings with voice control directives, and klattsch renders them to audio. The MCP server exposes 5 tools:

Tool

What it does

speak

Render phoneme string → base64 WAV audio

speak_file

Render phoneme string → WAV file on disk

text_to_phonemes

Convert English → approximate ARPAbet (500+ word dictionary)

voice_presets

Get copy-paste voice presets (male, female, robot, whisper, singing, etc.)

list_phonemes

List all 39 ARPAbet phonemes with descriptions

validate

Parse a string without rendering — check for errors

Related MCP server: MCP TTS Server

Quick Start

Prerequisites

  • Node.js ≄ 18

  • npm

Installation

git clone https://github.com/Endeavor-DoxiDoxi/klattsch-mcp.git
cd klattsch-mcp
npm install

Test It

# Test via CLI
npx klattsch "b120 HH AH L OW . W ER L D" hello.wav

# Start the MCP server
node src/index.js

Connecting to Your AI

Claude Desktop

Add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "klattsch": {
      "command": "node",
      "args": ["/absolute/path/to/klattsch-mcp/src/index.js"]
    }
  }
}

Then restart Claude Desktop. The AI can now call speak, text_to_phonemes, etc.

Claude Code (CLI)

claude mcp add klattsch -- node /absolute/path/to/klattsch-mcp/src/index.js

Cursor

Add to Cursor's MCP settings (Settings → MCP → Add MCP Server):

{
  "mcpServers": {
    "klattsch": {
      "command": "node",
      "args": ["/absolute/path/to/klattsch-mcp/src/index.js"]
    }
  }
}

OpenClaw

Add to your OpenClaw gateway config:

mcp:
  servers:
    klattsch:
      command: node
      args:
        - /absolute/path/to/klattsch-mcp/src/index.js

Any MCP-Compatible Client

This is a standard stdio MCP server. Any client that supports the Model Context Protocol can use it. Just point it at node src/index.js.

What the AI Can Do

Once connected, tell your AI things like:

  • "Say hello world in a deep male voice"

  • "Sing twinkle twinkle little star"

  • "Do a dramatic movie trailer voice about my toaster"

  • "Read this text in a robot voice"

  • "Whisper me a secret"

The AI will use the text_to_phonemes tool to convert your text, tweak it, and render audio with speak or speak_file.

Voice Presets

The voice_presets tool provides ready-to-use voice configurations:

Preset

Style

male_natural

Default male, natural pacing

male_deep

Deep, authoritative, warm

male_bright

Clear, energetic

female_natural

Default female

female_warm

Warm, friendly

female_bright

Bright, cheery

child

Higher pitch, small vocal tract

robot

Flat, mechanical, no vibrato

whisper

Breathy whisper

dramatic

Slow, theatrical, heavy vibrato

old_man

Older, creaky, darker tone

singing_male

For sung notes (use bNoteName per syllable)

singing_female

For sung notes, female range

Example: Full Workflow

User: "Make me a robot that says 'I am a large language model trapped in a Raspberry Pi'"

AI uses text_to_phonemes:

b120 r100 s1.0 v2 AY . AE M . AH . L AA R JH . L AE NG G W AH JH . M AH D AH L . T R AE P T . IH N S AY D . AH . R AE Z B EH R IY . P AY

AI then tweaks for robot voice and calls speak:

b120 r85 s1.0 v0 h0 g0.8 t0.4 AY . AE M . AH . L AA R JH . L AE NG G W AH JH . M AH D AH L ...

→ Returns WAV audio! šŸŽ‰

šŸŽµ Demo

ā–¶ļø Click to play demo — a sung "no" generated entirely from a phoneme string.

The phoneme string that made this:

b100 s1.0 v5 t-0.2 g0.6 bG3 r280 N OW bC4 r300 N OW bE4 r400 N OW(+10) ,
bG4 r350 N OW , bE4 r300 N OW(-15) , b90 r220 N OW(-30) .

Try it yourself — paste that into the speak tool!

How It Works

klattsch uses Klatt-style parallel formant synthesis:

  • Voiced sounds: Rosenberg glottal pulse → 3 parallel bandpass filters (F1, F2, F3)

  • Unvoiced sounds: Noise → same filters

  • Controls: Pitch, rate, formant scale, vibrato, aspiration, spectral tilt, vocal effort

Credits

License

MIT

Available Tools

6 tools
list_phonemesA

List all 39 ARPAbet phoneme codes supported by klattsch, with example words and voice tips.

Inputs: no named parameters.

speakA

Synthesize speech from a klattsch phoneme string. Returns base64 WAV audio.

What This Is

klattsch is a formant speech synthesizer (late-70s/early-80s style — think Votrax, SAM). You give it a string of ARPAbet phoneme codes with optional voice control directives, and it renders a WAV audio file.

How To Use This Tool

Step 1: Build a phoneme string

Write ARPAbet phonemes separated by spaces, with control directives mixed in. Use the text_to_phonemes tool first to convert English text, then refine by hand.

Step 2 (optional): Set voice character

Prefix your utterance with control directives to set the voice:

  • bN: base pitch in Hz (b120 = default male, b200 = female, b280 = child)

  • rN: per-phoneme duration in ms (r80 = fast, r110 = normal, r250+ = sung)

  • sN: formant scale (1.0 = male, 1.17 = female, 1.3 = child)

  • vN: vibrato depth in Hz (v3-v6 = expressive, v0 = off)

  • hN: breathiness 0..1 (h0.3 = airy/whispery)

  • gN: vocal effort 0=lax..1=tense (default 0.5)

  • tN: spectral tilt -0.9=darker..+0.9=brighter (t-0.4 = warm, t0.3 = bright)

Step 3: Add prosody (intonation)

  • ! after a vowel for stress: DH AE! T = "THAT" with emphasis

  • +N/-N on vowels for pitch changes: AY+20 = rising "I", D AH N(-30) = falling "done"

  • (+N)/(-N) for transient ornaments (don't carry forward)

  • , ; . for pauses: 100ms, 200ms, 300ms

Step 4: Render

Pass the complete string to this tool.

Quick-Reference Voice Presets

Preset

Directives

Description

Male natural

b120 r100 s1.0 v2

Default voice

Male deep

b90 r95 s0.92 v1 t-0.3 g0.6

Deep, authoritative

Male bright

b130 r105 s1.0 v2 t0.2

Clear, energetic

Female natural

b200 r100 s1.17 v2

Natural female

Female warm

b185 r105 s1.15 v3 t-0.2

Warm, friendly

Female bright

b220 r100 s1.18 v2 t0.2

Bright, cheery

Child

b280 r90 s1.3 v1

Young, higher pitch

Robot

b120 r90 s1.0 v0 h0 g0.8 t0.5

Flat, mechanical

Whisper

b120 r100 s1.0 v0 h0.6 g0.1

Breathy whisper

Dramatic

b100 r130 s1.0 v5

Slow, theatrical

Singing male

bC4 r300 s1.0 v5

For sung notes

Singing female

bG4 r300 s1.17 v4

For sung notes

Intonation Patterns That Sound Natural

Falling statement (period): last vowel gets -20 to -30 e.g. D AH N(-25) Rising question: last vowel gets +20 to +30 e.g. R EH D IY(+25) Listing items: each item rises, last falls e.g. AE(+15) P AH L Z(+15) AO R AH N JH(-20) Excited: higher base pitch, faster b140 r85 ... Serious/deep: lower base pitch, slower b95 r115 ... Sarcastic: exaggerated pitch swings AY+30 M . S OW(-30) . S AH R K AE S T IH K

Singing With Note Names

Instead of Hz for b, use note names: bC4, bD#4, bEb4, bF4, bG4, bA4, bB4 Middle C = C4 (261Hz), A4 = 440Hz Set r250-r400 per phoneme, group notes with parentheses: bC4 r300 ( HH AH ) ( L OW ) bE4 ( W ER L D )

Example Strings

  1. "Hello world" (male): b120 r100 s1.0 HH AH L OW . W ER L D

  2. "How are you?" (female, rising): b200 s1.17 HH AW . AA R . Y UW(+25)

  3. "I am NOT impressed" (stress on NOT): b120 AY . AE M . N AO T! . IH M P R EH S T(-20)

  4. "The quick brown fox" (energetic): b135 r90 t0.2 DH AH . K W IH K . B R AW N . F AA K S

  5. Sing "Twinkle twinkle" (two notes): bC4 r300 ( T W IH NG ) ( K AH L ) bG4 r300 ( T W IH NG ) ( K AH L )

  6. Dramatic movie trailer voice: b95 r140 s0.95 v4 t-0.3 g0.7 IH N . AH . W ER L D(-25) .

  7. Robot announcement: b130 r85 s1.0 v0 h0 g0.8 t0.4 AH T EH N SH AH N . P L IY Z

  8. Whispered secret: b110 r105 v0 h0.5 g0.1 s1.0 P S T . D OW N T . T EH L . EH N IY W AH N

Phoneme Categories (all 39 phonemes)

Vowels: IY IH EH AE AA AO AH UH UW ER AY AW EY OW OY Sonorants: W Y R L M N NG Fricatives: F TH S SH V DH Z ZH HH Stops: P B T D K G (these get automatic burst + silence) Affricates: CH JH

āš ļø P, B, T, D, K, G, CH, JH are stop consonants — they include an automatic silence-burst pattern. Don't add extra pauses after them.

Inputs: utterance (required), sampleRate.

speak_fileA

Like speak, but writes the WAV directly to a file on disk and returns the path. Use this when you need to attach or share the audio file.

Returns: { filePath, byteLength, durationMs, warnings }

Inputs: utterance (required), filePath (required), sampleRate.

text_to_phonemesA

Convert English text to an approximate klattsch phoneme string. This does a dictionary lookup word-by-word. Unknown words are spelled out letter-by-letter (which sounds robotic — hand-craft those for best results).

Returns a full phoneme string ready for speak/speak_file. You can (and should) edit the output before passing to speak — add stress marks (!), pitch contours (+N/-N), adjust pauses, or fix mispronounced words.

The output includes control prefixes based on your voice selections.

Inputs: text (required), pitch, rate, formantScale, +1 more.

validateA

Parse a klattsch phoneme string without rendering audio. Returns schedule info, duration, and warnings.

Inputs: utterance (required).

voice_presetsA

Get copy-paste ready voice presets. Returns preset name → directive string. Use these as prefixes before your phoneme strings.

Inputs: preset.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: listing phonemes, converting text, speaking, speaking to file, validating, and retrieving presets. No overlaps.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern with underscores, but 'voice_presets' is a noun phrase rather than a verb, causing a slight inconsistency.

    Tool Count5/5

    Six tools is well-scoped for a speech synthesizer, covering all essential actions without being too many or too few.

    Completeness5/5

    The tool set covers the full workflow: creating phoneme strings (text_to_phonemes), validating them, rendering audio in two formats, referencing phonemes, and accessing presets.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers