At the resurrections mentioned by Jesus in John 5:28-29 they will hear his voice, both the righteous and the wicked. Some to life and some to damnation. Whether those that were resurrected in Mathew 27, which would have been an Old Testament resurrection (pre-church) I do not know what or if they heard anything, since Matthew doesn't say.
Mat 27:52 And the graves were opened; and many bodies of the saints which slept arose, Mat 27:53 And came out of the graves after his resurrection, and went into the holy city, and appeared unto many.