Skip to main content
Glama

Whissle MCP Server

by WhissleAI

Whissle MCP 服务器

基于 Python 的服务器,提供对 Whissle API 端点的访问,用于语音转文本、二值化、翻译和文本摘要。

⚠️ 重要提示

  • 此服务器提供对 Whissle API 端点的访问,这可能会产生费用
  • 每个进行 API 调用的工具都会标有成本警告
  • 请遵循以下准则:
    1. 仅在用户明确要求时使用工具
    2. 对于处理音频的工具,请考虑音频的长度,因为它会影响成本
    3. 某些操作(例如翻译或摘要)的成本可能会更高
    4. 描述中没有成本警告的工具可以免费使用,因为它们只读取现有数据

先决条件

  • Python 3.8 或更高版本
  • pip(Python 包安装程序)
  • Whissle API 身份验证令牌

安装

  1. 克隆存储库:
    git clone <repository-url> cd whissle_mcp
  2. 创建并激活虚拟环境:
    python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate
  3. 安装所需的软件包:
    pip install -e .
  4. 设置环境变量:在项目根目录中创建一个.env文件,其内容如下:
    WHISSLE_AUTH_TOKEN=insert_auth_token_here # Replace with your actual Whissle API token WHISSLE_MCP_BASE_PATH=/path/to/your/base/directory
    ⚠️重要提示:切勿将你的实际令牌提交到存储库。.env 文件包含在.env.gitignore以防止意外提交。
  5. 配置 Claude 集成:将claude_config.example.json复制到claude_config.json并更新路径:
    { "mcpServers": { "Whissle": { "command": "/path/to/your/venv/bin/python", "args": [ "/path/to/whissle_mcp/server.py" ], "env": { "WHISSLE_AUTH_TOKEN": "insert_auth_token_here" } } } }
    • /path/to/your/venv/bin/python替换为虚拟环境中 Python 解释器的实际路径
    • /path/to/whissle_mcp/server.py替换为 server.py 文件的实际路径

配置

环境变量

  • WHISSLE_AUTH_TOKEN :您的 Whissle API 身份验证令牌(必需)
    • 这是一个敏感凭证,不应共享或提交到版本控制
    • 联系您的管理员以获取有效令牌
    • 将其安全地存储在本地.env文件中
  • WHISSLE_MCP_BASE_PATH :文件操作的基本目录(可选,默认为用户的桌面)

支持的音频格式

服务器支持以下音频格式:

  • WAV(.wav)
  • MP3(.mp3)
  • OGG(.ogg)
  • FLAC(.flac)
  • M4A (.m4a)

文件大小限制

  • 最大文件大小:25 MB
  • 大于此限制的文件将被拒绝

可用工具

1.语音转文本

使用 Whissle API 将语音转换为文本。

response = speech_to_text( audio_file_path="path/to/audio.wav", model_name="en-NER", # Default model timestamps=True, # Include word timestamps boosted_lm_words=["specific", "terms"], # Words to boost in recognition boosted_lm_score=80 # Score for boosted words (0-100) )

2. 语音分类

通过说话人识别将语音转换为文本。

response = diarize_speech( audio_file_path="path/to/audio.wav", model_name="en-NER", # Default model max_speakers=2, # Maximum number of speakers to identify boosted_lm_words=["specific", "terms"], boosted_lm_score=80 )

3.文本翻译

将文本从一种语言翻译成另一种语言。

response = translate_text( text="Hello, world!", source_language="en", target_language="es" )

4.文本摘要

使用 LLM 模型总结文本。

response = summarize_text( content="Long text to summarize...", model_name="openai", # Default model instruction="Provide a brief summary" # Optional )

5. 列出 ASR 模型

列出所有可用的 ASR 模型及其功能。

response = list_asr_models()

响应格式

语音转文本和分词

{ "transcript": "The transcribed text", "duration_seconds": 10.5, "language_code": "en", "timestamps": [ { "word": "The", "startTime": 0, "endTime": 100, "confidence": 0.95 } ], "diarize_output": [ { "text": "The transcribed text", "speaker_id": 1, "start_timestamp": 0, "end_timestamp": 10.5 } ] }

翻译

{ "type": "text", "text": "Translation:\nTranslated text here" }

总结

{ "type": "text", "text": "Summary:\nSummarized text here" }

错误响应

{ "error": "Error message here" }

错误处理

该服务器包括强大的错误处理功能:

  • HTTP 500 错误的自动重试
  • 不同故障场景的详细错误消息
  • 文件验证(存在性、大小、格式)
  • 身份验证检查

常见错误类型:

  • HTTP 500:服务器错误(带重试机制)
  • HTTP 413:文件太大
  • HTTP 415:不支持的文件格式
  • HTTP 401/403:身份验证错误

运行服务器

  1. 启动服务器:
    mcp serve
  2. 服务器将在默认 MCP 端口(通常为 8000)上可用

测试

提供了一个测试脚本来验证所有工具的功能:

python test_whissle.py

测试脚本将:

  1. 检查身份验证令牌
  2. 测试所有可用的工具
  3. 提供每个操作的详细输出
  4. 优雅地处理错误

支持

如有问题或疑问,请:

  1. 检查错误消息以了解具体细节
  2. 验证您的身份验证令牌
  3. 确保您的音频文件符合要求
  4. 针对 API 相关问题联系 Whissle 支持

执照

[在此添加您的许可证信息]

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

基于 Python 的服务器,提供对 Whissle API 端点的访问,用于语音转文本、二值化、翻译和文本摘要。

  1. ⚠️ 重要提示
    1. 先决条件
      1. 安装
        1. 配置
          1. 环境变量
          2. 支持的音频格式
          3. 文件大小限制
        2. 可用工具
          1. 1.语音转文本
          2. 2. 语音分类
          3. 3.文本翻译
          4. 4.文本摘要
          5. 5. 列出 ASR 模型
        3. 响应格式
          1. 语音转文本和分词
          2. 翻译
          3. 总结
          4. 错误响应
        4. 错误处理
          1. 运行服务器
            1. 测试
              1. 支持
                1. 执照

                  Related MCP Servers

                  • -
                    security
                    F
                    license
                    -
                    quality
                    A server providing text-to-speech and speech-to-text functionalities using Windows' native speech services without external dependencies.
                    Last updated -
                    4
                    JavaScript
                  • -
                    security
                    A
                    license
                    -
                    quality
                    Enables recording audio from a microphone and transcribing it using OpenAI's Whisper model. Works as both a standalone MCP server and a Goose AI agent extension.
                    Last updated -
                    6
                    Python
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A server that enables AI assistants like Claude to safely run Python code and access websites, processing data for better AI understanding while providing helpful error messages.
                    Last updated -
                    3
                    Python
                    GPL 3.0
                    • Linux
                    • Apple
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A lightweight server that provides detailed text analysis, counting total characters, characters without spaces, letters, numbers, and symbols for AI assistants like Claude Desktop and GitHub Copilot.
                    Last updated -
                    1
                    1
                    JavaScript
                    • Apple

                  View all related MCP servers

                  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/WhissleAI/whissle-mcp'

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