nb-speak
OfficialHandles Discord outbound formatting by wrapping compact tables in aligned monospace blocks, shielding and isolating fenced code blocks, and splitting long agent responses into balanced bubbles with a deterministic 8-rule bubble_lint check.
Converts pipe tables and long corporate-style walls into compact mobile cards and paced short bubbles for Signal, preserving code blocks and links while removing AI prose artifacts before sending.
Enforces human mobile delivery formatting on Slack-bound replies, replacing raw Markdown pipe tables with compact cards, isolating code/SQL/diffs into artifacts, and pacing long responses into short coherent bubbles in exact document order.
Formats outbound agent replies for Telegram: gates raw Markdown pipe tables into aligned monospace blocks or compact key-value cards, splits long 40–600+ character walls into 1–4 paced bubbles, and shields fenced code blocks and URLs so they never shatter across messages.
Normalizes agent output for WeChat: raw '|---|---|' Markdown tables are converted into mobile-friendly key-value cards, replies are split into paced short bubbles, and fenced code blocks, decimals, and query URLs are token-shielded before splitting so nothing breaks mid-content.
Applies narrow-screen delivery rules to WhatsApp replies, converting wide pipe tables (over 40 columns) into compact '- Item — Key: val' cards, stripping AI prose tells and concierge sign-offs, and dispatching long answers as balanced short bubbles instead of 250-word essays.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
humanizer strips AI prose tells from essays; chat-human + nb-speak stops your Personal Agent (OpenClaw, AstrBot, Telegram, WhatsApp, WeChat, QQ, Claude Code) from turning chat windows into corporate memos and raw pipe-table dumps.
Interactive Split-Stage · 30s Quick Start · Ecosystem Matrix · Protocol & SSE Bridge · bubble_lint Spec · Live Benchmarks · llms.txt
English · 简体中文
Prose humanizers rewrite blog posts. The moment you connect an LLM to OpenClaw, AstrBot, Telegram, WhatsApp, WeChat, QQ, Feishu/Lark, Slack, or Discord, prompt SOPs alone still regress—dumping raw |---|---| Markdown pipe tables onto 375px phone screens (openclaw#36323), refusing to split replies past 150 characters (AstrBot#8614), slicing fenced code blocks mid-comment, and wrapping two-line updates inside 250-word bulleted essays.
Within the NB-Corp ecosystem (nb-search discovers, nb-extract reads, nb-im routes), nb-speak enforces human mobile delivery physics at the Skill, PA Outbound Gate, Wire Protocol, and Linter layers—delivering pure text short bubbles and isolated code/table cards by default (enableVoiceNotes = false, with strictly opt-in generic TTS support).
Quick Start
Zero external runtime dependencies (
v0.2.0): Prebuilt ESM (dist/) and stdlib Python modules run directly on Node.js >= 22.19 (Node 24 recommended) and Python >= 3.10 with zero npm or pip runtime bloat.
1. skills.sh · Claude Code · Codex · Cursor (chat-human Agent Skill)
npx skills add NB-Corp/nb-speak --global --agent '*'
# Or from the standalone skill repository:
npx skills add NB-Corp/chat-human --global --agent '*'2. OpenClaw Native Plugin & Outbound Formatting Gate (@nb-corp/nb-speak-openclaw)
Fixes openclaw#36323 (raw pipe tables & 250-word essay regressions after session compaction on Telegram, WhatsApp, Discord, and Signal):
# Zero-clone reversible installer into ~/.openclaw (preview first, then apply)
npx --yes github:NB-Corp/nb-speak openclaw --dry-run
npx --yes github:NB-Corp/nb-speak openclaw --apply --preset neutral_peer
# Byte-for-byte reversible uninstall (never reads or touches credentials)
npx --yes github:NB-Corp/nb-speak openclaw --uninstall3. AstrBot Native Plugin for QQ · WeChat · Telegram · Feishu (astrbot_plugin_nb_speak)
Fixes AstrBot#8614 (built-in segmented_reply stopping above 150 chars, regex chopping fenced code blocks, and raw |---|---| pipe tables in QQ/WeChat bubbles):
# Option A: Paste directly in AstrBot WebUI -> Plugin Manager -> Install Plugin:
# https://github.com/NB-Corp/astrbot_plugin_nb_speak
# Option B: One-line shallow clone into AstrBot's data/plugins directory, then reload in WebUI
git clone --depth 1 https://github.com/NB-Corp/astrbot_plugin_nb_speak <AstrBot>/data/plugins/astrbot_plugin_nb_speak4. MCP Server, Claude Code Marketplace & OpenAI / SSE Bridge
# 1. Standard MCP stdio server (Cursor, Windsurf, Cherry Studio, Cline, Roo Code, Goose, Zed, Raycast)
npx --yes github:NB-Corp/nb-speak mcp
# 2. Claude Code native plugin marketplace (bundles chat-human skill + MCP config)
# Run inside Claude Code: /plugin marketplace add NB-Corp/nb-speak && /plugin install nb-speak@nb-corp
# 3. Local OpenAI-compatible HTTP/SSE bridge on http://127.0.0.1:18090 (enableVoiceNotes = false default)
NB_SPEAK_API_KEY="sk-..." npx --yes github:NB-Corp/nb-speak serve --port 18090 --upstream-url https://api.deepseek.com/v1Ecosystem Integration Matrix
All 10 surfaces share the exact same deterministic pipe-table converter, fenced-code shield, and 8-rule bubble_lint (enableVoiceNotes = false by default everywhere):
Ecosystem / Client | Package / Path | Official Market / Registry | One-Line Setup |
skills.sh (70+ Agents) |
|
| |
Claude Code | Claude Plugin Marketplaces |
| |
MCP Clients (Cursor / Cherry / Cline) |
|
| |
OpenClaw (TG / WhatsApp / Discord) | ClawHub ( |
| |
AstrBot (QQ / WeChat / Feishu) | AstrBot Market ( | Paste | |
LangBot v4+ (WeChat / QQ / DingTalk) | LangBot Space ( | Paste | |
Koishi v4 (OneBot / Satori / Discord) | Koishi Market ( |
| |
NoneBot2 (OneBot V11/V12 / TG / Lark) | NoneBot Store ( |
| |
OpenWebUI | OpenWebUI Community Functions ( | Import | |
OpenAI / SSE Bridge & DSH | npm ( |
|
Related MCP server: document-catalog-mcp
Personal Agent Plugins: OpenClaw & AstrBot
PA Pain Point in the Wild |
|
|
Raw |
|
|
Long walls & 150-char splitter cliffs | Injects | Eliminates AstrBot's 150-char |
Broken fenced code blocks & URLs | Isolates multi-line code/SQL/diffs via | Token-shields |
Persona & Voice defaults | Respects | Defaults to |
Architecture & Wire Protocol
1. send_message & send_artifact JSON Wire Payloads (nb-speak/1)
@nb-corp/nb-speak (packages/core) separates short conversational beats from heavy structured content across OpenAI, DeepSeek, Anthropic Claude, Google Gemini, and local GGUF models.
send_message (1–4 paced thumb-typed bubbles + quote anchor; voice_note omitted by default when enableVoiceNotes: false):
{
"bubbles": [
"Error rate held at 0.02%, p99 dropped to 38ms",
"Connection pool looks steady too, good to push 100%"
],
"reply_to": "msg_94810",
"end_turn": true
}send_artifact (offloads multi-line code, SQL, unified diffs, or comparison tables outside narrow chat bubbles):
{
"title": "idx_orders_tenant_created.sql",
"kind": "code",
"language": "sql",
"content": "CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_orders_tenant_created\n ON orders (tenant_id, created_at DESC)\n WHERE deleted_at IS NULL;"
}Natural Typing Cadence (
computeBubbleSchedule): Computes{ index, text, delayMs, typingDurationMs, cumulativeMs }per bubble (240msinitial reaction delay +190ms + 42ms × CJK_chars + 56ms × EN_words + 75ms × clause_pauses, clamped to[360ms, 2100ms]).Plain-Reply Fallback (
normalizeTurnOutput): When an unprompted model emits rawassistant.content,nb-speakautomatically extracts fenced code blocks and Markdown pipe tables into typedartifacts, splits remaining text into\n\nmicro-beats (preserving coupled 2-line copy-paste pairs), stripsBubble 1:labels and short-beat trailing periods, and offloads>4-bubble essays to amarkdownartifact.Optional Provider-Agnostic Voice Notes (
enableVoiceNotes: falsedefault): Voice prompting and synthesis are off by default across every surface. When explicitly opted in (--voice-notesorenableVoiceNotes: true),voice_noteattaches strictly to the final bubble (<50%overlap with text, spoken-word numbers, silent fallback on error) and works with any OpenAI-compatible/v1/audio/speechserver (OpenAI, Qwen TTS, Fish, Kokoro, vLLM), local JSON bridge, or browser Web Speech API.
2. Streaming SSE Event Contract & OpenAI Compatibility
POST /v1/chat/completions on nb-speak serve supports both structured IM event streams (x-nb-speak-events: structured or "speak_stream": true, emitting nb.artifact → nb.bubble → nb.lint → nb.done) and unmodified OpenAI client streams (streaming standard delta.content chunks to existing OpenAI SDKs, OpenWebUI, or LobeChat before appending finalized nb.* frames).
Deterministic bubble_lint Specification
TypeScript lintTurn() (packages/core/src/lint.ts) and zero-dependency Python skills/chat-human/scripts/bubble_lint.py implement an identical 8-rule static analyzer, achieving 97.2%–100% zero-slop pass rates across DeepSeek and GPT evaluations:
# | Rule Family | Issue Codes | Severity | Exact Thresholds & Conditions |
1 | Bubble Count & Empty Guard |
|
| Fails when no non-empty bubble exists, or when bubble count exceeds |
2 | Mobile Length Budget |
|
| Warns when cumulative turn text exceeds |
3 | Markdown & List Wall Ban |
|
| Fails if any bubble contains |
4 | Short-Beat & Code Trailing Periods |
|
| Warns when a single-clause short beat ( |
5 | Stage Brackets, Clichés & Particles |
|
| Fails on RPG stage brackets ( |
6 | Emoji Policy & Leak Hygiene |
|
| Warns on Unicode emoji when |
7 | Opt-In Final-Bubble Voice Placement |
|
| When optional voice notes are enabled, fails on |
8 | Voice Complementarity & Tokens |
|
| Fails if directional character-bigram overlap with text bubbles exceeds |
Same Model, Different Delivery: 4 Live Benchmarks
Executed live on identical model endpoints (cmd/deepseek-v4.1-flash, Vanilla assistant.content vs. nb-speak structured bubbles + artifact cards, zero mocks):
Live Scenario | Vanilla Agent ( | With |
1. Casual Friday Off-Work Chat"Brain is fried in front of the convenience store fridge—what do I grab?" | 4-item bolded nutrition matrix ( | 3 relaxed friend beats ( |
2. 4.2M-Row SQL Triage" | Multi-section | 3 crisp SRE beats + collapsible, one-click copyable |
3. Multi-File Kanban Bugfix"Fix dual-running timer leak + live | 13/13 tests pass, followed by a multi-screen file-by-file changelog essay after editing 9 files. | 17/17 tests pass (zero engineering loss), delivered in 4 crisp beats + |
4. Persona Under Concurrency LoadCustom persona | Stays in character on Turn 1, then collapses completely on Turn 2 into a 10-paragraph mutex postmortem lecture. | 100% character & engineering fidelity across all turns: short in-character beats + stress-tested |
packages/dsh-plugin (standalone mirror: NB-Corp/nb-speak-dsh) provides a native Cordis plugin + WebUI bubble/artifact extension (send_bubble with exec.concludeTurn(), zero subagent send_message collision, enableVoiceNotes: false by default).
Pluggable Personas & Integration Recipes
Layer 1 enforces universal mobile delivery physics; Layer 2 resolves tone in strict priority order:
Explicit current-turn user instruction ("draft a formal reply to Director Li with a handshake emoji")
Active Persona /
SOUL.md/ AstrBot or OpenClaw System Prompt (neutral_peer,sharp_lead,warm_companion,calm_sre, or customSOUL.md)Channel context (1-on-1 DM vs. shared team channel)
Neutral Engineer Peer default (direct, equal-footing teammate—zero uninvited roleplay, zero Unicode emoji spam, zero corporate servility)
Paced Multi-Bubble Dispatch Over @nb-corp/nb-im
import { setTimeout as sleep } from 'node:timers/promises';
import { normalizeTurnOutput } from '@nb-corp/nb-speak';
export async function deliverSpeakTurn(session, target, rawCompletion, abortSignal) {
const turn = normalizeTurnOutput(rawCompletion, { cleanHygiene: true });
for (const art of turn.artifacts) {
await session.send(
{
type: 'file',
target,
filename: art.title,
bytes: new TextEncoder().encode(art.content),
mime_type: 'text/plain; charset=utf-8',
},
abortSignal,
);
}
for (const beat of turn.schedule) {
await sleep(beat.delayMs, undefined, { signal: abortSignal });
await session.send({ type: 'text', target, text: beat.text }, abortSignal);
}
}Monorepo Layout & Verification
nb-speak/
├── packages/
│ ├── core/ # @nb-corp/nb-speak: protocol, parser, TS bubble_lint, HTTP/SSE bridge & CLI
│ ├── openclaw-plugin/ # @nb-corp/nb-speak-openclaw: native OpenClaw tools, table/essay gate & installer
│ └── dsh-plugin/ # @nb-corp/nb-speak-dsh: DeepSeek Harness WebUI bubble & artifact client plugin
├── integrations/
│ └── astrbot_plugin_nb_speak/ # Native AstrBot v4+ Star plugin (QQ/WeChat/TG/Lark) + pytest suite
├── skills/
│ └── chat-human/ # Universal chat-human Agent Skill (v0.2.0) + bubble_lint.py + proactive_gate.py
├── apps/
│ └── web/ # Tactile paper-ink IM split-stage source (exports to docs/)
├── llms.txt # Concise LLM/GEO index (llmstxt.org)
└── llms-full.txt # Complete protocol schemas, PA plugin matrix, metrics & Q&ARun the complete build and verification suite locally (Core TS + OpenClaw TS + DSH TS + AstrBot Python + chat-human Python):
npm test
pytest integrations/astrbot_plugin_nb_speak/tests -vLicense
MIT © 2026 NB-Corp — applies to all source code, protocol schemas, CLI tools, OpenClaw/AstrBot/DSH plugins, chat-human Agent Skill, and documentation.
Demo Audio Assets & AI Disclosure: Static .mp3 clips in apps/web/src/assets/audio/ (docs/assets/audio/) are AI-synthesized speech included solely to demonstrate optional nb-speak voice-note playback in the web playground with zero real-person voice cloning; see AI Demo Audio Notice.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
Unified 15-tool SEO, SERP, clean Markdown & GEO (LLM citation Share-of-Voice) MCP server.
MCP server (stdio): fetch web pages as clean readable markdown via the AgentForge API
Remote MCP server for notes, tasks, kanban boards and docs - the Slates agentic workspace
Related MCP Servers
- FlicenseAqualityCmaintenanceMCP server that wraps MiniMax platform APIs (speech, video, image, music, and file management) as tools over stdio, enabling natural language interaction with MiniMax's AI services.161-
- FlicenseAqualityBmaintenancePrivate local stdio MCP server for metadata-only discovery, recording, and querying of Markdown and PDF documents.4-
- AlicenseNot gradedqualityDmaintenanceZero-dependency stdio MCP server for token-aware prompt version diffs. Compare prompts or files and get machine-readable token delta reports with confidence labels.MIT
- AlicenseAqualityBmaintenanceLocal stdio Model Context Protocol server for OmniDimension. Drive voice agents, dispatch calls, and manage knowledge bases from Claude, Cursor, Windsurf, or any MCP-compatible client.80304 npm7MIT