In this paper, we discuss the flocking phenomenon for the Cucker-Smale and Motsch-Tadmor models in continuous time on a general oriented and weighted graph with a general communication function of the form Ψij (t, (x1(t), v1(t)), . . . , (xN (t), vN (t)). We present a new approach for studying this problem based on a probabilistic interpretation of the solutions. We establish flocking conditions for four assumptions on the weighted graph. These results improve and generalize previous results on particular cases of our models. Indeed, for the Cucker-Smale model, we refine previous results on the minimal case where the graph admits a unique closed communication class. Moreover, we improve the flocking conditions under two new assumptions when the adjacency matrix is scrambling or when it admits a positive reversible measure. In the last case, we characterize the asymptotic speed. We also study the hierarchical leadership case where we are now able to give general flocking conditions which allow to deal with the case ψ(r) ∝ (1 + r 2 ) −β/2 and β ≥ 1. Finally, we show that some of the flocking results of the Cucker-Smale model can be extended to a generalisation of the Motsch-Tadmor model on a general weighted digraph. Notably, we are able to show that the unconditionnal flocking occurs for the original model when the integral of ψ diverges instead of ψ 2 .