Since Siri made its debut in 2011 with the iPhone 4s, your iPhone---and, subsequently, other Apple devices---has been able to recognize what you're saying. But future devices, such as the HomePod smart speaker, may also be able to work out where you're saying it, too.

That's according to a new patent application, spotted by Apple Insider. It describes how Apple has been exploring technology that could enable its devices to estimate how far away a user is when they speak, and potentially act accordingly.

New Smart Interactions

The patent application is titled "Learning-Based Distance Estimation." It notes how being able to estimate the distance from a device to a user could lead to some pretty useful interactions. "For example, the device may adjust the playback volume or the response from a smart assistance device based on the estimated distance of the user from the device," it observes.

This could mean that a device, such as a HomePod, might vary the volume of music playback or its Siri smart assistant so as to be heard by the user if they are at a distance, while not blasting their eardrums if they're up close.

It could also be used to decide which device should respond to a particular query, in settings where several possible devices might answer a request.

Related: HomePod Review: The Most Apple Thing Ever

This is achieved by using deep learning artificial intelligence. As Apple writes in the patent application:

The deep learning system may estimate the direct speech component that contains information about the direct signal propagation from the speech source to the microphone array and the reverberant speech signal that contains the reverberation effect and noise. The deep learning system may [then] extract signal characteristics of the direct signal component and the reverberant signal component and estimate the distance based on the extracted signal characteristics using the learned mapping.

Artificial Intelligence to the Rescue

It's another example of how Apple is using AI in more and more of its work. For a long time, Apple lagged behind other tech giants like Facebook and Google/Alphabet in this domain.

Over approximately the past half decade, Apple has sought to catch up in this important area. While people can convincingly argue that Siri still lags behind Amazon's Alexa and Google Assistant in terms of overall smarts, that gap is closing all the time.

Innovative technology like the one described in this patent application shows that Apple is doing its best to use cutting edge AI to make tech that, to quote previous Apple marketing materials, "just works."

As a patent application, there's no guarantee that this ever makes it into an Apple product that ships, of course. Nonetheless, it gives an indication of one of the possible approaches Apple could usefully incorporate into future technology.