'She speaks mixed': Roger Federer stunned to be caught out by Australian Open umpire

Roger Federer joked that he'll be more careful what language he swears in after he was warned for an audible obscenity during his thrilling Australian Open quarter-final win on Tuesday.

Federer swore loudly in a "mix" of languages during the third set, before he came from two sets down -- saving seven match points - to beat 100th-ranked Tennys Sandgren.

‘IS THAT ALLOWED’: Djokovic rushes off court in bizarre Aus Open drama

‘HEARTBREAKING’: Djokovic breaks down in tears over Kobe Bryant tragedy

The six-time champion Federer, who speaks English, German and French - as well as some Italian, Spanish, Swedish and Afrikaans - was overheard by a line judge, who reported it to the umpire.

"It was a mix (of languages)," Federer said. "Clearly she speaks mixed. Didn't know that. Next time I got to check the lines people."

Roger Federer was reported by the line judge before arguing his case with chair umpire Marijana Veljovic. Image: ESPN/Getty

It was a rare flare-up from the normally unflappable Swiss, who said he was frustrated about a groin injury that was hampering his movement and required a medical time-out shortly afterwards.

The 38-year-old, now into his 46th Grand Slam semi-final after recovering to beat Sandgren 6-3, 2-6, 2-6, 7-6 (10/8), 6-3, said the warning was harsh.

"Honestly, to be frustrated at one point throughout the match, I think it's normal," Federer said. "I found it a bit tough.

"It's not like I'm known to throw around words and whatever. It's not like the whole stadium heard it either.

"But no problem, I'll accept it."

Roger Federer had words with the line judge. (Photo by Speed Media/Icon Sportswire via Getty Images)

Federer escapes in ‘miracle’ win

Federer feared he was heading home to the Swiss alps before surviving seven match points and sealing a remarkable 15th Australian Open semi-final berth.

Bidding for his first final four spot and to become the first US man in the Open semi-finals since Andy Roddick in 2009, Sandgren had seven match points in the fourth set.

But the moment got the better of the world No.100 while Federer - playing in his 1512th career match - held his nerve.

"I think I got incredibly lucky today," Federer said.

"I don't deserve this one but I'm standing here and I'm obviously very, very happy.

"I was just hoping that maybe he was not going to smash the winner, you know on that one point, that he would maybe keep the ball in play."

Federer needed a medical time-out in the third set, but didn't believe the injury would hinder his chances of a record-equalling seventh Open crown.

"I've got nothing to do tomorrow and then I play at night so you do feel better in a couple of days and then you just never know again," he said.

"With these lucky escapes, you might play without any expectations anymore because you know you should really be skiing in Switzerland.

"So there you go - I'm lucky to be here and I will make the most of it."

with AAP