All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
It is not permissible for a Muslim to imitate the sound of a pig or dog, or other animals. It is dispraised to imitate the sounds or acts of animals, and Ibn Taymiyyah clarified this in details in his Fataawa.
Since it is prohibited to imitate animals, then it is even worse to imitate a pig as it is an impure animal and it is forbidden to eat its meat. So, one should be careful about this.
Allaah Knows best.