Labsco
WhissleAI logo

Whissle MCP Server

β˜… 2

from WhissleAI

Access Whissle API for speech-to-text, diarization, translation, and text summarization.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

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

Available Tools

1. Speech to Text

Convert speech to text using the Whissle API.

Copy & paste β€” that's it
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.

Copy & paste β€” that's it
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.

Copy & paste β€” that's it
response = translate_text(
    text="Hello, world!",
    source_language="en",
    target_language="es"
)

4. Text Summarization

Summarize text using an LLM model.

Copy & paste β€” that's it
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.

Copy & paste β€” that's it
response = list_asr_models()

Response Format

Speech to Text and Diarization

Copy & paste β€” that's it
{
    "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

Copy & paste β€” that's it
{
    "type": "text",
    "text": "Translation:\nTranslated text here"
}

Summarization

Copy & paste β€” that's it
{
    "type": "text",
    "text": "Summary:\nSummarized text here"
}

Error Response

Copy & paste β€” that's it
{
    "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

Testing

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

Copy & paste β€” that's it
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]