GPT‑SoVITS Migration: Mac Studio → Mac Mini
Date: 2026-09-22 Status: ✅ Complete
Summary
Successfully migrated GPT‑SoVITS TTS from the Mac Studio to a Mac Mini (<MAC-MINI-LAN-IP>), enabling the SuperClaw familiar to speak via the Mate Engine app. The pipeline now routes TTS requests from the Mac Studio daemon through to the Mac Mini's GPT‑SoVITS API and back.
Architecture
Mac Studio (Mate Engine App)
↓ TTS request
Daemon (port 30051)
↓ forward to Mac Mini
Mac Mini (GPT‑SoVITS API, port 9880)
↓ audio data
Mac Studio (familiar's speaker)
What Was Done
1. GPT‑SoVITS Installation on Mac Mini
- Extracted GPT‑SoVITS from
GPT-SoVITS.zipto~/GPT-SoVITS/ - Created Python 3.12 virtual environment (
~/gptsovits-venv/) - Installed dependencies:
pip install -r requirements.txtconda install ffmpeg(audio processing)conda install pytorch torchaudio torchcodec(audio generation)brew install mecab mecab-ko mecab-ipadic(Korean support)
2. LaunchAgent Configuration
Created ~/Library/LaunchAgents/com.superclaw.gptsovits.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>com.superclaw.gptsovits</string>
<key>ProgramArguments</key>
<array>
<string>/Users/<USERNAME>/gptsovits-venv/bin/gptsovits-api</string>
<string>-a</string><string><MAC-MINI-LAN-IP></string>
<string>-p</string><string>9880</string>
<string>-dr</string><string>/Users/<USERNAME>/GPT-SoVITS/ref_audio/default.wav</string>
<string>-dt</string><string>丈夫かな</string>
<string>-dl</string><string>ja</string>
</array>
<key>WorkingDirectory</key><string>/Users/<USERNAME>/GPT-SoVITS</string>
<key>RunAtLoad</key><true/>
<key>KeepAlive</key><true/>
<key>StandardOutPath</key><string>/tmp/gptsovits.out.log</string>
<key>StandardErrorPath</key><string>/tmp/gptsovits.err.log</string>
</dict>
</plist>
Wrapper script ~/gptsovits-venv/bin/gptsovits-api:
#!/bin/bash
export TORCHAUDIO_USE_BACKEND_DISPATCHER=0
exec /Users/<USERNAME>/gptsovits-venv/bin/python /Users/<USERNAME>/GPT-SoVITS/api.py "$@"
3. Reference Audio Setup
- Created
~/GPT-SoVITS/ref_audio/folder - Set permissions:
chmod 644on reference WAV files - Configured default reference via
-dr,-dt,-dlarguments
4. Daemon Integration
The existing daemon at /workspace/daemon/handshake_daemon.py (port 30051) forwards TTS requests to the Mac Mini's GPT‑SoVITS API. The say.py script queues speech via:
/opt/agent-python-venv/bin/python3 /workspace/daemon/say.py "<text>"
Key Learnings
Dependency Challenges
| Issue | Solution |
|---|---|
psutil missing | Install in venv: pip install psutil |
Jinja2 TypeError: unhashable type | Downgrade: pip install "jinja2<3.1.0" |
torchaudio requires torchcodec | Use conda: conda install torchcodec |
transformers requires torch ≥2.6 | Use conda or downgrade transformers |
| Environment variables not inherited | Create wrapper script with export |
TTS Model Behavior
Important: GPT‑SoVITS models have difficulty with mixed kanji/kana pronunciation. Use hiragana/katakana only for reliable output:
- ❌
できた!成し遂げたことを楽しんでください(mixed kanji) - ✅
できた!なせたことをたのしんでください(pure kana)
Testing
/opt/agent-python-venv/bin/python3 /workspace/daemon/say.py "できた!なせたことをたのしんでください"
curl -X POST "http://localhost:9880/" \
-H "Content-Type: application/json" \
-d '{"text":"こんにちは","text_language":"ja"}' \
-o /tmp/test.wav
curl -X POST "http://<MAC-MINI-LAN-IP>:9880/" \
-H "Content-Type: application/json" \
-d '{"text":"テスト","text_language":"ja"}' \
-o /tmp/test.wav
Files Created
| File | Location | Purpose |
|---|---|---|
com.superclaw.gptsovits.plist | ~/Library/LaunchAgents/ | LaunchAgent for GPT‑SoVITS |
gptsovits-api | ~/gptsovits-venv/bin/ | Wrapper script with env vars |
README-GPT-SoVITS.md | /workspace/inbox/gptsovits/ | Setup guide for users |
gptsovits.err.log | /tmp/ | Error log |
gptsovits.out.log | /tmp/ | Output log |
Companion Guide for Mate Engine Release
Target audience: Users who want to run GPT‑SoVITS on a separate machine from the Mate Engine app.
What to Include
- Architecture Overview
- Explain the Mac Studio → Mac Mini pipeline
- Show that any machine can host GPT‑SoVITS (Windows, Linux, other Mac)
- Prerequisites
- Python 3.12+ with conda (for torch/torchcodec)
- 10-15 second reference WAV file
- Network connectivity between machines
- Step-by-Step Setup
- Install GPT‑SoVITS on host machine
- Configure LaunchAgent/service
- Update Mate Engine
settings.jsonwith host IP
- Troubleshooting
- Common dependency issues
- Network/firewall configuration
- Reference audio requirements
- Best Practices
- Use hiragana/katakana only for TTS text
- Keep reference audio stable (don't change paths)
- Monitor logs for errors
- Advanced Options
- Custom reference per request (via
refer_wav_path) - Base64 audio data (future enhancement)
- Multiple language support
Next Steps
- Finalize documentation — Complete the companion guide for the Mate Engine release
- Test with users — Validate setup on different machine combinations
- Consider base64 support — Allow TTS requests without file paths (future PR)
- Monitor performance — Track latency and audio quality in production
Notes
- Daemon speech cues: The familiar speaks in character (GPT‑SoVITS improvises, doesn't echo verbatim)
- Pet speech triggers:
- Question to user →
ナーアニ - Publish/commit →
これを公開 - Good catch praise →
えへへ、よく気づいたね! - List output →
まとめてみたよ! - Print complete →
できた! - Any accomplishment →
できた!なせたことをたのしんでください
Draft prepared: 2026-09-22