A. In any criminal prosecution brought by the state, a confession shall be admissible in evidence if it is voluntarily given. Before such confession is received in evidence, the trial judge shall, out of the presence of the jury, determine any issue as to voluntariness. If the trial judge determines that the confession was voluntarily made it shall be admitted in evidence and the trial judge shall permit the jury to hear relevant evidence on the issue of voluntariness and shall instruct the jury to give such weight to the confession as the jury feels it deserves under all the circumstances.
B. The trial judge in determining the issue of voluntariness shall take into consideration all the circumstances surrounding the giving of the confession, including but not limited to the following:
1. The time elapsing between arrest and arraignment of the defendant making the confession, if it was made after arrest and before arraignment.
2. Whether such defendant knew the nature of the offense with which he was charged or of which he was suspected at the time of making the confession.
3. Whether or not such defendant was advised or knew that he was not required to make any statement and that any such statement could be used against him.
4. Whether or not such defendant had been advised prior to questioning of his right to the assistance of counsel.
5. Whether or not such defendant was without the assistance of counsel when questioned and when giving such confession. The presence or absence of any of the factors indicated in paragraphs 1 through 5 of this subsection which are taken into consideration by the judge need not be conclusive on the issue of voluntariness of the confession.
C. Nothing contained in this section shall bar the admission in evidence of any confession made or given voluntarily by any person to any other person without interrogation by anyone, or at any time at which the person who made or gave such confession was not under arrest or other detention. As used in this section, the term “confession” means any confession of guilt of any criminal offense or any self-incriminating statement made or given orally or in writing.