Accused’s Spouse
Historically, there were restrictions on the competence and compatibility of the accused’s spouse. This was for the purpose of upholding privacy in marital communications.
The spouse is both competent and can be compelled on behalf of the defence. This is unless he or she is jointly charged. The spouse is treated as any other co-accused.
He may testify on behalf of the defence or other co-accused, may not be compelled to testify. The spouse may not be compelled for the prosecution or generally for any other co-accused. Spouse may be compelled in relation to a violent offences against the spouse herself or against the child of the family or any person under 18.
It appears that a spouse includes a former spouse where the relevant offence occurred while the parties were married. Similarly, if the events took place before marriage, the spouse may be compelled, is competent and may be compelled even if the marriage takes place after the events.
The Criminal Justice Evidence Act 1924 allows the spouse to testify for the accused. The spouse is both competent and maybe compelled unless jointly charged. The prosecution may not make any comment on the failure of the accused spouse to give evidence.
Criminal Evidence Act 1992 provides that in criminal proceedings, the spouse of the  accused shall be compellable to give evidence on behalf of the prosecution, only in the case of
an offence which includes a violence or a threat of violence to the spouse or a child of the spouse or of the accused or any person, who as at the material time aged under 18;
a sexual offence alleged to have been committed in relation to a person referred to above or consists of attempting to or conspiring to commit or aid, abet, cancel, procure, or incite the commission of any of the above offences.
The Criminal Evidence Act, provides that where persons being either a husband or wife or persons who were formerly husband and wife are charged in  the same proceedings, neither shall at the trial by virtue of the above be competent to give evidence at the instance of the prosecution or be compellable to give evidence unless the person concerned is not or is no longer liable to be convicted at the trial as a result of pleading guilty for any other reason.
The accused spouse is competent to testify on behalf of a  person charged with the accused. However the spouse is compellable only for the co-accused, only in one of the cases mentioned above (violent sexual offence against the spouse or children).
Former spouses are treated in the same way as spouses in relation to offences committed during marriage. A former spouse includes a spouse who is the subject of a judicial separation or a divorce or separation agreement.
The Criminal Evidence Act 1992 provides that the above provisions are not to affect the right of a spouse or former spouse in respect of marital privacy. It is not clear how this  particular provision might be interpreted and applied.