Record if a user responds by Voice or by DTMF (Keypad response)

I am looking to see if it is possible to capture how a user responds. Is it possible to capture the user’s response if it is a speech or DTMF type?