Napoleon Hill said "Think twice before you speak, because your words and influence will plant the seed of either success or failure in the mind of another." Thinking before you speak is a really good habit. Try to create a habit of giving yourself a few seconds before giving reply to another person. Do not say the first thing that comes to your mind. Screen that word or phrase and ask yourself if there is a better way to say it. Always remember where you are. Before you speak realize that certain language is acceptable among friends and family in private situation. However these same words can be misunderstood in public. You are to need to work on this consciously at first. It is going to require all your energies. When you try a new skill, practice is more required at beginning but with the time and practice skill will become more automatic, you would not have to think of it much as you did in the beginning. Finally apologize quickly, concisely and honestly for saying something that you know you should not have said. own it with no excuses.