Skip to main content
Glama

CallLens

基于 LangGraph 的开源对话智能与行为评估工具。

上传一通通话。CallLens 会将其转写、重构对话、度量确定性沟通指标、依据可配置的评分标准评估语义行为、核验支撑证据,并产出可解释的对话智能。

CallLens 将原始对话——录音或转写文本——转化为结构化、有证据支撑的行为智能:带说话人分离的转写稿、发言时长与语速指标、纵向情绪分析、话题、机会/风险检测,以及按代表维度的分析,全部依据声明式、带版本管理的评分标准进行打分。

每一项语义评分都有证据支撑。 绝不只是 Discovery: 8/10。而是:

Discovery: 8.7/10
Confidence: 0.91

Evidence:
  04:32  Representative asks customer about their current operational bottleneck.
  05:17  Representative asks about business impact.
  07:02  Customer explains delivery delays.

Missing behavior:
  Representative never established urgency or implementation timeframe.

用户点击时间戳,音频播放器便会跳转到那一精确时刻


为什么存在

大多数通话评分工具要么 (a) 将整个转写稿发送给 LLM 并要求给出一个分数,要么 (b) 统计关键词。CallLens 两者都不做:

  • 多阶段评分 —— 候选证据提取 → 确定性核验 → 评分标准打分 → 一致性检查 → 置信度门控 → 有界复审。绝不是一个"给这份转写稿打分"的单一提示词。

  • 确定性优先,语义仅在必要时使用 —— 发言时长、每分钟字数、打断、话轮和静默均为纯 Python 实现。LLM 仅用于推理:情绪、话题、意图、行为、辅导建议。

  • 提供商隔离 —— 语音抽象层(目前为 ElevenLabs)和 LLM 抽象层(OpenAI / Anthropic / 任何兼容 OpenAI 的端点),因此没有任何环节被硬编码绑定到单一厂商。

  • 设计上可审计 —— 每项分析都会记录模型、提示词、评分标准和流水线版本。

Related MCP server: Trustwise MCP Server

架构

flowchart TD
    A[Audio / Transcript] --> B[Ingestion]
    B --> C[ElevenLabs STT + Diarization]
    C --> D[Transcript Normalization]
    D --> E[LangGraph]
    E --> F[Deterministic Metrics]
    E --> G[Semantic Analysis]
    G --> H[Sentiment]
    G --> I[Topics]
    G --> J[Intents]
    F --> K[Evidence Verification]
    H --> K
    I --> K
    J --> K
    K --> L[Confidence Gate]
    L -->|sufficient| M[Report]
    L -->|insufficient| N[Bounded Re-score]
    N --> K

参见 docs/ARCHITECTURE.mddocs/LANGGRAPH.mddocs/DATA_MODEL.md

快速开始

Docker(推荐)

cp .env.example .env
docker compose up

无需 API 密钥即可试用:未设置 ELEVENLABS_API_KEY 时,语音提供商和推理 LLM 会回退到确定性的离线模拟实现,因此完整流水线(转写 → 指标 → 证据支撑的评分标准打分 → 辅导建议)可以端到端运行。

本地(Python)

python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"

# Analyze a transcript (offline, deterministic)
calllens analyze sample.txt

# Start the API server
calllens server

# Run the evaluation harness
calllens eval run

前端

cd apps/web
npm install
NEXT_PUBLIC_API_URL=http://localhost:8000 npm run dev

CLI

calllens analyze call.mp3
calllens analyze call.mp3 --rubric consultative_sales --output report.json
calllens rubric list
calllens rubric validate ./my_rubric.yaml
calllens eval run
calllens server

Python SDK

import asyncio
from calllens import CallLens


async def main():
    async with CallLens(base_url="http://localhost:8000") as client:
        call = await client.calls.upload("sales-call.mp3")
        await call.analyze(rubric="consultative_sales")
        report = await call.report()
        print(report["overall_score"], report["confidence"])


asyncio.run(main())

REST API(子集)

POST   /api/v1/calls                     upload a recording or transcript
GET    /api/v1/calls
GET    /api/v1/calls/{id}
POST   /api/v1/calls/{id}/analyze
GET    /api/v1/calls/{id}/analysis       the evidence-backed CallReport
GET    /api/v1/calls/{id}/transcript
DELETE /api/v1/calls/{id}                privacy/retention deletion
POST   /api/v1/rubrics                   register a declarative rubric
GET    /api/v1/rubrics
POST   /api/v1/rubrics/validate
GET    /api/v1/reps/{id}/analytics
POST   /api/v1/evals/run

交互式文档位于 /docs

评分标准

评分标准是声明式且带版本管理的 YAML 文档。引擎本身是通用的——销售只是第一个内置的评分标准。你可以自带:客户支持、招聘、催收、保险、房地产、客户成功、面试、AI 语音代理。

name: consultative_sales
version: "1.0"
dimensions:
  rapport:
    label: Rapport
    weight: 0.08
  discovery:
    label: Problem Discovery
    weight: 0.16

维度权重之和必须为 1.0。参见 rubrics/docs/custom-rubrics

提供商

提供商

配置

语音(STT/TTS)

ElevenLabs Scribe v2

ELEVENLABS_API_KEYELEVENLABS_STT_MODEL

推理 LLM

OpenAI

LLM_PROVIDER=openaiOPENAI_API_KEYLLM_MODEL

推理 LLM

Anthropic

LLM_PROVIDER=anthropicANTHROPIC_API_KEYLLM_MODEL

推理 LLM

任何兼容 OpenAI 的端点

LLM_PROVIDER=compatibleCOMPATIBLE_BASE_URLCOMPATIBLE_API_KEY

推理 LLM

离线模拟(默认)

LLM_PROVIDER=mock

所有测试和 CI 均针对模拟实现运行——无需付费 API 调用。

示例:使用真实提供商进行实时分析

.env 中配置两个提供商,然后分析一段实际录音:

# .env — speech + reasoning
ELEVENLABS_API_KEY=sk_...
ELEVENLABS_STT_MODEL=scribe_v2

# Any OpenAI-compatible endpoint, e.g. Melious (https://api.melious.ai/v1)
LLM_PROVIDER=compatible
COMPATIBLE_BASE_URL=https://api.melious.ai/v1
COMPATIBLE_API_KEY=sk-mel-...
LLM_MODEL=gpt-oss-120b

然后在录音上运行完整流水线——必须是预先录制的通话文件(MP3/WAV),但如果你手头没有录音,也可以合成一段:

# Option A — you have a recording: transcribe + analyze it live
# (Scribe v2 STT → metrics → evidence-backed scoring → coaching)
calllens analyze call.mp3 --rubric consultative_sales --output report.json

# Option B — no recording? Synthesize a two-speaker sample call with ElevenLabs TTS
python examples/generate_sample_call.py   # → sample_call.mp3
calllens analyze sample_call.mp3 --rubric consultative_sales --output report.json

# Both write the evidence-backed report (scores + timestamped evidence + coaching)
# to report.json; omit --output to print it to stdout.

compatible 端点必须支持 OpenAI JSON-schema 结构化输出 (response_format: {type: "json_schema"})——流水线的 structured_completion 依赖于此。并非每个网关上的每个模型都支持;例如 Melious 上的 gpt-oss-120b 可以工作,而其他几个模型(Melious 上的 GLM、Kimi、DeepSeek v4)会拒绝 schema 模式。在确定使用某个模型之前,先用一个小的结构化调用进行探测。

MCP / MCPize

CallLens 附带一个 MCP 服务器,暴露 analyze_transcriptscore_dimensionlist_rubrics,可部署在 MCPize 上:

mcpize analyze && mcpize doctor && mcpize deploy

本地 stdio:

pip install -r requirements.txt
python mcp-server/server.py

评估

| Dimension | MAE | Correlation |
|-----------|-----|-------------|
| Discovery | .61 | .88         |
| Rapport   | .74 | .81         |

测试框架(calllens.evals)在包含 13 个场景的合成数据集(优秀销售、糟糕销售、薄弱的需求挖掘、愤怒的客户、多语言……)上运行完整流水线,并针对人工质量标签报告 MAE、RMSE、相关性和证据精确率/召回率。

路线图

参见 docs/ROADMAP.md。亮点:Supabase 认证/RLS 和对象存储、异步任务后端(Redis/SQS)、GraphQL 仪表盘查询、实时通话模式、AI 角色扮演模式、按代表维度的趋势分析、漂移监控。

安全与隐私

  • API 密钥仅存在于环境变量中;绝不会被提交、记录或暴露给浏览器。

  • 通话录音被视为敏感数据:租户隔离、私有/签名存储、删除和可配置的保留策略。

  • 完整转写稿默认不会被记录。

  • 参见 SECURITY.mddocs/ARCHITECTURE.md

许可证

MIT © Yabloko Labs

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    F
    maintenance
    Provides advanced analysis of conversations from Limitless Pendant recordings, including intelligent meeting detection, action item extraction, natural language time queries, and comprehensive conversation analytics with smart pagination support.
    14
    38
    24
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides advanced evaluation tools for assessing AI safety, alignment, and performance of LLM outputs. Enables programmatic evaluation of quality, safety metrics like toxicity and PII detection, and operational metrics including carbon footprint and cost estimation.
    4
    Apache 2.0
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to query Ringba call analytics, including running EHG insights reports and listing available metrics and dimensions.
  • A
    license
    A
    quality
    A
    maintenance
    Enables conversational access to the VerifyAX agent-evaluation platform, exposing tools for agent evaluation workflows through natural language.
    12
    1
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Simulation, evaluation and monitoring for voice agents.

  • Create voice-agent scenarios, pull session analytics, place SIP calls, schedule meeting bots.

  • Manage Voice Logica agents, calls, phones, workflows, messaging, and integrations.

View all MCP Connectors

Latest Blog Posts

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/yablokolabs/CallLens'

If you have feedback or need assistance with the MCP directory API, please join our Discord server