Spike Jonze was inspired by how efficiently ''artificial intelligence'' could simulate conversation with a human in his new film 'Her'.

The 44-year-old director's forthcoming movie is about a modern day romance in which depressed writer Theodore Twombly - played by Joaquin Phoenix - falls in love with his new computer and smartphone operating system named Samantha, voiced by Scarlett Johansson.

Jonze began thinking about a virtual romance after reading a piece on online communication between a digital device and a person and ''got a buzz'' when the intelligence could ''keep up'' with him.

He said: ''The very tiniest seed came about 10 years ago when I saw this article online that said you can interact live with an artificial intelligence. So I went to the website, and I IM-ed this address, and I was like, 'Hi, how are you?' and I got responses like, 'Great, how are you?' And you can talk to it and tease it - not a him or her, it's just typing - and get a little banter going, getting mocked and so on. I got this sort of buzz thinking: this thing's actually keeping up with me.''

Jonze began noticing flaws in the digital responses after a while of talking but, on the whole, he was still astounded by the ''clever'' device.

He explained: ''After a couple of minutes you start to notice the cracks and the flaws. 'Oh, this is a very cleverly written program', I thought in the end.

''But for those couple of minutes I got a very distinctive, tingly kind of buzz from the experience. The movie has a lot of large conceptual ideas holding it up, but most of all, I always wanted to make it a moving relationship movie - that was what I was most interested in.''