How can I stream speech to voice assistant through API

By using ESPHome, you can directly stream your speech to Assist, as documented here:

What if I don’t use ESPHome, let’s say I use micropython, how can I stream my speech to assist, is there any doc on this?

I found the answer: