Now the tts library is properly shut down and no memory is leaked.