implemented tts speaking algorithm