The science behind Amazon’s spatial audio-processing technology

Combining psychoacoustics, signal processing, and speaker beamforming enhances stereo audio and delivers an immersive sound experience for customers.

With every new Echo device and upgrade, we challenge ourselves to bring the best audio experience to our customers at an affordable price. This year, we’re introducing Amazon’s own custom-built spatial audio-processing technology, designed to enhance stereo sound on compatible Echo devices.

The version of the technology on Echo Studio, for instance, is customized to the specific acoustic design of the speakers and employs digital-processing methods — such as upmixing and virtualization — so stereo audio, television shows, and movie soundtracks feel closer to the listener, with greater width, clarity, and presence. It turns the Echo Studio into a hi-fi audio system that mirrors that of a stereo reference arrangement. Vocal performances are more present in the center soundstage, and stereo panned instruments are better defined on the sides, thereby creating a more immersive sound experience that reproduces the artist's intent.

In this blog post, we break down how we built this spatial audio-processing technology with an emphasis on the way humans perceive sound — or psychoacoustics — by using a combination of crosstalk cancellation, speaker beamforming, and upmixing to create a room-filling, spatial audio experience.

Psychoacoustics: Width, depth, and listening zones

Throughout development, we characterize the stereo image by its psychoacoustic qualities, including width, depth, and listening zones. We then investigate how sound waves interact with listeners in various room shapes and sizes and how signal-processing methods affect the listener’s experience.

Stereo angle.png
Echo Studio virtualizes the stereo sound field at the listener’s location in the far field.

Width

Width: The angular extent (wide vs. narrow) of localizable elements in the stereo image along the horizontal — or azimuth — plane.

When determining the width of a sound field, we first consider localizable elements such as a point-source that would induce time and level differences in the acoustic responses at the listener’s two ears. To model this phenomenon, it is helpful to compare the listening experiences on headphones vs. a loudspeaker in terms of the separation of left and right ear responses.

Unlike loudspeaker listening, headphone listening lacks a crosstalk path, as illustrated in the image below. In order to make headphone listening realistic, we can model crosstalk from the point-source to the two ears using an all-pass signal-processing filter for one ear and a delayed low-pass filter for the other ear. The two filters approximate and parameterize the listener’s ear responses with respect to their relative head-related transfer functions (HRTFs), which contain important cues that the human ear uses to localize sound. Moreover, the filter design ensures that there’s minimal modification to the signal spectra — or tonal balance — and therefore preserves the original playback content.

Crosstalk simulation.png
All-pass and delayed low-pass filters approximate the angle-dependent relative ipsilateral (same side of the body) and contralateral (opposite side of the body) head-related transfer functions (HRTFs).

However, unlike headphones, an external speaker can create its own crosstalk for the listener, depending on its placement. For example, the left and right speaker transducers, or drivers, on the Echo Studio are narrowly spaced within the device, whereas the speakers in a standard stereo pair are 60 degrees apart relative to the listener.

With the spatial audio-processing technology on Echo Studio, we decouple the crosstalk of the driver pair by modeling and then inverting the system of equations between each driver and the listener’s ears, via crosstalk cancellation (CTC) methods. If we have more than two drivers, then the more general formulation is called null-steering, where filters are designed for all the drivers so that their acoustic responses cancel at one ear.

In both cases, we can normalize the filter design to satisfy a target cancellation gain curve defined by the power ratio of the acoustic energy at the ipsilateral (same side of the body) and contralateral (opposite side of the body) ears across frequencies. This prevents overfitting the cancellation to an exact location, since a listener may be at varying distances or not perfectly centered to the device.

Once the driver’s CTC filters are designed for stereo inputs, they can be combined with the approximated HRTF filters that introduce the amount of crosstalk consistent with a stereo reference system.

CTC filters.png
Stereo virtualization for external speaker playback specifies an additional pair of crosstalk cancellation (CTC) filters for nulling the contralateral acoustic response. The relative transfer function (RTF) filter realizes the ratio of the two CTC filter responses.

Depth

Depth: The distance (frontal vs. recessed) of the perceived sound field from the listener.

The distance at which sound elements in an audio track localize correlates with the relationship — or coherence — of the two signals between the sound source and the listener’s ears. For example, a simple left or right signal from a speaker is easy to understand, but if the audio mixes with the room’s reverberation, the audio clarity decreases, and the audio sounds recessed.

In speaker playback, however, we contend with the speaker directivity and its interaction with the room environment. For example, a direct acoustic path between a speaker and a listener preserves the desired clarity of the original content. But when the acoustic signal reflects off of walls, the loss in coherence recesses the perceived sound field and causes elements to smear spatially. This is why tracks heard anechoically or on headphones appear closer — or even inside the listener’s head — and clearer than tracks heard over external speakers in a reverberant room. In the first case, the acoustic response is direct from the driver to the listener’s ears, while external speakers must contend with the effects of the room environment.

Beamformer impact.png
Strong room reflections and reverberation mask the binaural cues and reduce the perceived distance of the soundstage. Speaker beamforming pushes the soundstage forward by attenuating the indirect sound energy, increasing the critical distance and coherence.

As part of our custom-built spatial audio technology, we can control the speaker directivity via careful beamforming. The speaker drivers can be filtered to produce a sound field with a directivity that sums coherently on-axis and cancels off-axis. That is, the acoustic response is greatest when the listener is lined up in front of the speaker and, conversely, weakest when the listener is to the side at +/- 90 degrees.

Therefore, one way to design with such directivity is to place two nulls at +/- 90-degree angles and either control for the cancellation gain between on-/off-axis power responses or the shape of the nulls as a function of azimuth. The resulting beam pattern is one with a main lobe that is wide enough for the direct path to be strong, at up to a +/- 45-degree azimuth listening window, before quickly tapering off to minimize the acoustic energy further off-axis, which would reflect off the walls.

This has the intended effect of making stereo audio feel closer to the listener, with greater clarity than is typical in an acoustically untreated listening environment like a living room. The effect is similar to how theaters reproduce a frontal soundstage over different seating areas, despite the speakers’ being far away.

Beamforming.png
The speaker beamformer increases directivity after placing two off-axis nulls in the midrange frequencies. The acoustic responses over frequency and azimuth contrast that of simple matrix mixing with the beamformer realized in relative-transfer-function (RTF) form.

Listening zones

Listening zone: The mapping between the listening area and the stereo soundstage.

A listening “sweet spot” — the stereo image in a hi-fi audio system reference stereo pair — is best reproduced when the listener’s location forms an equilateral triangle with the stereo speaker pair. If the listener angle exceeds +/- 30 degrees, then a hole is created in the listener’s phantom center due to the loss of inter-speaker-to-ear coherence as room reflections grow stronger. Important elements of the audio mix, such as vocals, lose their presence. If the listener angle falls below +/- 30 degrees, then the stereo image narrows, as audio elements collapse toward the center. If the listener’s location is off-axis, then the stereo image biases towards one side or the other.

Phantom center.png
The stereo field relies on a “phantom center”, where important lead vocals and instruments are mixed. The center content can be separated from the original stereo left and right input after the mid-/side decomposition.

To combat this, our spatial audio technology aims to reproduce the stereo image over the largest listening area. In practice, the intended listening area of CTC-filtered playback conflicts with that of beamforming designs that control for speaker directivity. We can achieve a compromise by performing stereo upmixing and then applying different beamforming filters to each channel. For example, we can upmix into left, right, and center (LRC), where the center is minimally correlated with left-minus-right in the mid-/side decomposition.

The upmixed left channel is processed through the CTC filter that nulls the right ear after virtualization, the upmixed right channel nulls the left ear, and the center channel is beamformed with a wide main lobe. This means that vocal performances are more present in the center, while the stereo panned instruments are better defined on the side, creating a more immersive sound experience for the listener.

Signal flow.png
After upmixing, the virtualization and the crosstalk cancellation (CTC) widens the left and right channels, and the midrange beamformer pushes the center content forward. Subsequent delay blocks phase-align the faster of the two paths.

We’re continuing to iterate and refine technology across the Echo portfolio to bring the best audio experience to our customers. If you’d like to learn more about beamforming and speaker directivity in room acoustics, read papers published by our engineering team: “Fast source-room-receiver modeling”, in EUSIPCO 2020, and “Spherical harmonic beamformer designs", in EURASIP 2021.

Related content

US, MA, North Reading
Are you inspired by invention? Is problem solving through teamwork in your DNA? Do you like the idea of seeing how your work impacts the bigger picture? Answer yes to any of these and you’ll fit right in here at Amazon Robotics. We are a smart team of doers that work passionately to apply cutting edge advances in robotics and software to solve real-world challenges that will transform our customers’ experiences in ways we can’t even imagine yet. We invent new improvements every day. We are Amazon Robotics and we will give you the tools and support you need to invent with us in ways that are rewarding, fulfilling and fun. The Research Science team at Amazon Robotics is seeking interns with a passion for robotic research to work on cutting edge algorithms for robotics. Our team works on challenging and high-impact projects, including allocating resources to complete a million orders a day, coordinating the motion of thousands of robots, autonomous navigation in warehouses, and learning how to grasp all the products Amazon sells. We are seeking internship candidates with backgrounds in computer vision, machine learning, resource allocation, discrete optimization, search, planning/scheduling, and reinforcement learning. As an intern you will develop a new algorithm to solve one of the challenging computer vision and manipulation problems in Amazon's robotic warehouses. Your project will fit your academic research experience and interests. You will code and test out your solutions in increasingly realistic scenarios and iterate on the idea with your mentor to find the best solution to the problem.
US, WA, Seattle
Are you excited about building high-performance robotic systems that can perceive, learn, and act intelligently alongside humans? The Robotics AI team is creating new science products and technologies that make this possible, at Amazon scale. We work at the intersection of computer vision, machine learning, robotic manipulation, navigation, and human-robot interaction.The Amazon Robotics team is seeking broad, curious applied scientists and engineering interns to join our diverse, full-stack team. In addition to designing, building, and delivering end-to-end robotic systems, our team is responsible for core infrastructure and tools that serve as the backbone of our robotic applications, enabling roboticists, applied scientists, software and hardware engineers to collaborate and deploy systems in the lab and in the field. Come join us!
US, VA, Arlington
The Central Science Team within Amazon’s People Experience and Technology org (PXTCS) uses economics, behavioral science, statistics, and machine learning to proactively identify mechanisms and process improvements which simultaneously improve Amazon and the lives, well-being, and the value of work to Amazonians. We are an interdisciplinary team, which combines the talents of science and engineering to develop and deliver solutions that measurably achieve this goal. As Director for PXT Central Science Technology, you will be responsible for leading multiple teams through rapidly evolving complex demands and define, develop, deliver and execute on our science roadmap and vision. You will provide thought leadership to scientists and engineers to invent and implement scalable machine learning recommendations and data driven algorithms supporting flexible UI frameworks. You will manage and be responsible for delivering some of our most strategic technical initiatives. You will design, develop and operate new, highly scalable software systems that support Amazon’s efforts to be Earth’s Best Employer and have a significant impact on Amazon’s commitment to our employees and communities where we both serve and employ 1.3 million Amazonians. As Director of Applied Science, you will be part of the larger technical leadership community at Amazon. This community forms the backbone of the company, plays a critical role in the broad business planning, works closely with senior executives to develop business targets and resource requirements, influences our long-term technical and business strategy, helps hire and develop engineering leaders and developers, and ultimately enables us to deliver engineering innovations.This role is posted for Arlington, VA, but we are flexible on location at many of our offices in the US and Canada.
US, VA, Arlington
Employer: Amazon.com Services LLCPosition: Data Scientist IILocation: Arlington, VAMultiple Positions Available1. Manage and execute entire projects or components of large projects from start to finish including data gathering and manipulation, synthesis and modeling, problem solving, and communication of insights and recommendations.2. Oversee the development and implementation of data integration and analytic strategies to support population health initiatives.3. Leverage big data to explore and introduce areas of analytics and technologies.4. Analyze data to identify opportunities to impact populations.5. Perform advanced integrated comprehensive reporting, consultative, and analytical expertise to provide healthcare cost and utilization data and translate findings into actionable information for internal and external stakeholders.6. Oversee the collection of data, ensuring timelines are met, data is accurate and within established format.7. Act as a data and technical resource and escalation point for data issues, ensuring they are brought to resolution.8. Serve as the subject matter expert on health care benefits data modeling, system architecture, data governance, and business intelligence tools. #0000
US, TX, Dallas
Employer: Amazon.com Services LLCPosition: Data Scientist II (multiple positions available)Location: Dallas, TX Multiple Positions Available:1. Assist customers to deliver Machine Learning (ML) and Deep Learning (DL) projects from beginning to end, by aggregating data, exploring data, building and validating predictive models, and deploying completed models to deliver business impact to the organization;2. Apply understanding of the customer’s business need and guide them to a solution using AWS AI Services, AWS AI Platforms, AWS AI Frameworks, and AWS AI EC2 Instances;3. Use Deep Learning frameworks like MXNet, PyTorch, Caffe 2, Tensorflow, Theano, CNTK, and Keras to help our customers build DL models;4. Research, design, implement and evaluate novel computer vision algorithms and ML/DL algorithms;5. Work with data architects and engineers to analyze, extract, normalize, and label relevant data;6. Work with DevOps engineers to help customers operationalize models after they are built;7. Assist customers with identifying model drift and retraining models;8. Research and implement novel ML and DL approaches, including using FPGA;9. Develop computer vision and machine learning methods and algorithms to address real-world customer use-cases; and10. Design and run experiments, research new algorithms, and work closely with engineers to put algorithms and models into practice to help solve customers' most challenging problems.11. Approximately 15% domestic and international travel required.12. Telecommuting benefits are available.#0000
US, WA, Seattle
MULTIPLE POSITIONS AVAILABLECompany: AMAZON.COM SERVICES LLCPosition Title: Manager III, Data ScienceLocation: Bellevue, WashingtonPosition Responsibilities:Manage a team of data scientists working to build large-scale, technical solutions to increase effectiveness of Amazon Fulfillment systems. Define key business goals and map them to the success of technical solutions. Aggregate, analyze and model data from multiple sources to inform business decisions. Manage and quantify improvement in the customer experience resulting from research outcomes. Develop and manage a long-term research vision and portfolio of research initiatives, with algorithms and models that to be integrated in production systems. Hire and mentor junior scientists.Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation #0000
US, VA, Arlington
MULTIPLE POSITIONS AVAILABLECompany: AMAZON.COM SERVICES LLCPosition Title: Data Scientist IILocation: Arlington, VirginiaPosition Responsibilities:Design and implement scalable and reliable approaches to support or automate decision making throughout the business. Apply a range of data science techniques and tools combined with subject matter expertise to solve difficult business problems and cases in which the solution approach is unclear. Acquire data by building the necessary SQL / ETL queries. Import processes through various company specific interfaces for accessing Oracle, RedShift, and Spark storage systems. Build relationships with stakeholders and counterparts. Analyze data for trends and input validity by inspecting univariate distributions, exploring bivariate relationships, constructing appropriate transformations, and tracking down the source and meaning of anomalies. Build models using statistical modeling, mathematical modeling, econometric modeling, network modeling, social network modeling, natural language processing, machine learning algorithms, genetic algorithms, and neural networks. Validate models against alternative approaches, expected and observed outcome, and other business defined key performance indicators. Implement models that comply with evaluations of the computational demands, accuracy, and reliability of the relevant ETL processes at various stages of production.Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation #0000
US, WA, Seattle
Are you motivated to explore research in ambiguous spaces? Are you interested in conducting research that will improve the employee and manager experience at Amazon? Do you want to work on an interdisciplinary team of scientists that collaborate rather than compete? Join us at PXT Central Science!The People eXperience and Technology Central Science Team (PXTCS) uses economics, behavioral science, statistics, and machine learning to proactively identify mechanisms and process improvements which simultaneously improve Amazon and the lives, wellbeing, and the value of work to Amazonians. We are an interdisciplinary team that combines the talents of science and engineering to develop and deliver solutions that measurably achieve this goal.We are seeking a senior Applied Scientist with expertise in more than one or more of the following areas: machine learning, natural language processing, computational linguistics, algorithmic fairness, statistical inference, causal modeling, reinforcement learning, Bayesian methods, predictive analytics, decision theory, recommender systems, deep learning, time series modeling. In this role, you will lead and support research efforts within all aspects of the employee lifecycle: from candidate identification to recruiting, to onboarding and talent management, to leadership and development, to finally retention and brand advocacy upon exit.The ideal candidate should have strong problem-solving skills, excellent business acumen, the ability to work independently and collaboratively, and have an expertise in both science and engineering. The ideal candidate is not methods-driven, but driven by the research question at hand; in other words, they will select the appropriate method for the problem, rather than searching for questions to answer with a preferred method. The candidate will need to navigate complex and ambiguous business challenges by asking the right questions, understanding what methodologies to employ, and communicating results to multiple audiences (e.g., technical peers, functional teams, business leaders).About the teamWe are a collegial and multidisciplinary team of researchers in People eXperience and Technology (PXT) that combines the talents of science and engineering to develop innovative solutions to make Amazon Earth's Best Employer. We leverage data and rigorous analysis to help Amazon attract, retain, and develop one of the world’s largest and most talented workforces.
US, WA, Bellevue
Job summaryThe Global Supply Chain-ACES organization aims to raise the bar on Amazon’s customer experience by delivering holistic solutions for Global Customer Fulfillment that facilitate the effective and efficient movement of product through our supply chain. We develop strategies, processes, material handling and technology solutions, reporting and other mechanisms, which are simple, technology enabled, globally scalable, and locally relevant. We achieve this through cross-functional partnerships, listening to the needs of our customers and prioritizing initiatives to deliver maximum impact across the value chain. Within the organization, our Quality team balances tactical operation with operations partners with global engagement on programs to deliver improved inventory accuracy in our network. The organization is looking for an experienced Principal Research Scientist to partner with senior leadership to develop long term strategic solutions. As a Principal Scientist, they will lead critical initiatives for Global Supply Chain, leveraging complex data analysis and visualization to:a. Collaborate with business teams to define data requirements and processes;b. Automate data pipelines;c. Design, develop, and maintain scalable (automated) reports and dashboards that track progress towards plans;d. Define, track and report program success metrics.e. Serve as a technical science lead on our most demanding, cross-functional projects.
US, MA, Cambridge
Job summaryMULTIPLE POSITIONS AVAILABLECompany: AMAZON.COM SERVICES LLCPosition Title: Data Scientist IILocation: Cambridge, MassachusettsPosition Responsibilities:Utilize code (Python, R, etc.) to build ML models to solve specific business problems. Build and measure novel online & offline metrics for personal digital assistants and customer scenarios, on diverse devices and endpoints. Research and implement novel machine learning algorithms and models. Collaborate with researchers, software developers, and business leaders to define product requirements and provide modeling solutions. Communicate verbally and in writing to business customers and leadership team with various levels of technical knowledge, educating them about our systems, as well as sharing insights and recommendations.Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation #0000