improve(tts-voice): 改用 spawnSync 參數陣列避免 shell quoting 問題 #1
Reference in New Issue
Block a user
Delete Branch "yucheng/openclaw-skill:improve/tts-voice-safe-curl-args"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
改進說明
tts-voice目前用字串拼接組curl指令並透過execSync執行。當輸入文字包含引號、跳脫字元或 shell 特殊符號時,容易出現參數被 shell 誤解析的風險,影響可維護性與穩定性。變更內容
child_process匯入改為execSync, spawnSyncgenerateSpeech():spawnSync('curl', args)+ 參數陣列傳遞result.status === 0、HTTP code 為200、輸出檔存在測試建議
tts-voice,測試一般輸入:tts 你好,今天要開會tts 他說: "Hello & Welcome"🤖 由 yucheng 自動審查並提交
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.