Any person aggrieved by a statement taken from him or her which is not a voluntary statement, or any statement which he or she believes was taken from him or her in violation of the fifth or sixth amendments of the Constitution of the United States, may move for suppression of such statement for use as evidence against him or her. The suppression motion shall be filed in the district court where a felony is charged and may be made at any time after the information or indictment is filed, and must be filed at least ten days before trial, unless otherwise permitted by the court for good cause shown. When the charge is other than a felony, the motion shall be filed in the court where the complaint is pending, and must be filed at least ten days before trial or at the time of the plea to the complaint, whichever is later, unless otherwise permitted by the court for good cause shown. Unless claims of a statement being involuntary or taken in violation of the fifth or sixth amendments of the Constitution of the United States are raised by motion before trial as provided in this section, all objections to the use of such statements as evidence on these grounds shall be deemed waived, except that the court may entertain such motions to suppress after the commencement of trial when the defendant is surprised by the introduction of such statements by the state, and also the court in its discretion may entertain motions to suppress such statements when the defendant was not aware of the grounds for any such motion before the commencement of trial, or in such situations as the court deems that justice may require. In the event that the trial court entertains any such motion after the commencement of trial, the defendant shall be deemed to have waived any jeopardy which may have attached. None of the foregoing shall affect the right of the defendant to present the question of the voluntariness of the statement, or the question of whether the proper constitutional safeguards were given to any defendant either in custody or otherwise significantly deprived of his or her liberty, for the consideration of the fact finder at trial.