On a case like the one you are talking about, where there is an alleged victim but no witnesses, the state will not be able to make out its case without the complaining witness. Hearsay testimony is not allowed at trial.
The state is expected to have control over its witnesses before they can state that they are ready. That means that they have had recent contact with the complainant, know her whereabouts, and can bring her in if necessary by making a phone call. If the People do not have a complainant that they can bring in at a moment's notice (if they are unable to state "Ready for Trial," time gets charged against the DA's Office. On a felony, once the DA has accrued 6 months of chargeable time (doesn't have to be 6 consecutive months but can be pieced together), the defense lawyer can move for speedy trial
So you get your right to confront the witness. The DA is required by state law to make "vigorous efforts" to get their complainant in, before a court
would accept that the witness is unavailable. If the court determines that a witness is unavailable, the time needed until the witness becomes available would not count towards the 6 months.
I had cases where the witness just hid from the DA rather than cooperate, and they have had to be dismissed. I had a trial case once where the DA had to fly him over from another country to prevent time being charged to them.
The right of a defendant to face his accuser and his right to a speedy trial are taken seriously in the state.