Privilege May Be Irrelevant In Your Case
In a criminal case in the U.S., a criminal prosecution is moot and dismissed if the criminal defendant dies (or even if the criminal defendant is convicted and the case is still on appeal). (Pending divorce cases also abate upon the death of a spouse, but most other civil cases do not.)
Caveat: Your Mileage May Vary
Privilege law is established on a state by state basis and at the federal level based upon federal law, so it can vary.
Confidential Communications v. The Testimonial Privilege
There are really two privileges.
The privilege for confidential communications between a husband and wife survives the marriage (although it does not impose a duty on a spouse not to disclose confidential communications outside court testimony) and may be asserted by either party to the communication.
The testimonial privilege allows someone facing criminal charges or a civil claim in court to prevent a current spouse from testifying against them whether or not the current spouse wishes to testify.
Exceptons To Spousal Privilege
Both privileges generally exclude criminal and civil claims between the spouses and sometimes certain other crimes, and often also ongoing crimes and an intent to commit a future crime.
In Colorado, the privilege extends to crimes allegedly committed against children, however, although this would not be true in all states. The detailed example of the Colorado statute on this point is set forth below.
The 5th Amendment Alternative To The Testimonial Privilege
Note that even when the testimonial privilege does not apply because a marriage has ended due to death, divorce or annulment, the former spouse may still be able to claim a 5th Amendment privilege out of concerns about prosecution, for example, for aiding and abetting, conspiracy, or accessory liability, if the witness is not given immunity (which is usually available only in criminal cases, not in civil cases brought by a private party who does not have authority to grant immunity).
Spousal Immunity Contrasted With Spousal Privilege
Spousal immunity is a very different concept from spousal privilege. Historically, you were immune from criminal liability for most crimes committed against your spouse (except murder), and had immunity from civil liability from all civil lawsuits brought by or on behalf of a spouse against the other spouse (e.g. breach of contract, personal injury, property disputes), except a suit for dissolution or annulment of a marriage or legal separation.
If you have immunity from criminal or civil liability, testimony is irrelevant. You can't be found guilty period.
The criminal liability immunities were lifted for all crimes other than rape long ago, and relatively recently for marital non-consent rape (there is still generally immunity from statutory rape or person in position of trust rape committed during the marriage). The civil liabilities were mostly eliminated many decades ago.
The Example Of Colorado's Spousal Privilege Statute
In Colorado, the spousal privilege statute reads as follows (later parts of the statute apply to other privileges):
Colorado Revised Statutes § 13-90-107. Who may not testify without
consent - definitions
(1) There are particular relations in which it is the policy of the
law to encourage confidence and to preserve it inviolate; therefore, a
person shall not be examined as a witness in the following cases:
(a)(I) Except as otherwise provided in section 14-13-310(4), C.R.S., a
husband shall not be examined for or against his wife without her
consent nor a wife for or against her husband without his consent; nor
during the marriage or afterward shall either be examined without the
consent of the other as to any communications made by one to the other
during the marriage; but this exception does not apply to a civil
action or proceeding by one against the other, a criminal action or
proceeding for a crime committed by one against the other, or a
criminal action or proceeding against one or both spouses when the
alleged offense occurred prior to the date of the parties' marriage.
However, this exception shall not attach if the otherwise privileged
information is communicated after the marriage.
(II) The privilege described in this paragraph (a) does not apply to
class 1, 2, or 3 felonies as described in section 18-1.3-401(1) (a)
(IV) and (1) (a) (V), C.R.S., or to level 1 or 2 drug felonies as
described in section 18-1.3-401.5(2) (a), C.R.S. In this instance,
during the marriage or afterward, a husband shall not be examined for
or against his wife as to any communications intended to be made in
confidence and made by one to the other during the marriage without
his consent, and a wife shall not be examined for or against her
husband as to any communications intended to be made in confidence and
made by one to the other without her consent.
(III) Communications between a husband and wife are not privileged
pursuant to this paragraph (a) if such communications are made for the
purpose of aiding the commission of a future crime or of a present
continuing crime.
(IV) The burden of proving the existence of a marriage for the
purposes of this paragraph (a) shall be on the party asserting the
claim.
(V) Notice of the assertion of the marital privilege shall be given as
soon as practicable but not less than ten days prior to assertion at
any hearing.
(a.5)(I) Except as otherwise provided in section 14-13-310(5), C.R.S.,
a partner in a civil union shall not be examined for or against the
other partner in the civil union without the other partner's consent,
nor during the civil union or afterward shall either be examined
without the consent of the other as to any communications made by one
to the other during the civil union; except that this exception does
not apply to a civil action or proceeding by one against the other, a
criminal action or proceeding for a crime committed by one against the
other, or a criminal action or proceeding against one or both partners
when the alleged offense occurred prior to the date of the parties'
certification of the civil union. However, this exception shall not
attach if the otherwise privileged information is communicated after
the certification of the civil union.
(II) The privilege described in this paragraph (a.5) does not apply to
class 1, 2, or 3 felonies as described in section 18-1.3-401(1) (a)
(IV) and (1) (a) (V), C.R.S., or to level 1 or 2 drug felonies as
described in section 18-1.3-401.5(2) (a), C.R.S. In this instance,
during the civil union or afterward, a partner in a civil union shall
not be examined for or against the other partner in the civil union as
to any communications intended to be made in confidence and made by
one to the other during the civil union without the other partner's
consent.
(III) Communications between partners in a civil union are not
privileged pursuant to this paragraph (a.5) if such communications are
made for the purpose of aiding the commission of a future crime or of
a present continuing crime.
(IV) The burden of proving the existence of a civil union for the
purposes of this paragraph (a.5) shall be on the party asserting the
claim.
(V) Notice of the assertion of the privilege described in this
paragraph (a.5) shall be given as soon as practicable but not less
than ten days prior to assertion at any hearing.
(VI) For the purposes of this paragraph (a.5), "partner in a civil
union" means a person who has entered into a civil union established
in accordance with the requirements of article 15 of title 14, C.R.S.
The reference to C.R.S. § 14-13-310(4) is to the section on child-custody hearings.
How Serious Are The Crimes To Which Testimonial Privilege Does Not Apply In Colorado?
Class 1, 2 or 3 felonies to which the confidential communication husband-wife privilege applies but not the testimonial husband-wife privilege apply in Colorado are quite serious offenses.
Class 1 felonies in Colorado have a mandatory minimum sentence of life in prison without possibility of parole (or life with possibility of parole after 40 years if the offender is a minor). Class 1 felonies include first degree murder for which the death penalty is available in some cases and aggravated kidnapping where death is presumed because the victim has not be released alive.
Class 2 felonies in Colorado are punishable by eight to thirty-six years in person (eight to twenty-four years if non-violent, sixteen to thirty-six if violent). Class 2 felonies would include second degree murder, kidnapping involving the rape or robbery of the victim, gang rape, rape committed with a deadly weapon, rape causing serious bodily injury, theft of more than $1,000,000, and attempted Class 1 felonies.
Class 3 felonies are punishable by four to eighteen years in prison (four to twelve if non-violent, eight to eighteen years if violent). Class 3 felonies would include heat of passion murder, aggravated armed robbery, aggravated armed burglary, aggravated assault causing serious bodily injury or disfigurement or a permanent disability (and not in the heat of passion), human trafficking for involuntary servitude or sexual servitude (including keeping slaves), kidnapping for ransom or with a deadly weapon, forcible rape, rape committed by incapacitating someone with drugs, or rape caused by a credible threat of "imminent death, serious bodily injury, extreme pain, or kidnapping, to be inflicted on anyone", arson of a building, and theft of $100,000 or more but less than $1,000,000.
A class 1 drug felony is punishable by eight to thirty-two years in prison. A class 2 drug felony is punishable by four to eight years in prison. These involve drug dealing of large amounts of drugs and/or drug dealing to children.
Among the crimes to which the marital privilege would be still apply would be manslaughter, assault not causing serious bodily injury, theft of less than $100,000, unarmed burglary, unarmed robbery, kidnapping without a weapon and without asking for ransom, drug dealing in moderate amounts to adults, statutory rape, rape by a person in a position of trust, rape without consent but without use of physical force (e.g. by blackmail not involving physical violence threats), or arson of property other than a building.
Of course, by charging a serious crime, one may cause the privilege to evaporate even if it is unlikely to result in a conviction for that crime.