Hilbert transformer and minimum-phase
as a related aside question i posted this question about minimum-phase filters and the phase-magnitude relationship.

let $N$ be the FFT size you will use.  (often $N$ is a power of two, but it doesn't have to be.)

the target magnitude response is

$$ G[k] \qquad \text{for } 0 \le k \le \tfrac{N}{2} $$

$G[0]$ is the magnitude at DC.  $G[\tfrac{N}2]$ (if $N$ is even) is the magnitude at Nyquist.  $G[k]$ must be purely real and positive.  No complex values and no polarity (sign) changes.  Then, when converting to log-magnitude, the logarithm function should not give you trouble.

First thing is convert magnitude to nepers using the natural (base-$e$) logarithm.

$$ H[k] = \ln(G[k]) \qquad 0 \le k \le \tfrac{N}2 $$

If you started with gain in dB, it has already been logged.  but dB are not nepers.  you must multiply each value by $\frac{1}{20}\ln(10)$ = 0.115129255 (that's one of these magic numbers we get to see in DSP).

you need not worry about any constant added to the log-magnitude (which would correspond to a positive gain factor in $G[k]$).  the Hilbert transform of a constant is zero so the minimum-phase result will be unchanged no matter how $G[k]$ is scaled.

You must mirror the first half into the latter half (the latter half of the DFT corresponds to negative frequencies or negative times):

$$ H[k] = H[N-k] \qquad \tfrac{N}2 &lt; k \le N-1 $$

Then, to compute the Hilbert transform, there are 3 steps.  First, compute

$$\begin{align}
h[n] &amp;= \mathcal{DFT}\bigg\{ H[k] \bigg\} \\
\\
     &amp;= \sum\limits_{k=0}^{N-1} H[k] e^{-j 2 \pi \frac{nk}N} \\
\end{align}$$

Then, multiply every positive time index ($n&lt;\tfrac{N}2$) with $-j = e^{-j\frac\pi2}$ (or spin those complex values by -90°) and multiply every negative time index ($n&gt;\tfrac{N}2$) with $+j = e^{+j\frac\pi2}$ (or spin those complex values by +90°).  $h[0]$ and $h[\tfrac{N}2]$ (if $N$ is even) should be set to 0.

$$ h[n] \leftarrow \begin{cases} 
  0 &amp; n=0 \\
 -j \cdot h[n] \qquad &amp; 1 \le n&lt; \tfrac{N}2 \\
  0 &amp; n=\tfrac{N}2 \\
 j \cdot h[n] \qquad &amp; \tfrac{N}2 &lt; n \le N-1 \\
\end{cases} $$

Finally inverse transform that result (and negate)

$$\begin{align}
\phi[k] &amp;= -\mathcal{IDFT}\bigg\{ h[n] \bigg\} \\
\\
     &amp;= - \tfrac1N \sum\limits_{n=0}^{N-1} h[n] e^{j 2 \pi \frac{nk}N} \\
\end{align}$$

$\phi[k]$ is the phase, in radians, of the minimum-phase system.  Your complex transfer function is

$$ G[k] \, e^{j \phi[k]} $$.