Is the transducer version of BPP closed under complement? Obviously, recognizing BPP languages is closed under complement. For primes and composite integers both recognizing primes/composites and generating primes/composites can be done in "BPP". Is this true generally for BPP languages, i.e. can generating random words in a BPP language (and it's complement) be done in probabilistic polynomial time?

Specifically, given a probabilistic polynomial time algorithm which outputs strings in $F_2^n$ by computing the functions $g_i(x_k)$, where $i = 1 .. n$ and $x_k$ are random bits, is it possible to output (uniformly or otherwise) strings from the complement of the image of $g_i$, $F_2^n \setminus Im(g)$ in probabilistic polynomial time?

If so, is there a known practical algorithm to find the complement and what is its computational complexity and is that complexity bound optimal? If only an approximate complement can be computed efficiently, what are the upper bounds on approximation? Could there be a PCP theorem?
No. For example, if your input is a CNF with few solutions, then you can randomly generate non-satisfying assignment: just generate an assignment and keep it if it's non-satisfying. But generating a satisfying assignment is NP-hard.