A man made online searches about punishments for infidelity according to Islam before stabbing his wife to death in their Sydney home last year, a court has heard.

Key points: Shahab Ahmed is accused of killing his wife over a romance with a colleague

Shahab Ahmed is accused of killing his wife over a romance with a colleague The judge-alone trial will hear evidence he searched about infidelity and punishment according to Islam before the attack

The judge-alone trial will hear evidence he searched about infidelity and punishment according to Islam before the attack The court heard Mr Ahmed sought help for marriage problems two years before his wife's death

Shahab Ahmed, 35, has pleaded not guilty to killing Khondkar Faihi Elahi, but guilty to her manslaughter.

The NSW Supreme Court today heard he was suffering a psychological illness when he stabbed his wife 14 times with a kitchen knife in their Parramatta home in February 2017.

The Crown opposed the manslaughter plea.

It argued Mr Ahmed had "turned his mind to punishing his wife" for a romance with a colleague, Omar Khan, and that he intended to kill her or cause her grievous bodily harm.

The judge-alone trial before Justice Monika Schmidt will hear considerable evidence of communications between Mr Ahmed and his wife, and between her and Mr Khan.

Crown prosecutor Steven Hughes told the court he would present evidence Mr Ahmed made internet searches about infidelity, including punishments according to Islam, in the months before the killing.

Mr Hughes said immediately before the killing, Mr Ahmed found phone messages between his wife and Mr Khan.

The court heard that after killing his wife, Mr Ahmed posted on Facebook "this is the end", smoked a cigarette and called triple zero to report her death.

He remained at the scene and was arrested by police.

The court heard while Mr Khan did not have sex with Mr Ahmed's wife, the two exchanged sexually-charged messages.

Mr Khan also said he bought her clothes, a car radio and a teddy bear for her birthday, and that they referred to each other as "Wifey" and "Hubby".

The trial was shown a video of Mr Ahmed's interview with detectives in which he said: "I killed her … my wife … with a knife."

Accused sought help for marital issues

The court heard Mr Ahmed, who has no prior convictions for violence, sought help for stress and anxiety over his marriage problems two years before the killing.

During that time, his wife had called police on one occasion because of concern over his state of mind, Mr Hughes told the court.

Mr Ahmed also punched a plaster wall during an argument with her and had threatened to kill himself during a trial separation, the court heard.

Defence counsel Avni Djemal told Judge Schmidt Mr Ahmed "accepts legal and moral culpability for the death of his wife".

He said he would present evidence from a psychiatrist that Mr Ahmed suffered from a depressive illness "of such significance that it affected his ability to control himself".

Mr Djamal argued Mr Ahmed's reaction to finding the text messages between his wife and her lover was out of character, consistent with having a mental illness and would support a finding of manslaughter.

The trial continues.