Sponsored by Deepsite.site

gradio-transcript-mcp: A Gradio MCP Server for Audio/Video Transcription from URLs

Created By
bsmnyk7 months ago
Gradio demo cum MCP server to generate transcripts from Audio/Video
Content

title: gradio-transcript-mcp - Gradio MCP Server for Transcription emoji: 💬 colorFrom: green colorTo: green sdk: gradio sdk_version: 5.29.0 app_file: app.py pinned: false license: apache-2.0 short_description: Gradio MCP server to transcribe audio & video from URLs

gradio-transcript-mcp: A Gradio MCP Server for Audio/Video Transcription from URLs

Overview

gradio-transcript-mcp is a Gradio application configured to function as an MCP (Model Control Protocol) server. It is designed to transcribe audio and video from URLs into text. Implementing OpenAI's Whisper and ffmpeg (via yt-dlp), this server enables MCP clients (like Cline) to process multimedia inputs efficiently by downloading and converting content from a given URL. It supports robust handling, including format conversion to WAV and dynamic device selection (CPU or GPU).

The repository contains the following main components:

  • app.py: The main Gradio application file that runs the MCP server.
  • transcription_tool.py: The core logic for handling file conversion and calling the transcription function.
  • transcription.py: Contains the implementation for Whisper transcription using the transformers library.
  • requirements.txt: Lists the necessary Python dependencies.
  • ffmpeg_setup.py: Script to ensure ffmpeg is available.
  • logging_config.py: Configuration for logging.

Installation

  1. Clone this repository:
    git clone https://huggingface.co/spaces/bismay/gradio-transcript-mcp
    cd gradio-transcript-mcp
    
  2. Install dependencies:
    pip install -r requirements.txt
    
    This will install the necessary libraries, including gradio[mcp], yt-dlp, transformers, and torch.

Usage

Running the Gradio App / MCP Server

To run the Gradio application which also starts the MCP server, execute:

python app.py

This will launch a local Gradio web interface and start the MCP server. The server will expose the transcribe_url function as an MCP tool.

Using as an MCP Server

When you run python app.py, the application starts an MCP server accessible to MCP clients.

Exposed Tool:

The server exposes one tool: transcribe_url.

  • Description: Transcribes audio or video from a given URL. Downloads the media from the URL, converts it to WAV format, and then uses the TranscriptTool to perform the transcription in English.
  • Input:
    • url (string): The URL of the audio or video file.
  • Output: (string): The transcription of the audio/video in English, or an error message if download or transcription fails.

Connecting an MCP Client:

The MCP server will typically be accessible at http://127.0.0.1:7860/gradio_api/mcp/sse when run locally. You can find the exact URL printed in your console when the Gradio app launches.

To connect an MCP client (like Cline) to this server, you need to add a configuration entry in your client's settings. The exact format depends on your client, but it generally involves specifying a name for the server and its URL.

Example configuration for a client (like Cline) that supports SSE:

{
  "mcpServers": {
    "gradio-transcript": {
      "url": "http://127.0.0.1:7860/gradio_api/mcp/sse"
    }
  }
}

Note: If your MCP client does not directly support SSE-based servers (like Claude Desktop), you may need to use a tool like mcp-remote as an intermediary.

In those cases, you can use a tool such as mcp-remote. First install Node.js. Then, add the following to your own MCP Client config:

{
  "mcpServers": {
    "gradio": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://127.0.0.1:7860/gradio_api/mcp/sse"
      ]
    }
  }
}

Connecting to the Hosted Server on Hugging Face Spaces

This application is also hosted on Hugging Face Spaces, providing a publicly accessible MCP server. You can connect to this hosted server using the following URL:

https://bismay-gradio-transcript-mcp.hf.space/gradio_api/mcp/sse

To connect your MCP client (like Cline) to this hosted server, add a configuration entry similar to this:

{
  "mcpServers": {
    "gradio-transcript": {
      "url": "https://bismay-gradio-transcript-mcp.hf.space/gradio_api/mcp/sse"
    }
  }
}

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for more details.


Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Amap Maps高德地图官方 MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
CursorThe AI Code Editor
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors