← 返回 Skills 市场
trondw

Local Voice (FluidAudio TTS/STT)

作者 Trond Wuellner · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
1575
总下载
1
收藏
2
当前安装
2
版本数
在 OpenClaw 中安装
/install local-voice
功能描述
Local text-to-speech (TTS) and speech-to-text (STT) using FluidAudio on Apple Silicon. Sub-second voice synthesis and transcription running entirely on-device via the Apple Neural Engine. Use when setting up local voice capabilities, voice assistant integration, or replacing cloud TTS/STT services.
使用说明 (SKILL.md)

Local Voice (FluidAudio TTS/STT)

Sub-second local voice AI for Apple Silicon Macs using FluidAudio's CoreML models.

Features

  • TTS: Kokoro model with 54 voices, ~0.6-0.8s latency
  • STT: Parakeet TDT v3, ~0.2-0.3s latency, 25 languages
  • 100% local: No cloud, no cost, works offline
  • Neural Engine: Runs on Apple's ANE for efficiency

Requirements

  • macOS 14+ on Apple Silicon (M1/M2/M3/M4)
  • Swift 5.9+
  • espeak-ng (for TTS phoneme fallback)

Quick Setup

1. Install Dependencies

brew install espeak-ng

2. Build the Daemon

cd /path/to/skill/sources
swift build -c release

3. Install Binary and Framework

mkdir -p ~/clawd/bin
cp .build/release/StellaVoice ~/clawd/bin/
cp -R .build/arm64-apple-macosx/release/ESpeakNG.framework ~/clawd/bin/
install_name_tool -add_rpath @executable_path ~/clawd/bin/StellaVoice

4. Create LaunchAgent

cat > ~/Library/LaunchAgents/com.stella.tts.plist \x3C\x3C 'EOF'
\x3C?xml version="1.0" encoding="UTF-8"?>
\x3C!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
\x3Cplist version="1.0">
\x3Cdict>
    \x3Ckey>Label\x3C/key>
    \x3Cstring>com.stella.tts\x3C/string>
    \x3Ckey>ProgramArguments\x3C/key>
    \x3Carray>
        \x3Cstring>$HOME/clawd/bin/StellaVoice\x3C/string>
    \x3C/array>
    \x3Ckey>RunAtLoad\x3C/key>
    \x3Ctrue/>
    \x3Ckey>KeepAlive\x3C/key>
    \x3Ctrue/>
    \x3Ckey>StandardOutPath\x3C/key>
    \x3Cstring>$HOME/.clawdbot/logs/stella-tts.log\x3C/string>
    \x3Ckey>StandardErrorPath\x3C/key>
    \x3Cstring>$HOME/.clawdbot/logs/stella-tts.err.log\x3C/string>
\x3C/dict>
\x3C/plist>
EOF

launchctl load ~/Library/LaunchAgents/com.stella.tts.plist

API Endpoints

The daemon listens on http://127.0.0.1:18790:

TTS - Text to Speech

# Simple text to WAV
curl -X POST http://127.0.0.1:18790/synthesize -d "Hello world" -o output.wav

# With speed control (0.5-2.0)
curl -X POST "http://127.0.0.1:18790/synthesize?speed=1.2" -d "Fast!" -o output.wav

# JSON endpoint
curl -X POST http://127.0.0.1:18790/synthesize/json \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello", "speed": 1.0, "deEss": true}'

STT - Speech to Text

curl -X POST http://127.0.0.1:18790/transcribe \
  --data-binary @audio.wav \
  -H "Content-Type: audio/wav"
# Returns: {"text": "transcribed text"}

Health Check

curl http://127.0.0.1:18790/health
# Returns: ok

Voice Options

Default voice is af_sky. Change by modifying the source code.

Top Kokoro voices (American female):

  • af_heart (A grade) - warm, natural
  • af_bella (A-) - expressive
  • af_sky (C-) - clear, light

All 54 voices: See references/VOICES.md

Expressiveness

Speed Control

  • speed=0.8 → Calm, relaxed
  • speed=1.0 → Natural pace
  • speed=1.2 → Energetic, upbeat

Punctuation (automatic)

  • ! → Excited tone
  • ? → Rising intonation
  • . → Neutral, falling
  • ... → Pauses

SSML Tags

\x3Cphoneme ph="kəkˈɔɹO">Kokoro\x3C/phoneme>
\x3Csub alias="Doctor">Dr.\x3C/sub>
\x3Csay-as interpret-as="date">2024-01-15\x3C/say-as>

Helper Script

See scripts/stella-tts.sh for a convenient wrapper:

scripts/stella-tts.sh "Hello world" output.wav
scripts/stella-tts.sh "Hello world" output.mp3  # Auto-converts

Integration Example

For voice assistants, update your voice proxy to use local endpoints:

// STT
const response = await fetch('http://127.0.0.1:18790/transcribe', {
    method: 'POST',
    headers: { 'Content-Type': 'audio/wav' },
    body: audioData
});
const { text } = await response.json();

// TTS
const audio = await fetch('http://127.0.0.1:18790/synthesize', {
    method: 'POST',
    body: textToSpeak
});

Troubleshooting

Library not loaded (ESpeakNG)

  • Ensure ESpeakNG.framework is in the same directory as the binary
  • Run install_name_tool -add_rpath @executable_path /path/to/binary

Slow first request

  • First request loads models (~8-10s)
  • Subsequent requests are sub-second

x86 vs ARM

  • Must build and run on ARM64 native (not Rosetta)
  • Check with uname -m (should show arm64)

Source Code

The daemon source is in sources/ directory. It's a Swift package using:

  • FluidAudio (TTS + STT models)
  • Hummingbird (HTTP server)

Rebuild after modifying:

cd sources && swift build -c release
安全使用建议
This package appears to be a legitimate local TTS/STT daemon, but check these before installing: 1) Offline claim: verify whether AsrModels.downloadAndLoad and KokoroTtsManager.initialize fetch models from the network and which hosts they contact — if you need truly offline operation, test in an isolated network or inspect FluidAudio sources. 2) LaunchAgent mismatch: SKILL.md, setup.sh, and the helper script use different plist names (com.stella.tts vs com.stella.voice); decide which to use and inspect the plist before loading. 3) Persistent service: the setup creates a KeepAlive LaunchAgent and log files under your home directory; ensure you’re comfortable with a background process auto-starting. 4) Build from source and inspect the FluidAudio package sources (or vendor models) to confirm model origin and license. 5) If privacy is a concern, run the setup in a controlled environment (VM or isolated account) and monitor outbound network connections during first startup to confirm no unexpected exfiltration. If you want, I can list the exact places in the FluidAudio package where model download endpoints are defined (you would need to provide or point me at that repository URL).
功能分析
Type: OpenClaw Skill Name: local-voice Version: 1.0.1 The skill establishes a local text-to-speech (TTS) and speech-to-text (STT) service on Apple Silicon. It uses standard macOS mechanisms like Homebrew for dependency installation (`espeak-ng`) and a LaunchAgent (`com.stella.voice.plist`) for user-level persistence, explicitly described in SKILL.md and implemented in scripts/setup.sh. The Swift application downloads its necessary AI models from its declared dependency (FluidAudio) and exposes a local HTTP API on 127.0.0.1:18790. All actions are transparently aligned with the stated purpose, and there is no evidence of data exfiltration, malicious execution, or prompt injection attempts against the agent.
能力评估
Purpose & Capability
Name/description, source files, and dependencies (FluidAudio, Hummingbird) align with a local TTS/STT daemon for Apple Silicon. However the SKILL.md repeatedly claims “100% local / no cloud,” while the STT code calls AsrModels.downloadAndLoad(version: .v3) at runtime — implying models may be fetched from the network. That contradiction is important for privacy/offline guarantees.
Instruction Scope
Runtime instructions focus on building, installing, and running a local daemon and include example curl/JS integration; they do not request unrelated files or credentials. Issues: mismatched LaunchAgent names and references (SKILL.md shows com.stella.tts/plist but scripts/setup.sh creates and loads com.stella.voice.plist; helper script references com.stella.tts), which could confuse users and lead to accidental misconfiguration. The instructions create a persistent user LaunchAgent with KeepAlive=true and place binaries/logs under user home directories.
Install Mechanism
No packaged install in the registry (instruction-only) and the provided source builds from a Swift Package that pulls FluidAudio and Hummingbird from GitHub — this is expected for a compiled Swift daemon. There are no arbitrary URL downloads in the repo itself. Note: runtime model downloading (AsrModels.downloadAndLoad) is performed by the library at startup and is not part of the registry install spec.
Credentials
The skill declares no required env vars or credentials and the code does not request secrets. The LaunchAgent sets HOME in EnvironmentVariables (setup script). No unexplained credential or config access is requested.
Persistence & Privilege
The setup creates a user LaunchAgent (keeps the daemon running, RunAtLoad + KeepAlive) and copies a binary into ~/clawd/bin, so the service will persist across logins. While not an OS-level privileged install, persistent background services increase blast radius (especially combined with runtime model downloads). The skill is not marked always:true in the registry, but the service will auto-start on the user account.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install local-voice
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /local-voice 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Minor documentation update
v1.0.0
Initial release: Sub-second local TTS and STT for Apple Silicon
元数据
Slug local-voice
版本 1.0.1
许可证
累计安装 2
当前安装数 2
历史版本数 2
常见问题

Local Voice (FluidAudio TTS/STT) 是什么?

Local text-to-speech (TTS) and speech-to-text (STT) using FluidAudio on Apple Silicon. Sub-second voice synthesis and transcription running entirely on-device via the Apple Neural Engine. Use when setting up local voice capabilities, voice assistant integration, or replacing cloud TTS/STT services. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1575 次。

如何安装 Local Voice (FluidAudio TTS/STT)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install local-voice」即可一键安装,无需额外配置。

Local Voice (FluidAudio TTS/STT) 是免费的吗?

是的,Local Voice (FluidAudio TTS/STT) 完全免费(开源免费),可自由下载、安装和使用。

Local Voice (FluidAudio TTS/STT) 支持哪些平台?

Local Voice (FluidAudio TTS/STT) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Local Voice (FluidAudio TTS/STT)?

由 Trond Wuellner(@trondw)开发并维护,当前版本 v1.0.1。

💬 留言讨论