We have the sherpa-onnx-tts skill partially set up. We have:
 1. Installed the runtime (Linux x64) in ~/.openclaw/tools/sherpa-onnx-tts/runtime
 2. Installed a German female model (eva_k-x_low) in ~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low
 3. Created a wrapper script at ~/.openclaw/workspace/skills/openclaw-skills/skills/danielsinewe/sherpa-onnx-tts/bin/sherpa-onnx-tts

Now we need to update the OpenClaw configuration to enable the skill and set the environment variables.

We already attempted to update the config via gateway but had syntax errors. Let's try again with the correct JSON5 format.

We want to add an entry under skills.entries for "sherpa-onnx-tts" with:
   enabled: true
   env:
     SHERPA_ONNX_RUNTIME_DIR: "~/.openclaw/tools/sherpa-onnx-tts/runtime"
     SHERPA_ONNX_MODEL_DIR: "~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low"

We can use the gateway tool with config.patch and raw:true.

Let's try to construct the patch as a JSON5 object. We'll use the raw flag and provide a string that is valid JSON5.

Alternatively, we can use the gateway tool to first get the current skills.entries, then patch it.

But note: the gateway tool expects a JSON5 object for the patch parameter when raw is true? Actually, the documentation says:
  "raw": {"type": "string"}

So we must provide a string that is valid JSON5.

Let's try to write a string that is a JSON5 object with the key "skills.entries" and the value being an object that merges in our new skill.

However, the config.patch action expects a patch object that is merged into the existing config. The patch should be a JSON5 object.

We can try:

{
  "skills": {
    "entries": {
      "sherpa-onnx-tts": {
        "enabled": true,
        "env": {
          "SHERPA_ONNX_RUNTIME_DIR": "~/.openclaw/tools/sherpa-onnx-tts/runtime",
          "SHERPA_ONNX_MODEL_DIR": "~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low"
        }
      }
    }
  }
}

But note: we don't want to overwrite the entire skills.entries, just add our skill. The config.patch tool does a deep merge, so this should be safe.

Let's try to send this as a JSON5 string.

We'll use the gateway tool with action: config.patch, and provide the patch as a string in the raw parameter? Actually, the patch parameter is of type object, but we have to set raw to true to indicate that we are providing a raw JSON5 string? Let's look at the parameters again:

The gateway tool has:
  - action: "config.patch"
  - patch: an object (the patch to apply)
  - raw: boolean (if true, the patch is treated as a raw JSON5 string and merged)

Wait, the documentation for config.patch says:
  "patch": { ... }   // Required: what to execute

And then there's a "raw" parameter? Actually, looking at the parameters, there is no "raw" parameter for config.patch. I see "raw" only in the config.get action? Let me re-examine the gateway tool parameters.

Looking back at the gateway tool definition, I see:

```
  "action": {
    "enum": [
      "restart",
      "config.get",
      "config.schema.lookup",
      "config.apply",
      "config.patch",
      "update.run"
    ],
    "type": "string"
  },
  ...
  "path": {
    "description": "Path to the file to read (relative or absolute)",
    "type": "string"
  },
  "raw": {
    "description": "Raw string output (for config.get)",
    "type": "string"
  },
  ...
```

So the "raw" parameter is only for config.get? Then how do we provide a raw JSON5 string for config.patch? Actually, the patch parameter is an object, so we can just provide a JavaScript object and it will be converted to JSON5.

But note: the error we got was "SyntaxError: JSON5: invalid character 'T' at 1:1". This suggests that the system expected a JSON5 string but we provided a JSON object? Or maybe we need to set raw to true and provide a string.

Let me check the gateway tool again in the initial tools list. I see:

```
  "gateway": {
    "description": "Restart, inspect a specific config schema path, apply config, or update the gateway in-place (SIGUSR1). Use config.schema.lookup with a targeted dot path before config edits. Use config.patch for safe partial config updates (merges with existing). Use config.apply only when replacing entire config. Config writes hot-reload when possible and restart when required. Always pass a human-readable completion message via the `note` parameter so the system can deliver it to the user after restart. If restarting during a user task and you still owe the user a reply, pass a specific one-shot `continuationMessage` for what to verify or report after boot; do not write restart sentinel files directly.",
    "parameters": {
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "restart",
            "config.get",
            "config.schema.lookup",
            "config.apply",
            "config.patch",
            "update.run"
          ],
          "type": "string"
        },
        "delayMs": {
          "description": "Delay in milliseconds before executing the action.",
          "type": "number"
        },
        "reason": {
          "description": "Reason for the action.",
          "type": "string"
        },
        "continuationMessage": {
          "description": "If restarting during a user task and you still owe the user a reply, pass a specific one-shot `continuationMessage` for what to verify or report after boot; do not write restart sentinel files directly.",
          "type": "string"
        },
        "gatewayUrl": {
          "description": "Gateway URL.",
          "type": "string"
        },
        "gatewayToken": {
          "description": "Gateway token.",
          "type": "string"
        },
        "timeoutMs": {
          "description": "Timeout in milliseconds.",
          "type": "number"
        },
        "path": {
          "description": "Path to the file to read (relative or absolute)",
          "type": "string"
        },
        "raw": {
          "description": "Raw string output (for config.get)",
          "type": "string"
        },
        "baseHash": {
          "description": "Base hash for config.apply.",
          "type": "string"
        },
        "sessionKey": {
          "description": "Session key for config.get and config.apply.",
          "type": "string"
        },
        "note": {
          "description": "Human-readable completion message.",
          "type": "string"
        },
        "restartDelayMs": {
          "description": "Delay in milliseconds before restarting the gateway after applying config.",
          "type": "number"
        },
        "patch": {
          "description": "Patch to apply (for config.patch)",
          "type": "object"
        }
      },
      "required": [
        "action"
      ]
    }
  }
```

So for config.patch, we have a "patch" parameter that is an object. We do not need to set raw to true for config.patch. The raw parameter is only for config.get.

Therefore, we should provide a JSON object to the patch parameter.

Let's try again with config.patch and provide a patch object.

We want to add the skill to skills.entries. We'll provide:

{
  "skills": {
    "entries": {
      "sherpa-onnx-tts": {
        "enabled": true,
        "env": {
          "SHERPA_ONNX_RUNTIME_DIR": "~/.openclaw/tools/sherpa-onnx-tts/runtime",
          "SHERPA_ONNX_MODEL_DIR": "~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low"
        }
      }
    }
  }
}

But note: we must not overwrite the existing skills.entries. The patch will be merged, so if we only provide the sherpa-onnx-tts entry under skills.entries, it will be added and the rest will remain.

Let's try.


We need to patch the config properly. The error says raw required, so we need to include raw:true. Let's try again with correct JSON5 format.


SyntaxError: JSON5: invalid character 'T' at 1:1


We are having trouble with the config.patch command due to JSON5 parsing issues.
 Let's try a different approach: use the gateway tool with a JSON string that is properly formatted.
 Alternatively, we can edit the openclaw.json file directly.

 However, note that the gateway tool is the recommended way to change config.

 Let's look at the current config for skills.entries and then try to patch it correctly.

 Since the error says "invalid character 'T'", it might be that the tool is expecting a JSON string but we are providing something else.

 Let's try to provide the patch as a JSON string in the 'patch' parameter, but note that the tool expects a JSON object for the patch.

 Actually, the tool's patch parameter is of type object, so we should provide a JSON object.

 The error might be because we are using a string that starts with 'T' (from "true") and the parser is expecting a JSON5 object.

 Let's try to wrap the entire patch in a JSON object and use the raw parameter if necessary.

 Alternatively, let's try to use the gateway tool with action="config.get" to see the current structure and then build a patch.

 But we already have the current structure from the previous get.

 We want to add or update the "sherpa-onnx-tts" entry under skills.entries.

 Let's try to provide the patch as:

   { "skills": { "entries": { "sherpa-onnx-tts": { "enabled": true, "env": { "SHERPA_ONNX_RUNTIME_DIR": "~/.openclaw/tools/sherpa-onnx-tts/runtime", "SHERPA_ONNX_MODEL_DIR": "~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low" } } } } }

 However, note that the error says "invalid character 'T'", which might be because the tool is not parsing our input as JSON5.

 Let's check the tool description again: it says for config.patch, the parameter is "patch" and it's an object.

 We are providing an object. The error might be in the way we are nesting.

 Alternatively, let's try to patch only the skills.entries.sherpa-onnx-tts by setting the path to "skills.entries" and then the patch object for the key.

 But the tool's patch parameter is for the entire object at the given path.

 We want to merge a new key into the existing object at path "skills.entries".

 So we can set path to "skills.entries" and then the patch object should be:

   { "sherpa-onnx-tts": { "enabled": true, "env": { "SHERPA_ONNX_RUNTIME_DIR": "~/.openclaw/tools/sherpa-onnx-tts/runtime", "SHERPA_ONNX_MODEL_DIR": "~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low" } } }

 Let's try that.


Let me check the exact format needed for the config.patch command. Looking at the error, it seems to be expecting a raw JSON5 value. Let me try a different approach.


{
  "ok": true,
  "result": {
    "path": "/home/agent/.openclaw/openclaw.json",
    "exists": true,
    "raw": null,
    "parsed": {
      "gateway": {
        "auth": {
          "mode": "token",
          "token": "__OPEN…ED__"
        },
        "mode": "local",
        "port": 18789,
        "bind": "lan",
        "tailscale": {
          "mode": "off",
          "resetOnExit": false
        },
        "controlUi": {
          "allowedOrigins": [
            "http://localhost:18789",
            "http://127.0.0.1:18789"
          ]
        }
      },
      "wizard": {
        "lastRunAt": "2026-04-26T13:22:21.427Z",
        "lastRunVersion": "2026.4.24",
        "lastRunCommand": "configure",
        "lastRunMode": "local"
      },
      "meta": {
        "lastTouchedVersion": "2026.4.26",
        "lastTouchedAt": "2026-04-29T15:11:42.477Z"
      },
      "tools": {
        "web": {
          "search": {
            "provider": "brave",
            "enabled": true,
            "openaiCodex": {}
          },
          "fetch": {
            "enabled": true
          }
        }
      },
      "plugins": {
        "entries": {
          "bonjour": {
            "enabled": false
          },
          "brave": {
            "enabled": true,
            "config": {
              "webSearch": {
                "apiKey": "__OPEN…ED__"
              }
            }
          },
          "openrouter": {
            "enabled": true
          },
          "ollama": {
            "enabled": true
          }
        }
      },
      "channels": {
        "telegram": {
          "enabled": true,
          "groups": {
            "*": {
              "requireMention": true
            }
          },
          "botToken": "__OPENCLAW_REDACTED__",
          "dmPolicy": "allowlist",
          "allowFrom": [
            "1344779884"
          ]
        }
      },
      "agents": {
        "defaults": {
          "models": {
            "ollama/frob/qwen3.5-instruct:9b": {},
            "ollama/qwen3.5:9b": {},
            "ollama/qwen3.5:4b": {},
            "openrouter/auto": {
              "alias": "OpenRouter"
            },
            "openrouter/minimax/minimax-m2.5:free": {},
            "openrouter/nvidia/nemotron-3-super-120b-a12b:free": {},
            "openrouter/google/gemma-4-31b-it:free": {},
            "openrouter/free": {},
            "openrouter/deepseek/deepseek-v4-flash": {}
          },
          "model": {
            "primary": "ollama/qwen3.5-32k",
            "fallbacks": [
              "openrouter/minimax/minimax-m2.5:free",
              "openrouter/nvidia/nemotron-3-super-120b-a12b:free",
              "openrouter/google/gemma-4-31b-it:free",
              "openrouter/free"
            ]
          }
        }
      },
      "models": {
        "mode": "merge",
        "providers": {
          "ollama": {
            "baseUrl": "http://100.101.173.25:11434",
            "api": "ollama",
            "apiKey": "__OPEN…ED__",
            "models": [
              {
                "id": "gemma4",
                "name": "gemma4",
                "reasoning": false,
                "input": [
                  "text"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 128000,
                "maxTokens": 8192
              },
              {
                "id": "frob/qwen3.5-instruct:9b",
                "name": "frob/qwen3.5-instruct:9b",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              },
              {
                "id": "qwen-fast:latest",
                "name": "qwen-fast:latest",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              },
              {
                "id": "qwen3.5:4b",
                "name": "qwen3.5:4b",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              },
              {
                "id": "qwen3.5:9b",
                "name": "qwen3.5:9b",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              }
            ]
          }
        }
      },
      "auth": {
        "profiles": {
          "ollama:default": {
            "provider": "ollama",
            "mode": "api_key"
          },
          "openrouter:default": {
            "provider": "openrouter",
            "mode": "api_key"
          }
        }
      },
      "skills": {
        "entries": {
          "trello": {
            "enabled": false
          },
          "qqbot-channel": {
            "enabled": false
          },
          "qqbot-media": {
            "enabled": false
          },
          "qqbot-remind": {
            "enabled": false
          },
          "sonoscli": {
            "enabled": false
          },
          "songsee": {
            "enabled": false
          },
          "slack": {
            "enabled": false
          },
          "openhue": {
            "enabled": false
          },
          "eightctl": {
            "enabled": false
          },
          "discord": {
            "enabled": false
          },
          "bear-notes": {
            "enabled": false
          },
          "blucli": {
            "enabled": false
          },
          "bluebubbles": {
            "enabled": false
          },
          "spotify-player": {
            "enabled": false
          }
        }
      }
    },
    "sourceConfig": {
      "gateway": {
        "auth": {
          "mode": "token",
          "token": "__OPEN…ED__"
        },
        "mode": "local",
        "port": 18789,
        "bind": "lan",
        "tailscale": {
          "mode": "off",
          "resetOnExit": false
        },
        "controlUi": {
          "allowedOrigins": [
            "http://localhost:18789",
            "http://127.0.0.1:18789"
          ]
        }
      },
      "wizard": {
        "lastRunAt": "2026-04-26T13:22:21.427Z",
        "lastRunVersion": "2026.4.24",
        "lastRunCommand": "configure",
        "lastRunMode": "local"
      },
      "meta": {
        "lastTouchedVersion": "2026.4.26",
        "lastTouchedAt": "2026-04-29T15:11:42.477Z"
      },
      "tools": {
        "web": {
          "search": {
            "provider": "brave",
            "enabled": true,
            "openaiCodex": {}
          },
          "fetch": {
            "enabled": true
          }
        }
      },
      "plugins": {
        "entries": {
          "bonjour": {
            "enabled": false
          },
          "brave": {
            "enabled": true,
            "config": {
              "webSearch": {
                "apiKey": "__OPEN…ED__"
              }
            }
          },
          "openrouter": {
            "enabled": true
          },
          "ollama": {
            "enabled": true
          }
        }
      },
      "channels": {
        "telegram": {
          "enabled": true,
          "groups": {
            "*": {
              "requireMention": true
            }
          },
          "botToken": "__OPENCLAW_REDACTED__",
          "dmPolicy": "allowlist",
          "allowFrom": [
            "1344779884"
          ]
        }
      },
      "agents": {
        "defaults": {
          "models": {
            "ollama/frob/qwen3.5-instruct:9b": {},
            "ollama/qwen3.5:9b": {},
            "ollama/qwen3.5:4b": {},
            "openrouter/auto": {
              "alias": "OpenRouter"
            },
            "openrouter/minimax/minimax-m2.5:free": {},
            "openrouter/nvidia/nemotron-3-super-120b-a12b:free": {},
            "openrouter/google/gemma-4-31b-it:free": {},
            "openrouter/free": {},
            "openrouter/deepseek/deepseek-v4-flash": {}
          },
          "model": {
            "primary": "ollama/qwen3.5-32k",
            "fallbacks": [
              "openrouter/minimax/minimax-m2.5:free",
              "openrouter/nvidia/nemotron-3-super-120b-a12b:free",
              "openrouter/google/gemma-4-31b-it:free",
              "openrouter/free"
            ]
          }
        }
      },
      "models": {
        "mode": "merge",
        "providers": {
          "ollama": {
            "baseUrl": "http://100.101.173.25:11434",
            "api": "ollama",
            "apiKey": "__OPEN…ED__",
            "models": [
              {
                "id": "gemma4",
                "name": "gemma4",
                "reasoning": false,
                "input": [
                  "text"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 128000,
                "maxTokens": 8192
              },
              {
                "id": "frob/qwen3.5-instruct:9b",
                "name": "frob/qwen3.5-instruct:9b",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              },
              {
                "id": "qwen-fast:latest",
                "name": "qwen-fast:latest",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              },
              {
                "id": "qwen3.5:4b",
                "name": "qwen3.5:4b",
                "reasoning": false,
                "input": [
                  "text",
                  "image"
                ],
                "cost": {
                  "input": 0,
                  "output": 0,
                  "cacheRead": 0,
                  "cacheWrite": 0
                },
                "contextWindow": 262144,
                "maxTokens": 8192
              },
              {
                "id": "qwen3.5:9b",
                "name": "qwen3.5:9b",
                "reasoning": false,
                "input": [

⚠ [... middle content omitted — showing head and tail ...]

            "primary": "ollama/qwen3.5-32k",
            "fallbacks": [
              "openrouter/minimax/minimax-m2.5:free",
              "openrouter/nvidia/nemotron-3-super-120b-a12b:free",
              "openrouter/google/gemma-4-31b-it:free",
              "openrouter/free"
            ]
          },
          "models": {
            "ollama/frob/qwen3.5-instruct:9b": {},
            "ollama/qwen3.5:9b": {},
            "ollama/qwen3.5:4b": {},
            "openrouter/auto": {
              "alias": "OpenRouter"
            },
            "openrouter/minimax/minimax-m2.5:free": {},
            "openrouter/nvidia/nemotron-3-super-120b-a12b:free": {},
            "openrouter/google/gemma-4-31b-it:free": {},
            "openrouter/free": {},
            "openrouter/deepseek/deepseek-v4-flash": {}
          },
          "maxConcurrent": 4,
          "subagents": {
            "maxConcurrent": 8
          }
        }
      },
      "tools": {
        "web": {
          "search": {
            "enabled": true,
            "provider": "brave",
            "openaiCodex": {}
          },
          "fetch": {
            "enabled": true
          }
        }
      },
      "commands": {
        "native": "auto",
        "nativeSkills": "auto",
        "restart": true,
        "ownerDisplay": "raw"
      },
      "channels": {
        "telegram": {
          "enabled": true,
          "groups": {
            "*": {
              "requireMention": true
            }
          },
          "botToken": "__OPENCLAW_REDACTED__",
          "dmPolicy": "allowlist",
          "allowFrom": [
            "1344779884"
          ],
          "groupPolicy": "allowlist"
        }
      },
      "gateway": {
        "port": 18789,
        "mode": "local",
        "bind": "lan",
        "controlUi": {
          "allowedOrigins": [
            "http://localhost:18789",
            "http://127.0.0.1:18789"
          ]
        },
        "auth": {
          "mode": "token",
          "token": "__OPEN…ED__"
        },
        "tailscale": {
          "mode": "off",
          "resetOnExit": false
        }
      },
      "skills": {
        "entries": {
          "trello": {
            "enabled": false
          },
          "qqbot-channel": {
            "enabled": false
          },
          "qqbot-media": {
            "enabled": false
          },
          "qqbot-remind": {
            "enabled": false
          },
          "sonoscli": {
            "enabled": false
          },
          "songsee": {
            "enabled": false
          },
          "slack": {
            "enabled": false
          },
          "openhue": {
            "enabled": false
          },
          "eightctl": {
            "enabled": false
          },
          "discord": {
            "enabled": false
          },
          "bear-notes": {
            "enabled": false
          },
          "blucli": {
            "enabled": false
          },
          "bluebubbles": {
            "enabled": false
          },
          "spotify-player": {
            "enabled": false
          }
        }
      },
      "plugins": {
        "entries": {
          "bonjour": {
            "enabled": false
          },
          "brave": {
            "enabled": true,
            "config": {
              "webSearch": {
                "apiKey": "__OPEN…ED__"
              }
            }
          },
          "openrouter": {
            "enabled": true,
            "config": {}
          },
          "ollama": {
            "enabled": true,
            "config": {}
          },
          "memory-core": {
            "config": {}
          },
          "telegram": {
            "config": {}
          }
        }
      },
      "messages": {
        "ackReactionScope": "group-mentions"
      }
    },
    "hash": "10f5a3aa82d9e8db00d07d96a2c1ae6afa4caf5816b6b9eee39e12ade0a95334",
    "issues": [],
    "warnings": [],
    "legacyIssues": []
  }
}[... 19304 more characters truncated]


Now I need to test the TTS functionality with a German female voice. Let me try to run the sherpa-onnx TTS command.

exec

/home/agent/.openclaw/workspace/skills/openclaw-skills/skills/danielsinewe/sherpa-onnx-tts/bin/sherpa-onnx-tts -o /tmp/test_tts.wav "Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme."


Validation failed for tool "exec":
  - env: must be object

Received arguments:
{
  "command": "/home/agent/.openclaw/workspace/skills/openclaw-skills/skills/danielsinewe/sherpa-onnx-tts/bin/sherpa-onnx-tts -o /tmp/test_tts.wav \"Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme.\"",
  "env": "SHERPA_ONNX_RUNTIME_DIR:/home/agent/.openclaw/tools/sherpa-onnx-tts/runtime\nSHERPA_ONNX_MODEL_DIR:/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low"
}


We need to fix the env format; it should be an object mapping.
Let's construct correct command with env as JSON object.


/bin/bash: Zeile 1: /home/agent/.openclaw/workspace/skills/openclaw-skills/skills/danielsinewe/sherpa-onnx-tts/bin/sherpa-onnx-tts: Keine Berechtigung

Command not executable (permission denied)


(no output)


We are trying to run the sherpa-onnx-tts skill with a German female voice.
 We have:
   - Runtime downloaded and extracted to /home/agent/.openclaw/tools/sherpa-onnx-tts/runtime
   - Model (vits-piper-de_DE-eva_k-x_low) downloaded and extracted to /home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low
   - A wrapper script at /home/agent/.openclaw/workspace/skills/openclaw-skills/skills/danielsinewe/sherpa-onnx-tts/bin/sherpa-onnx-tts

 However, we are having trouble configuring the skill in the OpenClaw config via the gateway tool.

 Let's try to set the skill configuration by writing to the openclaw.json file directly, or by using the gateway tool correctly.

 Since the gateway tool is having issues with the patch, let's try to read the current config, then write the updated config.

 Alternatively, we can try to use the gateway tool with the correct JSON5 format.

 Let's first check the current skills section in the config.

 We'll do:
   gateway config.get --path skills.entries

 Then, we'll create a patch that adds the sherpa-onnx-tts skill.

 However, note that the error was about invalid character 'T'. This might be because we are not providing valid JSON5.

 Let's try to use the gateway tool with a JSON string that is valid.

 We can try:

   gateway config.patch --path skills.entries --patch '{"sherpa-onnx-tts":{"enabled":true,"env":{"SHERPA_ONNX_RUNTIME_DIR":"~/.openclaw/tools/sherpa-onnx-tts/runtime","SHERPA_ONNX_MODEL_DIR":"~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low"}}}'

 But note: the previous error said invalid character 'T' at 1:1. This might be because the patch is being interpreted as a string and the first character is not {.

 Let's try to wrap the entire patch in a JSON object and use the --raw flag? Actually, the --raw flag is for when the patch is a raw string that is the entire JSON to merge? The documentation is unclear.

 Alternatively, let's try to use the gateway tool to set the entire skills.entries object.

 But note: we don't want to overwrite the existing skills.

 Let's try to get the current skills.entries, then update it, and then set it.

 However, given the time, let's try a different approach: we can create a temporary file with the desired config and then use config.apply.

 Steps:

   1. Get the current config: gateway config.get > /tmp/current.json
   2. Update the skills.entries in the JSON to include our skill.
   3. Apply the config: gateway config.apply --file /tmp/current.json

 But note: the gateway tool might not accept a file? Let's check the gateway tool documentation.

 Alternatively, we can use the gateway tool with the --raw flag and a string.

 However, let's first try to run the TTS command directly to see if it works, and then we can worry about the skill configuration later.

 We have the wrapper script and the environment variables set.

 Let's try to run the TTS command with the environment variables set in the exec tool.

 We'll use the exec tool to run the command with the environment.

 If it works, then we can note that the skill is set up and ready to use, and we can update the MEMORY.md and the skill documentation.

 Let's do that.


/home/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/parse-options.cc:Read:373 /home/agent/.openclaw/tools/sherpa-onnx-tts/runtime/bin/sherpa-onnx tts --model=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/de_DE-eva_k-x_low.onnx --tokens=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/tokens.txt -o /tmp/test_tts.wav 'Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme.'

OnlineRecognizerConfig(feat_config=FeatureExtractorConfig(sampling_rate=16000, feature_dim=80, low_freq=20, high_freq=-400, dither=0, normalize_samples=True, snip_edges=False), model_config=OnlineModelConfig(transducer=OnlineTransducerModelConfig(encoder="", decoder="", joiner=""), paraformer=OnlineParaformerModelConfig(encoder="", decoder=""), wenet_ctc=OnlineWenetCtcModelConfig(model="", chunk_size=16, num_left_chunks=4), zipformer2_ctc=OnlineZipformer2CtcModelConfig(model=""), nemo_ctc=OnlineNeMoCtcModelConfig(model=""), t_one_ctc=OnlineToneCtcModelConfig(model=""), provider_config=ProviderConfig(device=0, provider="cpu", cuda_config=CudaConfig(cudnn_conv_algo_search=1), trt_config=TensorrtConfig(trt_max_workspace_size=2147483647, trt_max_partition_iterations=10, trt_min_subgraph_size=5, trt_fp16_enable="True", trt_detailed_build_log="False", trt_engine_cache_enable="True", trt_engine_cache_path=".", trt_timing_cache_enable="True", trt_timing_cache_path=".",trt_dump_subgraphs="False" )), tokens="", num_threads=1, warm_up=0, debug=False, model_type="", modeling_unit="cjkchar", bpe_vocab=""), lm_config=OnlineLMConfig(model="", scale=0.5, lodr_scale=0.01, lodr_fst="", lodr_backoff_id=-1, shallow_fusion=True), endpoint_config=EndpointConfig(rule1=EndpointRule(must_contain_nonsilence=False, min_trailing_silence=2.4, min_utterance_length=0), rule2=EndpointRule(must_contain_nonsilence=True, min_trailing_silence=1.2, min_utterance_length=0), rule3=EndpointRule(must_contain_nonsilence=False, min_trailing_silence=0, min_utterance_length=20)), ctc_fst_decoder_config=OnlineCtcFstDecoderConfig(graph="", max_active=3000), enable_endpoint=True, max_active_paths=4, hotwords_score=1.5, hotwords_file="", decoding_method="greedy_search", blank_penalty=0, temperature_scale=2, rule_fsts="", rule_fars="", reset_encoder=False, hr=HomophoneReplacerConfig(lexicon="", rule_fsts=""))
/home/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/online-model-config.cc:Validate:122 tokens: '' does not exist, you should provide either a tokens buffer or a tokens file
Errors in config!

(Command exited with code 255)


We need to provide the correct tokens file path. The tokens file is in the model directory. Let's adjust the command to point to the tokens file. The wrapper script already sets TOKENS_FILE="$MODEL_DIR/tokens.txt". Let's check if that file exists.

We'll run the command directly with the sherpa-onnx binary, specifying model and tokens.

/home/agent/.openclaw/tools/sherpa-onnx-tts/runtime/bin/sherpa-onnx tts --model=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/de_DE-eva_k-x_low.onnx --tokens=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/tokens.txt -o /tmp/test_tts.wav "Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme."


Let me check what's actually in the tokens.txt file and if we're pointing to the right location.


-rw-r--r-- 1 agent agent 763 Dez  4 06:59 /home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/tokens.txt


The token file exists but the command is still not finding it. Let me check the path being used in the error. The error says tokens="", meaning it's not getting the --tokens parameter correctly. Let me try a simpler approach and use the absolute path. Also check if we need to specify the data-dir.

Let me first check what the sherpa-onnx tts command expects by looking at its help.


/home/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/parse-options.cc:PrintUsage:414

Usage:

(1) Streaming transducer

  ./bin/sherpa-onnx \
    --tokens=/path/to/tokens.txt \
    --encoder=/path/to/encoder.onnx \
    --decoder=/path/to/decoder.onnx \
    --joiner=/path/to/joiner.onnx \
    --provider=cpu \
    --num-threads=2 \
    --decoding-method=greedy_search \
    /path/to/foo.wav [bar.wav foobar.wav ...]

(2) Streaming zipformer2 CTC

  wget -q https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2
  tar xvf sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13.tar.bz2

  ./bin/sherpa-onnx \
    --debug=1 \
    --zipformer2-ctc-model=./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/ctc-epoch-20-avg-1-chunk-16-left-128.onnx \
    --tokens=./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/tokens.txt \
    ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/test_wavs/DEV_T0000000000.wav \
    ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/test_wavs/DEV_T0000000001.wav \
    ./sherpa-onnx-streaming-zipformer-ctc-multi-zh-hans-2023-12-13/test_wavs/DEV_T0000000002.wav

(3) Streaming paraformer

  wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2
  tar xvf sherpa-onnx-streaming-paraformer-bilingual-zh-en.tar.bz2

  ./bin/sherpa-onnx \
    --tokens=./sherpa-onnx-streaming-paraformer-bilingual-zh-en/tokens.txt \
    --paraformer-encoder=./sherpa-onnx-streaming-paraformer-bilingual-zh-en/encoder.onnx \
    --paraformer-decoder=./sherpa-onnx-streaming-paraformer-bilingual-zh-en/decoder.onnx \
    ./sherpa-onnx-streaming-paraformer-bilingual-zh-en/test_wavs/0.wav

Note: It supports decoding multiple files in batches

Default value for num_threads is 2.
Valid values for decoding_method: greedy_search (default), modified_beam_search.
Valid values for provider: cpu (default), cuda, coreml.
foo.wav should be of single channel, 16-bit PCM encoded wave file; its
sampling rate can be arbitrary and does not need to be 16kHz.

Please refer to
https://k2-fsa.github.io/sherpa/onnx/pretrained_models/index.html
for a list of pre-trained models to download.

Options:
  --reset-encoder             : True to reset encoder_state on an endpoint after empty segment.Done in `Reset()` method, after an endpoint was detected. (bool, default = false)
  --rule-fsts                 : If not empty, it specifies fsts for inverse text normalization. If there are multiple fsts, they are separated by a comma. (string, default = "")
  --decoding-method           : decoding method,now support greedy_search and modified_beam_search. (string, default = "greedy_search")
  --hotwords-score            : The bonus score for each token in context word/phrase. Used only when decoding_method is modified_beam_search (float, default = 1.5)
  --blank-penalty             : The penalty applied on blank symbol during decoding. Note: It is a positive value. Increasing value will lead to lower deletion at the costof higher insertions. Currently only applicable for transducer models. (float, default = 0)
  --temperature-scale         : Temperature scale for confidence computation in decoding. (float, default = 2)
  --max-active-paths          : beam size used in modified beam search. (int, default = 4)
  --enable-endpoint           : True to enable endpoint detection. False to disable it. (bool, default = true)
  --hr-rule-fsts              : Fst files for HomophoneReplacer. If there are multiple, they are separated by a comma. E.g., a.fst,b.fst,c.fst (string, default = "")
  --hr-lexicon                : Path to lexicon.txt used by HomophoneReplacer. (string, default = "")
  --trt-max-partition-iterations : Limit partitioning iterations for model conversion. (int, default = 10)
  --cuda-cudnn-conv-algo-search : CuDNN convolution algrorithm search (int, default = 1)
  --tokens                    : Path to tokens.txt (string, default = "")
  --rule-fars                 : If not empty, it specifies fst archives for inverse text normalization. If there are multiple archives, they are separated by a comma. (string, default = "")
  --nemo-ctc-model            : Path to CTC model.onnx from NeMo. Please see https://github.com/k2-fsa/sherpa-onnx/pull/843 (string, default = "")
  --zipformer2-ctc-model      : Path to CTC model.onnx. See also https://github.com/k2-fsa/icefall/pull/1413 (string, default = "")
  --trt-dump-subgraphs        : Dump optimized subgraphs for debugging. (bool, default = false)
  --trt-engine-cache-enable   : Enable caching of TensorRT engines. (bool, default = true)
  --feat-dim                  : Feature dimension. Must match the one expected by the model. Not used by whisper and CED models (int, default = 80)
  --trt-timing-cache-path     : Set path for storing timing cache. (string, default = ".")
  --decoder                   : Path to decoder.onnx (string, default = "")
  --low-freq                  : Low cutoff frequency for mel bins (float, default = 20)
  --rule3-min-utterance-length : This endpointing rule3 requires utterance-length (in seconds) to be >= this value. (float, default = 20)
  --trt-engine-cache-path     : Set path to store cached TensorRT engines. (string, default = ".")
  --rule2-min-utterance-length : This endpointing rule2 requires utterance-length (in seconds) to be >= this value. (float, default = 0)
  --trt-timing-cache-enable   : Enable use of timing cache to speed up builds. (bool, default = true)
  --trt-fp16-enable           : Enable FP16 precision for faster performance. (bool, default = true)
  --joiner                    : Path to joiner.onnx (string, default = "")
  --provider                  : Specify a provider to use: cpu, cuda, coreml (string, default = "cpu")
  --rule3-must-contain-nonsilence : If True, for this endpointing rule3 to apply there must be nonsilence in the best-path traceback. For decoding, a non-blank token is considered as non-silence (bool, default = false)
  --ctc-graph                 : Path to H.fst, HL.fst, or HLG.fst (string, default = "")
  --wenet-ctc-model           : Path to CTC model.onnx from WeNet. Please see https://github.com/k2-fsa/sherpa-onnx/pull/425 (string, default = "")
  --sample-rate               : Sampling rate of the input waveform. Note: You can have a different sample rate for the input waveform. We will do resampling inside the feature extractor (int, default = 16000)
  --lm-provider               : Specify a provider to LM model use: cpu, cuda, coreml (string, default = "cpu")
  --encoder                   : Path to encoder.onnx (string, default = "")
  --rule3-min-trailing-silence : This endpointing rule3 requires duration of trailing silence in seconds) to be >= this value. (float, default = 0)
  --lodr-backoff-id           : ID of the backoff in the LODR FST. -1 means autodetect (int, default = -1)
  --trt-detailed-build-log    : Enable detailed logging of build steps. (bool, default = false)
  --lm-num-threads            : Number of threads to run the neural network of LM model (int, default = 1)
  --paraformer-decoder        : Path to decoder.onnx of paraformer. (string, default = "")
  --dither                    : Dithering constant (0.0 means no dither). By default the audio samples are in range [-1,+1], so 0.00003 is a good value, equivalent to the default 1.0 from kaldi (float, default = 0)
  --high-freq                 : High cutoff frequency for mel bins (if <= 0, offset from Nyquist) (float, default = -400)
  --paraformer-encoder        : Path to encoder.onnx of paraformer. (string, default = "")
  --hotwords-file             : The file containing hotwords, one words/phrases per line, For example: HELLO WORLD你好世界 (string, default = "")
  --rule1-min-utterance-length : This endpointing rule1 requires utterance-length (in seconds) to be >= this value. (float, default = 0)
  --t-one-ctc-model           : Path to CTC model.onnx from T-one. Please see https://github.com/k2-fsa/sherpa-onnx/pull/2571 (string, default = "")
  --num-threads               : Number of threads to run the neural network (int, default = 1)
  --warm-up                   : Number of warm-up to run the onnxruntimeValid vales are: zipformer2 (int, default = 0)
  --trt-max-workspace-size    : Set TensorRT EP GPU memory usage limit. (int64, default = 2147483647)
  --debug                     : true to print model information while loading it. (bool, default = false)
  --device                    : GPU device index for CUDA and Trt EP (int, default = 0)
  --modeling-unit             : The modeling unit of the model, commonly used units are bpe, cjkchar, cjkchar+bpe, etc. Currently, it is needed only when hotwords are provided, we need it to encode the hotwords into token sequence. (string, default = "cjkchar")
  --ctc-max-active            : Decoder max active states.  Larger->slower; more accurate (int, default = 3000)
  --bpe-vocab                 : The vocabulary generated by google's sentencepiece program. It is a file has two columns, one is the token, the other is the log probability, you can get it from the directory where your bpe model is generated. Only used when hotwords provided and the modeling unit is bpe or cjkchar+bpe (string, default = "")
  --model-type                : Specify it to reduce model initialization time. Valid values are: conformer, lstm, zipformer, zipformer2, wenet_ctc, nemo_ctc. All other values lead to loading the model twice. (string, default = "")
  --wenet-ctc-chunk-size      : Chunk size after subsampling used for decoding. (int, default = 16)
  --rule1-must-contain-nonsilence : If True, for this endpointing rule1 to apply there must be nonsilence in the best-path traceback. For decoding, a non-blank token is considered as non-silence (bool, default = false)
  --rule1-min-trailing-silence : This endpointing rule1 requires duration of trailing silence in seconds) to be >= this value. (float, default = 2.4)
  --rule2-must-contain-nonsilence : If True, for this endpointing rule2 to apply there must be nonsilence in the best-path traceback. For decoding, a non-blank token is considered as non-silence (bool, default = true)
  --rule2-min-trailing-silence : This endpointing rule2 requires duration of trailing silence in seconds) to be >= this value. (float, default = 1.2)
  --lm                        : Path to LM model. (string, default = "")
  --lodr-fst                  : Path to LODR FST model. (string, default = "")
  --trt-min-subgraph-size     : Set minimum size for subgraphs in partitioning. (int, default = 5)
  --lm-shallow-fusion         : Boolean whether to use shallow fusion or rescore. (bool, default = true)
  --lm-scale                  : LM scale. (float, default = 0.5)
  --wenet-ctc-num-left-chunks : Number of left chunks after subsampling used for decoding. (int, default = 4)
  --lodr-scale                : LODR scale. (float, default = 0.01)
  --hr-dict-dir               : Not used. You don't need to provide a value for it (string, default = "")

Standard options:
  --config                    : Configuration file to read (this option may be repeated) (string, default = "")
  --help                      : Print out usage message (bool, default = false)
  --print-args                : Print the command line arguments (to stderr) (bool, default = true)

status exitCode durationMs aggregated cwd


We need to use the tts subcommand, not the main sherpa-onnx (which is for ASR). Let's see if there is a tts subcommand.
We should look for sherpa-onnx-tts binary. Maybe the runtime has a tts binary.
Let's check the runtime bin directory.


insgesamt 68300
drwxr-xr-x 2 agent agent    4096 Jan 15 10:36 .
drwxrwxr-x 5 agent agent    4096 Apr 29 17:12 ..
-rwxr-xr-x 1 agent agent 3120888 Jan 15 10:30 sherpa-onnx
-rwxr-xr-x 1 agent agent 3113064 Jan 15 10:31 sherpa-onnx-alsa
-rwxr-xr-x 1 agent agent 3229360 Jan 15 10:31 sherpa-onnx-alsa-offline
-rwxr-xr-x 1 agent agent  408848 Jan 15 10:31 sherpa-onnx-alsa-offline-audio-tagging
-rwxr-xr-x 1 agent agent  469904 Jan 15 10:32 sherpa-onnx-alsa-offline-speaker-identification
-rwxr-xr-x 1 agent agent  817320 Jan 15 10:29 sherpa-onnx-keyword-spotter
-rwxr-xr-x 1 agent agent  813904 Jan 15 10:32 sherpa-onnx-keyword-spotter-alsa
-rwxr-xr-x 1 agent agent  963528 Jan 15 10:32 sherpa-onnx-keyword-spotter-microphone
-rwxr-xr-x 1 agent agent 3261408 Jan 15 10:33 sherpa-onnx-microphone
-rwxr-xr-x 1 agent agent 3376544 Jan 15 10:33 sherpa-onnx-microphone-offline
-rwxr-xr-x 1 agent agent  541128 Jan 15 10:34 sherpa-onnx-microphone-offline-audio-tagging
-rwxr-xr-x 1 agent agent  606672 Jan 15 10:34 sherpa-onnx-microphone-offline-speaker-identification
-rwxr-xr-x 1 agent agent 3230984 Jan 15 10:30 sherpa-onnx-offline
-rwxr-xr-x 1 agent agent  387256 Jan 15 10:30 sherpa-onnx-offline-audio-tagging
-rwxr-xr-x 1 agent agent  327880 Jan 15 10:30 sherpa-onnx-offline-denoiser
-rwxr-xr-x 1 agent agent  398232 Jan 15 10:30 sherpa-onnx-offline-language-identification
-rwxr-xr-x 1 agent agent 3245056 Jan 15 10:30 sherpa-onnx-offline-parallel
-rwxr-xr-x 1 agent agent  290672 Jan 15 10:30 sherpa-onnx-offline-punctuation
-rwxr-xr-x 1 agent agent  378560 Jan 15 10:30 sherpa-onnx-offline-source-separation
-rwxr-xr-x 1 agent agent  505496 Jan 15 10:31 sherpa-onnx-offline-speaker-diarization
-rwxr-xr-x 1 agent agent 3325864 Jan 15 10:31 sherpa-onnx-offline-tts
-rwxr-xr-x 1 agent agent 3483968 Jan 15 10:33 sherpa-onnx-offline-tts-play
-rwxr-xr-x 1 agent agent 3339488 Jan 15 10:32 sherpa-onnx-offline-tts-play-alsa
-rwxr-xr-x 1 agent agent 3798296 Jan 15 10:35 sherpa-onnx-offline-websocket-server
-rwxr-xr-x 1 agent agent 3330680 Jan 15 10:31 sherpa-onnx-offline-zeroshot-tts
-rwxr-xr-x 1 agent agent  362656 Jan 15 10:30 sherpa-onnx-online-punctuation
-rwxr-xr-x 1 agent agent  921888 Jan 15 10:35 sherpa-onnx-online-websocket-client
-rwxr-xr-x 1 agent agent 3703712 Jan 15 10:35 sherpa-onnx-online-websocket-server
-rwxr-xr-x 1 agent agent  154968 Jan 15 10:27 sherpa-onnx-pa-devs
-rwxr-xr-x 1 agent agent  373192 Jan 15 10:30 sherpa-onnx-vad
-rwxr-xr-x 1 agent agent  379520 Jan 15 10:32 sherpa-onnx-vad-alsa
-rwxr-xr-x 1 agent agent 3293552 Jan 15 10:32 sherpa-onnx-vad-alsa-offline-asr
-rwxr-xr-x 1 agent agent  513344 Jan 15 10:33 sherpa-onnx-vad-microphone
-rwxr-xr-x 1 agent agent 3441720 Jan 15 10:34 sherpa-onnx-vad-microphone-offline-asr
-rwxr-xr-x 1 agent agent 3447000 Jan 15 10:34 sherpa-onnx-vad-microphone-simulated-streaming-asr
-rwxr-xr-x 1 agent agent 3296944 Jan 15 10:34 sherpa-onnx-vad-with-offline-asr
-rwxr-xr-x 1 agent agent 3176936 Jan 15 10:34 sherpa-onnx-vad-with-online-asr
-rwxr-xr-x 1 agent agent   15792 Jan 15 10:27 sherpa-onnx-version


I see the issue - we need to use the sherpa-onnx-offline-tts command for TTS, not the generic sherpa-onnx command. Let me check the correct usage.


/home/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/parse-options.cc:PrintUsage:414

Offline/Non-streaming text-to-speech with sherpa-onnx

Usage example:

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-piper-en_US-amy-low.tar.bz2
tar xf vits-piper-en_US-amy-low.tar.bz2

./bin/sherpa-onnx-offline-tts \
 --vits-model=./vits-piper-en_US-amy-low/en_US-amy-low.onnx \
 --vits-tokens=./vits-piper-en_US-amy-low/tokens.txt \
 --vits-data-dir=./vits-piper-en_US-amy-low/espeak-ng-data \
 --output-filename=./generated.wav \
 "Today as always, men fall into two groups: slaves and free men. Whoever does not have two-thirds of his day for himself, is a slave, whatever he may be: a statesman, a businessman, an official, or a scholar."

It will generate a file ./generated.wav as specified by --output-filename.

You can find more models at
https://github.com/k2-fsa/sherpa-onnx/releases/tag/tts-models

Please see
https://k2-fsa.github.io/sherpa/onnx/tts/index.html
or details.

Options:
  --tts-silence-scale         : Duration of the pause is scaled by this number. So a smaller value leads to a shorter pause. (float, default = 0.2)
  --tts-rule-fars             : It not empty, it contains a list of rule FST archive filenames.Multiple filenames are separated by a comma and they are applied from left to right. An example value: rule1.far,rule2.far,rule3.far. Note that an *.far can contain multiple *.fst files (string, default = "")
  --provider                  : Specify a provider to use: cpu, cuda, coreml (string, default = "cpu")
  --kitten-data-dir           : Path to the directory containing dict for espeak-ng. (string, default = "")
  --kitten-model              : Path to kitten model (string, default = "")
  --zipvoice-guidance-scale   : The scale of classifier-free guidance during inference for ZipVoice (default: 1.0) (float, default = 1)
  --zipvoice-target-rms       : Target speech normalization rms value for ZipVoice (default: 0.1) (float, default = 0.1)
  --zipvoice-t-shift          : Shift t to smaller ones if t_shift < 1.0 (default: 0.5) (float, default = 0.5)
  --zipvoice-feat-scale       : Feature scale for ZipVoice (default: 0.1) (float, default = 0.1)
  --zipvoice-encoder          : Path to zipvoice text model (string, default = "")
  --zipvoice-data-dir         : Path to the directory containing dict for espeak-ng. (string, default = "")
  --zipvoice-tokens           : Path to tokens.txt for ZipVoice models (string, default = "")
  --vits-length-scale         : Speech speed. Larger->Slower; Smaller->faster. (float, default = 1)
  --kitten-length-scale       : Inverse of speech speed. Larger->Slower; Smaller->faster. (float, default = 1)
  --vits-noise-scale          : noise_scale for VITS models (float, default = 0.667)
  --zipvoice-vocoder          : Path to zipvoice vocoder (string, default = "")
  --vits-tokens               : Path to tokens.txt for VITS models (string, default = "")
  --matcha-acoustic-model     : Path to matcha acoustic model (string, default = "")
  --num-threads               : Number of threads to run the neural network (int, default = 1)
  --kokoro-voices             : Path to voices.bin for Kokoro models (string, default = "")
  --zipvoice-decoder          : Path to zipvoice flow-matching decoder model (string, default = "")
  --vits-model                : Path to VITS model (string, default = "")
  --sid                       : Speaker ID. Used only for multi-speaker models, e.g., models trained using the VCTK dataset. Not used for single-speaker models, e.g., models trained using the LJSpeech dataset (int, default = 0)
  --output-filename           : Path to save the generated audio (string, default = "./generated.wav")
  --matcha-lexicon            : Path to lexicon.txt for Matcha models. You can pass multiple files separated by comma , e.g., lexicon.txt,lexicon2.txt,lexicon3.txt (string, default = "")
  --kitten-voices             : Path to voices.bin for kitten models (string, default = "")
  --matcha-length-scale       : Speech speed. Larger->Slower; Smaller->faster. (float, default = 1)
  --vits-lexicon              : Path to lexicon.txt for VITS models (string, default = "")
  --kokoro-lexicon            : Path to lexicon.txt for Kokoro models. Used only for Kokoro >= v1.0You can pass multiple files, separated by ','. Example: ./lexicon-us-en.txt,./lexicon-zh.txt (string, default = "")
  --matcha-vocoder            : Path to matcha vocoder (string, default = "")
  --debug                     : true to print model information while loading it. (bool, default = false)
  --matcha-noise-scale        : noise_scale for Matcha models (float, default = 1)
  --matcha-tokens             : Path to tokens.txt for Matcha models (string, default = "")
  --kokoro-lang               : Used only by kokoro >= 1.0. Example values: en (English), es (Spanish), fr (French), hi (hindi), it (Italian), pt-br (Brazilian Portuguese).You can leave it empty, in which case you need to provide --kokoro-lexicon. (string, default = "")
  --vits-noise-scale-w        : noise_scale_w for VITS models (float, default = 0.8)
  --matcha-data-dir           : Path to the directory containing dict for espeak-ng. If it is given, --matcha-lexicon is ignored. (string, default = "")
  --vits-data-dir             : Path to the directory containing dict for espeak-ng. If it is given, --vits-lexicon is ignored. (string, default = "")
  --matcha-dict-dir           : Not used. You don't need to provide a value for it (string, default = "")
  --zipvoice-lexicon          : Path to lexicon.txt for Chinese (string, default = "")
  --kokoro-tokens             : Path to tokens.txt for Kokoro models (string, default = "")
  --tts-rule-fsts             : It not empty, it contains a list of rule FST filenames.Multiple filenames are separated by a comma and they are applied from left to right. An example value: rule1.fst,rule2.fst,rule3.fst (string, default = "")
  --kokoro-data-dir           : Path to the directory containing dict for espeak-ng. (string, default = "")
  --tts-max-num-sentences     : Maximum number of sentences that we process at a time. This is to avoid OOM for very long input text. If you set it to -1, then we process all sentences in a single batch. (int, default = 1)
  --kitten-tokens             : Path to tokens.txt for kitten models (string, default = "")
  --kokoro-model              : Path to Kokoro model (string, default = "")
  --vits-dict-dir             : Not used. You don't need to provide a value for it (string, default = "")
  --kokoro-dict-dir           : Not used. You don't need to provide a value for it (string, default = "")
  --kokoro-length-scale       : Speech speed. Larger->Slower; Smaller->faster. (float, default = 1)

Standard options:
  --help                      : Print out usage message (bool, default = false)
  --print-args                : Print the command line arguments (to stderr) (bool, default = true)
  --config                    : Configuration file to read (this option may be repeated) (string, default = "")


Now I need to test the correct TTS command for the sherpa-onnx offline TTS. Let me use the sherpa-onnx-offline-tts binary with the German Eva model.

/home/agent/.openclaw/tools/sherpa-onnx-tts/runtime/bin/sherpa-onnx-offline-tts \
  --vits-model=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/de_DE-eva_k-x_low.onnx \
  --vits-tokens=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/tokens.txt \
  --vits-data-dir=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/espeak-ng-data \
  --output-filename=/tmp/test_tts.wav \
  "Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme."


/home/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/parse-options.cc:Read:373 /home/agent/.openclaw/tools/sherpa-onnx-tts/runtime/bin/sherpa-onnx-offline-tts --vits-model=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/de_DE-eva_k-x_low.onnx --vits-tokens=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/tokens.txt --vits-data-dir=/home/agent/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-de_DE-eva_k-x_low/espeak-ng-data --output-filename=/tmp/test_tts.wav 'Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme.'

/home/runner/work/sherpa-onnx/sherpa-onnx/sherpa-onnx/csrc/piper-phonemize-lexicon.cc:PiperPhonemesToIdsVits:146 Skip unknown phonemes. Unicode codepoint: \U+0327.
Number of threads: 1
Elapsed seconds: 0.205 s
Audio duration: 3.504 s
Real-time factor (RTF): 0.205/3.504 = 0.059
The text is: Hallo Sir, dies ist ein Test der deutschen weiblichen Stimme.. Speaker ID: 0
Saved to /tmp/test_tts.wav successfully!
sample=56064, progress=1.000000


Perfect! The TTS command worked successfully. The German female voice generated the audio file at `/tmp/test_tts.wav`. Now I need to update the skill configuration properly and create a proper wrapper script.

Let me test playing the audio and then finish setting up the skill:


Wiedergabe: WAVE '/tmp/test_tts.wav' : Signed 16 bit Little Endian, Rate: 16000 Hz, mono


Now I need to update the wrapper script to use the correct command for offline TTS. Let me fix the wrapper script.

write

#!/bin/sh
# Wrapper for sherpa-onnx TTS
# Uses the runtime and model directories set via environment variables

BASE_DIR="$(cd "$(dirname "$0")/.." && pwd)"
RUNTIME_DIR="${SHERPA_ONNX_RUNTIME_DIR:-$BASE_DIR/runtime}"
MODEL_DIR="${SHERPA_ONNX_MODEL_DIR:-$BASE_DIR/models/vits-piper-en_US-lessac-high}"

# Default to the first .onnx file in the model directory if not set
if [ -z "$SHERPA_ONNX_MODEL_FILE" ]; then
    MODEL_FILE=$(find "$MODEL_DIR" -name "*.onnx" | head -1)
else
    MODEL_FILE="$SHERPA_ONNX_MODEL_FILE"
fi

# Default tokens file
TOKENS_FILE="$MODEL_DIR/tokens.txt"

# Default data directory for espeak-ng
DATA_DIR="$MODEL_DIR/espeak-ng-data"

# Execute the sherpa-onnx offline tts command
"$RUNTIME_DIR/bin/sherpa-onnx-offline-tts" \
    --vits-model="$MODEL_FILE" \
    --vits-tokens="$TOKENS_FILE" \
    --vits-data-dir="$DATA_DIR" \
    "$@"


Successfully wrote 860 bytes to /home/agent/.openclaw/workspace/skills/openclaw-skills/skills/danielsinewe/sherpa-onnx-tts/bin/sherpa-onnx-tts


Now I need to update the skill configuration to use the correct model and make sure it's enabled. Let me try the config patch again with the correct format.


The gateway config.patch command seems to be having syntax issues with the JSON5 format. Let me try a different approach - I'll read the current config, modify it manually, and then apply it.

First, let me get the current skills configuration: