The Huawei AI Cube on display at the IFA 2018 consumer electronics show in Berlin, Germany.

Huawei is working on its own voice assistant that works outside of China, potentially pitting it against software produced by Google and Amazon.

In China, Huawei has its own voice assistant called Xiaoyi which operates in its smart speaker called the AI Cube and its smartphones. But it is only for the Chinese market.

Now the technology giant is working on a voice assistant that will work outside China.

"We are using our own in China, in (the) future we will also have our own outside of China," Richard Yu, CEO of Huawei's consumer business, told CNBC in an exclusive interview.

"In the beginning, we are mainly using Google Assistant and Amazon Alexa" for its AI Cube and smartphones, he said. "We need more time to build our AI (artificial intelligence) services ... Later we will expand this outside of China."

The CEO made clear that it will continue working in partnership with both Amazon and Google. However, any step outside China could put it in direct competition with the two U.S. tech giants, both of which have their voice assistants integrated with various hardware.

Reached by CNBC, Google declined to comment. Amazon was not immediately available for comment.