OPINION OF THE COURT
Hopkins, J. P.The defendant was convicted of the crime of criminal contempt in the second degree (Penal Law, § 215.50, subd 3) as the consequence of his disobedience of an order of Criminal Term directing him to provide voice exemplars during a prior trial of the defendant under an indictment for bribery. He contends that the judgment must be reversed, because he did not intend to flout the order of the court, and that, moreover, the order was not a legal mandate, nor commanded him [the defendant] clearly and unequivocally, under pain of contempt, to supply voice exemplars.
We reverse. The record before us does not establish that the defendant was required by a legally enforceable order to provide voice exemplars while on trial.
I
In May, 1978 the defendant was on trial under an indictment for bribe taking.1 During the trial the prosecutor asked the court to "instruct the Defendant to stand up in this courtroom and read from a portion of the transcript that’s been marked for Identification as People’s 3A and 4A for purposes of voice identification.”2
The defendant’s counsel objected on the ground that to grant the request would constitute a violation of the defendant’s rights under the Sixth Amendment. Criminal Term sustained the objection and denied the request.
*350Indicating that he had been surprised by the failure of a witness to identify the defendant’s voice on a tape of a conversation (the tape and the transcript having been thus rendered inadmissible in evidence as a result of that defect in proof), the prosecutor then moved that the defendant be directed to have his voice recorded outside the courtroom for the purpose of later playing the recording at the trial before the jury, so that, as the prosecutor stated, "the jury can judge for themselves as to the inflections and voice of this Defendant.”3
After considerable discussion, the court said: "At any rate, I have ordered the Defendant to make the exemplar and to make it out of the presence of the jury.” Following the court’s inquiry whether the equipment was prepared, this colloquy occurred:
"Mr. Rost [Assistant District Attorney]: I intend at this time to call the wireroom to bring a man over to make an exemplar.
"The Court: I thought you had him over here. We’re wasting a lot of time.
"Mr. Rost: At that time that that witness be called to state there was a recording played and then play the recording for the jury.
"The Court: I understand.
"Mr. Rost: Without having identified any voices.
"The Court: I think Mr. Handler wants to add something, your assistant, Mr. Reuss.
"Mr. Reuss [Defendant’s attorney]: Mr. Handler asked me if Giglio would take the stand, would that be necessary. My immediate answer to him in open court was that’s precisely what the District Attorney would like to accomplish to deprive us of the right to remain silent and rely upon our plea of not guilty which is not only a plea but the fact.
"The Court: I understand.
"Mr. Reuss: May we see the exemplar? May we see the confession to be read?
"The Court: What do you request?
*351"Mr. Rost: Your Honor, I present to the Court People’s 3A for identification. I’d ask that a portion, upper most portion on Page 6 be read by Mr. Giglio and People’s 4A.
"The Court: Only one. I’m not going to give you two.
"Mr. Rost: Yes, sir. In that case the People would request the reading of Page 6 on People’s 4A for identification.
"The Court: 4A. Okay, Page 6 on 4A is a full page in which there is conversation alleged between Mr. Roberto and Mr. Giglio and you are asking for a full page to be read.
"Mr. Rost: Yes, sir, in view of the fact that there are two tapes and your Honor asked me.
"The Court: I’m not going to—you see, I think there is sufficient comparison if we have Mr. Giglio’s voice read to the jury from a portion, a portion, a half page is enough.”
Thereafter, the trial record discloses that the following took place:
"The Court: The wire man I understand is ready to be here any minute?
"Mr. Rost: Yes, sir.
"The Court: Now, we’re ready to set up the equipment. Is Mr. Giglio prepared to read that statement that I so order him to do?
"Mr. Reuss: No, he is not, your Honor.
"The Court: On your advice?
"Mr. Reuss: Upon my advice and strong advice to that effect, right or wrong. It would not be the first time, I’ve given wrong advice and I hope that it is one of the many times when I’ve given correct advice to a client.
"The Court: All right. Then the Court cannot direct that order be carried out because there is no way I can make a man talk if he doesn’t want to talk. The only remedy I have that you would have, Mr. Rost, would be a request that he be held in contempt of Court for not complying with my order and that would have to be in writing and probably would have to be done after the trial, I suppose.”
The court and the prosecutor then engaged in the following dialogue:
"The Court: Let the record note that after about fifteen minutes of discussions the District Attorney has requested me to delay the trial for a half hour or so, so he can go to his office and continue further discussions.
*352"I have denied that request and permitted him only to make a phone call to his office to advise his office that I’m directing him to continue on trial. He’s now returned to the Court and so I’m putting this all on the record. You have an objection to that procedure and I give you an exception.
"Mr. Rost: Fine.
"The Court: All right. Anything else you want to say?
"Mr. Rost: Just the fact it’s the People’s position that we will go forth with and ask your Honor to hold this Defendant in contempt and we will submit papers on this, your Honor.
"The Court: That’s something else.
"Mr. Rost: You’ve asked for what the People’s position will be and I have just echoed what it is.
"The Court: Do you have another witness?
"Mr. Rost: No, your Honor.
"The Court: You are resting?
"Mr. Rost: Yes, in view of the inability in obtaining an exemplar we would have to rest.”
The defendant was subsequently acquitted of the charge of bribery.
II
The defendant was indicted late in 1978 for criminal contempt in the second degree for having engaged in "[ijntentional disobedience or resistance to the lawful process or other mandate of a court to wit: to submit to a voice exemplar.”
At the contempt trial the prosecutor rested on the record of the bribery trial. The defendant called the Trial Judge presiding at the bribery trial as his witness. On direct examination the Judge testified as follows:
"Q [Defendant’s attorney] Mr. Justice Booth, your reading of these minutes and insofar as your recollection is concerned and is refreshed by a reading of the minutes, calling your attention to page 21 of the minutes, I wonder if your Honor can tell me whether or not you made an order for a mandate of the Court requiring Benjamin Giglio to give an exemplar of his voice during the course of these proceedings on May 3rd?
"Mr. Kaplan [Assistant District Attorney]: I’m going to object to that. The minutes speak for themselves.
"The Court; I will allow the question to be asked.
*353"A Having read these minutes and particularly page 21, the words are, 'Exemplar ordered.’ But then there is something else added: T should ask Mr. Giglio, in person, if that is his desire.’
"I said, 'Mr. Giglio, you have heard your lawyer state that on his advice you desire not to read that exemplar, is that right?’
"I intended to give counsel and the defendant a chance to determine whether or not they wanted to stand on their Constitutional rights and that opportunity was given, was taken, and Mr. Giglio and Mr. Reuss told me they did not desire to make that exemplar on Constitutional grounds. I did not press the issue because I felt it would be wrong for me to press them since they did exercise a Constitutional right.
"Q Judge, there was no order or mandate as such?
"A No, there’s no order or mandate because that order that was given was hedged, so to speak, by permitting you and Mr. Giglio to determine whether or not you desired to give an exemplar based upon your Constitutional rights. I respect that very much.”
On cross-examination, the witness testified that he recalled the colloquies appearing in the trial record set out above. The witness testified on redirect that the defendant had not tended to disrupt the dignity of the law or the courtroom or offend his dignity or the dignity of the law or the dignity of the courtroom.
Criminal Term found the defendant guilty of criminal contempt in the second degree, holding that the defendant had intentionally refused to comply with the order of the court directing him to give a voice exemplar.
Ill
Section 215.50 of the Penal Law provides that a person is guilty of criminal contempt in the second degree when he engages in intentional disobedience or resistance to the lawful process or other mandate of a court. "The crime is not intended solely to vindicate the authority of the court, but to further the ends of public justice as well” (People v Leone, 44 NY2d 315, 317). "Criminal contempts consist in a violation of the rights of the public as represented in their judicial tribunals. An element of willfulness exists in them, and they are punished in the interest of public justice, and not in the *354interest of individual litigants.” (People ex rel. Gaynor v McKane, 78 Hun 154, 161.)
Though the defendant pleads that the prosecution failed to establish that he intended to defy the dignity and the authority of the court, we do not think his argument meets squarely the facts of the case. Respectful as the defendant was to the court in refusing to carry out its direction, nonetheless he refused. "A person acts intentionally with respect to a result or to conduct described by a statute defining an offense when his conscious objective is to cause such result or to engage in such conduct” (Penal Law, § 15.05, subd 1). Nothing could be more clear from the record than the defendant’s conscious choice not to do what the court had ordered him to do, and that he had made that choice after conferring with his counsel. Intentional disobedience was therefore an inexorable conclusion to be drawn from the defendant’s conduct.
The defendant’s second point is more complex. He argues that the direction of the trial court was not clear and unequivocal, nor a lawful mandate requiring the defendant, under pain of sanctions on disobedience, to submit to furnishing voice exemplars while on trial.
The statute plainly authorizes a finding of a "lawful mandate.” Section 28-a of the General Construction Law provides that a mandate "includes a writ, process or other written direction, issued pursuant to law, out of a court, or made pursuant to law, by a court * * * commanding * * * an officer or other person * * * to do or to refrain from doing an act therein specified” (emphasis supplied). Thus, a mandate, as defined, is an order in writing made pursuant to law.
The direction of the Trial Judge to the defendant was oral, in the sense that it was made in the course of a trial and not reduced to a formal order, and it has been held that an oral order may not be the foundation of contempt (People ex rel. Donnelly v Miller, 213 App Div 88, 91; People v Balt, 34 AD2d 932, 933). There were special circumstances present in each of these cases,4 and we are reluctant to hold in the face of *355authority to the contrary that one cannot be held in contempt for failing to heed an order orally delivered to the contemnor personally in open court and preserved in the minutes of the proceeding, as here (see, e.g., Rudnick v Jacobson, 284 App Div 1064; Miller v Smerkins, 243 App Div 780). Otherwise, the power of a court to maintain order or to secure compliance with its directions would be seriously undercut.
Nevertheless, we are constrained to hold that the direction of the Trial Judge—the mandate—was not lawful under the facts in this case and could not form the predicate for the crime of contempt. The defendant was denied due process when he was compelled to submit to the taking of a voice exemplar during his trial for bribery. No prior notice of the prosecution’s intention to apply for that relief was given to the defendant; the necessity for the relief was not established on any papers served on the defendant; and he was not afforded the opportunity to controvert the grounds for the application.
We do not doubt that the prosecution in a proper case may obtain voice exemplars before trial or even before indictment (see, e.g., United States v Dionisio, 410 US 1; United States v Mara, 410 US 19; Ann. 24 ALR3d 1261). But we have made it a requirement that the prosecution’s applications to obtain this and other modes of discovery—such as handwriting samples, or hair specimens—follow the precepts of procedural due process (Matter of District Attorney of Kings County v Angelo G., 48 AD2d 576, app dsmd 38 NY2d 923; Matter of Erlbaum v Gold, 49 AD2d 594; People v Vega, 51 AD2d 33; Matter of Barber v Rubin 72 AD2d 347). Thus we said in Angelo G. (p 580): "We see no violation of due process under the proceedings initiated by the District Attorney. The appellants were served with the notice of the application and with the supporting papers. They were given the opportunity to oppose the application and to submit any grounds of opposition to the court.”
And we concluded that (p 580): "The question in every case must be whether proper notice of the application has been given to the individual, and whether probable cause for the granting of the relief sought appears in the moving papers. Once these salient requirements have been satisfied, the dictates of due process have been met.”
At the defendant’s trial for bribery the prosecution’s application came without warning in the middle of trial. We need *356not canvass the question whether the prosecution orally demonstrated the necessity for the voice exemplars on account of the unforeseen failure of the witness to identify the defendant’s voice on the tapes; the defendant, however, was bereft of his right to controvert the existence of that necessity by the abrupt manner in which the prosecution applied for that relief; the defendant in the nature of things was also deprived of a review of the direction, however limited that review may be, by resort to prohibition (cf. Matter of Barber v Rubin, 72 AD2d 347, supra; see Kuhns, Limiting the Criminal Contempt Power: New Roles for the Prosecutor and the Grand Jury, 73 Mich L Rev 484, 504-509; Kuhns, The Summary Contempt Power: A Critique and a New Perspective, 88 Yale LJ 39, 52-55).
Though not controlling because it did not become effective until January 1, 1980, the new provisions of CPL article 240 (L 1979, ch 412) reflect the policy of our system of criminal administration that the application by the prosecution for voice exemplars must be made prior to trial on papers served on the defendant, subject to constitutional limitations (CPL 240.40, subd 2; 240.80; 240.90). This procedure pursues in large part the American Bar Association’s Standards for Criminal Justice (Standards Relating to Discovery and Procedure Before Trial, §§ 3.1, 4.4). The defendant, in short, could not be found guilty of contempt on the basis of a disobedience of a mandate made without regard for the demands of due process.
IV
Consequently, the judgment of conviction must be reversed and the indictment dismissed.
Damiani, Titone and Mangano, JJ., concur.
Judgment of the Supreme Court, Kings County, rendered March 29, 1979, reversed, on the law, indictment dismissed and case remitted to the Supreme Court, Kings County, for the purpose of entering an order in its discretion pursuant to CPL 160.50.
. The exact offense for which the defendant was indicted is not clear in the record. The defendant asserts in his brief that this was the second trial, the first having ended in a mistrial.
. The transcript was made from a tape of a conversation in which the defendant was claimed to have participated.
. We do not reach the question, in the form in which this appeal is presented to us, whether the recording of the defendant’s voice, without more, could have properly been heard by the jury (cf. People v Dunbar Contr. Co., 215 NY 416, 422; Epstein v Epstein, 285 App Div 593, 594-595; People v Arena, 65 AD2d 182, 185-187).
. In Donnelly the relator placed custody of his child with another, who refused to give the child to the relator. The relator brought a habeas corpus proceeding for the return of the child. He was sought to be held in contempt for taking his child from the other person before a final order was made in the proceeding.
In Balt, the basis of the contempt was that the defendant, an attorney, did not advise his clients to appear before a Grand Jury, and the clients defaulted in appearance.