OTRC: Katy Perry, John Mayer collaborate on 'Who You Love' single - Listen

John Mayer and Katy Perry arrive at the ceremonial swearing-in for President Barack Obama at the U.S. Capitol during the 57th Presidential Inauguration in Washington, Monday, Jan. 21, 2013. (AP Photo/J. Scott Applewhite)

Katy Perry teamed up with her on-again off-again boyfriend John Mayer to record a duet called "Who You Love."

The single, which can be heard below, is featured on Mayer's upcoming album "Paradise Valley." The album is out on August 20 and, according to an interview Perry did with Sirius XM on August 12, Perry and Mayer wrote the song together.

Perry also explained a giggle that can be heard toward the end of the song, "I think that's just a love giggle. It's like the ones that Mariah Carey had in 1990 and stuff like that. I think I was going for that. I think I was just so happy, so, I love that song."

On the track, Mayer sings, "My girl, she ain't the one that I saw coming / sometimes I don't know which way to go / and I tried to run before but I'm not running anymore."

The two appear to be on-again after splitting in March. In June, the couple was spotted together at a Friars Club event honoring Don Rickles. Perry posted a photo on her Instagram that appeared to show her and Mayer embracing on the 4th of July and Mayer dedicated a song to "my Katy" during a concert in Milwaukee on July 6.

Perry is also doing press for her upcoming album "Prism," due out in October. "Roar," the first single off the album, was leaked online early on Sunday, ahead of its scheduled release on Aug. 12.