It's definitely down to confidence, I am very similar, I can be a total chatterbox with people similar to me and have endless conversations, but with people not my type, it is normally restricted to a few words and it must seem like watching paint dry just talking to me - firstly find confidence in yourself by talking in situations where you are comfortable, and gradually try to face more and more difficult situations. If you want psychological techniques, one is to repeatedly imagine how you feel in a comfortable situation, and recreate it in an imagined situation which you find uncomfortable - eventually you can rewire your perceptions so that you can be confident with more people. From personal experience, this feeling stems from a young age and whether you were sociable or not. If you weren't, and people weren't often interested in what you said, your brain perceives a situation with new people as "these people are on a totally different plane to me, it's not even worth talking to them because they will hardly be interested". This process can become so natural to your psychology that in can totally ruin your confidence, and being in this mindset makes you sound more forced and less confident, thus creating a vicious cycle. A way to counter it is to realise that these are merely perceptions you have created and assume people will be interested in what you say. Building confidence can take a long time and with it will come assertiveness - I can guess that if you have a problem, you will most likely find it difficult to say to another person for fear of how they may react, or avoid the person altogether. Confidence coaching and building of self esteem is available as well.