Can I use Openai Realtime API for Speech-to-Text?

Yeah, the OpenAI Realtime API allows you to translate your voice to text. Take in account that it uses the whisper-1 model behind the scenes for this.

Here you can see an example in Java, but you can extrapolate to another context: