I don't know if a built in app does that, but if not, it should be possible to write one and use the OS APIs to do the actual recognition?
Your idea is definitely easy on the wallet, but I should've mentioned before that accuracy is crucial.
When it comes to speech recognition accuracy:
- Windows might work well, since Office 365 has good speech recognition features.
- The speech recognition on macOS isn't as accurate, and iOS might have the same problem.
- As for Chrome and Google Docs, their speech recognition quality is lower, and Android might be similar.