How one woman discovered her husband's plot to kill and eat her

The former New York City police officer known in the tabloids as the "Cannibal Cop" has described in his new book the moment his wife discovered his dark sexual fantasies.

In an exclusive excerpt from the new book, which he co-wrote, Raw Deal: The Untold Story of NYPD's Cannibal Cop, Gilberto Valle explained how he was using his wife's computer after his had broken. He says she later installed spyware onto the machine because she suspected he was having an affair.

"This, of course, led to her finding the kind of pornography I was really looking at, and eventually all the chats that went along with the secret fantasy life I was living," he wrote.

Valle, 32, had been visiting a Dark Fantasy Network (DFN), where he would share his fantasies of kidnapping and killing his wife and other women so that he could cook and eat them.

He wrote: "It was not that I thought anything was wrong with me; I was just aroused by certain things, just like everyone else. Just because my template was different didn't mean I thought that it was a big problem. I would never harm anyone in real life, so why did I care what turned me on?"

He even made a list of the materials he'd need: A car, chloroform, rope, a gag, and a tarp or plastic bags to protect the car from blood.

In an interview with Inside Edition, the former cop explained: "These were things that were between me and an anonymous person that were never supposed to be out there."

In the book, he described how his wife confronted him about her findings, writing: "She cut me off and said, 'Cook women? Grill them? That's what we are to you?'"

Valle added: "I was mortified. I just kept repeating that she knows me, and I kept apologizing."

In October 2012, the father of one was arrested and accused of planning to kidnap dozens of women so that he could cook and eat them.

Valle, who is now divorced, was charged with conspiracy to commit kidnapping and found guilty by a jury in March 2013. But nearly two years later, the conviction was overturned.

In his interview with Inside Edition, he said that despite those online conversations, he's not a bad guy.

"It's not a crime to fantasize about people you know," he said. "It's not a crime to fantasize about committing crimes against people you know. It's action. There were no actions taken, period."

Following the trial, his wife took their infant daughter and left for Nevada. In his book, he wrote that he "only had eleven months" with his infant daughter.

His then-wife testified in the trial.

"It bums me to this day," he said. "I never faulted her for the way she reacted."

Brian Whitney, who co-authored Raw Deal, told Inside Edition: "People say he should be locked up but then again, he never did anything so what are you trying to say? That people should be locked up because they have thoughts you don't agree with or thoughts that scare you?"

Valle admitted that "on occasion" he does still visit DFN websites and similar websites "because there's nothing illegal, there's nothing wrong with that. What I do at home is my business."

He added:" I would never do these role plays again, but that doesn't mean I can't look at porn if I want to."

Valle said that he hasn't seen his daughter in five years and goes to therapy regularly.

"No one can just snap their fingers and it goes away. I would never hurt anyone, ever. If there is a treatment, if someone can snap a finger or say a magic word but no one can choose what they are into," he said.