mirror of https://github.com/openclaw/openclaw.git
Skills: tighten env path guidance
This commit is contained in:
parent
a3de1f5f55
commit
ab141df4b5
|
|
@ -66,7 +66,13 @@ Local TTS using the sherpa-onnx offline CLI.
|
|||
1. Download the runtime for your OS (extracts into `$OPENCLAW_STATE_DIR/tools/sherpa-onnx-tts/runtime`, default `~/.openclaw/tools/sherpa-onnx-tts/runtime`)
|
||||
2. Download a voice model (extracts into `$OPENCLAW_STATE_DIR/tools/sherpa-onnx-tts/models`, default `~/.openclaw/tools/sherpa-onnx-tts/models`)
|
||||
|
||||
Update the active OpenClaw config file (`$OPENCLAW_CONFIG_PATH`, default `~/.openclaw/openclaw.json`). Use a path inside your active state directory (`$OPENCLAW_STATE_DIR`, default `~/.openclaw`) for the runtime and model directories:
|
||||
Resolve the active state directory first:
|
||||
|
||||
```bash
|
||||
STATE_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
|
||||
```
|
||||
|
||||
Then write those resolved paths into the active OpenClaw config file (`$OPENCLAW_CONFIG_PATH`, default `~/.openclaw/openclaw.json`):
|
||||
|
||||
```json5
|
||||
{
|
||||
|
|
@ -74,8 +80,8 @@ Update the active OpenClaw config file (`$OPENCLAW_CONFIG_PATH`, default `~/.ope
|
|||
entries: {
|
||||
"sherpa-onnx-tts": {
|
||||
env: {
|
||||
SHERPA_ONNX_RUNTIME_DIR: "<state-dir>/tools/sherpa-onnx-tts/runtime",
|
||||
SHERPA_ONNX_MODEL_DIR: "<state-dir>/tools/sherpa-onnx-tts/models/vits-piper-en_US-lessac-high",
|
||||
SHERPA_ONNX_RUNTIME_DIR: "/path/to/your/state-dir/tools/sherpa-onnx-tts/runtime",
|
||||
SHERPA_ONNX_MODEL_DIR: "/path/to/your/state-dir/tools/sherpa-onnx-tts/models/vits-piper-en_US-lessac-high",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -83,8 +89,6 @@ Update the active OpenClaw config file (`$OPENCLAW_CONFIG_PATH`, default `~/.ope
|
|||
}
|
||||
```
|
||||
|
||||
`<state-dir>` means your active `OPENCLAW_STATE_DIR` (default `~/.openclaw`).
|
||||
|
||||
The wrapper lives in this skill folder. Run it directly, or add the wrapper to PATH:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ const CASES: GuidanceCase[] = [
|
|||
forbidden: [
|
||||
"for f in ~/.openclaw/agents/<agentId>/sessions/*.jsonl",
|
||||
'rg -l "phrase" ~/.openclaw/agents/<agentId>/sessions/*.jsonl',
|
||||
"~/.openclaw/agents/<agentId>/sessions/<id>.jsonl",
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
@ -35,10 +36,15 @@ const CASES: GuidanceCase[] = [
|
|||
},
|
||||
{
|
||||
file: "skills/sherpa-onnx-tts/SKILL.md",
|
||||
required: ["OPENCLAW_STATE_DIR", "OPENCLAW_CONFIG_PATH"],
|
||||
required: [
|
||||
"OPENCLAW_STATE_DIR",
|
||||
"OPENCLAW_CONFIG_PATH",
|
||||
'STATE_DIR="${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"',
|
||||
],
|
||||
forbidden: [
|
||||
'SHERPA_ONNX_RUNTIME_DIR: "~/.openclaw/tools/sherpa-onnx-tts/runtime"',
|
||||
'SHERPA_ONNX_MODEL_DIR: "~/.openclaw/tools/sherpa-onnx-tts/models/vits-piper-en_US-lessac-high"',
|
||||
"<state-dir>",
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue