Generally, a voluntary confession to officers isn't automatically unlawful, but its use in a trial is a tricky matter. The key factor is whether it was obtained properly. Investigators must adhere to specific rules, https://panchanandshaw.com/blog/contempt-notice-explained/