We honestly don't know.
Birds actually do have a larynx, and it does participate in vocalization, but not through the vibration of vocal folds (see reference below). But we have no idea as to whether a syrinx or larynx with vocal folds are mutually exclusive, how the syrinx first evolved, or what the two organs would function like together. Aside from a handful of extinct birds that have preserved syringes, sound-making anatomy is virtually unknown in extinct animals, and all extant species are either predominantly syrinx or predominantly larynx-with-vocal-folds vocalizers.
Non-avian dinosaurs, for all we know, could have had both. A lot of people, especially on the Internet, have been going around saying that dinosaurs “couldn’t” vocalize because of how the two traits are distributed in living animals, but that’s not how phylogenetic bracketing works. If an unknown taxon is bracketed by a living group with state B (crocodilians and turtles with vocal folds) and another group with state C (birds with a syrinx), the answer to the most parsimonious state for the unknown taxon isn’t state A (neither), it’s “uncertain”.
The broader problem is that vocal organs (e.g., a larynx with vocal folds) and the anatomy of the throat don't preserve in most fossils. An ossified syrinx occasionally preserves in the fossil record, but only rarely and it seems to be limited to Neornithes. However in order to evolve an ossified syrinx, you have to evolve an unossified one first, and we have no idea when that happened. Most of the Liaoning non-avian dinosaurs appear to lack an ossified trachea but Scipionyx apparently has cartilagenous tracheal rings. Pterosaurs and megaraptorid theropods have features (a pneumatized furcula) that today are correlated with features related to a syrinx (i.e., a clavicular air sac) in birds. So for all we know they did have an unossified syrinx. There is also evidence that hadrosaur crests modulated sound production, which means there had to be some precursor sound-making ability in order for selection to act on the sound-making function of the crests.
So the distribution of sound producing elements in Archosauria outside extant taxa is pretty much unknown. Maybe most dinosaurs had a larynx? Maybe most dinosaurs had an ossified syrinx? Maybe some had one, some had another, and some had no ability to vocalize at all? Maybe the reduction of the larynx as a functional element is due to the miniaturization trend in maniraptorans in general? We don't know.
Similar transformations of traits that seem "mutually exclusive" with animals having both features at once have been seen in evolutionary history. Synapsids went from a quadrate-articular jaw joint with the condyle on the cranium and the socket on the mandible to a squamosal-dentary jaw joint with the condyle on the mandible and the socket on the cranium, and went through a phase where both joints were functional at the same time (e.g., the cynodont Diarthrognathus) before the original joint gradually lost its original function and became part of the mammalian inner ear. If we didn't have these transitional fossils people might surmise that mammals evolved their jaws independently from all other tetrapods because these two jaw joints come off as mutually exclusive in function.
Another example can be seen in dinosaurs. Many dinosaurs and most crocodilians have only teeth, all birds today have toothless beaks. But many dinosaurs also have beaks, and some species have both beaks and teeth (e.g., most ornithischians, many maniraptorans). The problem is unlike teeth, vocal parts don’t fossilize.
This reference and associated references cited within does a pretty good job at summarizing the whole syrinx versus larynx debate, including references about birds having both.