It is both. Text-to-speech is a technology. You simply install the app on your device or if you’d rather use it on your laptop, then install it as a browser extension on either Chrome or Safari and use it online. Adoption on Firefox and Microsoft browsers as far as the speech web application is yet low.
Most apps convert text to audio in real time and reads the text aloud well as some allow you to download the audio files in various file formats.
Try Speechify for free on Android, iOS, Chrome, or Safari.