@sternstaub: To clarify, I am talking about units (characters) which have voice lines, not buildings.
@phosit: As long as the timer is not reset, the specific unit cannot have a voice line. Other units can. So if we have 5 units, we will need 5 timers. The timer resets to 0 with a simple countdown. Of course, the setting value is going to be small, let's say 2 seconds. It should be slightly greater than the duration of the longest possible voiceline. Optimally, we would be able to use a boolean variable instead of a timer, named, for example, "talking". While the voice line is being played, "talking" is true. As soon as the voice line ends, "talking" is false and the unit can use a voice line again (the same as before or another one). This is a definitely better approach, but I do not know if it can be implemented easily. We can dump the idea of randomness that I talked about earlier. As @sternstaub said, consistent feedback is important. But a unit should not talk over its own voice / a unit's voice lines should not overlap each other! It sounds bad and peculiar.