Scott Chalmers, 24, and Lyndsay Archibald, 20, had moved into the flat in The Inch, Edinburgh, with their two-year-old son only a week before their ordeal at the hands of Jamie Ross, 17, and another man.
In spite of his face being covered by a balaclava, Mr Chalmers thought he recognised Ross by his voice, and shouted at him: “Jamie ... get out of my house.”
The High Court in Edinburgh heard that Ross replied: “I’m not Jamie, I’m Graham.” However, his accomplice stated: “Come on Jamie, let’s go. They’ve got a bairn.”
Ross, of Moredun, Edinburgh, admitted assaulting the couple on 17 November last year and robbing them of a television. He was sentenced to three years’ detention.
The advocate-depute, Pino Di Emidio, said Mr Chalmers and Ms Archibald had been distressed and shaken by the incident and moved out of the flat because they no longer felt safe there.
They were wakened about 2.20am by loud bangs, and found two masked men in their bedroom demanding money.
Ross had a knife, which he pointed at Mr Chalmers’s face. The victim thought he recognised the voice as someone he knew as Jamie from local shops.
The identity of the second man remained unknown.
The defence counsel, Ronnie Renucci, said Ross had been owed £150 by Mr Chalmers, but went about obtaining it in entirely the wrong way.
“He took alcohol and drugs that night and the combination clouded his judgment,” added Mr Renucci.