You can make that happen with your mix in real time by using sidechain compression.
As soon as the characters start to talk, the music quiets down. Imagine you’re watching a movie and there’s a scene without dialogue, and the music is playing loudly. In simple terms, it’s a way to set up your mix so that when one sound comes in, another one quiets down. For those who are unfamiliar, sidechaining means using the output of one track, such as a kick drum, to alter the compression on another track, such as a bassline. If you’re a producer, chances are you either use sidechain compression or have heard of it.