Lena Dunham's 'Girls' was inspired by Taylor Swift's music.

The 28-year-old producer and star of the hit HBO series has confessed she always listens to the 'Shake It Off' hitmaker's songs when she writes and describes Taylor's albums as the ''soundtrack'' to her life.

The actress - who has recently become good friends with the 24-year-old singer - told Entertainment Tonight: ''Long before she was my friend, she was my friend in my head.

''I was listening to her while I wrote my first film, while I wrote the first season of Girls, while I wrote the second season of Girls - so she's definitely a soundtrack to many of my feelings.''

While the Golden Globe nominee is growing close to the 'I Knew You Were Trouble' songstress, Taylor is believed to have recently lashed out at a fellow popstar - rumoured to be singer Katy Perry - in her new track 'Bad Blood', after the unnamed artist allegedly tried to ''sabotage'' her entire 'Red' world tour by hiring her dancers.

Taylor said when discussing the track: ''I'm surprisingly non-confrontational - you would not believe how much I hate conflict. So now I have to avoid her. It's awkward, and I don't like it.''

However, a source close to the 'Roar' singer has denied that Katy deliberately tried to ruin Taylor's tour.

They said: ''They were loyal to Katy when it came time to launch the 'Prism' tour. She didn't steal them. Taylor just employed them when they weren't working for Katy.''

[They can be] very competitive.''