A totalitarian regime wants citizens who can speak, but not sing.
If you're willing to accept sign language as "speaking" you've two reasonably simple options.
- Cut their vocal cords
- Cut out their tongues
If you're not willing to accept sign language as speech for the purpose of your question then your only option would appear to be tone deafness.
- to be precise acquired amusia caused by brain damage.
They'll still be able to try to sing of course, you simply can't prevent that without physically removing the sound making organs but they won't be able to "sing" in any meaningful sense of the word.
Unless you assume a slightly more advanced knowledge of the brain areas involved than currently exists that's going to require a certain amount of research & experimentation to identify the correct bits of brain to cut out or scramble to achieve the specific type of acquired amusia that best suites your requirements but it's certainly doable, though not reversible.
It may be possible to achieve that with drugs as well but I've found no links myself to suggest that.
Those are pretty much the only (real world) science based options I can come up with for what you want, none of them seem a perfect match for what you're after but take your pick.
Can the procedure be reversed?
If you want something reversible (& amusia can't be achieved with drugs) then the vocal chords with sign language for speech are probably your only option, a medical silicon implant stuffed in between the vocal cords so they don't work that could then simply be removed perhaps.
Actually, that's the airway we're talking about there so simply stuffing it with a silicon plug probably isn't a good idea if you want them to keep breathing, some sort of collar or ring inserted to prevent them constricting for speech & sound modulation is probably best then.
On balance, some sort of vocal cord insert that can later be removed with sign language for speech is probably the most plausible procedure that achieves the closest to what you want.
magic
tag, I assume the answer cannot be "A totalitarian wizard did it". This comment is more of a clarification, because I know my first thought was "well, why don't the government just cast a spell to do that" and I know other people may have the same reaction. $\endgroup$