Firefighters from Dewsbury and Cleckheaton were called to Carr Street shortly before 7am today (Tuesday).
They used a hose reel and breathing apparatus to tackle the blaze which had engulfed the whole bedroom.
Two people had escaped the house before crews arrived but were suffering smoke inhalation.
It has since emerged that bin men and a passing driver made sure everyone got outside safely.
David Allen, who was one of those who called emergency services, said: "I would like to say a huge thank you to the bin men and white van man which pulled up and put their lives at risk to help evacuate the people who were in there.
"They didn't stop or hesitate. They just waded in and put their own lives at risk to make sure all the people were woken and out before too much damage had been caused."
A fire service spokesman said two people had been taken to hospital by ambulance for a precautionary check up.
He added that a smoke alarm was fitted in the house, but it was not working properly.
The cause of the fire is now under investigation.