How to make specific mobs in Minecraft make no sound

In my regular Minecraft survival world (1.17.30), I want to know if there is a way to make only certain mobs make no sound or only some sounds.

Example 1: A creeper would not hiss when charging but would still make a boom sound when exploding.

Example 2: A pig never oinks but a chicken still clucks.


The only way to achieve this in vanilla Minecraft would be to use a texture pack that replaces the .ogg sound files of the noises you want to silence with empty sound files so that you cannot hear them.