The very short answer is that simulating Moriarty's voice outside the holodeck would have been pointless since he'd set a password
MORIARTY: Computer... interface with the central computer on the Enterprise.
The computer beeps.
COMPUTER VOICE: Interface complete.
MORIARTY: Release command function lockouts... authorization Moriarty, alpha two-four-one-five-nine.
TNG: Ship in a Bottle
Even if they could simulate his voice perfectly, a five-digit password represents a hundred thousand possible combinations, with the added complexity of an alphabet letter at the start bringing the grand total into the millions.
Assuming the computer is happy for you to do keep trying 24/7, it would take weeks (if not months) to say all of the possible combinations.
Data simulating it inside the holodeck would have been just as useless since the combadges (and presumably the holodeck panels) were slaved to the holographic version of the ship and wouldn't have access to anything real.
PICARD: No. Thank you, Picard out. (to the others) Our combadges must be locked into the simulation; if that had been the
real Commander Riker, he would have given our location as Holodeck