Microsoft Teams provides live captions that will detect during your session and present real-time captions for participants that need them. Please note that live captions are a preview feature in Microsoft Teams, and currently only available in English (US) and on the Teams desktop app.
For more on Closed Captioning for Microsoft Teams, click on the links below.