音频 MCP 服务器
一个 MCP(模型上下文协议)服务器,为 Claude 等 AI 助手提供音频输入/输出功能。该服务器使 Claude 能够与计算机的音频系统进行交互,包括通过麦克风录音和通过扬声器播放音频。
特征
- 列出音频设备:查看系统上所有可用的麦克风和扬声器
- 录制音频:从任何麦克风捕获可自定义持续时间和质量的音频
- 播放录音:播放最近的录音
- 音频文件播放:通过扬声器播放音频文件
- 文本转语音:(未来实现的占位符)
要求
- Python 3.8 或更高版本
- 系统上的音频输入/输出设备
安装
- 克隆此存储库或将文件下载到您的计算机:
- 创建虚拟环境并安装依赖项:
- 或者使用附带的安装脚本来自动安装:
配置
Claude桌面配置
要将此服务器与 Claude Desktop 一起使用,请将以下内容添加到您的 Claude Desktop 配置文件中:
- macOS :
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows :
%APPDATA%\Claude\claude_desktop_config.json
将路径替换为系统上的实际路径。安装脚本将为您生成此配置。
用法
设置服务器后,重新启动 Claude Desktop。您应该在输入框中看到一个锤子图标,表示工具可用。
尝试询问克劳德:
- “我的系统上有哪些麦克风和扬声器?”
- “用我的麦克风录制 5 秒的音频。”
- “播放录音。”
- “从我的电脑播放音频文件。”
可用工具
列出音频设备
列出系统上所有可用的音频输入和输出设备。
录制音频
录制麦克风的音频。
参数:
duration
:录制持续时间(以秒为单位)(默认值:5)sample_rate
:采样率(赫兹)(默认值:44100)channels
:音频通道数(默认值:1)device_index
:要使用的特定输入设备索引(默认值:系统默认值)
播放最新录音
播放最近录制的音频。
播放音频
文本转语音功能的占位符。
参数:
text
:要转换为语音的文本voice
:要使用的语音(默认值:“default”)
播放音频文件
通过扬声器播放音频文件。
参数:
file_path
:音频文件的路径device_index
:要使用的特定输出设备索引(默认值:系统默认值)
故障排除
未找到设备
如果没有找到音频设备,请检查:
- 您的麦克风和扬声器已正确连接
- 您的操作系统识别该设备
- 您拥有访问音频设备的必要权限
播放问题
如果音频播放不正常:
- 检查音量设置
- 确保选择了正确的输出设备
- 尝试重新启动 Claude Desktop 应用程序
服务器连接
如果 Claude 无法连接到服务器:
- 验证配置路径是否正确
- 确保已安装 Python 和所有依赖项
- 检查 Claude 的日志中的错误消息
执照
麻省理工学院
致谢
注意:此服务器提供可访问您麦克风和扬声器的工具。请务必在执行工具操作前进行审核并获得批准。
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
使 Claude 和其他 AI 助手能够与您的计算机的音频系统进行交互,从而可以通过麦克风录音并通过扬声器播放音频。
Related MCP Servers
- -securityAlicense-qualityA modular server implementation for Claude AI assistants with integrated tools, enabling Claude to perform actions and access external resources like file systems, web searches, browser automation, financial data, and document generation.Last updated -90PythonMIT License
- -securityAlicense-qualityA server that allows Claude to control audio playback on your computer, supporting MP3, WAV, and OGG files with features like play, list, and stop commands.Last updated -3PythonMIT License
- AsecurityAlicenseAqualityA server that enables Claude 3.7 and other AI agents to access VOICEVOX-compatible speech synthesis engines (AivisSpeech, VOICEVOX, COEIROINK) through the Model Context Protocol.Last updated -110TypeScriptMIT License
- -securityFlicense-qualityEnables voice-based interactions with Claude by converting text to speech using Kokoro TTS and transcribing user responses using NVIDIA NeMo ASR, creating interactive voice dialogues.Last updated -Python