Is there any indication in the Bible (N.T. is preferred) that the spirit of man can be discerned properly from the words that he is speaking? And is there any indication of the opposite - that the spirit of man can be easily discerned without listening to his words?
We know that "out of the abundance of the heart, the mouth speaks".
However, being able to entirely determine the state of someone's soul via their words is a talent not entrusted to [most] people (the exceptions being accounted-for in the Bible with the Apostles).
A period of witnessing all of the components of a person's life - words, actions, approaches to living, etc - would be needed to make a credible decision as to whether or not they are saved. As a Christian, it should be our goal to become more and more like Christ every day, and part of that IS with our words - "Let no unwholesome word proceed from your mouth, but only such a word as is good for edification according to the need of the moment, so that it will give grace to those who hear."
Indeed, this practice is followed by many churches when they have a waiting period between when salvation is professed, and when the believer is baptized.
However, even knowing all of that, we are still fallible humans, and there will be "Many will say to Me on that day, 'Lord, Lord, did we not prophesy in Your name, and in Your name cast out demons, and in Your name perform many [a]miracles?'"
Ultimately, it is only God Himself who fully knows the heart.