when do miranda warnings have to be given
Miranda warning The Miranda warning, which also can be referred to as a person's Miranda rights, is a right to silence warning given by police in the United States to criminal suspects in police custody (or in a custodial interrogation) before they are interrogated to preserve the admissibility of their statements against them in criminal proceedings.
Right to silence Outside the context of lawful detention or arrest, a person has no duty to answer any questions of the police.[73] If judicial compulsion is sought by the State, the person can still invoke his or her Fifth Amendment right against compulsory self-incrimination, and refuse to testify if answers to questions posed are potentially self-incriminating.[74] Only if granted immunity by the state, in a formal proceeding, from having any testimony or evidence derived from the testimony used against him or her, can a person be compelled to answer over an assertion of this right.[75][76] If police detain (or arrest) a person, they must advise him or her that he or she has a right to remain silent, and the right to an attorney, among other rights. (This is known as the Miranda warning.)[69] If the detained person invokes these rights, all interrogation must cease, and ordinarily nothing said by the defendant in violation of this rule may be admitted against him or her at trial.[77][78]