There are many ways to answer this question, depending on the kind of error in speech. Your example is only one kind. I would say this is a "slip of the tongue."
This subject comes up most often when addressing what politicians say in a speech or answers to questions from constituents. Typically, a politician will say they "misspoke" or made a "gaffe." Although these expressions are not typically used for single letter mistakes.
Some speech errors are called "a Freudian slip." https://en.m.wikipedia.org/wiki/Freudian_slip. The idea behind this expression is that someone says something and the wrong word is uttered, but the wrong word actually reveals their "true" feeling, perhaps from their subconscious. Whether there is any proof of this, I can't say. Notice that the discussion of Freudian slip uses the expression "slip of the tongue" as part of its explanation.