That's natural English, but when writing it use two sentences (or at least use a semicolon).
1. What's wrong with your voice, do you have a cold?
2, What's wrong with your voice, did you have a cold?The did in the second clause puts that clause in the past tense. It clashes with the first clause. Better: "What's wrong with your voice. Are you getting over a cold?" (Using did puts the clause in the simple past, meaning that the cold could have happened at any time.)
3, What's wrong with your voice, did you get a cold?Mr. Micawber's interpretation is possible, but the first sentence is a more natural way of saying that. (If a person has a cold now he naturally acquired it before now.)