Keira Knightley struggled to learn Mandarin for her latest film 'Official Secrets'.

The 'Love Actually' star plays real-life British translator and whistleblower Katharine Gun in the new drama and had to master some Chinese phrases and words for the part and she readily admits it ''took some practising''.

Speaking in Baz Bamigboye's column for the Daily Mail newspaper, Keira said: ''I was listening to it and listening to it, and I think everyone at work was getting really annoyed because I was listening to it what seemed like ten million times.

''I felt quite cocky about it - I thought I'd cracked it. But when I listened to myself saying it, I realised that there's a tonal thing that we don't have.''

The 34-year-old English actress had to record her lines again on the request of director Gavin Hood with the help of a Mandarin speaker.

She added: ''A lady came in and read it out, and I recorded it phonetically. I can't say that I was a natural Mandarin speaker - well I clearly wasn't, was I?

''They were getting really annoyed with me at work, and I just didn't realise how difficult it was going to be.''

'Official Secrets' is based on the true story of Gun, an employee of the British intelligence agency Government Communications Headquarters, who, in 2003, turned whistleblower when she leaked a secret memo exposing an illegal spying operation by the US as it pushed for the 2003 invasion of Iraq.

The film, which is released next week, also stars Matt Smith, Rhys Ifans and Ralph Fiennes.