Elementary excitations of ultracold soft-core bosons across the superfluid-supersolid phase transition