refactoring TTS code, close TTS while reader is closing