Do you have any idea how I could achieve aforementioned result with a reasonable amount of time and effort?
I've spent the past few hours researching and trying different approaches.
- module-role-ducking seemed like a hot candidate. However, Discord does not specify the media.role property, so if I can't set that myself, it won't work. Even if adding the property did work, from my understanding, my music would be permanently ducked, as these voice chat clients don't pause/disconnect when nobody speaks.
- I had a look at spectrumyzer to see if I could intercept the sound output of the voice chat application, so I could do it all by myself (calculate voice chat volume, set music volume accordingly), but I'm not up to that task – I didn't find any helpful guides. This approach would, AFAIK, also involve creating another sink for just the voice chat application.
- I could follow this approach to pipe the voice chat audio to a custom script that does the things mentioned in 2. But how would I process this raw audio information?
- pulseeffects is great, but it doesn't allow such interactions between applications
- Mumble VoIP does the actual ducking-of-other-applications part, so that is absolutely doable.