Is it possible to take advantage of new local models like Gemma 4 to build a local multilingual agent in Home Assistant? Right now, I have a wake word for Spanish and one for English; would it be possible to have Home Assistant detect the language automatically and use the correct text-to-speech engine based on that to respond?
The home assistant pipeline doesn't offer this capability (if you don't rework the assist_pipeline system module). But you can try to implement it using the "assist" mode, without the built-in commands.
You'll need multilingual ASR and TTS, such as Parakeet v3 and Supertonic/Omnivoice. For LLM, there's no particular difference in the language in which the command is received and executed.
The prompt should specify that the response language must match the language in the request.