Stackchan open claw
I used my openclaw agent to make some changes to the stock firmware and have it set so my openclaw can talk through my stackchan now.but when sending voice messages the other way seems to not work when it tries to record my voice input..what issues we fixed so far
The fix was bypassing codec->Write()/esp_codec_dev_write() and writing PCM directly to the I2S TX channel via i2s_channel_write().
The bridge is at 16kHz WAV — matches the proven working pipeline. Here's the summary:
What works:
• stackchan_speak("text") → edge-tts (Sonia) → ffmpeg 16kHz mono WAV → POST /speak → I2S direct write → StackChan speaker
What the fix was:
• Went through ~6 firmware iterations to isolate the issue • codec->Write() → esp_codec_dev_write() silently fails in the integrated XiaoZhi firmware (I2S format conflict with duplex config) • Solution: use codec layer only for amp/volume management (EnableOutput/SetOutputVolume), write PCM straight to TX handle via i2s_channel_write()
What's next? Want me to check the full voice recording pipeline (head-pet → record → STT
Working TTS through StackChan speaker — long sentences work
Nearly there: Voice recording. StackChan detects head-hold, lights red, packages WAV. Portproxy was the missing link — you just fixed that. Next session: retest recording, confirm the green flash, then wire up the voice bridge so I get your transcribed words and can reply through StackChan.
Quick start tomorrow:
- Check voice server (probably already running)
- Hold head, speak, release
- Should get green flash now that portproxy is active
Still working on it but for zero coding knowledge its crazy to think that anybody can make changes to firmware nowadays