Can your voice encrypted so only someone with the same avatar can hear it?

As the title says, can you make an avatar that encrypts your voice and changes it to like a high pitch frequentie that can only be decrypted by others using the same avatar?

I seen a model do this once but that was a long time ago so im wondering how they did it and if its still possible.

Edit: i dont care about if its a good idea or not, i dont care about better ways. My curiosity wants me to figure out how it works.