One version of this story is retold in West African Folktales (collected and translated by Jack Berry) as "Adene and the Pineapple Child."
Synopsis:
An old woman counsels a childless couple to pick a talking pineapple and take it home. Three days later, the pineapple transforms into a beautiful baby girl, whom the couple adopts.
The parents raise the child with love and care. All is well until one day the child is left at home while her parents are at the farm. Adene, an older girl who lives with the family, taunts the child about her non-human origins...