360 Secure SkillHub
360 安全技能中心

MLX TTS

面向 Apple Silicon Mac 的本地文本转语音 Skill:install.sh 通过 brew/uv 安装 mlx_audio 等依赖,再用 mlx-tts.sh "<text>" 调用 MLX 与 QWen3-TTS 模型生成音频,脚本返回音频文件路径,由 Agent 用 message 工具作为语音消息发给用户;无需 API Key 与服务器。

guoqiao
guoqiao
热度 84.45
最近更新 2026-05-11 15:57:58
分类:创作依赖:代码执行 / 读写文件

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add mlx-tts
Metadata
name
mlx-tts
description
Text-To-Speech with MLX (Apple Silicon) and opensource models (default QWen3-TTS) locally.
author
guoqiao
metadata
{"openclaw":{"always":true,"emoji":"🦞","homepage":"https://clawhub.ai/guoqiao/mlx-tts","os":["darwin"],"requires":{"bins":["brew"]}}}
triggers
["/mlx-tts <text>","TTS ...","Convert text to audio ...","Say <text>","Reply with voice message ..."]

MLX TTS

Text-To-Speech with MLX (Apple Silicon) and open-source models (default QWen3-TTS) locally.

Free and Fast. No API key required. No server required.

Requirements

  • mlx: macOS with Apple Silicon
  • brew: used to install deps if not available

Installation

bash ${baseDir}/install.sh

This script will use brew to install these CLI tools if not available:

  • uv: install python package and run python script
  • mlx_audio: do the real job

Usage

To generate audio from text, run this script:

bash ${baseDir}/mlx-tts.sh "<text>"

Agent Instructions

  1. Run the script: Pass the text to be spoken as an argument.
  2. Handle Output: The script will output a path to a audio file. Use the message tool to send the audio file to the user as an voice message:
{
   "action": "send",
   "filePath": "<filepath>"
}

Example: User: "Say hello world" Agent:

  1. Runs bash path/to/mlx-tts.sh "hello world"
  2. Receives output: /tmp/folder/audio.ogg
  3. Calls message(action="send", filePath="/tmp/folder/audio.ogg", ...)