On Windows I had used SAPI and on Linux I had used speech-dispatcher (both of which are quite easy to use, albeit platform specific).
The problem though is that all those libraries don't use the screen reader but instead voice on their own, and it becomes really annoying when you consider they tuned the screen readers specifically to how they use their computer (and often set them to absurdly high speeds, too), and yes there have been quite a bunch of complaints over this. The only way around this is talking to the screen readers directly sadly, though there are libraries to handle them for you (like
Tolk, first one that comes to mind).
EDIT: whoops forgot Tolk is under the LGPL license. Make sure you know what you're doing if you use it =/ (especially these days where the most popular platforms are the most locked down ones)