Well if you're talking about a voice INSIDE your head, that could just be random thoughts or it could be your conscience talking, it would probably be a good idea to follow your conscience, but not before first testing it to see if its rational, for instance if your about to steal an apple and you here a voice saying "don't do that" that would probably be a good voice to listen to. On the other hand even your conscience might not be right all the time, or it might not be your conscience but just a 'voice' so use common sense.
As a person that used to hear voices that seemed to come from Outside my head, like God, Buddha, Tibetan deities etc, this is a really dangerous area, bordering on schitzophrenia. The voices seem to make sense up to a point, you're sure they aren't leading you wrong, until bingo, they're getting you in all kinds of trouble and leading you to do crazy things, and believe crazy things. Do I think its possible to have telepathic contact with deities and spirits, yes, would I recommend it, no, if you hear the voices anyway, take them with a grain of salt, unless you're absolutely sure they are pure good, OK, but if theres any doubt at all its better to ignore them.
When I was in my 20s I heard voices telling me I was going to be a buddha, I was almost totally convinced, I started writing down what the voices said, even channeled Gautama buddha, long story short, I hear virtually no voices today, and as to being a buddha, I definetly haven't lived up to the voices expectations!
However I can say on the whole the voices encouraged me to be a better person, and study more, but as soon as the voices became unbalanced; 5150 locked up in the Psych ward, very unpleasant, not at all something you would want to go through.
For me the solution was twofold, add Lithium to my anti psychotic medication, and for five years now, quit smoking pot and drinking; sobriety is the strongest medication for mania, psychotic type illnesses, many of which wouldn't have existed in the first place if drugs weren't involved.
For me it started with some bad LSD, terrible terrible risk to be taking stuff like that, you have no idea what drug you are taking, over 100 different drugs are sold on the street as LSD, only one of them is actually LSD. I actually took some poison mushrooms from some hippies that hated punks, instead of psylocibin they gave me Amanita Masacrita???? the poisoness kind, red with the white dots, could have killed me. Its a real minefield, the drug business. No wonder The Buddha and so many Buddhists consider sobriety to be one of the most important steps on the Buddhist path.
Anyway the reason I bring up drugs is people that try lots of drugs are much more likely to hear voices, and believe in God talking to them, buddha talking to them, not to say that it never happens, but if you need to do heavy drugs to hear something, its probably not a good idea, hope this can be of benefit to someone, sincerely former monk john
18 years ago I made one of the most important decisions of my life and entered a local Cambodian Buddhist Temple as a temple boy and, for only 3 weeks, an actual Therevada Buddhist monk. I am not a scholar, great meditator, or authority on Buddhism, but Buddhism is something I love from the Bottom of my heart. It has taught me sobriety, morality, peace, and very importantly that my suffering is optional, and doesn't have to run my life. I hope to give back what little I can to the Buddhist community that has so generously given me so much, sincerely former monk John