Every plan in Microsoft 365 and just about every plan in Office 365 includes Microsoft Stream, which is a private video hosting service from Microsoft. Stream is also integrated into Microsoft Teams, so that, if you record a meeting in Teams it is automatically saved in Stream for replay later. You can also transcribe anything spoken in the video to searchable text within Stream.
You may however find that this automatic captioning is not enabled by default in Stream. To see whether it is, simply connect to your tenant via PowerShell and run the command:
get-CsTeamsMeetingPolicy -Identity global
In the results look for the line:
as shown above. If it is set to False, run the command:
Set-CsTeamsMeetingPolicy -Identity Global -AllowTranscription $True
to enable Stream transcription. Note, that it may take a little while for the policy to be applied.
Now, when you upload a video to Stream or record a meeting in Teams any speech should be transcribed for you automatically.