Gemini Audio Mcp

io.github.jxoesneon由 GitHub 帳號 jxoesneon 發布v0.1.0更新於 Oct 24, 2026

High-performance audio, music, and voice generation MCP server for Gemini 2.5 and Lyria 3.

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理透過 Google Gemini 2.5 與 Lyria 3 音訊模型產生環境音、音樂與語音旁白。

可以做什麼
依文字提示產生無人聲的環境音景,可設定長度、品質與自動播放,並支援無縫循環。創作音樂,可控制速度、調性與強度,也能用本機圖片引導氛圍。產生富有表現力的旁白與角色對白,並可指定語氣方向。將兩段音景交叉淡入淡出,形成平順的場景轉換。透過種子、引導強度與長度等參數調整輸出。
適用情境
適合需要助理隨選產出環境音、配樂或語音旁白的情境,例如場景示範、原型或媒體專案,且已具備 Google AI Studio 存取權限時使用。
執行需求
以本機程序執行,通常透過 npx 啟動(需 Node.js 18 或更新版本),或以 Rust 工具鏈從原始碼建置。需安裝 FFmpeg 並在 PATH 中可用,用於音訊編碼與轉碼。需要 Google AI Studio API 金鑰,透過 GEMINI_API_KEY 環境變數提供,並需連網存取 Google 的 Gemini 與 Lyria 服務。
安裝前請注意
必須提供 GEMINI_API_KEY 金鑰,應透過環境變數注入,切勿寫死在程式碼中。提示詞、文字以及傳入的本機圖片路徑會送往 Google 的 Gemini 與 Lyria 服務。Lyria 3 模型通常需要付費方案或預覽權限,使用可能產生費用。產生的音訊會寫入本機,並可能自動播放。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Gemini Audio Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

🎵 Gemini Audio MCP

[Institutional Grade] [Gemini 2.5] [Lyria 3]

Gemini Audio MCP is a high-performance Model Context Protocol (MCP) server engineered for professional-grade audio synthesis. It leverages the Gemini 2.5 Multimodal Live API and Google DeepMind's Lyria 3 models to deliver high-fidelity environmental soundscapes, musical compositions, and expressive narration on-demand.


🛠 Prerequisites

Before deploying the server, ensure your environment meets the following technical requirements:

1. FFmpeg (Core Processing Engine)

Required for high-performance audio encoding, decoding, and transcoding.

  • macOS: brew install ffmpeg
  • Windows: winget install ffmpeg or download from ffmpeg.org.
  • Linux (Ubuntu/Debian): sudo apt update && sudo apt install ffmpeg

2. Rust Toolchain (Compilation)

Required to build the server from source.

  • Install via rustup.rs: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

3. Node.js & NPM (Runtime)

Required if using the pre-compiled NPM package.

  • Version: node >= 18.0.0

🚀 Installation & Deployment

Global Installation (via NPX)

The fastest way to integrate the server into your MCP client (e.g., Claude Desktop).

json
{  "mcpServers": {    "gemini-audio": {      "command": "npx",      "args": ["-y", "gemini-audio-mcp"],      "env": {        "GEMINI_API_KEY": "YOUR_SECURE_API_KEY"      }    }  }}

Manual Build (Optimized)

For maximum performance, build the Rust binary locally:

  1. Clone & Build:
    bash
    git clone https://github.com/mcp-servers/gemini-audio-mcp.gitcd gemini-audio-mcpcargo build --release
  2. Locate Binary: The optimized binary will be in ./target/release/gemini-audio-mcp.

🔑 API Key Management

The server requires a valid Google AI Studio API key.

  1. Obtain your key from Google AI Studio.
  2. Security Best Practice: Never hardcode keys. Inject the key via the GEMINI_API_KEY environment variable.
  3. Tier Note: Access to Lyria 3 (Pro/Clip) models typically requires a Paid Tier or specific preview access in Google AI Studio.

🎮 Tool Usage Guide

1. Environmental Generation (generate_soundscape)

Synthesizes immersive, vocal-free ambient textures.

json
{  "name": "generate_soundscape",  "arguments": {    "prompt": "Deep underwater abyss, low-frequency whale songs, rhythmic air bubbles rising, muffled aquatic pressure.",    "duration": 60,    "quality": "high",    "auto_play": true  }}

2. Professional Music (generate_music)

Generates structural compositions with optional vocal control.

json
{  "name": "generate_music",  "arguments": {    "prompt": "Melancholic solo cello in a vast cathedral with 5-second decay reverb.",    "bpm": 72,    "song_key": "D minor",    "intensity": 4  }}

3. Expressive Voice (generate_voice)

Narration and character dialogue using Gemini 2.5 Native Audio.

json
{  "name": "generate_voice",  "arguments": {    "text": "The artifacts are stable, but the rift remains open.",    "voice_direction": "Gravelly, urgent, whispered"  }}

4. Dynamic Evolution (transition_soundscape)

Crossfades two distinct environments for seamless scene transitions.

json
{  "name": "transition_soundscape",  "arguments": {    "from_prompt": "Quiet library silence.",    "to_prompt": "Sudden heavy rain on a tin roof.",    "transition_duration": 8  }}

⚙️ Advanced Parameters

ParameterTypeDescription
seedIntegerEnsures deterministic, reproducible audio outputs.
image_pathStringMultimodal: Uses a local image to guide the acoustic mood (e.g., resonance).
bpmNumberExplicitly sets the rhythmic tempo (essential for music).
intensityNumber1-10 scale controlling dynamic range and complexity.
guidanceNumber0.0-6.0 scale for prompt adherence (Lyria models).
durationNumberTarget length in seconds. Triggers the Seamless Looping Engine.

🔬 Architecture Overview

Gemini Audio MCP employs a unique Hybrid Engine Strategy:

  • WebSocket Loop: Connects to Gemini 2.5 Live for low-latency, interactive voice and foley tasks.
  • REST Pipeline: Interfaces with Lyria 3 Pro for high-fidelity musical synthesis.
  • PCM Processing: An internal Rust-based loop (decode -> crossfade -> loop -> encode) ensures that short clips are transformed into seamless, infinite soundscapes without audible clicks.

🧪 Troubleshooting

FFmpeg Errors

  • "FFmpeg not found": Ensure ffmpeg is in your system PATH. Run ffmpeg -version in your terminal to verify.
  • Transcoding Failures: Check if you have the necessary codecs (e.g., libmp3lame for MP3). Most standard FFmpeg installations include these.

API Issues

  • 429 Rate Limit: The server implements a semaphore to limit concurrency, but ensure your API tier supports the requested model.
  • Empty Audio Output: Verify your GEMINI_API_KEY is correct and that your account has access to the requested model (especially lyria-3-pro-preview).

📄 License

Licensed under the MIT License. Engineered with precision by the MCP community.

來源:README.md,提交 516a1f7

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分