Remove Silence - Keep Music

This is more of a Method question than a support question.

I record a weekly game session with my friends using the Craig bot on Discord. I always export as a single merged flac file and then removed silence from the whole recording. no issues here.

Now I have found a way to also include the Music as a separate track so i will download the Audacity project file then merge just the voice tracks.

My question then becomes, how do I handle ensuring the Music track and Voice track remain synced up? Ideally without a noticeable clip where the silence has been removed.

BONUS POINTS: Once I have a good method, I would like to make it into a Macro.

It sounds like a job for the “Truncate Silence” effect: https://manual.audacityteam.org/man/truncate_silence.html

Apply Truncate Silence to both tracks at the same time, and ensure that “Truncate tracks independently” is NOT enabled.

Very cool, so it would find the silence on the voice track and then apply the effect to both tracks? That’s very handy!

My one concern with this option is that the space removed from the music track may be noticable.

The only way I could think to remedy this would be to crossfade each place the audio was removed. Does this seem feasible or is there a better way?

No, but I didn’t think that was what you were wanting.
It will remove silences that are common to both tracks - when both the voice track and the music track are silent.

Let me read your question again…

  1. Obviously the only way to ensure that both tracks remain “synced up” is: When audio is removed from one track, the exact same amount is removed from the other track.

  2. It’s also obvious that if you remove audio from the music track where there is music playing, then there will be “a bit missing” from the music track.

Personally I’d go about this differently.
I’d record only the voice track. Then edit the voice track as required. Then add music (in a new track) where appropriate.

Ah thank you! Yes the music track plays throughout the recording and changes a few times to match the scene. Even when there is no vocals, there will be music. I apologize for not explaining that well.

Thankfully the way I have it setup the vocals and music remain on separate tracks so I can remix it, but I am trying to limit the amount of time I spend on each file.

Can I compress the length of the music track to match the edited voice track? Two issues I see are that It may not fully line up with where the song originally changes and I would need to edit the sound on the music track as it be compressed.

What about using detect silence on the voice track then using those labels to split the music track and crossfading at those splits?

You can do it any way that suits you, but as I wrote previously, the way that I would do it would be to edit all of the voice audio first (without any music), and then add the music to fit the edited voice recording.

[

While I absolutely agree that this would be the right way to handle it from a synchronization and audio quality standpoint, each recording is around 4 hours and the music is changed on the fly to match the scene. I just don’t have the time to do it the right way, so I am looking for the next best option.

Do you have any suggestions for selecting the silence from the voice track and applying that selection to the music track?

Maybe you could make use of:
Label Sounds: https://manual.audacityteam.org/man/label_sounds.html
and
Edit Menu > Labeled Audio > Delete: https://manual.audacityteam.org/man/edit_menu_labeled_audio.html