The correct and more commonly used phrase is: "Did you talk to him?"
The sentence "Have you talked him before" is not grammatically correct. Instead, you should use the past tense "did" to form the question: "Did you talk to him?"
As for whether to use "talk" or "speak," both words are generally interchangeable when referring to verbal communication. However, there are subtle differences in usage:
"Talk": This is more commonly used in informal settings or when discussing everyday conversations. For example, "Let's talk about our plans for the weekend."
"Speak": This is often used in more formal or professional contexts. For instance, "She will speak at the conference tomorrow."
In many cases, both "talk" and "speak" can be used without any issues. However, if you want to emphasize a formal or professional tone, using "speak" might be more appropriate. For informal situations, "talk" is usually the preferred choice.