Barrett, 48, of suburban Chicago, agreed to a 27-month prison sentence after pleading guilty. Andrews urged the judge at the hearing for a harsher sentence and said she fears for her life every time she enters a hotel.
"You violated me and you violated all women," Andrews told Barrett. "You are a sexual predator, a sexual deviant and they should lock you up."
Barrett admitted renting hotel rooms next to Andrews three times and shooting two videos of her while she was naked. He was accused of posting the videos online and trying to sell them to Los Angeles-based celebrity gossip site TMZ last year.
U.S. District Judge Manuel Real said he gave Barrett the maximum sentence under the law.
"Mr. Barrett has lost everything he built throughout his life," said his lawyer, David Willingham. "He's lost his career, his fiancee and his life savings. He knows that he brought this on himself."
But he said that Barrett is undergoing psychological treatment and "has sought the path of redemption."
Barrett was given until May 3 to surrender.
Federal prosecutors in Los Angeles have agreed not to pursue further charges against Barrett. However, he could face criminal action in other states stemming from other videos he allegedly shot of unsuspecting nude women through peepholes.
Andrews' attorney, Marshall Grossman, has said there could be as many as a dozen other women that Barrett taped.
A sentencing memo filed last month claimed Barrett videotaped 16 other women and ran background checks on 30 people, including female sports reporters and TV personalities, according to court documents.
Barrett also allegedly conducted 30 Internet background checks that can produce birthdays and home addresses, the document said. The filing did not name the other alleged victims or say what information he obtained or how he may have used it.
Prosecutors claim that 32 videos provided by DailyMotion.com show Barrett "victimized approximately 16 other women in almost precisely the same way that he victimized" Andrews. They did not identify the women.
Andrews testified in December that Barrett's actions had a devastating impact on her and her family because she is constantly reminded that his videos appeared online and is subjected to cruel taunts from sports fans when she works as a sideline reporter.
Andrews works as a sideline reporter for ESPN's game telecasts. She will also appear on the new season of ABC-TV's "Dancing with the Stars."
The Walt Disney Company is the parent company of ABC 30 and ESPN.