Phonetik
phonetik
A Rust library and HTTP server for English phonetic analysis. Rhyme detection, stress scanning, meter identification, and syllable counting — backed by the full CMU Pronouncing Dictionary compiled directly into the binary.
No files to download. No API keys. No runtime dependencies. Phonetik::new() and go.
What it does
Rhyme finding — perfect, slant, and near rhymes with confidence scores
Stress analysis — extract stress patterns from any English text
Meter detection — identify iambic pentameter, trochaic tetrameter, etc.
Phoneme lookup — ARPAbet transcriptions for 126K words
Syllable counting — per-word and batch
Rhyme map — detect phoneme repetition patterns across lines of verse
Word comparison — phonetic similarity scoring between any two words
Related MCP server: MCP Character Tools
Install
[dependencies]
phonetik = "0.3"Or install the binaries:
cargo install phonetikThis gives you phonetik-server (HTTP API) and phonetik-mcp (MCP tool server).
Usage
use phonetik::Phonetik;
let ph = Phonetik::new();
// Rhymes
for r in ph.rhymes("love", 10) {
println!("{} ({:?}, {:.0}%)", r.word, r.rhyme_type, r.confidence * 100.0);
}
// ABOVE (Perfect, 100%)
// DOVE (Perfect, 100%)
// GLOVE (Perfect, 100%)
// MOVE (Slant, 60%)
// GROOVE (Slant, 60%)
// Meter
let scan = ph.scan("uneasy lies the head that wears the crown");
println!("{} — {}", scan.visual, scan.meter.name);
// x / x / x / x / x / — iambic pentameter
// Comparison
let cmp = ph.compare("cat", "bat").unwrap();
println!("{:.0}% similar, {:?}", cmp.similarity * 100.0, cmp.rhyme_type);
// 67% similar, Perfect
// Lookup
let info = ph.lookup("extraordinary").unwrap();
println!("{}: {} syllables", info.word, info.syllable_count);
// EXTRAORDINARY: 6 syllablesHow it works
The entire CMU Pronouncing Dictionary is compiled into the binary at build time. Every phoneme is encoded as a single byte — no strings in the hot path. Rhyme detection is algorithmic:
Perfect rhymes are resolved by grouping words that share identical sound from their last stressed vowel onward. One hash lookup.
Slant rhymes use a vowel distance matrix and coda suffix matching. Words sharing the same consonant ending but different vowels (love/move) are found by index traversal, not pairwise comparison.
Near rhymes walk a precomputed graph of consonant clusters that differ by one edit. Same vowel, slightly different ending (night/nice).
Server
The crate includes an HTTP server binary behind the server feature (enabled by default):
cargo install phonetik
phonetik-server
# Phonetik starting on :1273 [126052 words]Endpoints: /health, /syllables, /syllable-counts, /rhymes, /rhymes/perfect, /rhymes/slant, /rhymes/near, /compare, /scan, /rhymemap, /document
MCP
phonetik includes an MCP (Model Context Protocol) server so AI assistants can use it as a tool. Runs over stdio — no network, no auth.
cargo install phonetikAdd to your MCP client config (Claude Code, Cursor, etc.):
{
"phonetik": {
"command": "phonetik-mcp"
}
}Tools: lookup, rhymes, scan, compare, analyze_document
Feature flags
Both server and mcp are enabled by default. For library-only use:
[dependencies]
phonetik = { version = "0.3", default-features = false }License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAquality-maintenanceEnables LLMs to analyze music (genre, mood, tempo, key), separate audio stems, detect AI-generated music, and measure loudness using IRCAM Amplify's audio processing APIs.Last updated5
- AlicenseAqualityCmaintenanceProvides 14+ character-level text analysis tools that give LLMs the ability to accurately count letters, analyze individual characters, and work with text at the character level—overcoming tokenization limitations.Last updated14283MIT
- FlicenseAqualityDmaintenanceEnables AI models to analyze audio files through numerical fingerprints, pitch tracking, and visual spectrograms without requiring direct audio playback. It provides tools for comparing audio iterations and detecting patterns using token-efficient analysis operations.Last updated11
- AlicenseAqualityAmaintenanceOfficial MCP server for the Vocametrix voice analysis API. Gives AI assistants direct access to clinical voice metrics (AVQI, DSI, jitter/shimmer, CPP), pronunciation assessment, speech transcription, prosody similarity, and AI-powered therapy planning. More than 40 endpoints for SLPs, voice researchers, and healthtech developers.Last updated3983MIT
Related MCP Connectors
Privacy-first audio intelligence: BPM, key, waveform. Audio never stored. Pay per second.
PQS scores any prompt before the model runs. 8 dimensions. 5 frameworks. Pre-flight, not post-hoc.
Precision math engine for AI agents. 203 exact methods. Zero hallucination.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Void-n-Null/phonetik'
If you have feedback or need assistance with the MCP directory API, please join our Discord server