Whissle MCP Server

Whissle MCP Server

Provides access to Whissle AI services for speech-to-text, speaker diarization, translation, and text summarization. It enables users to process various audio formats and manage text content through natural language tools.

Category
访问服务器

README

Whissle MCP Server

A Python-based server that provides access to Whissle API endpoints for speech-to-text, diarization, translation, and text summarization.

⚠️ Important Notes

  • This server provides access to Whissle API endpoints which may incur costs
  • Each tool that makes an API call is marked with a cost warning
  • Please follow these guidelines:
    1. Only use tools when explicitly requested by the user
    2. For tools that process audio, consider the length of the audio as it affects costs
    3. Some operations like translation or summarization may have higher costs
    4. Tools without cost warnings in their description are free to use as they only read existing data

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)
  • A Whissle API authentication token

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd whissle_mcp
    
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows, use: venv\Scripts\activate
    
  3. Install the required packages:

    pip install -e .
    
  4. Set up environment variables: Create a .env file in the project root with the following content:

    WHISSLE_AUTH_TOKEN=insert_auth_token_here  # Replace with your actual Whissle API token
    WHISSLE_MCP_BASE_PATH=/path/to/your/base/directory
    

    ⚠️ Important: Never commit your actual token to the repository. The .env file is included in .gitignore to prevent accidental commits.

  5. Configure Claude Integration: Copy claude_config.example.json to claude_config.json and update the paths:

    {
        "mcpServers": {
            "Whissle": {
                "command": "/path/to/your/venv/bin/python",
                "args": [
                    "/path/to/whissle_mcp/server.py"
                ],
                "env": {
                    "WHISSLE_AUTH_TOKEN": "insert_auth_token_here"
                }
            }
        }
    }
    
    • Replace /path/to/your/venv/bin/python with the actual path to your Python interpreter in the virtual environment
    • Replace /path/to/whissle_mcp/server.py with the actual path to your server.py file

Configuration

Environment Variables

  • WHISSLE_AUTH_TOKEN: Your Whissle API authentication token (required)
    • This is a sensitive credential that should never be shared or committed to version control
    • Contact your administrator to obtain a valid token
    • Store it securely in your local .env file
  • WHISSLE_MCP_BASE_PATH: Base directory for file operations (optional, defaults to user's Desktop)

Supported Audio Formats

The server supports the following audio formats:

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

File Size Limits

  • Maximum file size: 25 MB
  • Files larger than this limit will be rejected

Available Tools

1. Speech to Text

Convert speech to text using the 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. Speech Diarization

Convert speech to text with speaker identification.

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. Text Translation

Translate text from one language to another.

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

4. Text Summarization

Summarize text using an LLM model.

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

5. List ASR Models

List all available ASR models and their capabilities.

response = list_asr_models()

Response Format

Speech to Text and Diarization

{
    "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
        }
    ]
}

Translation

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

Summarization

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

Error Response

{
    "error": "Error message here"
}

Error Handling

The server includes robust error handling with:

  • Automatic retries for HTTP 500 errors
  • Detailed error messages for different failure scenarios
  • File validation (existence, size, format)
  • Authentication checks

Common error types:

  • HTTP 500: Server error (with retry mechanism)
  • HTTP 413: File too large
  • HTTP 415: Unsupported file format
  • HTTP 401/403: Authentication error

Running the Server

  1. Start the server:

    mcp serve
    
  2. The server will be available at the default MCP port (usually 8000)

Testing

A test script is provided to verify the functionality of all tools:

python test_whissle.py

The test script will:

  1. Check for authentication token
  2. Test all available tools
  3. Provide detailed output of each operation
  4. Handle errors gracefully

Support

For issues or questions, please:

  1. Check the error messages for specific details
  2. Verify your authentication token
  3. Ensure your audio files meet the requirements
  4. Contact Whissle support for API-related issues

License

[Add your license information here]

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选