Audio adjusting method, apparatus, device, and medium
By collecting sensory data in collaboration between the terminal device and the headphones, the system identifies the eating state and the headphone wearing state, and performs gain compensation on the audio data stream. This solves the problem of insufficient audio playback compensation accuracy in eating scenarios, and improves the naturalness and safety of the listening experience.
Patent Information
- Application Number
- CN202611449526.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies struggle to accurately characterize bone conduction and air conduction interference in eating scenarios, resulting in insufficient audio playback compensation accuracy and impacting speech intelligibility and naturalness of sound.
By collecting sensory data in collaboration between the terminal device and the headphones, the system identifies the user's eating state and headphone wearing state, maps them to the corresponding interference type, and performs gain compensation for the audio data stream based on the interference type and chewing noise.
It improves the targeting and accuracy of audio adjustment, avoids the one-size-fits-all frequency band conflicts in traditional noise reduction solutions, and ensures the naturalness of auditory perception and hearing safety.
Smart Images

Figure CN123185488A_ABST
Abstract
Description
Technical Field
[0001] This application relates to audio signal processing, and more particularly to an audio adjustment method, apparatus, device, and medium. Background Technology
[0002] With the widespread use of smart devices, users also use smartphones, tablets, personal computers, or smart TVs to play audio and video, participate in online meetings, or conduct voice interactions during their daily meals.
[0003] In existing technologies, smart terminals typically optimize the auditory experience in audio and video playback, voice communication, and headphone listening scenarios by employing methods such as environmental noise detection, active noise cancellation, and adaptive volume adjustment. However, these solutions often rely on overall noise levels or single sensor signals for adjustment, making it difficult to accurately characterize interferences such as bone conduction and air conduction during eating, resulting in insufficient playback compensation accuracy.
[0004] Therefore, how to improve the targeting and accuracy of audio adjustment in eating scenarios, while taking into account speech intelligibility, natural listening experience, and stability of use, has become a technical problem that needs to be solved. Summary of the Invention
[0005] This application provides an audio adjustment method, apparatus, device, and medium that adapts the audio adjustment to the current eating and wearing state, ensuring the naturalness of auditory perception and hearing safety.
[0006] In a first aspect, embodiments of this application provide an audio adjustment method, including:
[0007] In response to the terminal device playing audio, perceptual features are extracted from the perceptual data collected by the terminal device and / or headphones, wherein when the terminal device and headphones are in a communicative connection, the headphones are used to receive the audio data stream of the terminal device and play the audio corresponding to the audio data stream;
[0008] Based on the perceived features, eating detection is performed. If the user is detected to be eating, the type of interference corresponding to the wearing state of the headphones is determined according to the preset mapping relationship. The type of interference refers to the category that affects the audio playback quality of the terminal device and / or headphones.
[0009] Based on the type of interference and the chewing noise generated by the user while eating, gain compensation is performed on the audio data stream to adjust the audio being played.
[0010] In one possible implementation, the perceived data includes: video frames, and the eating detection based on the perceived features includes:
[0011] For each video frame captured by the visual perception unit of the terminal device, the mouth region and hand region are extracted from the video frame;
[0012] The overlap between the mouth region and the hand region is calculated separately, as well as the vertical distance and horizontal width of the mouth region. The ratio of the vertical distance to the horizontal width is then calculated to obtain the aspect ratio of the mouth.
[0013] The aspect ratio of each mouth in the preset sliding window is quantified into an aspect ratio curve. When the aspect ratio curve satisfies the preset periodic fluctuation and the overlap is greater than the first threshold, the visual feeding icon is set to the feeding state.
[0014] In one possible implementation, food detection is performed based on the perceived features, including:
[0015] When the earphone is in a worn state, voice activity detection is performed on the sound signal sent by the earphone;
[0016] When no voice signal is detected, bandpass filtering is performed on the bone conduction signal sent by the earphone, and periodic detection is performed on the filtered bone conduction signal;
[0017] When periodic chewing noise exists in the bone conduction signal, time-domain analysis is performed on the bone conduction signal to obtain the bone conduction envelope curve;
[0018] When the relative time delay of the cross-correlation peak of the bone conduction envelope curve and the aspect ratio curve meets the preset delay range, the acoustic feeding flag is set to the feeding state.
[0019] In one possible implementation, performing food detection based on the perceived features further includes:
[0020] When the headphones are not worn, transient pulses exceeding the fifth threshold are extracted from the mixed signal collected by the far-field microphone of the terminal device. When the pulse characteristics of the transient pulses reach the preset pulse conditions, the acoustic feeding flag is set to the feeding state.
[0021] When the visual feeding indicator and / or the acoustic feeding indicator are in a feeding state, it is determined that the user is eating.
[0022] In one possible implementation, the wearing state includes: an unworn state and a worn state. The step of acquiring the wearing state of the headphones and determining the interference type corresponding to the wearing state according to a preset mapping relationship includes:
[0023] When the earphones and the terminal device have no communication connection, the wearing state is determined to be an unworn state, and the interference type is determined to be air conduction interference;
[0024] Alternatively, when the earphone is connected to the terminal device, the sound signal and cavity air pressure data sent by the earphone can be acquired;
[0025] Frequency domain analysis is performed on the sound signal to obtain the frequency response curve, and state fitting is performed based on the frequency response curve and the cavity air pressure data;
[0026] When the fitting results indicate that the headphones are in an open wearing state, the interference type is determined to be bone conduction interference.
[0027] When the fitting result indicates that the headphones are in a closed-off wearing state, the interference type is determined to be composite interference.
[0028] In one possible implementation, gain compensation is performed on the audio data stream based on the type of interference and the chewing noise generated when the user eats, including:
[0029] When the interference type is airborne interference, echo cancellation is performed on the mixed signal collected by the far-field microphone of the terminal device to obtain chewing noise;
[0030] According to the difference between the loudness of the chewing noise and the preset loudness, gain compensation is performed on the human voice frequency band in the audio data stream so that the loudness of the human voice frequency band is higher than the loudness of the chewing noise.
[0031] When the interference type is bone conduction interference, periodic chewing noise is extracted from the bone conduction signal transmitted by the headphones;
[0032] At the peak of the chewing noise, the loudness of the human voice frequency band is increased according to the time-domain synchronization gain value;
[0033] When the interference type is composite interference, dynamic range compression is performed on the low-frequency band of the audio data stream according to a preset compression ratio, gain compensation for bone conduction interference is performed, and nonlinear gain compensation is performed on the speech band.
[0034] In one possible implementation, before performing gain compensation on the audio data stream based on the type of interference and the chewing noise generated when the user eats, the method further includes:
[0035] Within a preset sliding window, at least one of visual features, acoustic features, and bone conduction features is extracted from the multimodal data collected by the terminal device and / or headphones;
[0036] If the duration of the detected state change of the visual feature is less than the second threshold, the acoustic transient pulse density of the acoustic feature exceeds the third threshold, or the bone conduction amplitude of the bone conduction feature exceeds the fourth threshold, then the preset loudness difference, the preset compression ratio, and the temporal synchronization gain value are increased respectively within the specified range.
[0037] Secondly, embodiments of this application provide an audio adjustment device, comprising:
[0038] An extraction module, in response to audio playback by a terminal device, is used to extract perceptual features from perceptual data collected by the terminal device and / or headphones, wherein when the terminal device and headphones are in a communicative connection, the headphones are used to receive the audio data stream from the terminal device and play the audio corresponding to the audio data stream;
[0039] The detection module performs eating detection based on the perceived features. If it detects that the user is eating, it determines the interference type corresponding to the wearing state of the headphones according to a preset mapping relationship. The interference type refers to the category that affects the audio playback quality of the terminal device and / or headphones.
[0040] An adjustment module is used to perform gain compensation on the audio data stream according to the type of interference and the chewing noise generated when the user eats, so as to adjust the audio being played.
[0041] Thirdly, embodiments of this application provide a terminal device, including: a memory and a processor;
[0042] The memory stores computer-executed instructions;
[0043] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0045] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0046] The audio adjustment method, apparatus, device, and medium provided in this application collect sensory data through collaboration between a terminal device and headphones. The sensory results are used for eating detection and wearing status recognition. The wearing status is then mapped to the corresponding interference type. Finally, gain compensation is applied to the audio data stream based on the interference type and chewing noise, so that the audio adjustment is adapted to the current eating and wearing status. This avoids the frequency band conflict defects caused by the one-size-fits-all approach of traditional noise reduction schemes, and makes the gain compensation conform to the actual sound transmission path. It effectively avoids the risk of excessive total sound exposure caused by blindly boosting the entire frequency band, and ensures the naturalness of auditory perception and hearing safety. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0048] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;
[0049] Figure 2 A flowchart illustrating an audio adjustment method provided in this application embodiment. Figure 1 ;
[0050] Figure 3 A flowchart illustrating an audio adjustment method provided in this application embodiment. Figure 2 ;
[0051] Figure 4 A schematic diagram of a feeding state recognition process provided in an embodiment of this application;
[0052] Figure 5 This is a schematic diagram of the structure of an audio adjustment device provided in an embodiment of this application;
[0053] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.
[0054] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0055] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0056] "Multiple" refers to two or more, and other quantifiers are similar. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following objects have an "or" relationship.
[0057] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, products, or apparatus.
[0058] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0059] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0060] Electrical audio processing technology is widely used in scenarios involving collaborative playback of smartphones, tablets, personal computers, smart TVs, and headphones, especially in adaptive adjustment during audio and video playback, voice calls, and conference listening.
[0061] Figure 1 This is a schematic diagram of an application scenario provided in an embodiment of this application, such as... Figure 1As shown, when a user is chewing food while using terminal device 10 or playing audio through headphones 20 connected to terminal device 10, the audio experience is simultaneously affected by the user's behavior, the way the headphones are worn, and the surrounding acoustic environment. In existing technologies, a common approach is to use the microphone on the terminal or headphones to detect the ambient noise level, and then combine this with active noise cancellation, adaptive volume adjustment, or single-sensor signal recognition to perform uniform gain control on the played audio. Their working principle is mostly based on the correspondence between the overall noise level and preset adjustment rules; when an increase in noise is detected, the volume is increased, or suppression and enhancement are applied to a fixed frequency band.
[0062] Based on the above scenarios, it's clear that during eating, the interference sources are not limited to ambient noise alone. They simultaneously include bone conduction vibrations caused by chewing, transient sound transmitted through the air, and the amplification effect of the headphones' shape. In this situation, blindly increasing the volume leads to a muffled sound, decreased speech clarity, and reduced stability.
[0063] To address the aforementioned technical issues, this application provides an audio adjustment method that extracts sensory data during playback into features for identifying behavioral states and detecting eating. Furthermore, it associates headphone wearing status with different interference types, enabling audio adjustment to shift from overall volume response to targeted compensation. When the terminal device and headphones are connected, the headphones receive the audio data stream from the terminal device and execute playback. The sensing and adjustment link can cover the combined use of the terminal and headphone sides.
[0064] For users who are eating, incorporating chewing noise and interference type into the playback adjustment criteria helps to perform gain compensation on the audio data stream according to the current source of interference, reducing ineffective adjustments caused by misjudgment and improving playback stability under changing headphone wearing conditions.
[0065] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0066] Figure 2 A flowchart illustrating an audio adjustment method provided in this application embodiment. Figure 1 The executing entity can be, for example, located in, such as Figure 1 The processor of the terminal device shown, such as Figure 2 As shown, the method includes:
[0067] S201. In response to the terminal device playing audio, extract perceptual features from the perceptual data collected from the terminal device and / or headphones.
[0068] In this system, when the terminal device and the headphones are connected, the headphones receive the audio data stream from the terminal device and play the corresponding audio. The terminal device refers to the main device that plays audio and collects sensor data; it can be a mobile phone, tablet, personal computer, or smart TV. The terminal device and headphones can connect via Bluetooth or other short-range wireless communication. The headphones can be, for example, true wireless stereo (TWS) headphones, over-ear headphones, or open wearable stereo (WS) headphones.
[0069] The headphones receive audio data streams sent by the terminal device and output corresponding audio through decoding, digital-to-analog conversion, and the sound-generating unit. While in a communication connection state, the headphones also participate in sensory data acquisition. Sensory data refers to the raw input data collected by the terminal device and / or headphones, which can include, for example, video frames, acoustic data, bone conduction data, and communication status. Sensory features are intermediate features extracted from the sensory data and used to subsequently determine whether the user is eating.
[0070] In this step, when the terminal device plays an audio file, if the headphones are connected to the terminal device, perceptual features are extracted from the perceptual data collected by both the terminal device and the headphones, or perceptual features are extracted from the perceptual data collected by the headphones. If the headphones are not connected to the terminal device, perceptual features are extracted from the perceptual data collected by the terminal device.
[0071] In practice, after audio playback begins, the terminal device collects the first channel of sensory data. While maintaining a Bluetooth or other short-range wireless communication connection with the terminal device, the headphones continuously collect the second channel of sensory data. The headphones then upload the collected sensory data or corresponding features to the terminal device. After processing, the various feature values are fused according to the same time window to obtain a sensory feature vector used for eating detection.
[0072] By collecting data from the terminal device and both sides of the headphones during audio playback, and converting the relevant information into unified perceptual features, the input basis required for subsequent food detection and interference type determination is formed.
[0073] Optionally, to ensure that sensing data from different sources can be used together, alignment and preprocessing can be performed on each data source before extracting sensing features. After attaching a unified time base or timestamp to the first and second sensing data sources, preprocessing operations such as cleaning and denoising are performed.
[0074] S202. Perform eating detection based on perception features. If the user is detected eating, determine the interference type corresponding to the wearing status of the headphones according to the preset mapping relationship.
[0075] Among these, the eating detection is used to determine whether the user is eating, and is a prerequisite for triggering audio adjustments in eating scenarios. A preset mapping relationship is used to convert the headphone wearing state into the interference type upon which subsequent compensation is based; this mapping relationship is stored in the terminal device's memory. Wearing state refers to the current physical wearing condition of the headphones.
[0076] Interference type indicates the category that affects the audio playback quality of the terminal device and / or headphones. For example, when playing audio through the terminal device, the sound travels through the air, and the interference type is air conduction interference. When the user wears fully in-ear or closed-back headphones, the interference type is a combination of bone conduction and occlusion effects. When the user wears semi-in-ear or open-back headphones, the interference type is bone conduction interference, which means that the vibration reaches the inner ear directly through the skull.
[0077] In this step, the processor analyzes the sensory features obtained in step S101 to determine whether the user is eating. This determination is based on at least one sensory feature. When the terminal device and headphones are connected, multi-source sensory features from both the terminal device and headphones can be combined for a comprehensive determination to improve the reliability of the detection results. After detecting that the user is eating, the processor calls a pre-stored mapping relationship and queries the pre-stored mapping relationship based on the headphone wearing status to obtain the interference type.
[0078] Specifically, feature fusion can be performed on at least one perceptual feature, and the fused features can be input into a pre-trained classification model to perform classification judgment and obtain the classification result. The classification model can be, for example, a random forest model, a convolutional neural network model, etc. Alternatively, secondary discrimination can be performed on at least one perceptual feature to obtain the detection result. For example, the perceptual feature can be the bone conduction signal provided by the headphones, and the presence of periodic chewing noise can be detected from the bone conduction signal to determine whether the user is eating.
[0079] Specifically, the wearing status can be input by the user, or it can be determined based on the sensor data collected by the headphones or the connection status between the headphones and the terminal device. For example, when the terminal device is not connected to the headphones, the wearing status is determined to be not wearing; when the terminal device is connected to the headphones, the wearing status is determined to be wearing. Furthermore, the current wearing status of the headphones can be determined based on the sensor data related to the wearing status collected by the headphones.
[0080] By first confirming that the user is eating, and then converting the headphone wearing state into an interference type that can be used for audio processing, a correspondence between eating behavior recognition and playback compensation decision is established.
[0081] S203. Perform gain compensation on the audio data stream according to the type of interference and the chewing noise generated when the user is eating, so as to adjust the audio being played.
[0082] In this step, the audio data stream is the audio data to be played, sent by the terminal device to the headphones or processed within the terminal device. Gain compensation is the adjustment processing applied to this audio data stream. Chewing noise is the noise component generated when the user eats and interferes with the played audio. Noise data can be acquired or estimated in real time.
[0083] In this step, the processor calculates gain control parameters for the audio data stream based on the interference type determined in S202 and in conjunction with the chewing noise acquired or estimated in real time. The processor then performs corresponding gain compensation on the audio data stream using the gain control parameters to reduce the impact of chewing noise on the currently playing audio.
[0084] In the signal processing flow, after the audio data stream enters the compensation module, the audio parameters in the playback link can be adjusted according to the type of interference and chewing noise, and then output to the playback path. If the headphones and the terminal device are connected, the compensated audio data stream is sent to the headphones for playback via the wireless link; if the headphones and the terminal device are not connected, the compensation is completed locally on the terminal device and then directly drives the sound unit.
[0085] For example, when the interference type is air conduction interference, the human voice can be raised above the chewing noise while the background music volume remains unchanged to avoid overall sound degradation; when the interference type is bone conduction interference, transient gain compensation synchronized with the time-domain chewing cycle can be performed on the key frequency bands of the human voice.
[0086] In one possible embodiment, the composition of the sensing features, the mapping relationship, and the gain compensation parameters can be set according to the terminal device type, headphone structure, and playback content type, but the processing flow remains the same: first perform sensing and feature extraction, then perform eating detection and interference type determination, and finally complete audio compensation for chewing noise.
[0087] This application provides an audio adjustment method, including extracting perceptual features from perceptual data collected by the terminal device and / or headphones in response to audio playback by a terminal device; performing eating detection based on the perceptual features; if eating is detected, determining the interference type corresponding to the wearing state of the headphones according to a preset mapping relationship; and performing gain compensation on the audio data stream according to the interference type and chewing noise generated by the user while eating, so as to adjust the audio being played. In this application, perceptual data is collected collaboratively by the terminal device and headphones, and the perceptual results are used for eating detection and wearing state recognition. The wearing state is then mapped to the corresponding interference type, and finally, gain compensation is performed on the audio data stream according to the interference type and chewing noise. This makes the audio adjustment compatible with the current eating state and wearing state, avoiding the frequency band conflict defects caused by the one-size-fits-all approach of traditional noise reduction schemes. It also ensures that the gain compensation conforms to the actual sound transmission path, effectively avoiding the risk of excessive total sound exposure caused by blindly boosting the entire frequency band, and guaranteeing the naturalness of auditory perception and hearing safety.
[0088] In existing technologies, food detection relies on single-modal energy threshold comparison, which makes it difficult to effectively distinguish between real chewing actions and oral interactions such as speaking, coughing, and fake chewing. This leads to frequent false triggering of audio compensation strategies, disrupting the normal listening experience. Figure 3 A flowchart illustrating an audio adjustment method provided in this application embodiment. Figure 2 In this embodiment, the perceived data includes: video frames. Figure 2 Based on the embodiments, the above-mentioned food detection based on perceptual features will be further described in detail, such as... Figure 3 As shown, the method includes:
[0089] S301. Extract the mouth region and hand region from each video frame collected by the visual perception unit of the terminal device.
[0090] The visual perception unit is located in the front-facing camera of the terminal device. For example, the visual perception unit includes at least a camera module and an image acquisition circuit. The visual perception unit is used to capture images including the mouth and hands.
[0091] In this step, while the terminal device is playing audio, the visual perception unit of the terminal device acquires each video frame and performs target detection on each video frame to extract the mouth region and hand region from each video frame.
[0092] In this step, the target region is cropped from the acquired video frames, and bounding boxes are generated for the mouth and hand regions to obtain the mouth and hand regions.
[0093] S302. Calculate the overlap between the mouth region and the hand region respectively, and calculate the vertical distance and horizontal width of the mouth region. Calculate the ratio of the vertical distance to the horizontal width to obtain the aspect ratio of the mouth.
[0094] In this step, overlap refers to the proportion of the overlap between the mouth area and the hand area to the overall coverage area, vertical distance is used to indicate the distance of the mouth in the vertical direction, and horizontal width is used to indicate the distance of the mouth in the horizontal direction.
[0095] Specifically, the overlap between the mouth and hand regions is calculated based on the intersection and union relationship of their bounding boxes, using the following formula:
[0096]
[0097] The vertical distance and horizontal width are calculated based on the detected mouth area, and the ratio of the vertical distance to the horizontal width is used as the mouth aspect ratio.
[0098] Specifically, the vertical distance and horizontal width can be calculated based on the pixel coordinate difference of the bounding box. When extracting the mouth region, the mouth key points can also be determined by extracting the 68 key points of the face. The vertical distance can be calculated based on the key points at the highest and lowest points of the lip midline, and the horizontal width can be calculated based on the key points on both sides of the corners of the mouth.
[0099] S303. Quantify the aspect ratio of each mouth in the preset sliding window into aspect ratio curves. When the aspect ratio curves satisfy the preset periodic fluctuations and the overlap is greater than the first threshold, set the visual feeding sign to the feeding state.
[0100] The preset sliding window can be, for example, 500ms or 300ms; periodic fluctuation refers to the fluctuation of the aspect ratio curve within a preset frequency range, such as 1.2Hz to 2.0Hz. The first threshold can be a preset fixed value, such as 0.5; the first threshold can also be set according to different shooting distances and different device field of view angles. In practical applications, this threshold can also be adaptively adjusted according to scene parameters, which is not limited in this application.
[0101] Within a preset sliding window, the aspect ratio of the mouth in adjacent frames is quantized and mapped to form a continuous aspect ratio curve. Then, the peak-valley alternation feature in the curve is judged. When the periodic fluctuation reaches the preset condition and the overlap between the mouth area and the hand area is greater than the first threshold, the visual feeding sign is output as a feeding state.
[0102] For example, the aspect ratio when the mouth is closed can be used as a reference value. When the detected aspect ratio of the mouth is less than or equal to the reference value, it is quantized as 0, and when the detected aspect ratio of the mouth is greater than the reference value, it is quantized as 1, so that a continuous aspect ratio curve is formed.
[0103] Because visual feeding markers can simultaneously reflect chewing actions and hand-mouth interaction, they can form a stable feeding status output on the terminal side, reducing misidentification caused by relying solely on a single frame of mouth opening or a single hand approach, and enabling higher discrimination accuracy and response stability when the feeding status is associated with subsequent audio adjustments.
[0104] S304. When the headphones are being worn, perform voice activity detection on the sound signal sent by the headphones.
[0105] The headphones include a feedback microphone and a bone conduction acquisition unit. The feedback microphone is used to acquire sound signals, and the bone conduction acquisition unit is used to acquire bone conduction signals. Voice Activity Detection (VAD) is used to detect whether a speech signal is present in the sound signal.
[0106] Specifically, when the headphones are being worn, speech activity detection is performed on the sound signal sent by the headphones. Speech activity detection can be achieved by combining short-time energy, zero-crossing rate, or spectrogram features.
[0107] S305. When no voice signal is detected, bandpass filtering is performed on the bone conduction signal sent by the headphones, and periodic detection is performed on the filtered bone conduction signal.
[0108] Bandpass filtering is used to preserve the signal in the target frequency band. It can be implemented using a digital filter, and the target frequency band can cover chewing noise, for example, 20Hz-2kHz. Periodicity can be determined by the autocorrelation peak spacing, spectral peak repeatability, or period energy ratio.
[0109] In this step, if the voice activity detection does not detect a voice signal, the bone conduction signal sent by the headphones is bandpass filtered by a digital filter, and periodic detection is performed on the filtered bone conduction signal. If the voice activity detection does not detect a voice signal, it means that a voice signal is present in the sound signal at this time. To prevent false triggering, periodic detection is not required in this case.
[0110] In one possible implementation, speech activity detection can be performed first, then speech activity detection, or periodic detection and speech activity detection can be performed simultaneously.
[0111] S306. When there is periodic chewing noise in the bone conduction signal, perform time-domain analysis on the bone conduction signal to obtain the bone conduction envelope curve. When the relative time delay of the cross-correlation peak of the bone conduction envelope curve and the aspect ratio curve meets the preset delay range, set the acoustic feeding flag to the feeding state.
[0112] Temporal analysis refers to extracting the envelope of the filtered bone conduction signal using a sliding window. The preset delay range refers to the physiological delay of the bone conduction envelope curve relative to the aspect ratio curve. For example, it could be 50ms ± 10ms.
[0113] In this step, if there is no speech signal in the sound signal and there is periodic chewing noise in the bone conduction signal, a sliding window envelope extraction is performed on the filtered bone conduction signal to obtain the bone conduction envelope curve corresponding to the chewing rhythm. The bone conduction envelope curve and the aspect ratio curve are cross-correlated, and the relative time delay between the bone conduction envelope curve and the aspect ratio curve is calculated based on the position of the cross-correlation peak. When the time delay falls within the preset delay range, the acoustic feeding flag is set to the feeding state.
[0114] With the headphones worn, by eliminating speech interference and using bone conduction signals to identify periodic chewing noise, and combining the temporal consistency of the bone conduction envelope curve and aspect ratio curve for verification, the determination of acoustic feeding markers is based on multi-source sensory association. This allows for strong temporal constraints and signal consistency in feeding state recognition, thus providing a reliable basis for subsequent audio gain compensation based on feeding and wearing states, and improving the stability and accuracy of acoustic feeding determination.
[0115] In one possible implementation, if the hand and mouth regions fail to be recognized within a preset time period, the visual feeding sign remains unchanged.
[0116] S307. When the headphones are not worn, extract transient pulses exceeding the fifth threshold from the mixed signal collected by the far-field microphone of the terminal device. When the pulse characteristics of the transient pulses reach the preset pulse conditions, set the acoustic feeding flag to the feeding state.
[0117] The fifth threshold is used to retain high-frequency transient pulses. For example, the fifth threshold could be 5kHz, used to identify the "crunching" sound produced by chewing food. Pulse characteristics may include pulse amplitude, pulse width, pulse interval, pulse occurrence density, duration, etc., and these are matched and judged against preset pulse conditions.
[0118] In practical implementation, when the headphones are not worn, the mixed signal collected by the far-field microphone of the terminal device is used to extract pulses with amplitudes exceeding the fifth threshold. If multiple consecutive transient pulses exhibit an intermittent distribution in the time domain consistent with chewing actions, the acoustic feeding flag is set to the feeding state.
[0119] Optionally, before extracting pulses with amplitudes exceeding the fifth threshold, acoustic echo cancellation (AEC) can be performed on the mixed signal to eliminate the echo of the speaker playback sound captured by the far-field microphone.
[0120] S308. When the visual feeding indicator and / or acoustic feeding indicator are in a feeding state, determine that the user is eating.
[0121] The terminal device can also perform parallel judgment on the visual feeding sign and the acoustic feeding sign output by the visual channel. When either sign is in the feeding state, it is determined that the user is eating, or when both the visual feeding sign and the acoustic feeding sign are in the feeding state, it is determined that the user is eating.
[0122] By performing transient pulse recognition on the mixed signal collected by the far-field microphone when the headphones are not worn, and combining the pulse characteristics with preset pulse conditions to complete the determination, the acoustic eating state can be triggered in different wearing scenarios.
[0123] By combining visual and acoustic feeding indicators to determine the judgment result, the stability of the judgment result of the user's eating behavior is improved, and a consistent behavioral input is provided for subsequent audio gain compensation, so that the playback adjustment is synchronized with the actual eating state.
[0124] It is understood that in this embodiment, the determination of acoustic feeding flags and visual feeding flags can be performed in parallel or sequentially. When it is necessary to satisfy both the visual feeding flag and the acoustic feeding flag as feeding, if the previously identified acoustic feeding flag or visual feeding flag is in a non-feeding state, the process can be terminated without performing subsequent identification, so as to reduce computing power consumption.
[0125] For example, Figure 4 This is a flowchart illustrating an embodiment of the feeding state recognition method provided in this application, as shown below. Figure 4 As shown, video frames are captured by the visual perception unit of the terminal device, and the hand and mouth regions are extracted from the video frames. If the extraction of the hand and mouth regions fails within a preset time period, the visual feeding flag is maintained. vis Unchanged. The preset duration can be, for example, 1 second, 2 seconds, etc.
[0126] After extracting the hand and mouth regions, the vertical distance and horizontal width are easily extracted based on the extracted mouth region. The ratio of the vertical distance to the horizontal width is calculated to obtain the mouth's aspect ratio. The aspect ratios of each mouth region within the preset sliding window are quantified into aspect ratio curves. If the aspect ratio curves do not meet the preset periodic fluctuations, a Flag is output. vis =0, which sets the visual feeding flag to a non-feeding state.
[0127] If the aspect ratio curve satisfies the preset periodic fluctuation, the overlap between the hand and mouth regions is calculated. If the overlap is less than a first threshold, then no food is being delivered, and a Flag is output. vis If the value is 0, then if there is an overlap greater than or equal to the first threshold, then food delivery exists, and the Flag is output. vis =1, which sets the visual feeding indicator to the feeding state.
[0128] When no headphones are worn, echo cancellation is performed on the mixed signal collected from the far-field microphone of the terminal device. Transient pulses exceeding the fifth threshold are extracted from the echo-cancelled mixed signal. When the pulse characteristics such as pulse density, pulse amplitude, and duration of the transient pulses meet the preset pulse conditions, a Flag is output. audio =1, which sets the acoustic feeding flag to the feeding state; otherwise, output Flag. audio =0, which sets the acoustic feeding flag to a non-feeding state.
[0129] When headphones are worn, the system extracts sound signals from the ear canal through the headphone's feedback microphone and performs speech activity detection on the sound signals. If a speech signal is present in the sound signal, a flag is output. audio =0; When there is no speech signal in the sound signal, bandpass filtering is performed on the sound signal, and periodic detection is performed. If periodic chewing noise exists, time-domain analysis is performed on the bone conduction signal to obtain the bone conduction envelope curve. When the relative delay of the cross-correlation peak of the bone conduction envelope curve and the aspect ratio curve meets the preset delay range, a Flag is output. audio =1; otherwise, output Flag. audio =0. In Flag audio =1 and Flag audio When the value is 1, it is determined that the user is in a state of eating.
[0130] This application provides an audio adjustment method that uses visual feeding markers that simultaneously reflect chewing actions and hand-mouth interaction to determine visual feeding behavior. This reduces misidentification caused by relying solely on a single frame of mouth opening / closing or a single hand approach, and improves the accuracy and stability of the judgment when the feeding state is associated with subsequent audio adjustments. When headphones are worn, by eliminating speech interference and using bone conduction signals to identify periodic chewing noise, and combining the temporal consistency of the bone conduction envelope curve and aspect ratio curve for verification, the determination of acoustic feeding markers is based on multi-source perception association, improving the stability and accuracy of acoustic feeding determination. By performing transient pulse identification on the mixed signal collected by the far-field microphone when headphones are not worn, and combining pulse characteristics with preset pulse conditions to complete the determination, the acoustic feeding state can be triggered in different wearing scenarios. Combining visual and acoustic feeding markers to jointly determine the judgment result improves the stability of the user's feeding behavior determination result and provides consistent behavioral input for subsequent audio gain compensation, thereby keeping playback adjustment synchronized with the actual feeding state.
[0131] Existing technology cannot distinguish the different interference paths in open, semi-closed and fully closed wearing states, which means that the low-frequency booming amplified by bone conduction vibration and ear canal blockage cannot be separated in a targeted manner. Fixed frequency band compensation is very likely to cause secondary amplification and muddy sound.
[0132] In one possible implementation, the wearing state includes: an unworn state and a worn state. The wearing state of the headphones is acquired, and the interference type corresponding to the wearing state is determined according to a preset mapping relationship. This includes: when there is no communication connection between the headphones and the terminal device, the wearing state is determined to be an unworn state, and the interference type is determined to be air conduction interference; or, when the headphones are in communication connection with the terminal device, the sound signal transmitted by the headphones and the cavity air pressure data are acquired; frequency domain analysis is performed on the sound signal to obtain a frequency response curve, and state fitting is performed based on the frequency response curve and the cavity air pressure data; when the fitting result indicates that the wearing state of the headphones is an open wearing state, the interference type is determined to be bone conduction interference; when the fitting result indicates that the wearing state of the headphones is a closed wearing state, the interference type is determined to be composite interference.
[0133] The earphones include a near-field wireless communication module, a feedback microphone, and a pressure acquisition unit. A Bluetooth communication module is used to establish a communication link with the terminal device. The sound signal is acquired by the earphone's feedback microphone. The cavity pressure data is acquired by the pressure acquisition unit, which can be a MEMS (Micro-Electro-Mechanical Systems) pressure sensor or a differential pressure sensor. The sampling frequency of either can be set from 100Hz to 8kHz to cover the frequency band information required for wearing status identification.
[0134] Specifically, when the connection between the earphone and the terminal device is detected as disconnected, the controller directly sets the wearing status to unworn and outputs the corresponding air conduction interference flag. When the connection is established, the controller receives the audio signal sent by the earphone and acquires the cavity air pressure data through the pressure acquisition unit. After acquiring the audio signal, it performs a Fast Fourier Transform or Short-Time Fourier Transform to extract the amplitude and phase information of each frequency band, forming a frequency response curve. At the same time, the cavity air pressure data is denoised and averaged to obtain the cavity air pressure data.
[0135] The frequency response curve and cavity air pressure data are used for joint fitting. The preset fitting model is input, which can be a threshold discrimination model, regression model or lightweight neural network model, and is used to output the open wearing state or closed wearing state.
[0136] For example, the preset fitting model is a threshold discrimination model. If the frequency response curve has moderate energy in the 200-800Hz range, the low-frequency roll-off is >6dB / oct, and the cavity air pressure data is slightly greater than atmospheric pressure, then it is determined to be an open wearing state. If the frequency response curve has an energy increase of >8dB in the range below 300Hz, and the cavity air pressure data is 15-40Pa higher than atmospheric pressure, then it is determined to be a closed wearing state.
[0137] First, the system quickly determines the non-wearing state by establishing a communication connection. Then, in the wearing scenario, it combines sound signals and cavity air pressure data for joint fitting, thereby subdividing the wearing state into open and closed wearing states and outputting the corresponding interference type accordingly. As a result, the subsequent audio compensation module can select appropriate gain compensation and frequency band adjustment strategies based on air conduction interference, bone conduction interference, or combined interference, ensuring that the interference type matches the wearing form.
[0138] Based on the aforementioned embodiments, further, gain compensation is performed on the audio data stream according to the type of interference and the chewing noise generated when the user eats. This includes: when the interference type is air conduction interference, performing echo cancellation on the mixed signal collected by the far-field microphone of the terminal device to obtain chewing noise; performing gain compensation on the human voice frequency band in the audio data stream according to the difference between the loudness of the chewing noise and a preset loudness, so that the loudness of the human voice frequency band is higher than the loudness of the chewing noise; when the interference type is bone conduction interference, extracting periodic chewing noise from the bone conduction signal sent by the headphones; at the peak time of the chewing noise, increasing the loudness of the human voice frequency band according to the time-domain synchronization gain value; when the interference type is composite interference, performing dynamic range compression on the low-frequency band in the audio data stream according to a preset compression ratio, performing gain compensation for bone conduction interference, and performing nonlinear gain compensation on the speech frequency band.
[0139] Nonlinear gain compensation can be achieved using piecewise mapping or companding curves to maintain speech clarity while suppressing low-frequency boom.
[0140] In practice, after detecting that the user is eating and determining the current type of interference, the terminal device first selects the corresponding compensation path based on the wearing status of the headphones.
[0141] To address airborne interference, chewing noise is extracted from the mixed signal acquired by the far-field microphone after subtracting the relevant echo of the played audio. The instantaneous loudness of the chewing noise is calculated, and the sum of the instantaneous loudness and the preset loudness difference is calculated to obtain the target loudness. The difference between the target loudness and the loudness of the human voice frequency band in the audio data stream is calculated to obtain the compensation gain, which is then applied to the speech component after mid-frequency bandpass filtering. For example, the preset loudness difference is 3-5 dB, and the gain in the 2kHz-6kHz human voice frequency band is applied to raise the human voice by 3-5 dB above the chewing noise.
[0142] To address bone conduction interference, the bone conduction signal transmitted by the headphones is periodically detected to identify chewing noise with a repetitive rhythm. At its peak, a gain boost is applied to the vocal frequency band, synchronizing the gain with the chewing rhythm. For example, the time-domain synchronization gain value could be 2-3 dB, boosting the vocal frequency band by 2-3 dB when the peak of bone conduction vibration is detected.
[0143] In one possible implementation, linear smooth attenuation can be applied to the mouth opening gap to avoid volume jumps; without increasing the overall volume or deliberately suppressing low frequencies, only the auditory attenuation caused by bone conduction is compensated to achieve masking and filling.
[0144] For complex interference, dynamic range compression (DRC) can be performed first on the low-frequency band, then compensation gain can be applied to the frequency band corresponding to bone conduction interference, and finally nonlinear gain compensation can be performed on the speech band. For example, with a preset compression ratio of 3:1, dynamic range compression is initiated for low frequencies below 300Hz; the onset time is less than 5ms and the release time is 100ms, which can attenuate the amplified low-frequency hum by 5-20dB, effectively eliminating the intracranial booming sensation.
[0145] By extracting chewing noise according to different types of interference and applying differentiated compensation, the human voice frequency band can be maintained in the target loudness range in air conduction, bone conduction and combined interference scenarios, and low-frequency interference can be suppressed in a targeted manner, thereby improving the intelligibility and compensation stability of the played speech.
[0146] In one possible implementation, before performing gain compensation on the audio data stream based on the type of interference and the chewing noise generated when the user is eating, the method further includes: extracting at least one of visual features, acoustic features, and bone conduction features from multimodal data collected from the terminal device and / or headphones within a preset sliding window; if the duration of the detected state change of the visual feature is less than a second threshold, the acoustic transient pulse density in the acoustic feature exceeds a third threshold, or the bone conduction amplitude in the bone conduction feature exceeds a fourth threshold, then increasing the preset loudness difference, preset compression ratio, and temporal synchronization gain value respectively within a specified range.
[0147] When the duration of the visual feature state change is less than the second threshold, it indicates that the visual state of the food is a short-term switch. When the acoustic transient pulse density in the acoustic feature exceeds the third threshold, it indicates that the air conduction transient component generated by chewing is more concentrated. When the bone conduction amplitude in the bone conduction feature exceeds the fourth threshold, it indicates that the bone conduction interference is stronger. When any one of these conditions is met, it indicates that the food consumed by the user is a highly interfering food, such as hard or brittle food. Based on this, the preset loudness difference, preset compression ratio, and temporal synchronization gain value are increased within the preset upper and lower limits, and the updated parameters are used for subsequent compensation calculations.
[0148] Optionally, the increased parameters can be determined by a parameter table, lookup interval, or function mapping relationship.
[0149] For example, the increased preset loudness difference can be 5-8dB, the increased preset compression ratio can be 5:1, and the increased time-domain synchronization gain can be 3-4dB.
[0150] By windowing and thresholding visual, acoustic and bone conduction features, the interference intensity of different paths in the eating state is mapped to the dynamic adjustment of different compensation parameters, so that the subsequent gain compensation is consistent with the food type and wearing state, and the processing result of the audio data stream is more in line with the current playback scenario.
[0151] For example, the terminal device is a mobile phone, wearing TWS in-ear earphones. Visual perception uses the front-facing camera of the mobile phone (≥720P@30fps), supporting face loss detection; acoustic perception uses the far-field microphone at the bottom of the mobile phone and the feedback microphone of the TWS earphone (48kHz sampling), supporting echo cancellation and voice activity detection; bone conduction perception uses the bone conduction accelerometer built into the TWS earphone (sensitivity ≥0.1mV / g), supporting periodic feature extraction and source separation; the processor is located in the main control chip of the mobile phone. Optionally, before the earphone sends bone conduction signals and sound signals to the mobile phone, it can also perform preprocessing through the earphone's microcontroller unit (MCU) for collaborative calculation; the interaction unit is the TWS earphone's sound unit and Bluetooth 5.2 module, supporting real-time status synchronization.
[0152] For example, the terminal device is a TV, the top camera of the TV (≥720P@30fps) is the visual perception unit, which supports long-distance jaw contour detection; the TV has a built-in far-field microphone array (16kHz sampling) for acquiring mixed signals, supporting echo cancellation and transient pulse detection; there is no bone conduction sensing (the user is not wearing headphones); the processor is the TV's main control chip; the interaction unit is the TV speaker and WiFi module, which supports multi-device synchronization.
[0153] For example, visual perception uses the computer's front-facing camera (≥720P@30fps); acoustic perception uses the computer's built-in microphone and the headphone's feedback microphone (48kHz sampling); bone conduction perception uses the headphone's VPU sensor, supporting separation of speech and chewing vibrations; the processor is a PC processor and the headphone's DSP working together; the interaction unit is the headphone's sound unit connected via wired / wireless connection, supporting wearing status detection. All sensors share a common hardware clock, and the time stamp alignment accuracy of the visual, acoustic, and bone conduction signals is controlled within ±5ms.
[0154] For example, this application provides an audio adjustment method applied to everyday audio-visual playback and voice communication scenarios where smart terminal devices and wearable audio devices work together. Users often eat while using terminal devices such as mobile phones, tablets, personal computers, or smart TVs. A user sits at their desk, places their smart terminal device on a desktop stand, wears in-ear wireless headphones to listen to audio content or participate in a voice conference, and simultaneously eats crunchy snacks. The high-frequency breaking sounds generated by chewing are transmitted through the air into the ear canal, and the jaw closure vibration is directly transmitted to the inner ear via the skull. Furthermore, the closed-loop effect of the headphone cavity passively amplifies low-frequency vibrations, resulting in a muddy sound for human voices and a decrease in the intelligibility of speech consonants in the played content. When the terminal device plays audio and the terminal device and headphones are in a communication connection state, a multimodal perception and adaptive adjustment process is automatically triggered.
[0155] In one possible implementation, the front-facing camera of the smart terminal device and the microphone and bone conduction sensor inside the wireless earphone are time-stamped using a hardware-based clock reference. The earphone receives the audio data stream output by the terminal device and plays the corresponding audio. Simultaneously, it collects sensory data from the terminal device and / or the earphone. The sensory data includes video frames captured by the visual perception unit of the terminal device, feedback acoustic signals from the earphone canal, and raw skull vibration signals. The system captures the video stream of the user's facial area, the feedback acoustic signals from the earphone canal, and the raw skull vibration signals in real time, and extracts at least one of visual features, acoustic features, and bone conduction features from the multimodal data within a preset sliding window. DC bias removal, pre-emphasis processing, frame windowing, adaptive echo cancellation, and bandpass filtering are sequentially performed on the data from each channel. An adaptive algorithm is used to filter out the reflected echoes generated by the content played by the device's speaker in the microphone, while the bone conduction signal is band-limited to eliminate interference components caused by head rotation or low-frequency drift in the environment.
[0156] When the perception data includes video frames, the mouth region and hand region are extracted for each video frame. Facial key points are located on the preprocessed video frames. The overlap between the mouth region and the hand region is calculated. The vertical distance and horizontal width of the mouth region are calculated. The aspect ratio of the mouth is obtained based on the ratio of the vertical distance to the horizontal width. Then, the aspect ratio of each mouth within the preset sliding window is quantized into an aspect ratio curve.
[0157] The processor simultaneously performs speech activity detection and spectral energy variance analysis on the ear canal feedback signal, and performs smoothing and noise reduction and autocorrelation period detection on the bone conduction signal. When the earphone is in the wearing state, speech activity detection is performed on the sound signal sent by the earphone. When no speech signal is detected, bandpass filtering is performed on the bone conduction signal sent by the earphone, and periodic detection is performed on the filtered bone conduction signal. When there is periodic chewing noise in the bone conduction signal, time domain analysis is performed on the bone conduction signal to obtain the bone conduction envelope curve, and cross-correlation calculation is performed between the bone conduction envelope curve and the aspect ratio curve to obtain the cross-correlation peak value and relative time delay.
[0158] When the aspect ratio curve exhibits a preset periodic fluctuation and the overlap exceeds a first threshold, the visual feeding indicator is set to the feeding state. The system detects regular opening and closing fluctuations in the user's mouth aspect ratio and captures energy fluctuations in specific frequency bands during periods of speech silence. By comparing the mouth movement sequence with the bone conduction vibration envelope, a fixed time difference consistent with the physiological conduction laws of the human body is found between the peak values of the two. When the relative delay corresponding to the cross-correlation peak meets a preset delay range, the acoustic feeding indicator is set to the feeding state.
[0159] When the headphones are not worn, transient pulses exceeding the fifth threshold are extracted from the mixed signal collected by the far-field microphone of the terminal device, and the pulse characteristics of the transient pulses are calculated. When the pulse characteristics meet the preset pulse conditions, the acoustic feeding flag is set to the feeding state. The system performs logical verification and temporal continuity verification on the visual and acoustic flags within a continuous time window, and completes the final feeding state determination by combining the visual degradation strategy. When the visual feeding flag and / or the acoustic feeding flag are in the feeding state, it is determined that the user is eating. In the example, it is determined that the bimodal flag is valid and there is no voice activity within multiple consecutive windows, confirming that the user is eating.
[0160] After confirming that the user is eating, the system integrates visual fragmentation transient detection, acoustic high-frequency pulse density statistics, and bone conduction amplitude gradient analysis within an independent sliding window to perform a coarse classification of the food type. The system analysis reveals visual transients of food fragmentation and splashing in the video footage. The ear canal microphone captures dense high-frequency pulses and a significant jump in bone conduction amplitude. Based on this, the current food is classified as a highly brittle food with high interference, and a corresponding classification label is output. Simultaneously, before performing gain compensation, the system detects feature changes within a preset sliding window. If the duration of a sudden change in the visual feature is less than a second threshold, or the acoustic transient pulse density in the acoustic feature exceeds a third threshold, or the bone conduction amplitude in the bone conduction feature exceeds a fourth threshold, the preset loudness difference, preset compression ratio, and temporal synchronization gain are increased within specified ranges.
[0161] After determining that the user is eating, the system also acquires the earphone wearing status and determines the corresponding interference type according to a preset mapping relationship. When there is no communication connection between the earphone and the terminal device, the wearing status is directly determined as not being worn, and the interference type is determined as air conduction interference. When there is a communication connection between the earphone and the terminal device, the system acquires the sound signal transmitted by the earphone and the cavity air pressure data, performs frequency domain analysis on the sound signal to obtain the frequency response curve, and then combines the frequency response curve with the cavity air pressure data to perform state fitting.
[0162] The processor performs state fitting based on the frequency response characteristics of the ear canal feedback microphone and the cavity air pressure change data. The fitting shows a significant increase in low-frequency energy and air pressure in the ear canal, confirming a fully in-ear closed topology. When the fitting result indicates that the wearing state is open, the interference type is determined to be bone conduction interference; when the fitting result indicates that the wearing state is closed, the interference type is determined to be composite interference. The processor then binds this physical form with the composite interference type of bone conduction and occlusion effect according to preset mapping rules, and generates a graded compensation parameter set in combination with the category of high-interference brittle foods. It calls the compensation template optimized for brittle foods and uses preset high-proportion low-frequency dynamic compression ratio, mid-frequency synchronous gain curve, and nonlinear speech enhancement coefficient.
[0163] When the interference type is air conduction interference, echo cancellation is performed on the mixed signal collected by the far-field microphone of the terminal device to separate the chewing noise. Gain compensation is then applied to the human voice frequency band in the audio data stream based on the difference between the loudness of the chewing noise and a preset loudness, making the loudness of the human voice frequency band higher than the loudness of the chewing noise. When the interference type is bone conduction interference, periodic chewing noise is extracted from the bone conduction signal sent by the headphones, and the loudness of the human voice frequency band in the audio data stream is increased according to the time-domain synchronization gain value at the peak of the chewing noise. When the interference type is composite interference, dynamic range compression is first performed on the low-frequency band of the audio data stream according to a preset compression ratio, then gain compensation is performed for the corresponding bone conduction interference, and nonlinear gain compensation is performed on the speech band. Finally, the compensated audio data stream is output to the headphones or terminal device for playback.
[0164] The processing follows a cascaded sequence: first, low-frequency dynamic range compression to suppress cavity resonance; then, mid-frequency gain synchronized with the temporal chewing rhythm to fill in and mask the depressions, while preserving the original loudness benchmark of the background music. In the example, the audio modulation unit first applies dynamic compression to the extremely low frequency band to suppress the low-frequency boom caused by ear canal closure. Then, at the moment when the jaw closes and vibrates most strongly, gain fluctuations strictly synchronized with the chewing cycle are applied to the key frequency bands of the mid-voice to fill in the speech depressions masked by chewing noise, while keeping the overall sound pressure level within a safe and comfortable range.
[0165] In one possible implementation, the processor monitors the audio output load and user listening feedback in real time, dynamically fine-tunes the compensation parameter thresholds, and synchronizes the current compensation status, food category identifiers, and interference routing results to other smart terminal devices within the network via a wireless communication link, achieving consistent updates of the cross-terminal audio strategy. When the user transfers playback control to a laptop, the wireless protocol automatically synchronizes the generated compensation parameter set with the eating status identifier, enabling the computer's speaker to seamlessly take over and apply the same hierarchical compensation strategy.
[0166] Figure 5 This is a schematic diagram of the structure of an audio adjustment device provided in an embodiment of this application, as shown below. Figure 5 As shown, the audio adjustment device 50 provided in this embodiment includes: an extraction module 501, a detection module 502, and an adjustment module 503;
[0167] The extraction module 501, in response to the terminal device playing audio, is used to extract perceptual features from the perceptual data collected by the terminal device and / or headphones. When the terminal device and headphones are in a communication connection, the headphones are used to receive the audio data stream from the terminal device and play the audio corresponding to the audio data stream.
[0168] The detection module 502 performs eating detection based on perception features. If it detects that the user is eating, it determines the type of interference corresponding to the wearing status of the headphones according to the preset mapping relationship. The type of interference refers to the category that affects the audio playback quality of the terminal device and / or headphones.
[0169] The adjustment module 503 is used to perform gain compensation on the audio data stream according to the type of interference and the chewing noise generated when the user is eating, so as to adjust the audio being played.
[0170] In one possible implementation, the perception data includes: video frames; the detection module 502 is also used to extract the mouth region and hand region from each video frame collected by the visual perception unit of the terminal device.
[0171] Calculate the overlap between the mouth region and the hand region, as well as the vertical distance and horizontal width of the mouth region, and calculate the ratio of the vertical distance to the horizontal width to obtain the aspect ratio of the mouth.
[0172] The aspect ratio of each mouth in the preset sliding window is quantified into aspect ratio curves. When the aspect ratio curves satisfy the preset periodic fluctuations and the overlap is greater than the first threshold, the visual feeding icon is set to the feeding state.
[0173] In one possible implementation, the detection module 502 is further configured to detect voice activity in the sound signal sent by the headphones when the headphones are in a worn state.
[0174] When no voice signal is detected, the detection module 502 is also used to perform bandpass filtering on the bone conduction signal sent by the headphones and to perform periodic detection on the filtered bone conduction signal.
[0175] When periodic chewing noise exists in the bone conduction signal, the detection module 502 is also used to perform time-domain analysis on the bone conduction signal to obtain the bone conduction envelope curve;
[0176] When the relative time delay of the cross-correlation peaks of the bone conduction envelope curve and the aspect ratio curve meets the preset delay range, the acoustic feeding flag is set to the feeding state.
[0177] In one possible implementation, the detection module 502 is further configured to extract transient pulses exceeding a fifth threshold from the mixed signal collected from the far-field microphone of the terminal device when the headphones are not worn, and set the acoustic feeding flag to the feeding state when the pulse characteristics of the transient pulses reach the preset pulse conditions.
[0178] When the visual feeding indicator and / or acoustic feeding indicator are in a feeding state, it is determined that the user is eating.
[0179] In one possible implementation, the wearing state includes: an unworn state and a worn state. The detection module 502 is further configured to determine that the wearing state is an unworn state when there is no communication connection between the earphone and the terminal device, and to determine that the interference type is air conduction interference.
[0180] Alternatively, when the headphones are connected to the terminal device, the audio signal sent by the headphones and the cavity air pressure data can be obtained.
[0181] Frequency domain analysis is performed on the sound signal to obtain the frequency response curve, and state fitting is performed based on the frequency response curve and the cavity air pressure data;
[0182] When the fitting results indicate that the headphones are in an open wearing state, the interference type is determined to be bone conduction interference;
[0183] When the fitting results indicate that the headphones are in a closed-off wearing state, the interference type is determined to be composite interference.
[0184] In one possible implementation, the detection module 502 is further configured to perform echo cancellation on the mixed signal collected by the far-field microphone of the terminal device when the interference type is air-conducted interference, to obtain chewing noise.
[0185] Based on the difference between the loudness of the chewing noise and the preset loudness, gain compensation is performed on the human voice frequency band in the audio data stream so that the loudness of the human voice frequency band is higher than the loudness of the chewing noise.
[0186] When the interference type is bone conduction interference, periodic chewing noise is extracted from the bone conduction signal sent by the headphones;
[0187] At the peak of chewing noise, the loudness of the human voice frequency band is increased according to the time-domain synchronization gain value;
[0188] When the interference type is composite interference, dynamic range compression is performed on the low-frequency band of the audio data stream according to the preset compression ratio, gain compensation is performed for bone conduction interference, and nonlinear gain compensation is performed on the speech band.
[0189] In one possible implementation, the detection module 502 is further configured to extract at least one of visual features, acoustic features, and bone conduction features from multimodal data collected from the terminal device and / or headphones within a preset sliding window.
[0190] If the duration of the detected state change in the visual feature is less than the second threshold, the acoustic transient pulse density in the acoustic feature exceeds the third threshold, or the bone conduction amplitude in the bone conduction feature exceeds the fourth threshold, then the preset loudness difference, preset compression ratio, and temporal synchronization gain value are increased respectively within the specified range.
[0191] The audio adjustment device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0192] Figure 6 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Figure 6 As shown, the terminal device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the terminal device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.
[0193] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.
[0194] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0195] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0196] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0197] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0198] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0199] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0200] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0201] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0202] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0203] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0204] In addition, the functional units in the various embodiments of the present invention can be integrated into a processor, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0205] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0206] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0207] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. An audio adjustment method, characterized in that, include: In response to the terminal device playing audio, perceptual features are extracted from the perceptual data collected by the terminal device and / or headphones, wherein when the terminal device and headphones are in a communicative connection, the headphones are used to receive the audio data stream of the terminal device and play the audio corresponding to the audio data stream; Based on the perceived features, eating detection is performed. If the user is detected to be eating, the type of interference corresponding to the wearing state of the headphones is determined according to the preset mapping relationship. The type of interference refers to the category that affects the audio playback quality of the terminal device and / or headphones. Based on the type of interference and the chewing noise generated by the user while eating, gain compensation is performed on the audio data stream to adjust the audio being played.
2. The method according to claim 1, characterized in that, The perceived data includes: video frames, and the eating detection based on the perceived features includes: For each video frame captured by the visual perception unit of the terminal device, the mouth region and hand region are extracted from the video frame; The overlap between the mouth region and the hand region is calculated separately, as well as the vertical distance and horizontal width of the mouth region. The ratio of the vertical distance to the horizontal width is then calculated to obtain the aspect ratio of the mouth. The aspect ratio of each mouth in the preset sliding window is quantified into an aspect ratio curve. When the aspect ratio curve satisfies the preset periodic fluctuation and the overlap is greater than the first threshold, the visual feeding icon is set to the feeding state.
3. The method according to claim 2, characterized in that, The process of performing food intake detection based on the perceived features includes: When the earphone is in a worn state, voice activity detection is performed on the sound signal sent by the earphone; When no voice signal is detected, bandpass filtering is performed on the bone conduction signal sent by the earphone, and periodic detection is performed on the filtered bone conduction signal; When periodic chewing noise exists in the bone conduction signal, time-domain analysis is performed on the bone conduction signal to obtain the bone conduction envelope curve; When the relative time delay of the cross-correlation peak of the bone conduction envelope curve and the aspect ratio curve meets the preset delay range, the acoustic feeding flag is set to the feeding state.
4. The method according to claim 2 or 3, characterized in that, The process of performing food intake detection based on the perceived features further includes: When the headphones are not worn, transient pulses exceeding the fifth threshold are extracted from the mixed signal collected by the far-field microphone of the terminal device. When the pulse characteristics of the transient pulses reach the preset pulse conditions, the acoustic feeding flag is set to the feeding state. When the visual feeding indicator and / or the acoustic feeding indicator are in a feeding state, it is determined that the user is eating.
5. The method according to claim 1, characterized in that, The wearing state includes: an unworn state and a worn state. The process of acquiring the wearing state of the headphones and determining the interference type corresponding to the wearing state based on a preset mapping relationship includes: When the earphones and the terminal device have no communication connection, the wearing state is determined to be an unworn state, and the interference type is determined to be air conduction interference; Alternatively, when the earphone is connected to the terminal device, the sound signal and cavity air pressure data sent by the earphone can be acquired; Frequency domain analysis is performed on the sound signal to obtain the frequency response curve, and state fitting is performed based on the frequency response curve and the cavity air pressure data; When the fitting results indicate that the headphones are in an open wearing state, the interference type is determined to be bone conduction interference. When the fitting result indicates that the headphones are in a closed-off wearing state, the interference type is determined to be composite interference.
6. The method according to claim 5, characterized in that, The step of performing gain compensation on the audio data stream based on the type of interference and the chewing noise generated when the user eats includes: When the interference type is airborne interference, echo cancellation is performed on the mixed signal collected by the far-field microphone of the terminal device to obtain chewing noise; According to the difference between the loudness of the chewing noise and the preset loudness, gain compensation is performed on the human voice frequency band in the audio data stream so that the loudness of the human voice frequency band is higher than the loudness of the chewing noise. When the interference type is bone conduction interference, periodic chewing noise is extracted from the bone conduction signal transmitted by the headphones; At the peak of the chewing noise, the loudness of the human voice frequency band is increased according to the time-domain synchronization gain value; When the interference type is composite interference, dynamic range compression is performed on the low-frequency band of the audio data stream according to a preset compression ratio, gain compensation for bone conduction interference is performed, and nonlinear gain compensation is performed on the speech band.
7. The method according to claim 6, characterized in that, Before performing gain compensation on the audio data stream based on the type of interference and the chewing noise generated when the user eats, the method further includes: Within a preset sliding window, at least one of visual features, acoustic features, and bone conduction features is extracted from the multimodal data collected by the terminal device and / or headphones; If the duration of the detected state change of the visual feature is less than the second threshold, the acoustic transient pulse density of the acoustic feature exceeds the third threshold, or the bone conduction amplitude of the bone conduction feature exceeds the fourth threshold, then the preset loudness difference, the preset compression ratio, and the temporal synchronization gain value are increased respectively within the specified range.
8. An audio adjustment device, characterized in that, include: An extraction module, in response to audio playback by a terminal device, is used to extract perceptual features from perceptual data collected by the terminal device and / or headphones, wherein when the terminal device and headphones are in a communicative connection, the headphones are used to receive the audio data stream from the terminal device and play the audio corresponding to the audio data stream; The detection module performs eating detection based on the perceived features. If it detects that the user is eating, it determines the interference type corresponding to the wearing state of the headphones according to a preset mapping relationship. The interference type refers to the category that affects the audio playback quality of the terminal device and / or headphones. An adjustment module is used to perform gain compensation on the audio data stream according to the type of interference and the chewing noise generated when the user eats, so as to adjust the audio being played.
9. A terminal device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7.
