Whenever a deaf or hard of hearing person is arrested and taken into custody for an alleged violation of state law or local ordinance, the appointing authority shall procure a licensed interpreter for any interrogation, warning, notification of rights, or taking of a statement, unless otherwise waived. No arrested deaf or hard of hearing person otherwise eligible for release shall be held in custody solely to await the arrival of a licensed interpreter. A licensed interpreter shall be provided as soon as possible. No written or oral answer, statement, or admission made by a deaf or hard of hearing person in reply to a question of any law enforcement officer or any other person having a prosecutorial function may be used against the deaf or hard of hearing person in any criminal proceeding unless (1) the statement was made or elicited through a licensed interpreter and was made knowingly, voluntarily, and intelligently or (2) the deaf or hard of hearing person waives his or her right to an interpreter and the waiver and statement were made knowingly, voluntarily, and intelligently. The right of a deaf or hard of hearing person to an interpreter may be waived only in writing. The failure to provide a licensed interpreter pursuant to this section shall not be a defense to prosecution for the violation for which the deaf or hard of hearing person was arrested.