Copenhagen — Lego will partner with Amazon for a project that couples the toy maker’s building blocks with the retail company’s interactive voice program.

Children will be able to communicate with Amazon’s virtual assistant Alexa through a storytelling program as they play with their building blocks.

The product was launched in the UK and the US on Wednesday, the Danish company said in a statement.

The project is part of Lego CEO Niels B Christiansen’s efforts to keep the toy maker relevant to a generation of children obsessed with screens. Lego has so far had mixed results with its digital forays.

While the 2014 The Lego Movie and some of the company’s video games were successful, its big 2010 bet on an online multiplayer computer game, LegoUniverse, was a flop.

The Amazon Alexa stories, aimed at children aged two to five who play with Lego’s Duplo building blocks, include The Plane Story (about an aeroplane going on holiday) and The Rabbit Story (about a rabbit meeting its family’s other pets).

"Children don’t differentiate between physical and digital play," James Poulter, Lego’s head of emerging platforms and partnerships, said in the statement.

Europe’s biggest toy maker booked its first sales slump in 13 years in 2017, ending a decade-long streak of rapid expansion and surging profits.