# Patent

## Title
Contextual switching of microphones

## Abstract

Provided are systems and methods for contextual switching of microphones in audio devices. An example method includes detecting a change in conditions for capturing an acoustic signal by at least two microphones. A configuration is associated with the at least two microphones. The example method provides determining that the change in conditions has been stable for a pre-determined period of time. In response to the determination, the method changes the configuration associated with the at least two microphones. The conditions may include an absence or presence of far-end speech, reverberation, low/high signal-to-noise ratio, low/high signal-to-echo ratio, type of background noise, and so on. The changing of the configuration includes assigning a primary microphone and a secondary microphone based on a change in conditions. Based on the changed configuration, tuning parameters may be adjusted for noise suppression and acoustic echo cancellation.

## Background
CROSS-REFERENCE TO RELATED APPLICATION
The present application claims the benefit of U.S. Provisional Patent Application No. 62/110,171, filed Jan. 30, 2015. The subject matter of the aforementioned application is incorporated herein by reference for all purposes.


FIELD
The present application relates generally to audio processing and, more particularly, to systems and methods for contextual switching of microphones.
BACKGROUND
It is common for devices such as mobile phones, personal computers (PCs), tablet computers, gaming consoles, and wearables to have more than one microphone and one or more loudspeakers. With every advancing generation of the devices, the market focus has been on enhancing the end-user experience. It may be not feasible to place microphones at desired locations on a mobile phone or other devices due to, for example, waterproof designs, a single piece of glass design, curved screens, battery placement, location of camera, heart rate sensor, speaker size, Infrared (IR)/proximity/humidity/magnetic sensors, and so forth. These enhancements can make a desired performance challenging in various scenarios. For example, given the form factor of a device and the location of microphones and loudspeakers on the device, it is often difficult to achieve the desired noise suppression (NS) and acoustic echo cancellation (AEC) using the same microphone as the primary microphone in different scenarios.
SUMMARY
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
Provided are systems and methods for contextual switching of microphones. An example method includes detecting a change of conditions for capturing an acoustic signal by at least two microphones, a configuration being associated with the at least two microphones. The method allows determining that the change of conditions has been stable such that the change has occurred for a pre-determined period of time. In response to the determination, the method includes changing the configuration associated with the at least two microphones.
In various embodiments, the microphones include at least a first microphone and a second microphone. The configuration may include having the first microphone assigned to function as a primary microphone and having the second microphone assigned to function as a secondary microphone. In other embodiments, changing the configuration includes assigning the first microphone to function as the secondary microphone and assigning the second microphone to function as the primary microphone.
In some embodiments, the method further includes adjusting tuning parameters for noise suppression (NS) based on the changed configuration. In certain other embodiments, the method further includes adjusting tuning parameters for acoustic echo cancellation (AEC) based on the changed configuration.
In other embodiments, detecting the change of the conditions includes detecting that the first microphone is occluded and the second microphone is not occluded. Occlusion may be detected, for example, based on the microphone energy level. Changing the configuration may include assigning the second microphone to function as a primary microphone.
In some embodiments, detecting the change of the conditions includes detecting presence of a reverberation. The at least two microphones may comprise at least three microphones. In response to the detecting of the presence of the reverberation, changing the configuration includes selecting a first microphone and a second microphone from the at least three microphones for capturing the acoustic signal. The first microphone and the second microphone may be a pair of the microphones that are separated by a maximum distance.
In various embodiments, the conditions are associated with at least one of the following: absence or presence of far-end speech, a type of background noise, sensitivities of the at least two microphones, and seals of the at least two microphones.
In some embodiments, determining the conditions includes one or more of the following: determining a level of signal-to-noise ratio (SNR) in the acoustic signal and determining a level of signal-to-echo ratio (SER) in the acoustic signal.
According to another example embodiment of the present disclosure, the steps of the method for contextual switching of microphones are stored on a machine-readable medium comprising instructions, which, when implemented by one or more processors, perform the recited steps.
Other example embodiments of the disclosure and aspects will become apparent from the following description taken in conjunction with the following drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
Embodiments are illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements.
FIG. 1 is a block diagram of an exemplary audio device.
FIGS. 2A and 2B are block diagrams illustrating two configurations of microphones of an audio device, according to example embodiments.
FIG. 3 is a block diagram illustrating states associated with configurations of microphones and transitions between the states, according to an example embodiment.
FIG. 4 is a flow chart of an exemplary method for contextual switching of microphones, according to an example embodiment.
FIG. 5 is a flow chart of an exemplary method for contextual switching of microphones, according to another example embodiment.
FIG. 6 is a flow chart of an exemplary method for contextual switching of microphones, according to yet another example embodiment.
FIG. 7 illustrates an example computer system that may be used to implement embodiments of the disclosed technology.



DETAILED DESCRIPTION
The technology disclosed herein relates to systems and methods for contextual switching of microphones. Embodiments of the present technology may be practiced with audio devices operable at least to capture and process acoustic signals.
According to an example embodiment, a method for contextual switching of microphones includes detecting a change of conditions for capturing an acoustic signal by at least two microphones. The method allows determining that the change of conditions has been stable for a pre-determined period of time. In response to the determination, the method enables changing the configuration associated with the at least two microphones.
FIG. 1 is a block diagram illustrating an example audio device 100 suitable for implementing a method for contextual switching of microphones, according to some embodiments. The example audio device 100 includes a (radio) transceiver 110, a processor 130, microphones 120 (also further referred to as microphones 120a, 120b, 120c, and so forth), a loudspeaker 140, an audio processing system 150, and sensors 160. In other embodiments, the audio device 100 includes more or other components to provide a particular operation or functionality. Similarly, the audio device 100 may include fewer components that perform similar or equivalent functions to those depicted in FIG. 1.
In some embodiments, the transceiver 110 is configured to communicate with a network such as the Internet, Wide Area Network (WAN), Local Area Network (LAN), cellular network, and so forth, to receive and/or transmit an audio data stream. The received audio data stream may then be forwarded to the audio processing system 150 and the loudspeaker 140.
The processor 130 includes hardware and software that implement the processing of audio data and various other operations depending on a type of the audio device 100 (e.g., communication device and computer), according to some embodiments. A memory (e.g., non-transitory computer readable storage medium) is operable to store, at least in part, instructions and data for execution by processor 130.
In various embodiments, the audio processing system 150 includes hardware and software that implement the encoding of acoustic signal(s). For example, the audio processing system 150 is configured to receive acoustic signals from an acoustic source via microphone(s) 120 (which may be one or more microphones or acoustic sensors) and process the acoustic signals. After reception by the microphone(s) 120, the acoustic signals may be converted into electrical signals by an analog-to-digital converter. In some embodiments, the processing of acoustic signal(s) includes NS and/or AEC. Noise is unwanted sound including street noise, ambient noise, and speech from entities other than an intended speaker. For example, noise sources include a working air conditioner, ventilation fans, TV sets, mobile phones, stereo audio systems, and the like. Certain kinds of noise may arise from both operation of machines (for example, cars) and environments in which they operate (for example, a road, track, tire, wheel, fan, wiper blade, engine, exhaust, entertainment system, wind, rain, waves, and the like).
An example audio processing system suitable for performing noise suppression is discussed in more detail in U.S. patent application Ser. No. 12/832,901 (now U.S. Pat. No. 8,473,287), entitled “Method for Jointly Optimizing Noise Reduction and Voice Quality in a Mono or Multi-Microphone System,” filed Jul. 8, 2010, the disclosure of which is incorporated herein by reference for all purposes. By way of example and not limitation, noise suppression methods are described in U.S. patent application Ser. No. 12/215,980 (now U.S. Pat. No. 9,185,487), entitled “System and Method for Providing Noise Suppression Utilizing Null Processing Noise Subtraction,” filed Jun. 30, 2008, and in U.S. patent application Ser. No. 11/699,732 (now U.S. Pat. No. 8,194,880), entitled “System and Method for Utilizing Omni-Directional Microphones for Speech Enhancement,” filed Jan. 29, 2007, which are incorporated herein by reference in their entireties.
The loudspeaker 140 is a device that provides an audio output to a listener. In some embodiments, the audio device 100 further includes a class-D output, an earpiece of a headset, or a handset on the audio device 100.
In various embodiments, sensors 160 include, but are not limited to, an accelerometer, magnetometer, gyroscope, Inertial Measurement Unit (IMU), temperature sensor, altitude sensor, proximity sensor, barometer, humidity sensor, color sensor, light sensor, pressure sensor, GPS module, a beacon, WiFi sensor, ultrasound sensor, infrared sensor, touch sensor, and the like. In some embodiments, the sensor data can be used to estimate conditions and context for capturing acoustic signals by microphone(s) 120.
FIGS. 2A and 2B are block diagrams illustrating two configurations of microphones 120 of the audio device 100, according to some example embodiments. In the examples shown in FIGS. 2A and 2B, the audio device 100 includes microphones 120a, 120b, and 120c (also shown in FIG. 1 as microphone(s) 120, according to certain embodiments).
In various embodiments, each of the microphones 120a, 120b, and 120c is operable to provide predetermined functionality. In a typical situation, when a user speaks during a call on the audio device 100, it is recommended that the microphone closest to a target talker's mouth is configured to serve as the primary microphone on the audio device. In this instance, as shown in FIG. 2A, the microphone 120a on the bottom-left edge of the device serves as the primary microphone (“PRI”). The inputs from microphones 120b and 120c, which serve as secondary microphone (“SEC”) and tertiary microphone (“TER”) respectively in this example, can be used by the audio device 100 for noise reduction and AEC in captured acoustic signal. Noise reduction may include noise cancellation and/or noise suppression.
In an exemplary scenario, when the loudspeaker 140 is active, the designated microphone 120a, which serves as the primary microphone in this example, can pick up strong echoes due to its close proximity to the loudspeaker 140. In this scenario, it is preferred that the primary microphone that is assigned to capture a target talker be the farthest microphone from the loudspeaker 140. For this example, as shown in FIG. 2B, the microphone 120b on the top edge of the audio device 100 is assigned to serve as the primary microphone (in contrast to the example shown in FIG. 2A where the microphone 120a serves as the primary microphone).
According to various embodiments, the technologies described herein allow dynamically switching one or more microphone(s) based on near-end (target talker) and far-end conditions. The contextual switching can be based on one or more of the following factors: absence or presence of far-end speech (echo), absence or presence of reverberation, type of background noise, and microphone characteristics such as sensitivities and seals. In some embodiments, the contextual switching is based on values of signal-to-noise ratio (SNR) of signals captured by different microphones 120 of the audio device 100. For example, assigning which of the two microphones is a primary microphone and which is a secondary microphone can be based on determining which of the microphones 120 provides a low SNR and a high SNR at the current moment. Similarly, in certain embodiments, the contextual microphone switching is based on a signal-to-echo ratio (SER) in signals captured by different microphones 120 of audio device 100.
In some embodiments, one of the microphones 120, for example microphone 120a, can be occluded. For example, the microphone located at the bottom of the audio device 100 (the microphone 120a in FIGS. 2A and 2B) can be obstructed when the audio device 100 is inserted into a cup holder inside a car. In this situation, another microphone, for example microphone 120b, which is located at the opposite side of the audio device 100, can be assigned (configured) to be a primary microphone (as shown in FIG. 2B) and the microphone 120a can be assigned to be a secondary microphone.
FIG. 3 is a block diagram 300 illustrating states associated with configurations of microphones in audio devices and transitions between the states, according to an example embodiment. The exemplary diagram of FIG. 3 includes state 310 and state 320. In some embodiments, the state 310 corresponds to a configuration in which microphone 120a (as shown in FIG. 2A) is a primary microphone, while the state 320 corresponds to a configuration in which the microphone 120b (as shown in FIG. 2B) is the primary microphone. In other embodiments, each of the states 310 and 320 is associated with a set of tuning parameters for NS and AEC.
In various embodiments, the two states 310 and 320 in FIG. 3 differ by one or more of the following:
1) Tuning for aggressiveness of NS: more aggressive in low SNR conditions and less suppression in high SNR conditions for stationary or non-stationary distractors;
2) Robust tuning for AEC: based on detection of far-end activity, switch primary microphone to be farthest from the loudspeaker or adjust gains on the microphone closest to the loudspeaker to avoid clipping;
3) Reverberant conditions: when reverberant conditions are detected, use microphones that are separated by a maximum distance to remove reverberation from a target speech; and
4) Microphone occlusion: if the microphone is occluded due to a mobile phone case, a user's hand, or a cup holder covering the microphone, switch to using available non-occluded microphone(s).
Condition cues for switching between the states are checked in blocks 330 and 340, which are also referred to as “Check cues for switch” blocks. In the blocks 330 and 340, raw features are used for recognizing conditions for making a switch between the states. In various embodiments, the subset of cues used for making the decision includes, but is not limited to:

    
    
        1) Pitch;
        2) SNR;
        3) SER;
        4) Coherence;
        5) Type of noise source (e.g., train, car, pub, library, cafeteria, airport, etc.);
        6) Microphone energy levels; and
        7) Detection of reverberant conditions.
    
    


If conditions for a switch are met, then in blocks 350 and 360, a check for the stability of cues for a pre-determined period of time is executed. In various embodiments, the pre-determined period of time is in a range from approximately 20 milliseconds-50 milliseconds. The transition between the state 310 and the state 320 is executed in response to the conditions for a switch being met for a pre-determined amount of time. Otherwise, the existing configuration of microphones and the associated tuning parameters continue to be used.
FIG. 4 is a flow chart showing an example method 400 for contextual switching of microphones, according to various example embodiments. The example method 400 may be implemented with audio device 100. The example method 400 commences with detecting a change of conditions for capturing an acoustic signal by at least two microphones, a configuration being associated with the at least two microphones, in block 410. The conditions can be characterized by an absence or presence of far-end speech, a type of background noise, sensitivities of the at least two microphones, and seals of the at least two microphones. In certain embodiments, the conditions are associated with low or high SNR in the acoustic signal and low or high SER in the acoustic signal captured by the at least two microphones.
The example method 400 includes determining that the change of conditions has been stable for a pre-determined period of time in block 420. In block 430, in response to the determination, the example method 400 includes switching a configuration associated with the microphones.
In some embodiments, the example method 400 includes optionally adjusting tuning parameters for noise suppression based on the changed configuration in block 440. In other embodiments, the example method 400 includes optionally adjusting tuning parameters for acoustic echo cancellation based on the changed configuration in block 450.
FIG. 5 is a flow chart showing an example method 500 for contextual switching of microphones, according to some example embodiment. The example method 500 can be implemented with audio device 100. The example method 500 can commence with detecting that a first microphone from microphones of an audio device is occluded and a second microphone from the microphones is not occluded in block 510. In block 520, the example method 500 includes assigning the second microphone to function as a primary microphone for capturing an acoustic signal.
FIG. 6 is a flow chart showing an example method 600 for contextual switching of microphones, according to some other example embodiments. The example method 600 can be implemented with audio device 100. The example method 600 may commence in block 610 with detecting presence of a reverberation in an acoustic signal (e.g., a target speech) captured by at least three microphones.
In block 620, the method 600 includes selecting a first microphone and a second microphone from the at least three microphones for capturing the acoustic signal. The first and the second microphones may be separated by a maximum distance, the first and the second microphones being utilized to remove the reverberation in the captured acoustic signal.
FIG. 7 illustrates an exemplary computer system 700 that may be used to implement some embodiments of the present disclosure. The computer system 700 of FIG. 7 may be implemented in the contexts of the likes of computing systems, networks, servers, or combinations thereof. The computer system 700 of FIG. 7 includes one or more processor units 710 and main memory 720. Main memory 720 stores, in part, instructions and data for execution by processor unit(s) 710. Main memory 720 stores the executable code when in operation, in this example. The computer system 700 of FIG. 7 further includes a mass data storage 730, portable storage device 740, output devices 750, user input devices 760, a graphics display system 770, and peripheral devices 780.
The components shown in FIG. 7 are depicted as being connected via a single bus 790. The components may be connected through one or more data transport means. Processor unit(s) 710 and main memory 720 are connected via a local microprocessor bus, and the mass data storage 730, peripheral device(s) 780, portable storage device 740, and graphics display system 770 are connected via one or more input/output (I/O) buses.
Mass data storage 730, which can be implemented with a magnetic disk drive, solid state drive, or an optical disk drive, is a non-volatile storage device for storing data and instructions for use by processor unit(s) 710. Mass data storage 730 stores the system software for implementing embodiments of the present disclosure for purposes of loading that software into main memory 720.
Portable storage device 740 operates in conjunction with a portable non-volatile storage medium, such as a flash drive, floppy disk, compact disk, digital video disc, or Universal Serial Bus (USB) storage device, to input and output data and code to and from the computer system 700 of FIG. 7. The system software for implementing embodiments of the present disclosure is stored on such a portable medium and input to the computer system 700 via the portable storage device 740.
User input devices 760 can provide a portion of a user interface. User input devices 760 may include one or more microphones, an alphanumeric keypad, such as a keyboard, for inputting alphanumeric and other information, or a pointing device, such as a mouse, a trackball, stylus, or cursor direction keys. User input devices 760 can also include a touchscreen. Additionally, the computer system 700 as shown in FIG. 7 includes output devices 750. Suitable output devices 750 include speakers, printers, network interfaces, and monitors.
Graphics display system 770 includes a liquid crystal display (LCD) or other suitable display device. Graphics display system 770 is configurable to receive textual and graphical information and process the information for output to the display device.
Peripheral devices 780 may include any type of computer support device to add additional functionality to the computer system.
The components provided in the computer system 700 of FIG. 7 are those typically found in computer systems that may be suitable for use with embodiments of the present disclosure and are intended to represent a broad category of such computer components that are well known in the art. Thus, the computer system 700 of FIG. 7 can be a personal computer (PC), hand held computer system, telephone, mobile computer system, workstation, tablet, phablet, mobile phone, server, minicomputer, mainframe computer, wearable, or any other computer system. The computer may also include different bus configurations, networked platforms, multi-processor platforms, and the like. Various operating systems may be used including UNIX, LINUX, WINDOWS, MAC OS, PALM OS, QNX ANDROID, IOS, CHROME, TIZEN, and other suitable operating systems.
The processing for various embodiments may be implemented in software that is cloud-based. In some embodiments, the computer system 700 is implemented as a cloud-based computing environment, such as a virtual machine operating within a computing cloud. In other embodiments, the computer system 700 may itself include a cloud-based computing environment, where the functionalities of the computer system 700 are executed in a distributed fashion. Thus, the computer system 700, when configured as a computing cloud, may include pluralities of computing devices in various forms, as will be described in greater detail below.
In general, a cloud-based computing environment is a resource that typically combines the computational power of a large grouping of processors (such as within web servers) and/or that combines the storage capacity of a large grouping of computer memories or storage devices. Systems that provide cloud-based resources may be utilized exclusively by their owners or such systems may be accessible to outside users who deploy applications within the computing infrastructure to obtain the benefit of large computational or storage resources.
The cloud may be formed, for example, by a network of web servers that comprise a plurality of computing devices, such as the computer system 700, with each server (or at least a plurality thereof) providing processor and/or storage resources. These servers may manage workloads provided by multiple users (e.g., cloud resource customers or other users). Typically, each user places workload demands upon the cloud that vary in real-time, sometimes dramatically. The nature and extent of these variations typically depends on the type of business associated with the user.
The present technology is described above with reference to example embodiments. Therefore, other variations upon the exemplary embodiments are intended to be covered by the present disclosure.

## Claims

1. A method for contextual switching of microphones, the method comprising:
detecting a change of conditions for capturing an acoustic signal by at least two microphones, a configuration being associated with the at least two microphones, wherein detecting the change includes detecting presence of at least one of far-end speech, type of background noise, sensitivities of the at least two microphones, seals of the at least two microphones, level of signal-to-noise ratio (SNR) in the acoustic signal, and level of signal-to-echo ratio (SER) in the acoustic signal;
determining that the change of the conditions has occurred for a pre-determined period of time; and
in response to the determining, changing the configuration associated with the at least two microphones.

2. The method of claim 1, wherein the configuration includes having a first microphone, of the at least two microphones, assigned to function as a primary microphone and having a second microphone, of the at least two microphones, assigned to function as a secondary microphone.

3. The method of claim 2, wherein the primary microphone is the microphone, of the at least two microphones, closest to a target talker.

4. The method of claim 2, wherein the changing the configuration comprises:
assigning the first microphone to function as the secondary microphone; and assigning the second microphone to function as the primary microphone.

5. The method of claim 2, further comprising adjusting tuning parameters for noise suppression (NS) based on the changed configuration.

6. The method of claim 2, further comprising adjusting tuning parameters for acoustic echo cancellation (AEC) based on the changed configuration.

7. The method of claim 1, wherein the detecting the change of the conditions includes detecting that a first microphone, of the at least two microphones, is occluded and a second microphone, of the at least two microphones, is not occluded.

8. The method of claim 7, wherein the detecting that the first microphone is occluded is based on detecting the energy level of the first microphone, and the detecting that the second microphone is not occluded is based on detecting the energy level of the second microphone.

9. The method of claim 7, wherein the changing the configuration includes assigning the second microphone to function as a primary microphone.

10. The method of claim 1, wherein the detecting the change of the conditions includes detecting presence of a reverberation.

11. The method of claim 10, wherein the at least two microphones comprise at least three microphones, and wherein, in response to the detecting of the presence of the reverberation, the changing the configuration includes selecting a first microphone and a second microphone from the at least three microphones for capturing the acoustic signal, the first and the second microphones being separated by a distance that is a maximum distance between any pair of the at least three microphones.

12. A system for contextual switching of microphones, the system comprising:
at least one processor; and
a memory communicatively coupled with the at least one processor, the memory storing instructions, which, when executed by the at least processor, perform a method comprising:
detecting a change of conditions for capturing an acoustic signal by at least two microphones, a configuration being associated with the at least two microphones, wherein detecting the change includes detecting presence of at least one of far-end speech, type of background noise, sensitivities of the at least two microphones, seals of the at least two microphones, level of signal-to-noise ratio (SNR) in the acoustic signal, and level of signal-to-echo ratio (SER) in the acoustic signal;
determining that the change of the conditions has occurred for a predetermined period of time; and
in response to the determination, changing the configuration associated with the at least two microphones.

13. The system of claim 12, wherein the configuration includes having a first microphone, of the at least two microphones, assigned to function as a primary microphone and having a second microphone, of the at least two microphones, assigned to function as a secondary microphone.

14. The system of claim 13, wherein the primary microphone is the microphone, of the at least two microphones, closest to a target talker.

15. The system of claim 13, wherein the changing the configuration comprises:
assigning the first microphone to function as the secondary microphone; and
assigning the second microphone to function as the primary microphone.

16. The system of claim 13, further comprising adjusting tuning parameters for noise suppression (NS) based on the changed configuration.

17. The system of claim 13, further comprising adjusting tuning parameters for acoustic echo cancellation (AEC) based on the changed configuration.

18. A non-transitory computer-readable storage medium having embodied thereon instructions, which, when executed by at least one processor, perform steps of a method, the method comprising:
detecting a change of conditions for capturing an acoustic signal by at least two microphones, a configuration being associated with the at least two microphones, wherein detecting the change includes detecting presence of at least one of far-end speech, type of background noise, sensitivities of the at least two microphones, seals of the at least two microphones, level of signal-to-noise ratio (SNR) in the acoustic signal, and level of signal-to-echo ratio (SER) in the acoustic signal;
determining that the change of the conditions has occurred for a pre-determined period of time; and
in response to the determining, changing a configuration associated with the at least two microphones.

19. The method of claim 1, wherein based upon detection of the far-end speech, changing the configuration comprises, switching one of the at least two microphones that is farthest from a loudspeaker to be a primary microphone.

20. The method of claim 1, wherein the pre-determined period of time is in a range between and including twenty milliseconds and fifty milliseconds.