My problem originates from the following classical result, proved, as far as I know, by Grauert and Remmert:
Theorem. Let $Y$ be a compact complex manifold, $B \subset Y$ be a connected submanifold of codimension one and $G$ a finite group. Then isomorphism classes of connected analytic Galois covers $$f \colon X \longrightarrow Y,$$ with Galois group $G$ and branched at most over $B$, correspond to group epimorphisms $$\varphi \colon \pi_1(Y - B) \longrightarrow G,$$
up to automorphisms of $G$.
I would be glad to have a reference answering the following very basic topological question:
Question. How can we compute the fundamental group $\pi_1(X)$ in terms of the algebraic data above? For instance, in terms of the epimorphism $\varphi$ and of the homomorphism $\iota_* \colon \pi_1(Y-B) \to \pi_1(Y)$?
Elementary remark. If $D=f^{-1}(B)$, then $\pi_1(X-D)$ is isomorphic to $\ker \varphi$.