In this volume, we prove, inspired by earlier work of Wald-spurger on orthogonal groups, a sort of local trace formula which is related to the local Gan-Gross-Prasad conjecture over any local field F of characteristic zero. As a consequence, we obtain a geometric formula for certain multiplicities (...) appearing in this conjecture and deduce from it a weak form of the local Gan-Gross-Prasad conjecture (multiplicity one in tempered L-packets). These results were already known over p-adic fields by previous work of the author and thus are only new when F = (...). However, the proof we present here works uniformly over all local fields of characteristic zero.