A measurement of the inclusive semileptonic decay fraction of charmed hadrons