You would use LibGroupTalents-1.0 and call UnitSetRole as soon as you get talent information for the others. This could be pretty long as talent requests are throttled and you could not do it unless your were raid assistant or raid leader.
LibGroupTalents-1.0 and LibTalentQuery-1.0 are for querying others' talents. LibRaidRole would be only to get your own role (and ranged/melee status), as well as automatically setting your role in raid (using Blizzard dedicated API).
It doesn't account for example, a raid leader changing someones role because they want the player to go X role, but then change their mind, and want them to stay Y role without changing the role back. Hence mine triggers when you enter combat in an instance.
You can set your role fine in Combat.
Right. In that case, it should probably listen to both ACTIVE_TALENT_GROUP_CHANGED and PLAYER_REGEN_DISABLED and systematically call UnitSetRole. I think in most case one would be happy to know the actual roles before the combat starts.