What's the science behind impersonating people's voices?

Yes, I have seen and heard it. As @Francis_Vaughan notes, Hamill is no amateur – he is a very skilled voice actor and impressionist. Yes, he does an excellent impression of Harrison Ford – but with one’s eyes closed (or just hearing audio), I suspect that most people would still say “that sounds like Harrison Ford, but it’s not actually him.”

I’d be interested in hearing from some lawyers about this. Maybe if the instructions were to imitate the particular celebrity’s pet phrases or his particular mannerisms or something, but if the ad agency hired an impersonator and just told him, “We were hoping for a Harrison Ford kind of sound here,” and on Take 2 asked, “Maybe give it more of a Tom Selleck-type feel?” and on Take 3 said, “Great, but can you put some Ted Danson into it? Let’s see how that works,” they could claim in court that they were just trying to describe some general qualities to inspire the actor, and never actually instructed him to impersonate anyone.

It now sounds like you’re asking about having an impersonator not do a straight impersonation, but just capture some of the “general qualities” of a celebrity’s voice. That’s not really an impression, IMO, and it feels like you’ve moved the goalposts a little bit from when you originally asked about:

(emphasis mine)

What I’m trying to get at is that there must be some safe grounds where an agency can hire a skilled impersonator, and give him instructions that will get some spot-on celebrity impersonations but the agency will be protected legally against asking specifically that the celebrity they end up using has his or her property used without permission. You can’t copyright your voice, can you? I suspect that absent using someone’s catch-phrases or specific shtick, it’s very hard to make such a case in court. But IANAL so I’m asking.

See what I posted in post #20 – I’ve seen and heard ads which use a disclaimer “celebrity voice impersonated.”

Also, you may find this article informative:

It notes, among other things, that while voices, generally, are not subject to copyright, if a celebrity has a particularly distinctive voice, U.S. copyright law might possibly apply.

The big legal issue seems to be whether use of an impersonator implies, to the casual viewer, that the actual celebrity has been used by the advertiser (and, thus, said celebrity is seen as implicitly endorsing the product). I would suspect that this is particularly an issue for celebrities who choose to not do any advertising, as well as for those who are opposed to the particular brand or product being advertised.

In a voiceover ad the IP right probably in play will be ‘right of publicity.’ Basically the right of a (usually famous) person to their endorsements of products. If you’re fooling people into thinking it is the celebrity, you might be losing a lawsuit.

Voice is not always explicitly listed in the elements, but in some states is.

I remember him on variety shows in the 1970s. He was great.

I just looked him up. He’s still alive. I wonder if he still performs?

There was a thread on Little in Cafe Society last year. He still performs in Vegas (see the link below), though I remember someone in that other thread commenting that they went to see his show a few years ago, and a lot of it was video clips of Little’s old performances, and the entire act was centered on the same celebrity impressions he did back in the '70s.