Despite being spawned by pigs, truffles are not considered to be animal produce, like eggs or milk. They do not receive a price increase from the [[Farming#Farming Skill|Rancher]] profession.
And despite being mushrooms, they technically are also not considered to be [[Foraging|foraged]] items. They are not among the items included in the foraging category at the [[Stardew Valley Fair]], nor are they labeled as "Forage" in [[inventory]]. They do, however, benefit from the [[Skills#Foraging|Gatherer]] and [[Skills#Foraging|Botanist]] professions.