How to use live-api websocket to translate text in real-time connection

i gaved a {

            "model": "models/gemini-2.5-flash-native-audio-preview-09-2025",

            "generationConfig": {

                responseModalities: \["TEXT"\],

            },

            "systemInstruction": {

                parts: \[{

                    text: "Please translate into the target language."

                }\]

            }

        } configuration, but received a  non-voice request websocket message.   how to fix it ?

Hi @HenryBaby, welcome to the community!

Could you please confirm what you are trying to achieve? Are you trying to translate text to text or text to audio?
Also, please check, this is the latest model: gemini-2.5-flash-native-audio-preview-12-2025

Thank you!

I need to build a WebSocket connection to Google AI. Upon initiating the connection, I will instruct the model to translate all subsequent input text into multiple target languages, and return the translation results to me in JSON format. The current Google Translation service cannot meet my requirements (e.g., lack of real-time WebSocket support, insufficient contextual understanding, or inability to return structured JSON for multiple languages).

Can the Live API do this?