TAIPEI, Taiwan  After 10 minutes of drum-beating and incense-burning by her assistants, Chang Yin donned a black, spotted robe and a pointed hat. She picked up a fan with her right hand and a silver flask of sorghum liquor with her left.

Then, she sat in a chair before an altar piled with joss sticks, cans of beer, fruit, other snacks and images of deities. The session began. She appeared to slip into a trance.

Ms. Chang is a jitong, a shaman who dispenses advice while said to be possessed by a spirit. Here, inside a modern office building next to Taipei’s bustling main train station, she is carrying on a folk tradition that goes back hundreds of years in Taiwan and the Chinese mainland.

In the past, such shamans played a central role in rural village life. Based in local temples, they would resolve community disputes and pick auspicious dates for important occasions, and they were believed to help heal the sick by channeling spirits.