Turn off system sounds

Is there a way to turn off the sound that happens whenever my headphones disconnect or connect from a source? I turned off the talking voice, but the sound that plays is still always way too loud and jarring. There was a similar post on this subreddit, but it's two years old, so I was wondering if anything came out to fix this. Thanks.