I know it is obligatory to keep relationships with our relatives which are blood related. So is it obligatory for me to keep relationships with my uncle’s wife or aunt’s husband because they are not connected by the connection of womb? Is it a obligation? And also my female cousins are not Mahram for me, should I have talk or text with them frequently? Is it a obligation?
Assalam o alaikum, Brother. Keeping in contact with relatives, doesn't mean you'll have to be in contact with non mahrams, rather be in contact with mahram relatives such as males of your families. Contacting or talking to non mahram, without need, is dangerous and sinful or may lead to many sins, due to our own nafs and influence of shaitaan. You can talk to male cousins or brother or father of your cousins, to be in contact with relatives. As for Uncle's wife, She is not your mahram. However, aunt's husband is. You are a male, for you all males are mahram and the females that have been mentioned.
These relatives are not mahrams, see Who are the women that a man is forbidden to marry? .
There is however difference of opinion on the relatives with whom silat al-rahm (upholding of the ties of kinship) is required:
One view is that it includes only those who are mahrams to you if you assume yourself to be a male or female. For example it includes your uncles (parent's brothers) because they would have been your mahrams if you were female, and it includes your aunts (parent's sisters) because they would have been your mahrams if you were male.
The other view is that it also includes cousins etc. And the evidence of that includes:
إن أبر البر صلة الرجل أهل ود أبيه
The finest act of goodness is that a person should treat kindly the loved ones of his father.
Talking with your non-mahram relatives is not prohibited, provided that Islamic requirements are observed and there is no risk of fitna. So you may talk to them for example in the presence of a mahram, or inquire about them through a mahram intermediary such as their or your parents.
Also upholding of the ties of kinship is not limited to talking or visiting. Rather the weakest form is at the least not breaking the relationship. Other forms include greeting, visiting, helping out - including financially etc. So you can act on a different form as deemed appropriate.