The Mic cavity is a very important part in acoustic design. FIG. 1 is a block diagram of MIC structure in a common product.
FIG. 1 MIC structure in common products
The MIC pickup port to the surface of the product usually contains three parts: the acoustic seal part, the product enclosure part and the air passage part. The MESRF(Mic Enclosure System Resonant Frequency) has the greatest influence on microphone acoustic performance. The tolerance of components related to MIC within the product will directly affect MIC amplitude and frequency response.
FIG. 2 structure model diagram

FIG. 3 influence curve of product MIC aperture to depth ratio on MESRF in FIG. 2
Several conclusions can be drawn from figure 2 and figure 3:
\1. The larger the opening of the product structure, the better, and the shorter the sound pickup channel, the better (for the consideration of ID aesthetics, there are usually some restrictions on the opening, and in the actual design, it is recommended to be more than 1.5mm).
\2. The design principle should try to ensure that it is within the range of human voice (the platform degree of frequency response within 8KHZ). The poor design of MIC pickup cavity leads to the front movement of MESRF resonance peak, which directly affects the back-end algorithm and ultimately affects the recognition effect.
Supplement: when designing the MIC chamber, it is usually necessary to add a dust screen. Dust screen selection, the number of options do not too much.
MIC damping and sound insulation design is divided into two aspects: damping and sound insulation.
\1. Generally, silica gel reference figure 2 is used for sound insulation and shock absorption. The hardness of silica gel shall be designed according to the compression amount of the actual structure.
\2. The MIC should be kept away from interference (exhaust fan) or vibration (horn vibration and structural vibration), so as to avoid major influence of structural vibration on the MIC.
1、The microphone shall be isolated from the solid surface with silicone sleeve to reduce the vibration transmission and sealing of the shell. The design can refer to figure 4 to increase the contact between the silicone sleeve and the above structure. 
FIG. 4 increasing convex points of silicone sleeve
2, the silicone sleeve can increase the gum, prevent the silicone sleeve structure and shell in the assembly or use of relative movement, resulting in leakage.
\3. MIC must conduct internal sound insulation with SPK sound cavity to prevent the sound emitted by SPK from being directly transmitted to MIC through the internal space of the machine.

FIG. 5 view of sound insulation scheme
Note: for electret microphones, the protection of microphones should be considered in the structural design and production process to avoid the loss of microphone consistency caused by extrusion.
It is suggested that the loudspeaker and microphone should be placed in different cavities, and the cavities should be sealed with good sealing materials to prevent internal crosstalk. The loudspeaker mouthpiece should be more than 100mm away from the microphone sound pickup hole, the bigger the better. The speaker diaphragm and the passive diaphragm are not facing the microphone and the included Angle is greater than 90°.

Loudspeaker cavity design is also crucial, but due to the different requirements of sound quality, cavity structure and size vary, so this paper does not introduce in detail.
The requirement for sound quality and structure size is not high, so spk-box can be given priority to realize sound cavity design, which can greatly shorten the product development time.
In addition, the design of loudspeaker cavity should avoid the structural resonance caused by the sound, vibration. When the speaker cavity is loaded into the machine, be sure to carry out shock absorption treatment, such as the cable and screw for glue treatment.
When designing loudspeakers and passive radiators, the travel of the body should be fully considered, and the spacing of peripheral devices should be reserved to avoid abnormal sound and vibration under certain circumstances.