Skip to content

Instantly share code, notes, and snippets.

@ookam
Last active June 15, 2025 10:35

1. 棒読みちゃんをダウンロードして起動

https://chi.usamimi.info/Program/Application/BouyomiChan/

2. 自分の環境にnetcatを入れる

$apt install netcat

3. 適当に関数を作ってbashrcあたりに置いておく

# docker内から
echo 'bouyomi() { local bytes=$(echo -n "$1" | wc -c); printf "\x01\x00\xff\xff\xff\xff\xff\xff\x00\x00\x00\x$(printf %02x $((bytes&255)))\x$(printf %02x $((bytes>>8)))\x00\x00$1" | nc -w 2 host.docker.internal 50001; }' >> ~/.bashrc

# WSLのUbuntuから
echo 'bouyomi() { local bytes=$(echo -n "$1"  < /dev/null |  wc -c); local win_ip=$(ip route | grep default | awk "{print \$3}"); printf "\x01\x00\xff\xff\xff\xff\xff\xff\x00\x00\x00\x$(printf %02x $((bytes&255)))\x$(printf %02x $((bytes>>8)))\x00\x00$1" | nc -w 2 ${win_ip:-0.0.0.0} 50001; }' >> ~/.bashrc

4. Claude Codeで試す

「bouyomi テキスト で喋って」とか適当に言うと動きます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment