Realtime API Discord Bot - how to speak with realtime api on discord?

Is it possible to connect the realtime api to a discord bot, so that I can speak with it in the voice channel? I tried it but I didnt manage to do it.

Is there any place where i can figure out how i can get the realtime API to work with plain JS?