Guardians of the Galaxy Vol. 2 director James Gunn has confirmed that Miley Cyrus has lent her vocal talents to one of the film's five - yes five!! - post-credit scenes.

The 24-year-old singer was suspected by avid fans to be making her Marvel Cinematic Universe debut as the voice of Mainframe, an android that first appeared in Marvel’s A-Next series in 1999.

Gunn confirmed to RTÉ Entertainment that the rumours about Miley's surprise cameo are true, and he says that he became fond of her voice after she featured as a judge on The Voice.

"Yeah there is a Miley Cyrus cameo in there. I like her voice - I think it's really cool.

"I asked her if she wanted to do a little something in this movie and she was excited about it. She did a great job," Gunn added.

Miley Cyrus lends her voice to Mainframe in Guardians 2

It's not the first time the singer has made a movie cameo.

She turned up in the Christmas comedy The Night Before alongside Joseph Gordon-Levitt and Seth Rogen playing herself and belted out a version of her biggest hit Wrecking Ball with Levitt's character.

Miley being Miley in The Night Before

Guardians of the Galaxy Vol. 2 hits cinemas on April 28 and Gunn says he is excited for fans to find out what Baby Groot and the gang get up to next.

"I love these characters. They are very close to me. To be able to get to know them better and to be able to share more things that I know about them with the fans is a really fun part of making these movies," he said.

"I make these movies because I love these characters," he added.

They're back!

Read our four-star review of Guardians of the Galaxy Vol. 2 here