How do i use text to speech

Hi, Im new to all the hassio topics, and still learning. But had some trouble with TTS the Rhasspy. What Im trying to do is that Hassio announces if I turned a light or open a door.
Im currently tryning to do it by API. I have tried with mqtt but when I switch the option onthe web server to external, the voice cannot be tested anymore. I wonder if its just the spanish lenguage.
If someone could please help or just point out the right direction that would be enough.