After a defendant has been arraigned upon an accusatory instrument, and under circumstances prescribed in this article, a criminal court may, upon application of either the people or a defendant, order that a witness or prospective witness in the action be examined conditionally under oath in order that such testimony may be received into evidence at subsequent proceedings in or related to the action.
N.Y. Crim. Proc. Law ยง 660.10