I'm referring to speaking, not singing. After a _lot_ of work, I can speak passably as a woman or man and switch freely between the two. Depending on context I generally choose just one for the entire conversation, as switching tends to cause whiplash in the listener (^_^).

Does the f0 change? Or is it like power distribution of harmonics change? Or is it something else?

More or less everything changes. For trans men who are on HRT the voice's lowest pitch will get lower, as it would for someone AMAB going through puberty (since a second puberty is literally what's happening on HRT). Trans women do not get any voice changes from HRT though, so they train to raise their larynx when speaking to get up into the "perceived female range."

But pitch is far from the only thing that someone gendered one way or another in western culture (and presumably elsewhere). Resonance, weight, breathing patterns, word choice, and prosody all matter too. That's way too much to go into in a post here on HN, but the easiest one to understand is resonance or "size." Female-perceived speakers have higher resonance / smaller size. This means that some of the higher harmonics are amplified more than the lower harmonics, an it's called a "small size" because the actual resonating area from the larynx to the tongue is made smaller (mostly through tongue placement). Male-perceived speakers do the opposite, creating a larger space for resonance and resulting in a lowered resonance.

I know quite a few cis people who are also going through some of this training to help with their voice acting, or even just for fun.

There are a lot of good (and unfortunately some bad) resources online for trans voice training in both directions. My personal favorite (and where I started my lessons) is Seattle Voice Labs, but Online Vocal Coach / Vox Nova is also a great resource.

I'm curious as to what prompted you to pursue this ability.

I'm trans.

The ability to switch mid-sentence is mostly just something I discovered I can do and is fun. But the ability to pass as my real gender is something that helps me feel safe. And when needed, being able to occasionally pass as my prior gender (e.g., when calling my bank until I can change my name/gender legally), it also quite useful.

There is a common enough need for this for some