This is what we call rumbling in the piggy world there are different rumbles which mean different things.
A low gentle rumble when being stroked shows contentment.
Shorter sharper one is the dominant one (this is the one that is heard when you see a piggy strutting/vibrating at their friends). As well as being used to show who's boss (in both sexes) it is also used by a male show a female how manly he is. It can also be used to show humans they don't like something and it's almost asserting their authority over us lol. The latter could include the dislike of loud noises / baths or even at times a grumpy pig may not be in the mood for strokes. One of my boys who passed away last year used to rumble at me when he'd had enough cuddles / stroking and wanted to get back to his wife (he was neutered).