Skip to content

Commit 39b9155

Browse files
committed
fix: remove hardcoded voice:"default" that hangs Kokoro models
generateAudioViaProxy() hardcoded voice:"default" in the request body. Kokoro models do not ship a voices/default.safetensors file, causing the server to throw RuntimeError during streaming. Since the HTTP status was already sent, the client never receives an error and hangs until timeout. Use buildInjectedParams(cfg) instead, which omits voice and lets the server use its own default. This aligns the direct-generate path with the proxy path behavior. Fixes #3
1 parent 86c7845 commit 39b9155

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Zero API key, zero cloud dependency.
66
*/
77

8-
import { resolveConfig, resolvePortBinding, type MlxAudioConfig } from "./src/config.js";
8+
import { resolveConfig, resolvePortBinding, buildInjectedParams, type MlxAudioConfig } from "./src/config.js";
99
import { ProcessManager } from "./src/process-manager.js";
1010
import { TtsProxy } from "./src/proxy.js";
1111
import { HealthChecker } from "./src/health.js";
@@ -523,7 +523,7 @@ export default function register(api: PluginApi) {
523523
settled = true;
524524
resolve(result);
525525
};
526-
const body = JSON.stringify({ model: cfg.model, input: text, voice: "default" });
526+
const body = JSON.stringify({ ...buildInjectedParams(cfg), input: text });
527527
const req = http.request(
528528
{
529529
hostname: "127.0.0.1",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cosformula/openclaw-mlx-audio",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "OpenClaw local TTS plugin powered by mlx-audio — zero API key, zero cloud dependency",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)