Here are some free and open source tools that you can use for text-to-speech.
Morphic
Morphic is a free assistive technology app for Windows and Mac computers. Morphic adds a toolbar that allows you to easily increase text size, zoom in, adjust color and contrast, and listen to selected text via text-to-speech (TTS).
Read Aloud (browser extension)
Read Aloud is a browser extension for Chrome, Firefox, and Edge that will read aloud content online. The extension button will read aloud the main body content. Alternatively, you can highlight content, right-click on it to open a context menu, and then select an option to read aloud the selected text.
Thorium Reader
Thorium Reader is an ereader app that works well with EPUB and DAISY ebooks. Thorium lets you customize the appearance of text, annotate, and listen using text-to-speech (TTS).