WO2023197474A1 - Method for determining parameter corresponding to earphone mode, and earphone, terminal and system - Google Patents

Method for determining parameter corresponding to earphone mode, and earphone, terminal and system Download PDF

Info

Publication number
WO2023197474A1
WO2023197474A1 PCT/CN2022/105500 CN2022105500W WO2023197474A1 WO 2023197474 A1 WO2023197474 A1 WO 2023197474A1 CN 2022105500 W CN2022105500 W CN 2022105500W WO 2023197474 A1 WO2023197474 A1 WO 2023197474A1
Authority
WO
WIPO (PCT)
Prior art keywords
energy
audio signal
environmental sound
target
earphone
Prior art date
Application number
PCT/CN2022/105500
Other languages
French (fr)
Chinese (zh)
Inventor
韩欣宇
韩荣
夏日升
Original Assignee
北京荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京荣耀终端有限公司 filed Critical 北京荣耀终端有限公司
Publication of WO2023197474A1 publication Critical patent/WO2023197474A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise

Definitions

  • the present application relates to the field of audio processing technology, and in particular, to a method for determining parameters corresponding to a headphone mode, a headset, a terminal and a system.
  • headphones can provide users with multiple headphone modes.
  • headphone modes include one or more of active noise reduction (active noise control, ANC) mode, transparent transmission (hearthrough, HT) mode, or standard mode.
  • active noise control active noise control
  • HT transparent transmission
  • standard mode standard mode
  • the function of filtering out ambient sound signals can be realized when the user wears the headset; when the headphone mode of the headset is the transparent transmission mode, the user can When putting on the earphones, the user can still feel the environmental sound signals in the same way as when not wearing the earphones, that is, the user has the same experience of the environmental sound signals before and after wearing the earphones; when the earphone mode of the earphones is the standard mode, after wearing the earphones, the user can Good listening effect when wearing headphones.
  • the different parameters can bring different degrees of processing effects to the same headphone mode.
  • the different degrees of processing effects include that the headphones can realize the corresponding functions of the same headphone mode to different degrees.
  • take the active noise reduction mode as an example.
  • the active noise reduction mode can correspond to different parameters. Different parameters can be used to filter out environmental sound signals to different degrees. That is, the degree of active noise reduction can be strong or weak.
  • the active noise reduction mode can be strong or weak. When the noise level is stronger, the user hears fewer environmental sound signals. When the active noise reduction level is weaker, the user can hear more environmental sound signals. When the active noise reduction level is the weakest, it can be considered that the headset does not perform any reduction. Noise processing.
  • This application provides a method, earphones, terminals and systems for determining parameters corresponding to the earphone mode.
  • the earphones can determine the parameters corresponding to the earphone mode in different wearing situations and different ear canal models to achieve the target listening experience.
  • this application provides a method for determining parameters corresponding to a headphone mode, which is applied to headphones.
  • the method includes: the headphone acquires target environmental sound characteristics, and determines the target hearing sensation when the headphone mode is the first headphone mode;
  • the target environmental sound characteristics are used to reflect the energy of the environmental sound signal;
  • the headset adjusts the default prompt audio signal of the first headphone mode based on the target environmental sound characteristics to obtain an adjusted prompt audio signal; the energy of the environmental sound signal The larger it is, the greater the energy of the adjusted prompt audio signal.
  • the smaller the energy of the environmental sound signal the smaller the energy of the adjusted prompt audio signal.
  • the headset determines a target playback model based on the adjusted prompt audio signal and the feedback audio signal; the target playback model is used to reflect the user's wearing of the headset and the user's ear canal model ;
  • the headset determines a preset playback model that matches the target playback model from all preset playback models in the mode setting database;
  • the mode setting database includes multiple preset playback models, where each preset playback model also Corresponding to at least one parameter, each parameter in the at least one parameter corresponds to a headphone mode and a preset hearing sense; the headset determines the target parameter corresponding to the matching preset playback model; the headphone mode corresponding to the target parameter is The first earphone mode and the preset hearing sensation corresponding to the target parameter are the target hearing sensation;
  • the earphone processes the audio signal based on the first earphone mode and the target parameter corresponding to the first earphone mode.
  • a mode setting database can be set in the earphones.
  • the mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode.
  • the first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments.
  • the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters.
  • the energy of the environmental sound signal is large, it means that the environment is noisy.
  • the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
  • the microphone serves as a feedback microphone for the headset.
  • the feedback microphone can collect sound signals in the ear canal to obtain feedback audio signals with more comprehensive information.
  • the target environmental sound characteristics include one or more of absolute energy, relative energy, and energy proportions of different frequency bands of the environmental sound signal.
  • the target environmental sound characteristics include the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal.
  • the earphone acquires the target environmental sound characteristics, specifically including: the earphone collects the environmental sound signal to obtain the first environmental audio signal. ;
  • the headset determines the absolute energy, relative energy, and energy proportions of different frequency bands of the environmental sound signal in the first environmental audio signal as the target environmental sound characteristics based on the first environmental audio signal.
  • the headset can obtain the target environmental sound characteristics based on the first environmental audio signal, without relying on the terminal to analyze the target environmental sound characteristics, and can obtain the target environmental sound characteristics more quickly. And when the headset is not connected to the terminal, it can still be ensured that the headset can obtain the target environmental sound characteristics.
  • the target environmental sound characteristics include the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal.
  • the earphone acquires the target environmental sound characteristics, specifically including: the earphone collects the environmental sound signal to obtain the first environmental audio. signal; the headset determines a first environmental sound characteristic based on the first environmental audio signal, the first environmental sound characteristic includes the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal in the first environmental audio signal; the The earphone receives the second environmental sound characteristics sent by the terminal connected to the earphone.
  • the second environmental sound characteristics include the absolute energy, relative energy and energy proportion of the environmental sound signal in the second environmental audio signal;
  • the second environment The audio signal is an environmental sound signal collected by the terminal; when the first environmental sound characteristic and the second environmental sound characteristic are the same, the headset determines that the first environmental sound characteristic is the target environmental sound characteristic; in the first When the environmental sound characteristics are different from the second environmental sound characteristics, the headset can set different weights based on the first environmental sound characteristics and the second environmental sound characteristics for fusion, and use the fusion result as the target environmental sound. feature.
  • the headset can determine the target environmental sound feature based on the first environmental sound feature determined by the headset and the second environmental sound feature determined by the terminal, which can enhance the accuracy of the target environmental sound feature.
  • the terminal determines Secondary ambient sound signatures can compensate.
  • the headset adjusts the default prompt audio signal of the first headset mode based on the target environmental sound characteristics, specifically including: when it is determined that the energy of the environmental sound signal is greater than or equal to the first threshold, the headset adjusts the default prompt audio signal.
  • the energy of the prompt audio signal increases from the first energy to the second energy, and the second energy is greater than the energy of the feedback environmental sound signal; the energy of the feedback environmental sound signal is used to represent the energy size of the environmental sound signal in the ear canal; or, When it is determined that the energy of the environmental sound signal is less than or equal to the second threshold, the headset reduces the energy of the default prompt audio signal from the first energy to the third energy.
  • the first threshold when it is determined that the environmental sound signal is greater than or equal to the first threshold, can be the second energy threshold recorded in the embodiment, which means that the headset determines that the environment is noisy, so the default prompt audio signal can be increased. Energy to offset the impact of environmental sound signals on generating target playback models.
  • the second threshold which can be the first energy threshold recorded in the embodiment, it means that the headset determines that the environment is quiet, so the energy of the default prompt audio signal can be reduced to allow the user to listen When the default prompt audio signal is reached, you will not feel uncomfortable due to the large energy of the default prompt audio signal (unadjusted).
  • the headset adjusts the default prompt audio signal of the first headphone mode based on the target environmental sound characteristics, specifically including: when it is determined that the energy of the environmental sound signal is greater than or equal to the first threshold, the headset adjusts the default prompt audio signal.
  • the energy of the audio signal increases from the first energy to the second energy, the second energy is greater than the energy of the feedback environmental sound signal, and the energy proportion of the default prompt audio signal in different frequency bands is adjusted to be consistent with the target environmental sound characteristics.
  • the energy proportion of the environmental sound signal in different frequency bands is related; the energy of the feedback environmental sound signal is used to represent the energy of the environmental sound signal in the ear canal; or, when it is determined that the energy of the environmental sound signal is less than or equal to the second threshold, The earphone reduces the energy of the default prompt audio signal from the first energy to the third energy.
  • the first threshold when it is determined that the environmental sound signal is greater than or equal to the first threshold, can be the second energy threshold recorded in the embodiment, which means that the headset determines that the environment is noisy, so the default prompt audio signal can be increased.
  • the energy and the energy proportion of the default prompt audio signal in different frequency bands are the same as or corresponding to the environmental sound signal, which can ensure that the energy of the default prompt audio signal in each frequency band can be greater than the energy of the environmental sound signal, which can be better to offset the influence of environmental sound signals on generating target playback models.
  • the headset determines that the environment is quiet, so the energy of the default prompt audio signal can be reduced to allow the user to listen When the default prompt audio signal is reached, you will not feel uncomfortable due to the large energy of the default prompt audio signal (unadjusted).
  • the energy of the environmental sound signal is one of the target energy obtained by combining the target environmental sound characteristics including absolute energy, relative energy, or absolute energy and relative energy of the environmental sound signal.
  • the target listening feeling is the listening feeling set by the user through the headset or the terminal connected to the headset; in the case where the user does not set the target listening feeling, the headset or the terminal connected to the headset sets one.
  • the default listening feeling is used as the target listening feeling.
  • the headset determines a target playback model based on the adjusted prompt audio signal and the feedback audio signal, specifically including: the headset converts the adjusted prompt audio signal and the feedback audio signal into the frequency domain, so that The adjusted prompt audio signal and any frame audio signal in the feedback audio signal include N frequency points, where N is an integer power of 2; the headset is based on the adjusted prompt audio converted to the frequency domain.
  • the signal and the feedback audio signal determine the target playback model; N energy ratios in the target playback model; including the first total energy ratio, the first total energy ratio is all the first frequencies in the adjusted prompt audio signal
  • the comparison relationship between the feedback audio signal and the adjusted default prompt audio signal is used to reflect the wearing condition of the earphones and the ear canal model, and the calculation process is simple.
  • embodiments of the present application provide a communication system, which includes a terminal and an earphone, wherein: the earphone is used to collect environmental sound signals to obtain a first environmental audio signal, and based on the first environmental audio signal The signal determines the first environmental sound characteristic; the terminal is used to collect the environmental sound signal to obtain the second environmental audio signal, and determine the second environmental sound characteristic based on the second environmental audio signal; the terminal is also used to collect the second environmental audio signal.
  • the environmental sound characteristics are sent to the earphone; the earphone is also used to determine the target environmental sound characteristics based on the first environmental sound characteristics and the second environmental sound characteristics; the earphone is also used to determine the first earphone mode based on the target environmental sound characteristics.
  • the default prompt audio signal is adjusted; the headset is also used to collect the played prompt audio signal through the microphone to obtain a feedback audio signal after playing the adjusted prompt audio signal; the headset is also used to obtain a feedback audio signal based on the adjusted prompt audio signal
  • the audio signal and the feedback audio signal determine the target playback model; the headset is also used to determine the preset playback model that matches the target playback model from all the preset playback models in the mode setting database; the headset is also used to determine the Target parameters corresponding to the matching preset playback model; the earphone is also used to process audio signals based on the first earphone mode and the target parameters corresponding to the first earphone mode.
  • a mode setting database can be set in the earphones.
  • the mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode.
  • the first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments.
  • the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters.
  • the energy of the environmental sound signal is large, it means that the environment is noisy.
  • the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
  • embodiments of the present application provide an earphone, which includes: one or more processors, a microphone, and a speaker; the memory is coupled to the one or more processors, and the memory is used to store computer program codes,
  • the computer program code includes computer instructions that are invoked by the one or more processors to cause the terminal to perform the method of the first aspect.
  • a mode setting database can be set in the earphones.
  • the mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode.
  • the first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments.
  • the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters.
  • the energy of the environmental sound signal is large, it means that the environment is noisy.
  • the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
  • embodiments of the present application provide a computer storage medium, which is characterized in that a computer program is stored in the storage medium, and the computer program includes executable instructions that cause the processing when executed by a processor.
  • the processor executes the method of the first aspect.
  • a mode setting database can be set in the earphones.
  • the mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode.
  • the first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments.
  • the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters.
  • the energy of the environmental sound signal is large, it means that the environment is noisy.
  • the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
  • Figure 1 shows a schematic diagram of the wearing situation of the earphones
  • Figure 2 shows two situations where there is a gap between the earphones and the ear canal
  • Figure 3 shows a schematic diagram of the ear canal model
  • Figure 4 is a schematic structural diagram of an earphone provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • Figure 7 is a schematic flow chart of a method for determining parameters corresponding to the headphone mode in the embodiment of the present application.
  • Figure 8 shows the first ambient audio signal in the frequency domain
  • Figure 9 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in Method 1;
  • Figure 10 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in method 2;
  • Figure 11 shows a schematic diagram of playing the headphones and collecting the adjusted prompt audio signal to obtain the feedback audio signal.
  • first and second are used for descriptive purposes only and shall not be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, “plurality” The meaning is two or more.
  • the wearing condition of the earphones refers to whether the user is wearing the earphones well. With a good fit, there can be no gap between the earphones and the user's ear canal. When not worn properly, there is a gap between the earphones and the user's ear canal.
  • the wearing situation of the headset may also be referred to as the wearing situation of the headset or the situation of the user wearing the headset in the following.
  • Figure 1 shows a schematic diagram of the wearing condition of the earphones.
  • Figure 2 shows two situations where there is a gap between the earphones and the ear canal.
  • icon 101 in Figure 2 represents an environmental sound signal.
  • the gap 102 is smaller than the gap 103 .
  • Figure 3 shows a schematic diagram of the ear canal model.
  • the ear canal model refers to the corresponding ear canal shape when the ear canals of different users are divided into different types according to classification rules. Among them, an ear canal shape is an ear canal model.
  • the audio signal played by the earphones can be transmitted in the ear canal, and then the user has a sense of hearing.
  • headphones play audio signals different ear canal models can give users different hearing sensations.
  • the classification rules include but are not limited to one or a combination of two of the following rules.
  • Rule 1 Classify the ear canals of different users according to the length of the ear canal.
  • the length of the ear canal can be defined as an ear canal model.
  • the length of the ear canal can be the horizontal distance from the starting point on the left to the starting point on the right.
  • the length of the ear canal 301 can be expressed as L1
  • the length of the ear canal 302 can be expressed as L2.
  • L1 is not equal to L2, it can be considered that the shapes of the ear canal 301 and the ear canal 302 are different, and the ear canal 301 and the ear canal 302 are respectively different ear canal models. In other embodiments, if L1 is within one length range but L2 is within another length range, it can be considered that the ear canal 301 and the ear canal 302 have different shapes, and the ear canal 301 and the ear canal 302 are different ear canals respectively. Model.
  • Rule 2 Classify the ear canals of different users according to the width of the ear canal.
  • the width of the ear canal may be the vertical distance between the lowest point of the lower side of the ear canal and the lowest point of the upper side of the ear canal.
  • the vertical distance between the lowest point on the lower side of the ear canal 301 and the lowest point on the upper side of the ear canal can be expressed as S1.
  • the width of the ear canal 301 may be the vertical distance between the lowest point on the lower side of the ear canal and the highest point on the upper side of the ear canal.
  • the vertical distance between the lowest point on the lower side of the ear canal 302 and the lowest point on the upper side of the ear canal can be expressed as S2.
  • ear canals can also be classified according to other classification rules to obtain different ear canal models, such as the depth of the ear canal, etc., which are not limited in the embodiments of the present application.
  • the headphone mode of the headset can indicate how the headset processes audio signals, and the degree of processing is determined by the adjustment parameters (hereinafter referred to as parameters for short) corresponding to the headset mode.
  • This processing may include one or more of active noise reduction or transparent transmission.
  • the earphones use different earphone modes to process audio signals, they can give users different listening sensations.
  • the audio signal may include one or more of environmental sound signals or audio signals sent by the mobile phone to the earphones, such as audio signals when playing music or audio signals during calls.
  • common headphone modes include one or more of active noise reduction mode or transparent transmission mode.
  • the headphones can filter out environmental sound signals, which can weaken the user's perception of the current environmental sound signals.
  • the earphones in the active noise reduction mode, can process audio signals to different degrees, that is, the earphones can weaken environmental sound signals to different degrees.
  • the active noise reduction mode can be configured to correspond to three different sets of parameters, including first noise reduction parameters, second noise reduction parameters, and third noise reduction parameters.
  • the corresponding three sets of adjustment parameters in the active noise reduction mode can increase the degree of attenuation of environmental sound signals in sequence.
  • the method for the earphones to implement the active noise reduction function corresponding to the active noise reduction mode may include: the earphones may use the first parameter corresponding to the active noise reduction mode to process the audio signal including the environmental sound signal, such as filtering to weaken the audio signal. The included environmental sound signal is then used to obtain the inverse signal of the filtered audio signal based on the filtered audio signal. The phase difference between the inverted signal and the filtered audio signal is 180°. The headphones can then play that inverted signal, which can offset the ambient sound signal that the user actually hears for active noise reduction purposes. If the first parameter is different, the earphones will weaken the environmental sound signals included in the audio signal to different degrees, and will offset the environmental sound signals actually heard by the user after playing, thereby achieving different listening sensations.
  • the first parameter is different, the earphones will weaken the environmental sound signals included in the audio signal to different degrees, and will offset the environmental sound signals actually heard by the user after playing, thereby achieving different listening sensations.
  • the headphones can enhance the environmental sound signals, which can enhance the user's perception of the environmental sound signals.
  • the earphones can process the audio signals carrying the environmental sound signals to different degrees, that is, the earphones can enhance the environmental sound signals to different degrees.
  • the environmental sound signal can be enhanced to varying degrees by setting corresponding adjustment parameters (hereinafter referred to as parameters) in the transparent transmission mode.
  • the transparent transmission mode corresponds to three different sets of parameters, including a first transparent transmission parameter, a second transparent transmission parameter, and a third transparent transmission parameter.
  • the three sets of adjustment parameters corresponding to the transparent transmission mode can increase the degree of enhancement of the environmental sound signal in sequence.
  • the way in which the earphones implement the transparent transmission function corresponding to the transparent transmission mode may include: the earphones may use the first parameter corresponding to the transparent transmission mode to process the audio signal including the environmental sound signal, for example, enhance the environmental sound signal. Then, the earphones can play the enhanced audio signal, so that the user can hear the ambient sound signal through the earphones, and the intensity of the ambient sound signal is greater than when the transparent transmission mode is not used. If the first parameter is different, the earphones will enhance the environmental sound signals to different degrees, and the environmental sound signals heard by the user after playing will be enhanced to different degrees, thereby achieving different listening sensations.
  • active noise reduction mode and the transparent transmission mode other processing modes may also be included, which are not limited in the embodiments of the present application.
  • active noise reduction mode and transparent transmission mode are used as examples for explanation.
  • the target listening feeling can be the listening feeling set by the user through headphones or terminals.
  • the user can set a target hearing feeling, which reflects the preset processing degree of the audio signal by the headset in the headphone mode.
  • the target hearing feeling can also be used to indicate the user's ideal hearing feeling in the headphone mode.
  • the headset or terminal can set a default listening feeling as the target listening feeling.
  • the target listening feeling can be one of weak, medium or strong, or a state in the process from weak to strong.
  • the user can set the target hearing sense, that is, the degree to which the earphones can weaken the environmental sound signal.
  • the target hearing sense that is, the degree to which the earphones can weaken the environmental sound signal.
  • the audio signal (including the environmental sound signal) is processed using the corresponding parameters when the degree of active noise reduction is stronger, so that the user can hear less environmental sound signals.
  • the degree of active noise reduction is the strongest, it can be considered that the user cannot hear the environment. Sound signal; the weaker the active noise reduction level set by the user, the headset can process the audio signal (including environmental sound signals) using the corresponding parameters when the active noise reduction level is weaker, so that the user can hear more environmental sound signals.
  • the active noise reduction level is the weakest, it can be considered that the headset does not perform any noise reduction processing.
  • the user can set the target sense of hearing, that is, the degree to which the earphones can enhance the environmental sound signal.
  • the target sense of hearing that is, the degree to which the earphones can enhance the environmental sound signal.
  • the stronger the user sets the target sense of hearing the stronger the degree of transparent transmission processing of the earphones, and the earphones can use transparent transmission.
  • the stronger the transmission degree the corresponding parameters process the audio signal (including the environmental sound signal) so that the user can hear more environmental sound signals; the weaker the transparent transmission degree set by the user, the weaker the transparent transmission degree the headset can use
  • the corresponding parameters are used to process the audio signal (including the environmental sound signal) so that the user can hear less environmental sound signal.
  • the earphones can achieve the user's corresponding target hearing sensation in this mode by setting parameters corresponding to the earphone mode.
  • Factors that affect the parameters corresponding to the headphone mode include but are not limited to: one or more of the user's wearing of the headset (the wearing situation of the headset) and the user's ear canal model.
  • the wearing situation of the headset and the ear canal model are used as examples. Example to illustrate.
  • the impact of the wearing condition of the earphones and the user's ear canal model on the user's sense of hearing can be referred to the above-mentioned description of term (1).
  • the environmental sound signal entering the human ear is the first environmental sound signal
  • the earphones can The parameter A corresponding to the active noise reduction mode is used to perform noise reduction processing on the audio signal including the environmental sound signal, so that the environmental sound signal heard by the user achieves the first degree of noise reduction.
  • the ambient sound signal entering the human ear is the second ambient sound signal. Referring to the content in Figure 2, it can be seen that the energy of the second ambient sound signal is greater than the energy of the first ambient sound signal.
  • Parameter A is then used to perform noise reduction on the audio signal including the ambient sound signal. What is offset is the energy of the first ambient sound signal, while the energy of the second ambient sound signal that is more than the first ambient sound signal will not be offset. If the user does not wear the earphones properly, the earphones still use parameter A to de-noise the audio signal including the environmental sound signal, and the first degree of noise reduction cannot be achieved. This will cause the environmental sound signal heard by the user to be compared with It is clearer when worn well and cannot achieve the target listening feeling. Therefore, it is necessary to reset the earphones and apply the parameters in the active noise reduction mode so that the earphones can achieve the first degree of noise reduction.
  • the settings of parameters corresponding to the earphone mode of the ear canal model can refer to the description of the wearing condition of the earphones.
  • the headphones can be different.
  • the headset can determine the parameters corresponding to a headset mode based on the wearing condition of the headset and the ear canal model to achieve the target listening experience in a headset mode. For details of this process, please refer to the relevant description below and will not be described here.
  • Figure 4 is a schematic structural diagram of an earphone provided by an embodiment of the present application.
  • the earphones involved in the embodiments of the present application may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the earphones in the embodiments of the present application may be true wireless stereo (TWS) earphones or other types of Bluetooth earphones, which are not limited in the embodiments of the present application.
  • TWS true wireless stereo
  • the headset may include: a processor 151, a wireless communication processing module 152, a microphone set 153, and a speaker 154.
  • the processor 151 may be used to parse signals received by the wireless communication processing module 152.
  • the signal includes: a request to establish a connection sent by the terminal and environmental sound characteristics.
  • the processor 151 may also be used to generate a signal sent externally by the wireless communication processing module 152.
  • the signal includes: notifying the terminal of a request to obtain environmental sound characteristics, etc. Among them, the environmental sound characteristics will be described in detail below and will not be described in detail here.
  • the processor 151 may also be provided with a memory for storing instructions.
  • the instructions may include: instructions for determining characteristics of environmental sounds using environmental sound signals, instructions for sending signals, and the like.
  • the wireless communication processing module 152 may include one or more of a Bluetooth (BT) communication processing module 152A and a WLAN communication processing module 152B, and is used to provide services such as establishing a connection with the terminal and performing data transmission.
  • BT Bluetooth
  • WLAN wireless local area network
  • the microphone set 153 may include a feedforward microphone 153A, a feedback microphone 153B, and a talk microphone 153C.
  • the feedforward microphone 153A can collect the environmental sound signals around the earphones and send them to the processor. This allows the processor to determine environmental sound characteristics based on the environmental sound signal.
  • the feedback microphone 153B can collect the sound signal in the ear canal. For example, after the audio signal played by the speaker is transmitted to the ear canal, the feedback microphone can collect the audio signal. For example, the audio signal can be the prompt audio signal mentioned below.
  • the feedback microphone also picks up ambient sound signals around the headphones and sends them to the processor. This allows the processor to determine environmental sound characteristics based on the environmental sound signal.
  • the call microphone 153C can collect environmental sound signals around the headset and send them to the processor. This allows the processor to determine environmental sound characteristics based on the environmental sound signal.
  • Speaker 154 may be used to play audio signals, such as prompt audio signals.
  • the headset can be used to listen to music through the speaker 154, or to listen to phone calls.
  • the processor 151 can store computer instructions to cause the headset to execute the parameter determination method corresponding to the headset mode in the embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
  • terminal uses a terminal as an example to describe the embodiment in detail. It should be understood that the terminal may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
  • the terminal may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194 and user identification Module (subscriber identification module, SIM) card interface 195, etc.
  • a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen
  • the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal.
  • the terminal may include more or fewer components than shown in the figures, or some components may be combined, or some components may be separated, or may be arranged differently.
  • the components illustrated may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • NPU neural-network processing unit
  • different processing units can be independent devices or integrated in one or more processors.
  • the controller can be the nerve center and command center of the terminal.
  • the controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • UART universal asynchronous receiver and transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationships between the modules illustrated in the embodiments of the present application are only schematic illustrations and do not constitute structural limitations on the terminal.
  • the terminal may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the wireless communication function of the terminal can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in a terminal can be used to cover a single or multiple communication bands. Different antennas can also be reused to improve antenna utilization.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
  • a modem processor may include a modulator and a demodulator.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), etc. applied to the terminal. .
  • WLAN wireless local area networks
  • Bluetooth bluetooth, BT
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
  • RAM random access memories
  • NVM non-volatile memories
  • the terminal can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also called “speaker” is used to convert audio electrical signals into sound signals.
  • the terminal can listen to music through the speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals. When the terminal answers a call or voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
  • Microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the microphone can collect environmental sound signals and then transmit them to the processor 110, so that the processor 110 can determine environmental sound characteristics based on the environmental sound signals, and then transmit the environmental sound characteristics to the earphones through a wireless network (such as Bluetooth).
  • a wireless network such as Bluetooth
  • Figure 6 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
  • the communication system includes a headset and a terminal.
  • a headset For a schematic description of the earphones, reference may be made to the aforementioned description of FIG. 4 .
  • a terminal For a schematic description of the terminal, reference may be made to the foregoing description of FIG. 5 .
  • the wireless network is used to provide various services, such as communication services, connection services, transmission services, etc., for the terminals and headsets involved in the embodiments of this application.
  • Wireless networks include: Bluetooth (BT), wireless local area network (WLAN) technology, wireless wide area network (WWAN) technology, etc.
  • the headset can establish a connection with the terminal through a wireless network and then transmit data.
  • the terminal can search for the headset. When the headset is found, the terminal can send a connection establishment request to the headset. After receiving the request, the headset can establish a connection with the terminal.
  • the headset can also transmit instructions for determining environmental sound characteristics using environmental sound signals to the terminal through the wireless network.
  • the terminal can determine the environmental sound characteristics based on the environmental sound signals, and then transmit the environmental sound characteristics to the headset through the wireless network.
  • the embodiment of the present application provides a method for determining parameters corresponding to the headphone mode.
  • a mode setting database is provided in the headset.
  • the mode setting database may include multiple preset playback models, where each preset playback model also corresponds to a headphone mode, and the headphone mode also corresponds to a preset hearing sense and adjustment parameters (hereinafter may be referred to as parameters),
  • the adjustment parameters are parameters when the earphone mode can give the user a preset hearing sensation under a wearing condition of the earphone and an ear canal model.
  • the mode setting database includes a plurality of preset playback models, wherein each preset playback model also corresponds to at least one parameter (adjustment parameter), and each parameter in the at least one parameter corresponds to a headphone mode and A default listening experience.
  • the preset playback model refers to the contrast relationship between the prompt audio signal and the feedback audio signal before playback.
  • This comparison relationship can be expressed as a set of frequency point energy ratios of the pre-playback prompt audio signal and the feedback audio signal.
  • the frequency point energy ratio is the value of the pre-playback prompt audio signal and feedback audio signal after they are converted into the frequency domain. The ratio of the total energy of the same frequency points in the prompt audio signal and the feedback audio signal.
  • the preset playback model can reflect the wearing condition of the earphones and the transmission condition of the prompt audio signal (before playing) by the user's ear canal model. It can also be said that the preset playback model can reflect the wearing condition of the earphones and the type of the user's ear canal. What kind of ear canal model. Because the same prompt audio signal (before playback), when the earphones are worn or the ear canal model is different, the feedback audio signal obtained by playing the prompt audio signal (before playback, recorded as prompt audio signal 1) by the headset ( Denoted as the reference audio signal 1) is different, the preset playback model determined based on the reference audio signal 1 and the prompt audio signal 1 is different.
  • the prompt audio signal before playing can be white noise, and the speaker of the earphone can play it.
  • the played prompt audio signal can be transmitted in the ear canal, and at the same time, the played prompt audio signal can also be collected by the feedback microphone of the headset to obtain a feedback audio signal.
  • the feedback audio signal may include a played prompt audio signal, and may also include an environmental sound signal. When the environmental sound signal is noisier, the feedback audio signal includes more environmental sound signals and has greater energy.
  • the process of determining the preset playback model by the headset is usually performed in a quiet environment, so the feedback audio signal involved in the process of determining the preset playback model usually does not include environmental sound signals. Therefore, the ambient sound signal will not affect the determination of the preset playback model.
  • An exemplary mode setting database may be referred to Table 1 below.
  • the mode setting database includes a first preset playback model, which can reflect the first wearing situation of the earphones and the response to the prompt audio signal (before playback) when the user's ear canal is the first ear canal model. Transmission status.
  • the first preset playback model corresponds to the first headphone mode, and the corresponding parameter when the first headphone mode achieves the target listening feeling is the first parameter.
  • the first preset playback mode is preset playback mode 1
  • its corresponding adjustment parameter is parameter 1 when achieving the preset listening experience in active noise reduction mode.
  • the first preset playback model is any one of all preset playback models included in the mode setting database.
  • the headphone mode corresponding to the first preset playback model may be one or more of different headphone modes, such as active noise reduction mode or transparent transmission mode.
  • the headset when a mode setting database is set up in the headset, if it can be determined that the user's wearing situation of the headset and the user's ear canal model are most similar to the wearing situation of the headset and the ear canal model reflected by the preset playback model A , that is, the default playback model A is the most matching default playback model. And when the headphone mode and the target listening feeling are determined, the parameters corresponding to the headphone mode and the target listening feeling can be determined based on the most matching preset playback model as the parameters of the headphone mode to process the audio signal, so that the user can achieve the target listening feeling. feel.
  • the headset After the user wears the headset, he usually sets the headphone mode of the headset, and then the headset plays a prompt audio signal to remind the user that the headset is worn. After the headset plays the prompt audio signal, the feedback microphone can collect the played prompt audio signal to obtain Reference audio signal. The headset can determine the target playback model based on the reference audio signal and the prompt audio signal before playback, and then determine the preset playback model in the pattern database that best matches it based on the target playback model. Then, the headset determines the parameters corresponding to the most matching preset playback model to achieve the target listening experience in the headset mode.
  • the headset since the process of determining the preset playback model is usually carried out in a quiet environment, during actual use, the headset is often interfered by environmental sound signals when determining the target playback model. This interference is manifested in: when the headset plays the prompt audio signal, the played prompt audio signal is transmitted in the ear canal so that the feedback microphone can collect the played prompt audio signal to obtain the feedback audio signal.
  • the environmental sound signal external, For example, part of the ambient sound signal in the ear canal (around the earphone) will also enter the ear canal.
  • the feedback audio signal obtained by the feedback microphone may include this part of the ambient sound signal entering the ear canal.
  • the environmental sound signal entering the ear canal may be called feedback.
  • Environmental sound signals due to the environmental sound signal (external, For example, part of the ambient sound signal in the ear canal (around the earphone) will also enter the ear canal.
  • the feedback audio signal obtained by the feedback microphone may include this part of the ambient sound signal entering the ear canal.
  • the feedback audio signal not only includes the played prompt audio signal but also the feedback environmental sound signal (when the environmental sound signal is noisier, the feedback audio signal includes more feedback environmental sound signals and the greater the energy), then use The feedback audio signal is inaccurate when calculating the target playback model and will be interfered by the feedback environmental sound signal. Then the energy of the prompt audio signal included in the feedback audio signal can be adjusted to make it larger than the energy of the feedback environmental sound signal, thereby reducing the feedback environmental sound signal to the reference. Adjust the energy proportion of the prompt audio signal to reduce the environmental sound signal's contribution to the reference. Generate interference in the target playback model. In the process of determining the target playback model, the default prompt audio signal can be adjusted to reduce the interference of the environmental sound signal. For this process, please refer to the following description.
  • the earphone can collect the environmental sound signal and convert it into a first environmental audio signal, and then determine the environmental sound characteristics based on the first environmental audio signal.
  • the environmental sound characteristics can reflect the degree of environmental noise (that is, it can reflect the energy level of the environmental sound signal, and can also include the energy distribution of the environmental sound signal in different frequency bands).
  • the headset can adjust the default prompt audio signal based on the environmental sound characteristics, so that The adjusted prompt audio signal can change with the degree of environmental noise (that is, it can change with the energy of the environmental sound signal).
  • the changes include: when the environment is noisy (that is, when the energy of the environmental sound signal is greater), the adjusted The energy of the prompt audio signal may become larger relative to the default prompt audio signal, so that the adjusted prompt audio signal heard by the user has greater decibel (energy) relative to the default prompt audio signal. Then the energy of the adjusted prompt audio signal becomes larger than that of the default prompt audio signal. Then the energy of the feedback environment sound signal included in the feedback audio signal obtained by playing the adjusted prompt audio signal can be smaller than the energy of the prompt audio signal included therein. As a result, the feedback audio signal mainly includes the prompt audio signal and is not affected by the environmental sound signal.
  • the environmental sound signal will not affect the generation of the target playback model, that is, it is ensured that the target playback model is the adjusted prompt audio signal and feedback
  • the adjusted prompt audio signal can be smaller in energy relative to the default prompt audio signal, so that the decibel (energy) of the adjusted prompt audio signal heard by the user is moderate. , will not cause discomfort due to the large energy of the prompt audio signal.
  • the environmental sound characteristics may include one or more of the energy proportions of the environmental sound signals in different frequency bands in the first environmental audio signal, the absolute energy of the environmental sound signals, and the relative energy of the environmental sound signals.
  • the environmental sound audio For the description of the features, please refer to the detailed description of step S102 later, which will not be described again here.
  • the energy of the environmental sound signal can be characterized by the absolute energy and relative energy of the environmental sound signal included in the environmental sound characteristics. Among them, energy can be used to represent the voltage corresponding to the audio signal; it can also represent the amplitude of the audio signal; or the decibel size.
  • Figure 7 is a schematic flow chart of a method for determining parameters corresponding to the headphone mode in the embodiment of the present application.
  • the headset determines the headphone mode and the parameters corresponding to the headphone mode.
  • the process of processing the audio signal based on the headphone mode and its corresponding parameters to display the target listening feeling can refer to the following description of steps S101 to S111.
  • the headset After the headset determines that the headset comes out of the box, the headset obtains the first environmental audio signal.
  • the first environmental audio signal is an audio signal converted from the environmental sound signal collected by the microphone of the headset in the first time period.
  • the first environmental audio signal includes X frames of audio signals, where X is a positive integer greater than or equal to 1. Then the first environmental audio signal may include an environmental sound signal.
  • the first time period is a period of time after the earphones are determined to be taken out of the box, such as 0.5S, 1S or 2S.
  • the embodiment of the present application does not limit the length of the first time period and can be adjusted according to actual conditions.
  • the microphone may be any microphone in an earphone, for example, it may be any one of a feedforward microphone, a feedback microphone, and a call microphone, which is not limited in the embodiments of the present application.
  • the microphone of the headset can collect environmental sound signals, and then convert the environmental sound signals into analog electrical signals.
  • the headphones then sample the simulated electrical signal and convert it into an audio signal in the time domain.
  • the audio signal in this time domain is a digital audio signal, which is a sampling point of W analog electrical signals.
  • the first environmental audio signal can be represented by an array in the headset. Any element in the array is used to represent a sampling point. Any element includes two values, one of which represents the time, and the other value represents the time corresponding to the audio signal. Amplitude, which is used to represent the voltage corresponding to the audio signal.
  • step S101 can be performed to obtain the first environmental audio signal.
  • a charging box which may also be called a charging compartment or a storage box, etc.
  • step S101 can be performed to obtain the first environmental audio signal.
  • other steps can be performed to obtain the first environmental audio signal. For example, when the headset detects an in-ear operation, the headset can be triggered to obtain the first environmental audio signal.
  • the headset determines that the headset has left the box when the headset detects the out-of-box operation, that is, the headset detects the operation of the headset leaving the charging box.
  • the timing for the headset to determine that the headset leaves the charging box includes but is not limited to the following:
  • the earphones When the earphones are placed in the charging box, the earphones can be connected to the metal probe included in the charging box through the connection contact so that the charging box can charge the earphones. When the earphones detect that the connection contact is in contact with the metal When the probe is separated, the earphone can determine that the earphone has left the charging box. In response to the operation of taking out the box, the earphone can start to collect the environmental audio signal and convert it into an electrical signal as the first environmental audio signal. Then the first environmental audio signal Ambient audio signals are included. Among them, in some possible cases, the connection contacts can be set on the surface of the earphones, and the metal probes can be set on the inner wall of the charging box.
  • Opportunity 2 When the headset detects that charging has stopped, the headset can determine that the headset is out of the box, and the headset can obtain the first environmental audio signal.
  • This step S101 is optional.
  • the earphone when the earphone detects an in-ear operation, the earphone can be triggered to acquire the first environmental audio signal.
  • the earphone determines the first environmental sound feature based on the first environmental audio signal.
  • the earphone can convert the first environmental audio signal from the time domain to the frequency domain to obtain the first environmental audio signal in the frequency domain. Then the first environmental sound feature is calculated based on the first environmental audio signal in the frequency domain.
  • the headset can use a fast Fourier transform (FFT) to convert the first environmental audio signal from the time domain to the frequency domain.
  • FFT fast Fourier transform
  • first environmental audio signal in the time domain and the first environmental audio signal in the frequency domain only have different representation forms, but they are both the first environmental audio signal including the environmental sound signal.
  • any frame of the environmental audio signal in the first environmental audio signal in the frequency domain can be expressed as N (N is an integer power of 2) frequency points.
  • N can be 1024, 2048, etc.
  • the specific size can be expressed by The computing power of the headset determines.
  • the N frequency points are used to represent audio signals within a certain frequency range, such as between 0khz and 15khz, or other frequency ranges.
  • the frequency point refers to the information of the first environmental audio signal at the corresponding frequency, which information includes time, frequency of the environmental sound signal, and energy (decibel or amplitude) of the environmental sound signal, Among them, energy can be used to represent the voltage corresponding to the environmental sound signal; it can also represent the amplitude of the environmental sound signal; or the decibel size of the environmental sound signal.
  • the frequency distribution of the N frequency points in any two frames of environmental audio signals is the same, that is, the frequency of the i-th frequency point of the j-th frame audio signal in the first environmental audio signal is the same as the i-th frequency point of the j+1-th frame audio signal.
  • the frequencies of the frequency points are the same.
  • Figure 8 shows the first ambient audio signal in the frequency domain.
  • the first environmental audio signal in the frequency domain may include audio signals in the X frame frequency domain.
  • the audio signal in the frequency domain of any frame can be N frequency points.
  • area 801 includes N frequency points corresponding to the first frame audio signal in the first environmental audio signal
  • area 802 includes N frequency points corresponding to the second frame audio signal in the first environmental audio signal
  • area 803 includes N frequency points corresponding to the X-th frame audio signal in the first environmental audio signal.
  • An exemplary ambient sound signature is described with reference to FIG. 8 .
  • the first environmental sound feature may include one or more of the absolute energy of the environmental sound signal in the first environmental audio signal, the energy proportion of the environmental sound signal in different frequency bands, and the relative energy of the environmental sound signal.
  • the first environmental sound characteristic may reflect the environmental noisy level. It can be expressed as: the greater the absolute energy or relative energy, the noisier the environment.
  • the energy proportion of the environmental sound signal in different frequency bands reflects the energy distribution of the environmental sound in different frequency bands.
  • the absolute energy of the ambient sound signal in the first ambient audio signal includes the energy of all frequency points in the first ambient audio signal in the frequency domain, which describes the energy level of the ambient sound signal in the first ambient audio signal.
  • the relevant formula for the earphone to determine the absolute energy of the environmental sound signal in the first environmental audio signal may refer to the following formula (1).
  • T represents the absolute energy of the environmental sound signal in the first environmental audio signal.
  • w ⁇ w ⁇ N+
  • the first environmental audio signal includes the X-frame audio signal in the frequency domain
  • S(w) represents the w-th frame audio signal (frequency domain) in the first environmental audio signal ) energy.
  • the energy of the w-th frame audio signal may be the sum of the energy of each frequency point.
  • the energy proportion of the environmental sound signal in different frequency bands in the first environmental audio signal includes the energy proportion of the first frequency band.
  • the first frequency band refers to one of the frequency bands after dividing the frequency of the first environmental audio signal into different frequency bands, and one frequency band is a sub-range of the frequency of the environmental audio signal. As shown in Figure 8, the first frequency band can be expressed as frequency w 1 to frequency w 2.
  • the energy proportion of the first frequency band represents all frequency points included in the audio signal with frequencies w 1 to w 2 in the first environmental audio signal.
  • the audio signals with frequencies w 1 to w 2 include audio signals with frequencies w 1 to w 2 in each frame of the first environmental audio signal.
  • the formula for the earphone to determine the energy proportion of the environmental sound signal in the first frequency band in the first environmental audio signal can refer to the following formula (2).
  • P(w 1 ⁇ w 2 ) represents the energy proportion of the environmental sound signal in the first frequency band in the first environmental audio signal.
  • S(w 1 ⁇ w 2 ) represents the energy of the audio signal with the frequency w 1 to w 2 in the first environmental audio signal, and can be each frequency of the audio signal with the frequency w 1 to w 2 in the first environmental audio signal. The sum of the energy of the points.
  • the relative energy of the environmental sound signal in the first environmental audio signal includes the weighted energy of all frequency points in the first environmental audio signal in the frequency domain. Because human ears have different sensitivity or subjective feelings to audio signals of different frequencies. Therefore, it is necessary to perform a weighted correction on the energy of audio signals of different frequencies, so that the weighting (can be understood as a weight) of the audio signal with greater human ear sensitivity is greater, then the energy of the audio signal with greater human ear sensitivity is The greater the contribution to relative energy.
  • the relevant formula for the earphone to determine the absolute energy of the environmental sound signal in the first environmental audio signal can refer to the following formula (3).
  • H represents the relative energy of the environmental sound signal in the first environmental audio signal.
  • w ⁇ w ⁇ N+
  • the first environmental audio signal includes the audio signal in the frequency domain of the X frame
  • S*F_weight(w) represents the w-th frame audio signal in the first environmental audio signal ( (frequency domain) weighted energy.
  • the weighted energy of the w-th frame audio signal may be the sum of the weighted energy of each frequency point.
  • F_weight is a weighting filter. The function of this weighting filter is to weight the energy of frequency points in the w-th frame audio signal and adjust the energy of frequency points at different frequencies to make the human ear more sensitive to the frequency. The energy of the frequency point above becomes larger, and the contribution to the relative energy becomes larger.
  • the first environmental sound feature obtained in step S102 may be used to determine the target environmental sound feature in the following step S105.
  • the earphones can use the target environmental sound characteristics to reflect the noisy level of the environment. In order to improve the accuracy and robustness of the environmental noisy level reflected by the target environment sound characteristics.
  • the second environmental sound characteristics can also be determined through the second environmental audio signal obtained by the terminal, and then the headset can obtain the second environmental sound characteristics, and combine the first environmental sound characteristics and the second environmental sound characteristics to determine the target environmental sound characteristics. .
  • steps S103 to S105 please refer to the following description of steps S103 to S105.
  • the headset notifies the terminal to obtain the second environmental sound characteristics, and the terminal is connected to the headset.
  • This step S103 is optional.
  • the headset determines the terminal connected to the headset (for example, through Bluetooth or other means), and sends a notification to obtain the second environmental sound characteristics to the terminal, so that the terminal executes the following step S104.
  • step S102 can execute step S102 first and then step S103, it can execute step S103 first and then step S102, or it can also be executed at the same time.
  • step S102 can execute step S102 first and then step S103, it can execute step S103 first and then step S102, or it can also be executed at the same time.
  • step S103 can execute step S103 first and then step S102, or it can also be executed at the same time.
  • the terminal obtains the second environmental audio signal, determines the second environmental sound feature based on the second environmental audio signal, and sends the second environmental sound feature to the headset.
  • the terminal may execute step S104.
  • the second environmental audio signal is an audio signal converted from the environmental sound signal collected by the terminal's microphone in the second time period.
  • the second environmental audio signal includes L frames of audio signals, where L is a positive integer greater than or equal to 1.
  • the second environmental audio signal may include an environmental sound signal.
  • the second ambient audio signal may have the same number of frames as or may be different from the audio signal included in the aforementioned first ambient audio signal.
  • the second time period may be the same as or different from the aforementioned first time period.
  • the second time period is a period of time after the terminal determines that the headset comes out of the box. For example, 0.5S, 1S or 2S, etc.
  • the embodiment of the present application does not limit the length of the second time period and can be adjusted according to the actual situation.
  • the microphone may be any microphone in the terminal, for example, it may be any one of a top microphone, a bottom microphone, and a back microphone, which is not limited in the embodiments of the present application.
  • step S102 The process by which the terminal determines the second environmental sound characteristics based on the second environmental audio signal is the same as the process by which the headset determines the first environmental sound characteristics based on the first environmental audio signal. Reference may be made to the relevant description in step S102, which will not be described again here.
  • the second environmental sound feature may include one or more of the absolute energy of the environmental sound signal in the second environmental audio signal, the energy proportion of the environmental sound signal in different frequency bands, and the relative energy of the environmental sound signal. indivual. Both the second environmental sound feature and the first environmental sound feature can reflect the level of environmental noise. For a detailed introduction to the characteristics of the second environmental sound, please refer to the foregoing exemplary description of the characteristics of the first environmental sound, which will not be described again here.
  • the headset determines the target environmental sound feature based on the first environmental sound feature and the second environmental sound feature, or the headset determines the target environmental sound feature based on the first environmental sound feature.
  • the target environmental sound feature can reflect the degree of environmental noise.
  • the target environmental sound characteristics can reflect the noisy level of the environment as follows: the greater the absolute energy and/or relative energy of the environmental sound signal in the target environmental sound characteristics, the noisier the environment. The smaller the absolute energy and/or the relative energy of the environmental sound signal in the target environmental sound feature, the quieter the environment.
  • the headset may determine the target environmental sound characteristics based on the first environmental sound characteristics. Specifically, the headset may determine the first environmental sound feature as the target environmental sound feature.
  • the headset may determine the target environmental sound characteristics based on the first environmental sound characteristics and the second environmental sound characteristics.
  • the process of earphones determining the sound characteristics of the target environment can be referred to the following description.
  • the earphones may determine the one with greater absolute energy or relative energy among the first environmental sound feature and the second environmental sound feature as the target environmental sound feature.
  • the earphones can set different weights based on the first environmental sound feature and the second environmental sound feature and perform fusion, and use the fusion result as the target environmental sound feature.
  • the headset may also use the first environmental sound feature or the second environmental sound feature as the target environmental sound feature.
  • the headset detects the operation of selecting the headset mode, and determines the headset mode and the default prompt audio signal corresponding to the headset mode.
  • This step S106 is optional.
  • the default prompt audio signals corresponding to different headphone modes may be different and may be related to their corresponding headphone modes.
  • the default prompt audio signal corresponding to the active noise reduction mode can be: "Active noise reduction mode has been selected", etc.
  • the default prompt audio signal corresponding to the transparent transmission mode can be: “Transparent transmission mode has been selected”, etc.
  • the function of the default prompt audio signal is to prompt the user that the current headset has been worn or the headset mode of the headset, and its specific content is not limited in the embodiments of this application.
  • the headset can provide the user with a way to select the headset mode. For example, set the contacts on the headset that are involved in selecting headphone mode. This contact can be used to detect actions involved when the user selects headphone mode. For example, the headset can be set to determine that the headphone mode selected by the user is the active noise reduction mode when it detects that the user touches the contact point twice in succession; and that it determines that the headphone mode selected by the user is transparent when it detects that the user touches the contact point three times in a row. transmission mode, etc. Continuous means that the time interval between two adjacent touches is within a preset time threshold, such as 0.5s. Wherein, the user touching the contact point may include clicking the contact point.
  • a preset time threshold such as 0.5s.
  • the headset detects the operation of selecting the headset mode, and in response to the operation, the headset mode corresponding to the operation can be determined. The headset can then determine the default prompt audio signal corresponding to that headset mode.
  • step S106 if step S106 is not executed, that is, if the user does not select a headphone mode, the headset can select one headphone mode from multiple headphone modes (hereinafter may be referred to as headphone mode A).
  • headphone mode A As the headphone mode of the headset, and select the default prompt audio signal corresponding to the headphone mode A.
  • the headphone mode A may be the headphone mode selected by the user last time, or may be the headphone mode used longest by the user within a period of time (for example, 10 days).
  • step S106 if step S106 is not executed.
  • the headset does not need to select any headset mode.
  • the default prompt audio signal does not need to be related to any headset mode. Its function is to remind the user that the headset has been worn.
  • the default prompt audio signal can be "ding" or other content.
  • the headset adjusts the default prompt audio signal based on the target environmental sound characteristics to obtain an adjusted prompt audio signal.
  • the adjusted prompt audio signal can change with the degree of environmental noise.
  • the energy (decibel) of the default prompt audio signal is recorded as the first energy.
  • This default prompt audio signal is suitable for most users when the environment is moderately noisy (that is, between a quiet environment and a noisy environment). For example, when the environment is moderately noisy, it can be considered that the energy of the environmental sound signal is greater than or equal to the first energy threshold and less than or equal to the second energy threshold. When the energy of the environmental sound signal is less than or equal to the first energy threshold, the environment is quiet. When the energy of the environmental sound signal is greater than or equal to the second energy threshold, the environment is noisy. The greater the energy of the ambient sound signal, the noisier it is, and the smaller it is, the quieter it is.
  • the energy of the environmental sound signal can be characterized by the absolute energy or relative energy of the environmental sound signal included in the target environmental sound feature: the energy of the environmental sound signal can be the energy of the environmental sound signal included in the target environmental sound feature. Absolute energy or relative energy.
  • the energy of the environmental sound signal may also be the target energy obtained by combining the absolute energy and relative energy of the environmental sound signal included in the target environmental sound feature. The combination may be adding the absolute energy and the relative energy after setting different weights.
  • the adjusted prompt audio signal and the default prompt audio signal may include Y frame audio signals.
  • Y is a positive integer greater than or equal to 1.
  • the environmental sound signal will affect the user's listening, so that the user cannot clearly hear the default prompt audio signal, and the default prompt audio signal will still be played when the environment is noisy.
  • the influence of ambient sound signals makes the generated playback model inaccurate, making it impossible for the headphones to determine the parameters corresponding to the headphone mode based on the playback model to achieve the target listening experience. This part of the content is introduced in detail above and will not be repeated here.
  • the environment is quiet, when the earphones play the environmental prompt audio signal, the user will feel that the default prompt audio signal has too much energy, affecting the sense of hearing.
  • the headset can adjust the default prompt audio signal in the following two ways.
  • the headset can adapt the default prompt audio signal to the target environmental sound characteristics.
  • the adaptation is to adjust the energy proportion of the default prompt audio signal in different frequency bands to be related to the energy proportion of the environmental sound signal included in the target environmental sound feature in different frequency bands.
  • the energy of the default prompt audio signal is increased from the first energy to the second energy, and the second energy is greater than the energy of the feedback environmental sound signal.
  • One way of increasing the energy of the default prompt audio signal from the first energy to the second energy is to increase the energy of frequency points of different frequencies in the default prompt audio signal by the same value.
  • the energy gain at different frequency points is determined by the absolute energy and relative energy of the environmental sound signal included in the target environmental sound characteristics.
  • the energy proportion includes: the energy proportion of the default prompt audio signal in different frequency bands is adjusted to be the same as the energy proportion of the environmental sound signal included in the target environmental sound characteristics in different frequency bands, or the default prompt audio signal is in different frequency bands.
  • the energy proportion is adjusted to correspond to the energy proportion of the environmental sound signal included in the target environmental sound characteristics in different frequency bands. For example, different frequency bands are divided into the first frequency band, the second frequency band or the third frequency band. The first frequency band The audio signal has the largest energy proportion in the environmental sound signal, the second frequency band is the second, and the third frequency band is the smallest. Then the energy proportion of the first frequency band in the adjusted prompt audio signal will also become the largest, but it does not need to be consistent with the environment.
  • the energy proportion of the first frequency band in the sound signal is the same, the energy proportion of the third frequency band in the adjusted prompt audio signal is the smallest but may not be the same as the energy proportion of the third frequency band in the environmental sound signal. It should be understood that, in addition to the first frequency band, the second frequency band and the third frequency band, different frequency bands may also include more frequency bands, which is not limited in this embodiment of the present application.
  • the energy of the feedback sound signal can be used to characterize the energy of the environmental sound signal in the ear canal.
  • the energy determination method of the feedback environmental sound signal includes but is not limited to the following methods:
  • the microphone of the headset can collect the environmental sound signal in the ear canal to obtain the feedback environmental audio signal, and determine the energy of the feedback environmental audio signal based on the feedback environmental audio signal.
  • the third time period may be a period of time before the headset plays the adjusted prompt audio signal.
  • the headset can determine that the energy of the feedback environmental sound signal can be K times the energy of the environmental sound signal, and the value of K can be adjusted according to the actual situation.
  • the energy of the environmental sound signal can be characterized by the absolute energy and relative energy of the environmental sound signal included in the target environmental sound feature.
  • the target energy may be obtained by combining the absolute energy and relative energy of the environmental sound signals included in the target environmental sound characteristics. The combination may be adding the absolute energy and the relative energy after setting different weights.
  • energy can be used to represent the voltage corresponding to the audio signal; it can also represent the amplitude of the audio signal; or the decibel size.
  • the headset adjusts the default prompt audio signal based on the target environmental sound characteristics to obtain the adjusted prompt audio signal.
  • the relevant formula can refer to the following formula (4).
  • S tishi represents the adjusted prompt audio signal
  • S pri represents the default prompt audio signal
  • S pri* F_tishi[P(w 1 ⁇ w 2 )] represents the energy of different frequency bands of the default prompt audio signal according to the target environmental sound characteristics.
  • the energy of different frequency bands in the environmental sound signal is adjusted so that the energy proportion of the adjusted prompt audio signal in different frequency bands is related to the energy proportion of the target environmental sound feature in different frequency bands.
  • G(T,H) indicates that the energy gain of different frequency points in the default prompt audio signal is determined based on the absolute energy and relative energy of the environmental sound signal included in the target environmental sound characteristics. The greater the absolute energy and/or relative energy, the greater the energy of the feedback environmental sound signal, and the greater the energy gain at different frequency points.
  • Figure 9 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in Method 1.
  • the energy of the default prompt audio signal is the first energy
  • the energy of the adjusted prompt audio signal is the second energy
  • the second energy is greater than the first energy.
  • the energy proportion of different frequency bands in the adjusted prompt audio signal is the same as that of the ambient sound signal.
  • the energy of the adjusted prompt audio signal is greater than the energy of the ambient sound signal.
  • the headset can adapt the default prompt audio signal to the target environmental sound characteristics. This adaptation is to adjust the energy proportion of the default prompt audio signal in different frequency bands to be the same as the target environmental sound characteristics. At the same time, the energy of the default prompt audio signal is reduced from the first energy to the third energy.
  • the headset may or may not adjust the default prompt audio signal, which is not limited in the embodiments of the present application.
  • Method 2 When the environment is noisy, the earphones can increase the energy of the default prompt audio signal from the first energy to the third energy, and the third energy is greater than the energy of the environmental sound signal. At this time, the energy proportion of the audio signal in different frequency bands is not adjusted by default.
  • One way to increase the energy of the default prompt audio signal from the first energy to the third energy is to increase the energy of frequency points of different frequencies in the default prompt audio signal by the same value.
  • the energy gain at different frequency points (gain here is the degree of increase) is determined by the absolute energy and relative energy of the environmental sound signal included in the target environmental sound characteristics. The greater the absolute energy and/or relative energy, the greater the energy gain. , the greater the energy gain at different frequency points.
  • Another way is that the energy increase degree of frequency points in different frequency bands in the default prompt audio signal can also be different.
  • Figure 10 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in Method 2.
  • the energy of the default prompt audio signal is the first energy
  • the energy of the adjusted prompt audio signal is the third energy
  • the third energy is greater than the first energy. If the energy proportions of different frequency bands in the adjusted prompt audio signal are not adjusted, they can be the same as the default prompt audio signal in some possible implementations. And the energy of the adjusted prompt audio signal is greater than the energy of the ambient sound signal.
  • the earphones can reduce the energy of the default prompt audio signal from the first energy to the third energy.
  • the headset may or may not adjust the default prompt audio signal, which is not limited in the embodiments of the present application.
  • the energy of the adjusted prompt audio signal can become larger and greater than the energy of the environmental sound signal.
  • the energy of the default prompt audio signal can be reduced.
  • the adjusted audio prompt signal is played, and the earphone collects the played audio prompt signal through the microphone to obtain a feedback audio signal.
  • This microphone can be the feedback microphone of the headset, because the feedback microphone is close to the ear canal and can better pick up the sound signal transmitted in the ear canal.
  • Figure 11 shows a schematic diagram of playing the headphones and collecting the adjusted prompt audio signal to obtain the feedback audio signal.
  • icon 101 is the speaker of the earphone
  • icon 102 is the feedback microphone of the earphone
  • icon 103 is the prompt audio signal (after adjustment) transmitted in the ear canal.
  • the earphone can use the speaker to play the adjusted prompt audio signal, and the played prompt audio signal (after adjustment) can be transmitted in the ear canal, as shown by icon 103 in Figure 11.
  • An exemplary situation is when the played cue audio signal (modified) can be transmitted in the ear canal.
  • the headset can collect the prompt audio signal (after adjustment) transmitted in the ear canal through the feedback microphone to obtain the feedback audio signal.
  • the feedback audio signal may also include an environmental sound signal.
  • the energy of the prompt audio signal included in the feedback audio signal is greater than the energy of the ambient sound signal.
  • the interference of the ambient sound signal on the target playback model can be reduced.
  • the headset determines a target playback model based on the adjusted prompt audio signal and feedback audio signal.
  • the target playback model can reflect the wearing condition of the headset and the user's ear canal model.
  • the target playback model refers to the contrast relationship between the adjusted prompt audio signal and the feedback audio signal.
  • the contrast relationship may be a set of energy ratios of mid-frequency points in the adjusted prompt audio signal and the feedback audio signal.
  • the frequency point energy ratio is the ratio of the total energy of the frequency points of the same frequency in the adjusted prompt audio signal and the feedback audio signal after converting the adjusted prompt audio signal and the feedback audio signal into the frequency domain.
  • the headset can convert the adjusted prompt audio signal and feedback audio signal into the frequency domain.
  • the adjusted prompt audio signal in the frequency domain and the feedback audio signal in the frequency domain are obtained.
  • the adjusted prompt audio signal in the frequency domain may still be called the adjusted prompt audio signal
  • the feedback audio signal in the frequency domain may still be called the feedback audio signal.
  • Any frame audio signal in the adjusted prompt audio signal (in the frequency domain) and the feedback audio signal (in the frequency domain) can be expressed as N (N is an integer power of 2) frequency points.
  • N can be It is 1024, 2048, etc.
  • the specific size can be determined by the computing power of the headset.
  • the N frequency points are used to represent audio signals within a certain frequency range, such as between 0khz and 15khz, or other frequency ranges.
  • the frequency point refers to the information of the audio signal (including prompt audio signal and environmental sound signal) at the corresponding frequency.
  • This information includes time, frequency of the audio signal, and energy of the audio signal (decibel or Amplitude), where energy can be used to represent the voltage corresponding to the audio signal; it can also represent the amplitude of the audio signal; or the decibel size of the audio signal.
  • the frequency distribution of N frequency points in any two frames of audio signals is the same. For example, the frequency of the i-th frequency point of the j-th frame audio signal in the feedback audio signal is the same as the frequency of the i-th frequency point of the j+1-th frame audio signal.
  • Any frame audio signal in the adjusted prompt audio signal and feedback audio signal can be expressed as N (N is an integer power of 2) frequency points, then the target playback model includes N energy ratios. It includes a first total energy ratio, which is the ratio of the total energy of all frequency points of the first frequency in the adjusted prompt audio signal to the total energy of all frequency points of the first frequency in the feedback audio signal.
  • the first frequency is one of N frequencies corresponding to N frequency points in one frame of audio signal.
  • this target playback model can reflect the wearing condition of the headset as well as the user's ear canal model. It can also be said that the target playback model can reflect the wearing situation of the headphones and what kind of ear canal model the user's ear canal belongs to. Because the same prompt audio signal (adjusted), when the headset is worn or the ear canal model is different, the feedback audio signal (after adjustment, recorded as prompt audio signal 2) obtained by the headset playing the prompt audio signal ( Denoted as the reference audio signal 2), the target playback model determined based on the reference audio signal 2 and the prompt audio signal 2 is different.
  • the comparison relationship can also be other contents.
  • it may be the ratio of the total energy of all frequency points of the feedback audio signal to the total energy of all frequency points of the adjusted prompt audio signal. It can also be a set of energy ratios of mid-frequency points of the adjusted prompt audio signal and the feedback audio signal on some frequency bands. The embodiments of the present application do not limit this.
  • the headset Based on the target playback model matching the preset playback model in the mode setting database, the headset determines the preset playback model in the mode setting database that matches the target playback model, and determines the headset corresponding to the matching preset playback model. mode and the parameters corresponding to the headphone mode.
  • the mode setting database may include multiple preset playback models. Each preset playback model also corresponds to a headphone mode.
  • the headphone mode also corresponds to a preset hearing sense and adjustment parameters.
  • the adjustment parameters are a type of headphone.
  • the headphone mode can give the user preset listening parameters when worn and in an ear canal model. It can also be said that the mode setting database includes a plurality of preset playback models, wherein each preset playback model also corresponds to at least one parameter (adjustment parameter), and each parameter in the at least one parameter corresponds to a headphone mode and A default listening experience.
  • the target listening feeling corresponding to the earphone mode can be determined.
  • the target listening feeling can be set by the user. If the user does not set it, a default target listening feeling can be set.
  • the headset can determine parameters corresponding to the matched preset playback model based on the preset playback model matched to the target playback model, combined with the headphone mode and the target hearing sensation corresponding to the headphone mode. This parameter also corresponds to the headphone mode and target listening experience.
  • the headset determines the headphone mode corresponding to the matching preset playback model and the parameters corresponding to the headphone mode include but are not limited to the following methods.
  • Method 1 The headset can select a headphone mode from multiple headphone modes to determine the target listening experience corresponding to the headphone mode. Then, the headset can determine the parameters corresponding to the matched preset playback model based on the preset playback model matched to the target playback model, combined with the headphone mode and the target hearing sensation corresponding to the headphone mode. This parameter also corresponds to the headphone mode and target listening experience.
  • Method 2 The headset determines all parameters corresponding to the matching preset playback model. Determine the parameters that satisfy a first preset condition.
  • the first preset condition is: the headphone mode corresponding to the parameter satisfies the second preset condition and the preset hearing sense corresponding to the parameter satisfies the third preset condition.
  • the second preset condition is: the headphone mode corresponding to the parameter is the headphone mode last selected by the user, or the headphone mode that the user has used the longest within a period of time (for example, 10 days).
  • the third preset condition is that the preset hearing sense corresponding to the parameter is the target hearing sense set by the user or, if the user does not set the target hearing sense, the preset hearing sense corresponding to the parameter is the default target hearing sense.
  • any preset playback model and the target playback model is the same. It is assumed here that there are N energy ratios.
  • the following description may be used to refer to the manner in which the headset determines the preset playback model in the mode setting database that matches the target playback model.
  • the headphones calculate the total difference between the N energy ratios in the target playback model and different preset playback models.
  • the different preset playback models include a first preset playback model.
  • the total difference between the N energy ratios in the target playback model and the first preset playback model includes: the target playback model and the first preset playback model.
  • the sum of the absolute values of the differences between N corresponding energy ratios. Any corresponding energy ratio included in the N corresponding energy ratios is the i-th energy ratio in the target playback model and the i-th energy ratio in the first preset playback model.
  • the first preset playback model is any one of all preset playback models included in the mode setting database.
  • the headset determines the total difference that satisfies the fourth preset condition from the total difference of the N energy ratios in the target playback model and all preset playback models, and the headset determines the total difference that satisfies the fourth preset condition.
  • the default playback model corresponding to the value is the default playback model that matches the target playback model.
  • the fourth preset condition is that the total difference between the N energy ratios in the matching preset playback model and the target playback model is the smallest total difference.
  • the fourth preset condition is that the total difference between the N energy ratios in the matching preset playback model and the target playback model is less than or equal to the first difference threshold.
  • the earphone processes the audio signal based on the earphone mode corresponding to the matched preset playback model and the parameters corresponding to the earphone mode.
  • the earphone can process the audio signal based on the earphone mode corresponding to the matched preset playback model and the parameters corresponding to the earphone mode, so that the earphone's processing level of the audio signal can reach the preset processing level, so that the user can obtain the target listening experience.
  • the process of processing the audio signal by the earphone to obtain the target hearing sensation can be referred to the related descriptions in the aforementioned term (2) and term (3), which will not be described again here.
  • the execution subject can be replaced by a terminal, and the terminal can send the execution results of the steps to the headset.
  • the headset can send a first environmental audio signal to the terminal, and the terminal can determine a first environmental sound feature based on the first environmental audio signal, and then determine a target environmental sound feature based on the first environmental sound feature and the second environmental sound feature, and so on.
  • the first energy threshold may also be called the second threshold, and the second energy threshold may also be called the first threshold.
  • the term “when” may be interpreted to mean “if" or “after” or “in response to determining" or “in response to detecting" depending on the context.
  • the phrase “when determining" or “if (stated condition or event) is detected” may be interpreted to mean “if it is determined" or “in response to determining" or “on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated.
  • the available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.

Abstract

A method for determining a parameter corresponding to an earphone mode, and an earphone, a terminal and a system. In the method, an earphone can adjust a default prompt audio signal, and can then play an adjusted prompt audio signal, so as to obtain a reference prompt audio signal; then, a target playing model is determined on the basis of the adjusted prompt audio signal and the reference prompt audio signal; then, the target playing model is matched with preset playing models in a mode setting database to determine, from the mode setting database, a preset playing model matching the target playing model, and an earphone mode corresponding to the matching preset playing model and a parameter corresponding to the earphone mode are determined; and then the earphone processes an audio signal on the basis of the earphone mode corresponding to the matching preset playing model and the parameter corresponding to the earphone mode.

Description

一种耳机模式对应的参数确定方法、耳机、终端和系统A parameter determination method, headset, terminal and system corresponding to a headset mode
本申请要求于2022年04月11日提交中国专利局、申请号为202210371139.1、申请名称为“一种耳机模式对应的参数确定方法、耳机、终端和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on April 11, 2022, with the application number 202210371139.1 and the application title "A parameter determination method, earphone, terminal and system corresponding to the earphone mode", all of which The contents are incorporated into this application by reference.
技术领域Technical field
本申请涉及音频处理技术领域,尤其涉及一种耳机模式对应的参数确定方法、耳机、终端和系统。The present application relates to the field of audio processing technology, and in particular, to a method for determining parameters corresponding to a headphone mode, a headset, a terminal and a system.
背景技术Background technique
随着科学技术的发展,耳机的功能越来越多且逐渐完善。目前,一些耳机可以为用户提供多种耳机模式,耳机采用不同的耳机模式播放音乐时可以给用户带来不同的体验。常见的耳机模式包括主动降噪(active noise control,ANC)模式或者透传(hearthrough,HT)模式或者标准模式等模式中的一个或多个。当耳机的耳机模式为主动降噪模式时可以在用户佩戴上耳机时实现滤除环境声音信号(可以看做是一种噪声)的功能;当耳机的耳机模式为透传模式时,用户在佩戴上耳机时仍然可以实现与不佩戴耳机时一样感受环境声音信号,即用户佩戴了耳机前后对环境声音信号的感受一样;当耳机的耳机模式为标准模式时,用户在佩戴上耳机以后,能够实现良好佩戴耳机时的听音效果。With the development of science and technology, the functions of headphones are increasing and gradually improving. At present, some headphones can provide users with multiple headphone modes. When the headphones use different headphone modes to play music, they can bring different experiences to the users. Common headphone modes include one or more of active noise reduction (active noise control, ANC) mode, transparent transmission (hearthrough, HT) mode, or standard mode. When the headphone mode of the headset is active noise reduction mode, the function of filtering out ambient sound signals (can be regarded as a kind of noise) can be realized when the user wears the headset; when the headphone mode of the headset is the transparent transmission mode, the user can When putting on the earphones, the user can still feel the environmental sound signals in the same way as when not wearing the earphones, that is, the user has the same experience of the environmental sound signals before and after wearing the earphones; when the earphone mode of the earphones is the standard mode, after wearing the earphones, the user can Good listening effect when wearing headphones.
在同一个耳机模式下,可以对应不同的参数。这些不同的参数可以给该同一个耳机模式带来不同程度的处理效果,该不同程度的处理效果包括耳机可以不同程度的实现该同一个耳机模式对应的功能。例如,以主动降噪模式为例进行说明,主动降噪模式可以对应不同的参数,利用不同的参数对环境声音信号进行滤除的程度不同,即主动降噪程度可以有强有弱,主动降噪程度越强的时候,用户听见的环境声音信号越少,主动降噪程度越弱的时候,用户可以听见的环境声音信号越多,主动降噪程度最弱的时候,可以认为耳机不作任何降噪处理。In the same headphone mode, different parameters can be corresponding. These different parameters can bring different degrees of processing effects to the same headphone mode. The different degrees of processing effects include that the headphones can realize the corresponding functions of the same headphone mode to different degrees. For example, take the active noise reduction mode as an example. The active noise reduction mode can correspond to different parameters. Different parameters can be used to filter out environmental sound signals to different degrees. That is, the degree of active noise reduction can be strong or weak. The active noise reduction mode can be strong or weak. When the noise level is stronger, the user hears fewer environmental sound signals. When the active noise reduction level is weaker, the user can hear more environmental sound signals. When the active noise reduction level is the weakest, it can be considered that the headset does not perform any reduction. Noise processing.
由于不同用户的耳道模型不同且同一用户处于不同环境中时,环境嘈杂程度不同,则对于不同的用户要实现各个耳机模式下的最优听感,需要对耳机模式的参数进行适配。如何进行适配才可以实现不同用户拥有最优听感是值得研究的方向。Since different users have different ear canal models and the same user is in different environments with different levels of environmental noise, in order to achieve the optimal listening experience in each headphone mode for different users, the parameters of the headphone mode need to be adapted. How to adapt to achieve the optimal listening experience for different users is a direction worthy of study.
发明内容Contents of the invention
本申请提供了一种耳机模式对应的参数确定方法、耳机、终端和系统,耳机在不同的佩戴情况以及不同的耳道模型中可以确定耳机模式对应的参数以实现目标听感。This application provides a method, earphones, terminals and systems for determining parameters corresponding to the earphone mode. The earphones can determine the parameters corresponding to the earphone mode in different wearing situations and different ear canal models to achieve the target listening experience.
第一方面,本申请提供了一种耳机模式对应的参数确定方法,应用于耳机,该方法包括:该耳机获取目标环境声音特征,并确定耳机模式为第一耳机模式时的目标听感;该目标环境声音特征用于反映环境声音信号的能量大小;该耳机基于该目标环境声音特征对该第一耳机模式的默认提示音频信号进行调整,得到调整后的提示音频信号;该环境声音信号的能量越大则该调整后的提示音频信号的能量越大,该环境声音信号的能量越小则该调 整后的提示音频信号的能量越小;该耳机播放该调整后的提示音频信号之后,通过麦克风采集播放后的提示音频信号得到反馈音频信号;该耳机基于该调整后的提示音频信号以及反馈音频信号确定目标播放模型;该目标播放模型用于反映用户佩戴该耳机的情况以及用户的耳道模型;该耳机从模式设置数据库中的全部预设播放模型中确定与该目标播放模型匹配的预设播放模型;该模式设置数据库中包括多个预设播放模型,其中,每一个预设播放模型还与至少一个参数对应,该至少一个参数中的每一个参数都对应一个耳机模式以及一个预设听感;该耳机确定该匹配的预设播放模型对应的目标参数;该目标参数对应的耳机模式为该第一耳机模式且该目标参数对应的预设听感为该目标听感;该耳机基于该第一耳机模式与该第一耳机模式对应的目标参数对音频信号进行处理。In a first aspect, this application provides a method for determining parameters corresponding to a headphone mode, which is applied to headphones. The method includes: the headphone acquires target environmental sound characteristics, and determines the target hearing sensation when the headphone mode is the first headphone mode; The target environmental sound characteristics are used to reflect the energy of the environmental sound signal; the headset adjusts the default prompt audio signal of the first headphone mode based on the target environmental sound characteristics to obtain an adjusted prompt audio signal; the energy of the environmental sound signal The larger it is, the greater the energy of the adjusted prompt audio signal. The smaller the energy of the environmental sound signal, the smaller the energy of the adjusted prompt audio signal. After the headset plays the adjusted prompt audio signal, it passes through the microphone. Collect the played prompt audio signal to obtain a feedback audio signal; the headset determines a target playback model based on the adjusted prompt audio signal and the feedback audio signal; the target playback model is used to reflect the user's wearing of the headset and the user's ear canal model ; The headset determines a preset playback model that matches the target playback model from all preset playback models in the mode setting database; the mode setting database includes multiple preset playback models, where each preset playback model also Corresponding to at least one parameter, each parameter in the at least one parameter corresponds to a headphone mode and a preset hearing sense; the headset determines the target parameter corresponding to the matching preset playback model; the headphone mode corresponding to the target parameter is The first earphone mode and the preset hearing sensation corresponding to the target parameter are the target hearing sensation; the earphone processes the audio signal based on the first earphone mode and the target parameter corresponding to the first earphone mode.
上述实施例中,耳机中可以设置一个模式设置数据库,该模式数据库中记录了在安静环境时,基于不同的预设播放模型(即不同的耳机佩戴情况以及耳道模型)下,要实现第一耳机模式时的目标听感时所对应的参数。该第一耳机模式可以为下述实施例中记载的主动降噪模式或者透传模式等。然后,在实际使用过程中,可以确定目标播放模型来反映当前耳机的佩戴情况以及耳道模型,然后确定该目标播放模型匹配的预设播放模型对应的第一耳机模式下实现目标听感时对应的目标参数。但是如果环境声音信号的能量大表示环境嘈杂,在环境嘈杂时,环境声音信号会影响目标播放模型的准确性,从而确定出的目标参数是错误的,因此可以将默认提示音频信号的能量提高,使得其可以去抵消环境声音信号带来的影响。如果环境声音信号的能量小则表示环境安静,环境安静时使得默认提示音频信号的能量变小可以使得用户听感变好,不会因为在安静环境中听到默认提示音频信号感到不适。In the above embodiment, a mode setting database can be set in the earphones. The mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode. The first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments. Then, during actual use, the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters. However, if the energy of the environmental sound signal is large, it means that the environment is noisy. When the environment is noisy, the environmental sound signal will affect the accuracy of the target playback model, and the determined target parameters will be wrong. Therefore, the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
结合第一方面,该麦克风为该耳机的反馈麦克风。Combined with the first aspect, the microphone serves as a feedback microphone for the headset.
上述实施例中,反馈麦克风可以采集耳道中声音信号,得到信息更全面的反馈音频信号。In the above embodiment, the feedback microphone can collect sound signals in the ear canal to obtain feedback audio signals with more comprehensive information.
结合第一方面,该目标环境声音特征包括环境声音信号的绝对能量、相对能量以及不同频段的能量占比中的一个或者多个。Combined with the first aspect, the target environmental sound characteristics include one or more of absolute energy, relative energy, and energy proportions of different frequency bands of the environmental sound signal.
结合第一方面,该目标环境声音特征包括环境声音信号的绝对能量、相对能量以及不同频段的能量占,该耳机获取目标环境声音特征,具体包括:该耳机采集环境声音信号得到第一环境音频信号;该耳机基于该第一环境音频信号确定该第一环境音频信号中环境声音信号的绝对能量、相对能量以及不同频段的能量占比作为该目标环境声音特征。Combined with the first aspect, the target environmental sound characteristics include the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal. The earphone acquires the target environmental sound characteristics, specifically including: the earphone collects the environmental sound signal to obtain the first environmental audio signal. ; The headset determines the absolute energy, relative energy, and energy proportions of different frequency bands of the environmental sound signal in the first environmental audio signal as the target environmental sound characteristics based on the first environmental audio signal.
上述实施例中,耳机可以基于第一环境音频信号获取目标环境声音特征,不依赖终端去分析目标环境声音特征,可以更快速的获取目标环境声音特征。且在耳机没有与终端连接的情况下,仍然可以保证耳机可以获取到目标环境声音特征。In the above embodiment, the headset can obtain the target environmental sound characteristics based on the first environmental audio signal, without relying on the terminal to analyze the target environmental sound characteristics, and can obtain the target environmental sound characteristics more quickly. And when the headset is not connected to the terminal, it can still be ensured that the headset can obtain the target environmental sound characteristics.
结合第一方面,该目标环境声音特征包括环境声音信号的绝对能量、相对能量以及不同频段的能量占,该耳机获取该目标环境声音特征,具体包括:该耳机采集环境声音信号得到第一环境音频信号;该耳机基于该第一环境音频信号确定第一环境声音特征,该第一环境声音特征包括该第一环境音频信号中环境声音信号的绝对能量、相对能量以及不同频段的能量占比;该耳机接收与该耳机连接的终端发送的第二环境声音特征,该第二环境声音特征包括第二环境音频信号中环境声音信号的绝对能量、相对能量以及不同频段的能量 占比;该第二环境音频信号为该终端采集的环境声音信号;在该第一环境声音特征与该第二环境声音特征相同的情况下,该耳机确定该第一环境声音特征为该目标环境声音特征;在该第一环境声音特征与该第二环境声音特征不相同的情况下,该耳机可以基于该第一环境声音特征以及该第二环境声音特征设置不同的权重后进行融合,将融合的结果作为该目标环境声音特征。上述实施例中,耳机可以基于耳机确定的第一环境声音特征以及终端确定的第二环境声音特征确定目标环境声音特征,可以增强目标环境声音特征的准确性,在耳机出错的情况下,终端确定第二环境声音特征可以进行弥补。Combined with the first aspect, the target environmental sound characteristics include the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal. The earphone acquires the target environmental sound characteristics, specifically including: the earphone collects the environmental sound signal to obtain the first environmental audio. signal; the headset determines a first environmental sound characteristic based on the first environmental audio signal, the first environmental sound characteristic includes the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal in the first environmental audio signal; the The earphone receives the second environmental sound characteristics sent by the terminal connected to the earphone. The second environmental sound characteristics include the absolute energy, relative energy and energy proportion of the environmental sound signal in the second environmental audio signal; the second environment The audio signal is an environmental sound signal collected by the terminal; when the first environmental sound characteristic and the second environmental sound characteristic are the same, the headset determines that the first environmental sound characteristic is the target environmental sound characteristic; in the first When the environmental sound characteristics are different from the second environmental sound characteristics, the headset can set different weights based on the first environmental sound characteristics and the second environmental sound characteristics for fusion, and use the fusion result as the target environmental sound. feature. In the above embodiment, the headset can determine the target environmental sound feature based on the first environmental sound feature determined by the headset and the second environmental sound feature determined by the terminal, which can enhance the accuracy of the target environmental sound feature. In the case of an error in the headset, the terminal determines Secondary ambient sound signatures can compensate.
结合第一方面,该耳机基于该目标环境声音特征对该第一耳机模式的默认提示音频信号进行调整,具体包括:在确定环境声音信号的能量大于或者等于第一阈值时,该耳机将该默认提示音频信号的能量从第一能量增大到第二能量,该第二能量大于反馈环境声音信号的能量;该反馈环境声音信号的能量用于表征耳道中的环境声音信号的能量大小;或者,在确定环境声音信号的能量小于或者等于第二阈值时,该耳机将该默认提示音频信号的能量从第一能量减小到第三能量。Combined with the first aspect, the headset adjusts the default prompt audio signal of the first headset mode based on the target environmental sound characteristics, specifically including: when it is determined that the energy of the environmental sound signal is greater than or equal to the first threshold, the headset adjusts the default prompt audio signal. The energy of the prompt audio signal increases from the first energy to the second energy, and the second energy is greater than the energy of the feedback environmental sound signal; the energy of the feedback environmental sound signal is used to represent the energy size of the environmental sound signal in the ear canal; or, When it is determined that the energy of the environmental sound signal is less than or equal to the second threshold, the headset reduces the energy of the default prompt audio signal from the first energy to the third energy.
上述实施例中,在确定环境声音信号大于或者等于第一阈值时,该第一阈值可以为实施例中记录的第二能量阈值,则表示耳机确定环境嘈杂,因此可以增大默认提示音频信号的能量来抵消环境声音信号对生成目标播放模型的影响。在确定环境声音信号小于或者等于第二阈值时,该第二阈值可以为实施例中记录的第一能量阈值,则表示耳机确定环境安静,因此可以减小默认提示音频信号的能量来使得用户听到默认提示音频信号时不会因为默认提示音频信号(未调整)的能量较大而感到不适。In the above embodiment, when it is determined that the environmental sound signal is greater than or equal to the first threshold, the first threshold can be the second energy threshold recorded in the embodiment, which means that the headset determines that the environment is noisy, so the default prompt audio signal can be increased. Energy to offset the impact of environmental sound signals on generating target playback models. When it is determined that the environmental sound signal is less than or equal to the second threshold, which can be the first energy threshold recorded in the embodiment, it means that the headset determines that the environment is quiet, so the energy of the default prompt audio signal can be reduced to allow the user to listen When the default prompt audio signal is reached, you will not feel uncomfortable due to the large energy of the default prompt audio signal (unadjusted).
结合第一方面,该耳机基于目标环境声音特征对该第一耳机模式的默认提示音频信号进行调整,具体包括:在确定环境声音信号的能量大于或者等于第一阈值时,该耳机将该默认提示音频信号的能量从第一能量增大到第二能量,该第二能量大于反馈环境声音信号的能量并且将该默认提示音频信号在不同频段的能量占比调整为与该目标环境声音特征中包括的环境声音信号在不同频段的能量占比相关;该反馈环境声音信号的能量用于表征耳道中的环境声音信号的能量大小;或者,在确定环境声音信号的能量小于或者等于第二阈值时,该耳机将该默认提示音频信号的能量从第一能量减小到第三能量。Combined with the first aspect, the headset adjusts the default prompt audio signal of the first headphone mode based on the target environmental sound characteristics, specifically including: when it is determined that the energy of the environmental sound signal is greater than or equal to the first threshold, the headset adjusts the default prompt audio signal. The energy of the audio signal increases from the first energy to the second energy, the second energy is greater than the energy of the feedback environmental sound signal, and the energy proportion of the default prompt audio signal in different frequency bands is adjusted to be consistent with the target environmental sound characteristics. The energy proportion of the environmental sound signal in different frequency bands is related; the energy of the feedback environmental sound signal is used to represent the energy of the environmental sound signal in the ear canal; or, when it is determined that the energy of the environmental sound signal is less than or equal to the second threshold, The earphone reduces the energy of the default prompt audio signal from the first energy to the third energy.
上述实施例中,在确定环境声音信号大于或者等于第一阈值时,该第一阈值可以为实施例中记录的第二能量阈值,则表示耳机确定环境嘈杂,因此可以增大默认提示音频信号的能量以及使得默认提示音频信号在不同频段上的能量占比与环境声音信号相同或者有对应关系,可以确保每个频段上的默认提示音频信号的能量都可以大于环境声音信号的能量,可以更好的抵消环境声音信号对生成目标播放模型的影响。在确定环境声音信号小于或者等于第二阈值时,该第二阈值可以为实施例中记录的第一能量阈值,则表示耳机确定环境安静,因此可以减小默认提示音频信号的能量来使得用户听到默认提示音频信号时不会因为默认提示音频信号(未调整)的能量较大而感到不适。In the above embodiment, when it is determined that the environmental sound signal is greater than or equal to the first threshold, the first threshold can be the second energy threshold recorded in the embodiment, which means that the headset determines that the environment is noisy, so the default prompt audio signal can be increased. The energy and the energy proportion of the default prompt audio signal in different frequency bands are the same as or corresponding to the environmental sound signal, which can ensure that the energy of the default prompt audio signal in each frequency band can be greater than the energy of the environmental sound signal, which can be better to offset the influence of environmental sound signals on generating target playback models. When it is determined that the environmental sound signal is less than or equal to the second threshold, which can be the first energy threshold recorded in the embodiment, it means that the headset determines that the environment is quiet, so the energy of the default prompt audio signal can be reduced to allow the user to listen When the default prompt audio signal is reached, you will not feel uncomfortable due to the large energy of the default prompt audio signal (unadjusted).
结合第一方面,该环境声音信号的能量为该目标环境声音特征包括环境声音信号的绝对能量、相对能量或者绝对能量以及相对能量进行结合之后得到的目标能量中的一个。Combined with the first aspect, the energy of the environmental sound signal is one of the target energy obtained by combining the target environmental sound characteristics including absolute energy, relative energy, or absolute energy and relative energy of the environmental sound signal.
结合第一方面,该目标听感是该用户通过该耳机或者与该耳机连接的终端设置的听感;在用户没有设置该目标听感的情况下,该耳机或者与该耳机连接的终端设置一个默认的听 感作为目标听感。With reference to the first aspect, the target listening feeling is the listening feeling set by the user through the headset or the terminal connected to the headset; in the case where the user does not set the target listening feeling, the headset or the terminal connected to the headset sets one. The default listening feeling is used as the target listening feeling.
结合第一方面,该耳机基于该调整后的提示音频信号以及反馈音频信号确定目标播放模型,具体包括:该耳机将该调整后的提示音频信号以及该反馈音频信号转化到频域上之后,使得该调整后的提示音频信号以及该反馈音频信号中的任一帧音频信号中包括N个频点,该N为2的整数次方;该耳机基于转化到频域上的该调整后的提示音频信号以及该反馈音频信号确定目标播放模型;该目标播放模型中N个能量比值;其中,包括第一总能量比值,该第一总能量比值为该调整后的提示音频信号中第一频率的全部频点的总能量与该反馈音频信号中第一频率的全部频点的总能量之比;该第一频率为一帧音频信号中N个频点对应的N个频率中的一个频率。上述实施例中,利用反馈音频信号以及调整后的默认提示音频信号的对比关系,反映耳机的佩戴情况以及耳道模型,计算过程简单。Combined with the first aspect, the headset determines a target playback model based on the adjusted prompt audio signal and the feedback audio signal, specifically including: the headset converts the adjusted prompt audio signal and the feedback audio signal into the frequency domain, so that The adjusted prompt audio signal and any frame audio signal in the feedback audio signal include N frequency points, where N is an integer power of 2; the headset is based on the adjusted prompt audio converted to the frequency domain. The signal and the feedback audio signal determine the target playback model; N energy ratios in the target playback model; including the first total energy ratio, the first total energy ratio is all the first frequencies in the adjusted prompt audio signal The ratio of the total energy of a frequency point to the total energy of all frequency points of the first frequency in the feedback audio signal; the first frequency is one of N frequencies corresponding to N frequency points in a frame of audio signal. In the above embodiment, the comparison relationship between the feedback audio signal and the adjusted default prompt audio signal is used to reflect the wearing condition of the earphones and the ear canal model, and the calculation process is simple.
第二方面,本申请实施例提供了一种通信系统,该通信系统中包括终端和耳机,其中:该耳机,用于采集环境声音信号得到第一环境音频信号,并且,基于该第一环境音频信号确定第一环境声音特征;该终端,用于采集环境声音信号得到第二环境音频信号,并且,基于该第二环境音频信号确定第二环境声音特征;该终端,还用于将该第二环境声音特征发送至该耳机;该耳机,还用于基于该第一环境声音特征以及第二环境声音特征确定目标环境声音特征;该耳机,还用于基于该目标环境声音特征对第一耳机模式的默认提示音频信号进行调整;该耳机,还用于播放该调整后的提示音频信号之后,通过麦克风采集播放后的提示音频信号得到反馈音频信号;该耳机,还用于基于该调整后的提示音频信号以及反馈音频信号确定目标播放模型;该耳机,还用于从模式设置数据库中的全部预设播放模型中确定与该目标播放模型匹配的预设播放模型;该耳机,还用于确定该匹配的预设播放模型对应的目标参数;该耳机,还用于基于该第一耳机模式与该第一耳机模式对应的目标参数对音频信号进行处理。In a second aspect, embodiments of the present application provide a communication system, which includes a terminal and an earphone, wherein: the earphone is used to collect environmental sound signals to obtain a first environmental audio signal, and based on the first environmental audio signal The signal determines the first environmental sound characteristic; the terminal is used to collect the environmental sound signal to obtain the second environmental audio signal, and determine the second environmental sound characteristic based on the second environmental audio signal; the terminal is also used to collect the second environmental audio signal. The environmental sound characteristics are sent to the earphone; the earphone is also used to determine the target environmental sound characteristics based on the first environmental sound characteristics and the second environmental sound characteristics; the earphone is also used to determine the first earphone mode based on the target environmental sound characteristics. The default prompt audio signal is adjusted; the headset is also used to collect the played prompt audio signal through the microphone to obtain a feedback audio signal after playing the adjusted prompt audio signal; the headset is also used to obtain a feedback audio signal based on the adjusted prompt audio signal The audio signal and the feedback audio signal determine the target playback model; the headset is also used to determine the preset playback model that matches the target playback model from all the preset playback models in the mode setting database; the headset is also used to determine the Target parameters corresponding to the matching preset playback model; the earphone is also used to process audio signals based on the first earphone mode and the target parameters corresponding to the first earphone mode.
上述实施例中,耳机中可以设置一个模式设置数据库,该模式数据库中记录了在安静环境时,基于不同的预设播放模型(即不同的耳机佩戴情况以及耳道模型)下,要实现第一耳机模式时的目标听感时所对应的参数。该第一耳机模式可以为下述实施例中记载的主动降噪模式或者透传模式等。然后,在实际使用过程中,可以确定目标播放模型来反映当前耳机的佩戴情况以及耳道模型,然后确定该目标播放模型匹配的预设播放模型对应的第一耳机模式下实现目标听感时对应的目标参数。但是如果环境声音信号的能量大表示环境嘈杂,在环境嘈杂时,环境声音信号会影响目标播放模型的准确性,从而确定出的目标参数是错误的,因此可以将默认提示音频信号的能量提高,使得其可以去抵消环境声音信号带来的影响。如果环境声音信号的能量小则表示环境安静,环境安静时使得默认提示音频信号的能量变小可以使得用户听感变好,不会因为在安静环境中听到默认提示音频信号感到不适。In the above embodiment, a mode setting database can be set in the earphones. The mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode. The first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments. Then, during actual use, the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters. However, if the energy of the environmental sound signal is large, it means that the environment is noisy. When the environment is noisy, the environmental sound signal will affect the accuracy of the target playback model, and the determined target parameters will be wrong. Therefore, the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
第三方面,本申请实施例提供了一种耳机,该耳机包括:一个或多个处理器、麦克风和扬声器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器调用该计算机指令以使得该终端执 行如第一方面该的方法。In a third aspect, embodiments of the present application provide an earphone, which includes: one or more processors, a microphone, and a speaker; the memory is coupled to the one or more processors, and the memory is used to store computer program codes, The computer program code includes computer instructions that are invoked by the one or more processors to cause the terminal to perform the method of the first aspect.
上述实施例中,耳机中可以设置一个模式设置数据库,该模式数据库中记录了在安静环境时,基于不同的预设播放模型(即不同的耳机佩戴情况以及耳道模型)下,要实现第一耳机模式时的目标听感时所对应的参数。该第一耳机模式可以为下述实施例中记载的主动降噪模式或者透传模式等。然后,在实际使用过程中,可以确定目标播放模型来反映当前耳机的佩戴情况以及耳道模型,然后确定该目标播放模型匹配的预设播放模型对应的第一耳机模式下实现目标听感时对应的目标参数。但是如果环境声音信号的能量大表示环境嘈杂,在环境嘈杂时,环境声音信号会影响目标播放模型的准确性,从而确定出的目标参数是错误的,因此可以将默认提示音频信号的能量提高,使得其可以去抵消环境声音信号带来的影响。如果环境声音信号的能量小则表示环境安静,环境安静时使得默认提示音频信号的能量变小可以使得用户听感变好,不会因为在安静环境中听到默认提示音频信号感到不适。In the above embodiment, a mode setting database can be set in the earphones. The mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode. The first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments. Then, during actual use, the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters. However, if the energy of the environmental sound signal is large, it means that the environment is noisy. When the environment is noisy, the environmental sound signal will affect the accuracy of the target playback model, and the determined target parameters will be wrong. Therefore, the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
第四方面,本申请实施例提供了一种计算机存储介质,其特征在于,该存储介质中存储有计算机程序,该计算机程序包括可执行指令,该可执行指令当被处理器执行时使该处理器执行如第一方面该的方法。In a fourth aspect, embodiments of the present application provide a computer storage medium, which is characterized in that a computer program is stored in the storage medium, and the computer program includes executable instructions that cause the processing when executed by a processor. The processor executes the method of the first aspect.
上述实施例中,耳机中可以设置一个模式设置数据库,该模式数据库中记录了在安静环境时,基于不同的预设播放模型(即不同的耳机佩戴情况以及耳道模型)下,要实现第一耳机模式时的目标听感时所对应的参数。该第一耳机模式可以为下述实施例中记载的主动降噪模式或者透传模式等。然后,在实际使用过程中,可以确定目标播放模型来反映当前耳机的佩戴情况以及耳道模型,然后确定该目标播放模型匹配的预设播放模型对应的第一耳机模式下实现目标听感时对应的目标参数。但是如果环境声音信号的能量大表示环境嘈杂,在环境嘈杂时,环境声音信号会影响目标播放模型的准确性,从而确定出的目标参数是错误的,因此可以将默认提示音频信号的能量提高,使得其可以去抵消环境声音信号带来的影响。如果环境声音信号的能量小则表示环境安静,环境安静时使得默认提示音频信号的能量变小可以使得用户听感变好,不会因为在安静环境中听到默认提示音频信号感到不适。In the above embodiment, a mode setting database can be set in the earphones. The mode database records the first mode to be achieved based on different preset playback models (ie, different earphone wearing conditions and ear canal models) in a quiet environment. Parameters corresponding to the target listening experience in headphone mode. The first headphone mode may be an active noise reduction mode or a transparent transmission mode described in the following embodiments. Then, during actual use, the target playback model can be determined to reflect the current wearing situation of the headphones and the ear canal model, and then it is determined that the target playback model matches the preset playback model corresponding to the first headphone mode to achieve the target listening feeling. target parameters. However, if the energy of the environmental sound signal is large, it means that the environment is noisy. When the environment is noisy, the environmental sound signal will affect the accuracy of the target playback model, and the determined target parameters will be wrong. Therefore, the energy of the default prompt audio signal can be increased. This allows it to offset the impact of environmental sound signals. If the energy of the environmental sound signal is small, it means that the environment is quiet. When the environment is quiet, making the energy of the default audio signal smaller can improve the user's hearing experience and prevent the user from feeling uncomfortable when hearing the default audio signal in a quiet environment.
附图说明Description of the drawings
图1示出了耳机的佩戴情况示意图;Figure 1 shows a schematic diagram of the wearing situation of the earphones;
图2示出了耳机与耳道之间存在空隙的两种情况;Figure 2 shows two situations where there is a gap between the earphones and the ear canal;
图3示出了耳道模型的一个示意图;Figure 3 shows a schematic diagram of the ear canal model;
图4为本申请实施例提供的耳机的结构示意图;Figure 4 is a schematic structural diagram of an earphone provided by an embodiment of the present application;
图5是本申请实施例提供的终端的结构示意图;Figure 5 is a schematic structural diagram of a terminal provided by an embodiment of the present application;
图6是本申请实施例提供的通信系统的结构示意图;Figure 6 is a schematic structural diagram of a communication system provided by an embodiment of the present application;
图7为本申请实施例中耳机模式对应的参数确定方法的一个示意性流程图;Figure 7 is a schematic flow chart of a method for determining parameters corresponding to the headphone mode in the embodiment of the present application;
图8示出了频域上的第一环境音频信号;Figure 8 shows the first ambient audio signal in the frequency domain;
图9为方式1中在环境嘈杂的情况下对默认提示音频信号进行调整的一个示意图;Figure 9 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in Method 1;
图10为方式2中在环境嘈杂的情况下对默认提示音频信号进行调整的一个示意图;Figure 10 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in method 2;
图11示出了耳机播放以及采集调整后的提示音频信号得到反馈音频信号的示意图。Figure 11 shows a schematic diagram of playing the headphones and collecting the adjusted prompt audio signal to obtain the feedback audio signal.
具体实施方式Detailed ways
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a", "an", "said", "above", "the" and "the" are intended to also Plural expressions are included unless the context clearly indicates otherwise. It will also be understood that the term "and/or" as used in this application refers to and includes any and all possible combinations of one or more of the listed items.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms “first” and “second” are used for descriptive purposes only and shall not be understood as implying or implying relative importance or implicitly specifying the quantity of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, “plurality” The meaning is two or more.
为了便于理解,下面先对本申请实施例涉及的相关术语及概念进行介绍。In order to facilitate understanding, the relevant terms and concepts involved in the embodiments of this application are first introduced below.
(1)耳机的佩戴情况和耳道模型(1) Headphone wearing condition and ear canal model
耳机的佩戴情况是指用户是否良好佩戴耳机。在良好佩戴的情况下,耳机与用户的耳道之间可以没有空隙。在未良好佩戴的情况下,耳机与用户的耳道之间存在空隙。耳机的佩戴情况在下文中也可以被称为耳机佩戴情况或者用户佩戴耳机的情况。The wearing condition of the earphones refers to whether the user is wearing the earphones well. With a good fit, there can be no gap between the earphones and the user's ear canal. When not worn properly, there is a gap between the earphones and the user's ear canal. The wearing situation of the headset may also be referred to as the wearing situation of the headset or the situation of the user wearing the headset in the following.
图1示出了耳机的佩戴情况示意图。Figure 1 shows a schematic diagram of the wearing condition of the earphones.
如图1中的(a)所示,为用户良好佩戴耳机时的一种情况。此时,耳机与耳道贴合不存在空隙。在这样的情况下,可以有效阻隔环境声音信号进入人耳。其中,有效阻隔环境声音信号进入人耳是指相比于未良好佩戴时更能阻隔环境声音信号进入人耳,实际在通常情况下环境声音信号仍然可以进入人耳。As shown in (a) in Figure 1, it is a situation when the user wears the earphones well. At this time, there is no gap between the earphones and the ear canal. In this case, it can effectively block environmental sound signals from entering the human ear. Among them, effectively blocking environmental sound signals from entering human ears means that it can block environmental sound signals from entering human ears better than when it is not worn properly. In fact, under normal circumstances, environmental sound signals can still enter human ears.
如图1中的(b)所示,为用户未良好佩戴耳机时的一种情况。此时,耳机与耳道之前存在空隙。在这样的情况下,耳机阻隔环境声音信号的效果不如良好佩戴时效果好。当耳机与耳道之间存在空隙的情况下,还会导致漏音。其中,漏音是指耳机播放的音频信号可以从耳道传输至外界环境中。该音频信号可以是耳机的麦克风播放的音频信号。As shown in (b) in Figure 1 , it is a situation when the user does not wear the earphones properly. At this time, there is a gap between the earphones and the ear canal. In such cases, the headphones do not block ambient sound signals as well as they do when worn properly. When there is a gap between the earphones and the ear canal, it can also cause sound leakage. Among them, sound leakage means that the audio signals played by the headphones can be transmitted from the ear canal to the external environment. The audio signal may be an audio signal played by the microphone of the headset.
图2示出了耳机与耳道之间存在空隙的两种情况。Figure 2 shows two situations where there is a gap between the earphones and the ear canal.
应该理解的是,图2中的图标101表示环境声音信号,图标101越多,表示环境越嘈杂,环境声音信号的能量越大(能量越大则环境声音信号的分贝越高,表现为听到的环境声音信号越大)。It should be understood that the icon 101 in Figure 2 represents an environmental sound signal. The more icons 101 there are, the noisier the environment and the greater the energy of the environmental sound signal (the greater the energy, the higher the decibel of the environmental sound signal, which is manifested as hearing The greater the ambient sound signal).
用户未良好佩戴耳机的情况下,耳机与耳道之间会产生空隙,空隙越大对环境声音信号的阻隔效果越差则更多的环境声音信号可以进入人耳。如图2所示,空隙102比空隙103小。当耳机的佩戴情况如图2中的(a)所示时,会比如图2中的(b)示出的佩戴情况下存在更多的环境声音信号从外界环境传输至人耳中。When the user does not wear the earphones properly, a gap will appear between the earphones and the ear canal. The larger the gap, the worse the blocking effect on environmental sound signals, and more environmental sound signals can enter the human ear. As shown in FIG. 2 , the gap 102 is smaller than the gap 103 . When the earphones are worn as shown in (a) of Figure 2 , more environmental sound signals are transmitted from the external environment to the human ears than when the headphones are worn as shown in (b) of Figure 2 .
应该理解的是,空隙越大漏音也会越严重,即当耳机的佩戴情况如图2中的(a)所示时,会比如图2中的(b)示出的佩戴情况下存在更多的环境声音信号从耳道传输至外界环境中。对于漏音的图示可以参考图2中对环境声音信号的描述,只是环境声音信号是从外界环境传输至耳道中,但是漏音是从耳道传输至外界环境中。It should be understood that the larger the gap, the more serious the sound leakage will be. That is, when the earphones are worn as shown in (a) in Figure 2, there will be more noise than in the wearing situation as shown in (b) in Figure 2. Many environmental sound signals are transmitted from the ear canal to the external environment. For a diagram of sound leakage, please refer to the description of the environmental sound signal in Figure 2, except that the environmental sound signal is transmitted from the external environment to the ear canal, but the sound leakage is transmitted from the ear canal to the external environment.
图3示出了耳道模型的一个示意图。Figure 3 shows a schematic diagram of the ear canal model.
耳道模型是指按照分类规则将不同用户的耳道划分为不同类型时对应的耳道形状,其中,一个耳道形状就是一个耳道模型。耳机播放的音频信号可以在耳道中进行传输,然后使得用户产生听感。当耳机播放音频信号时,不同的耳道模型可以使得用户产生不同的听感。The ear canal model refers to the corresponding ear canal shape when the ear canals of different users are divided into different types according to classification rules. Among them, an ear canal shape is an ear canal model. The audio signal played by the earphones can be transmitted in the ear canal, and then the user has a sense of hearing. When headphones play audio signals, different ear canal models can give users different hearing sensations.
其中,分类规则包括但是不限于一下规则中的一个或者两个的组合。Among them, the classification rules include but are not limited to one or a combination of two of the following rules.
规则1:按照耳道的长度对不同用户的耳道进行分类,耳道的长度不同或者耳道的长度在一个范围内时可以定义为一个耳道模型。如图3所示,耳道的长度可以为左边起始处到右边起始处的水平距离。例如,图3所示,耳道301的长度可以表示为L1,耳道302的长度可以表示为L2。在一些实施例,如果L1不等于L2,则可以认为耳道301与耳道302的形状不同,则耳道301与耳道302分别是不同的耳道模型。在另一些实施例,如果L1在一个长度范围内但是L2在另一个长度范围内,则可以认为耳道301与耳道302的形状不同,则耳道301与耳道302分别是不同的耳道模型。Rule 1: Classify the ear canals of different users according to the length of the ear canal. When the length of the ear canal is different or the length of the ear canal is within a range, it can be defined as an ear canal model. As shown in Figure 3, the length of the ear canal can be the horizontal distance from the starting point on the left to the starting point on the right. For example, as shown in FIG. 3 , the length of the ear canal 301 can be expressed as L1, and the length of the ear canal 302 can be expressed as L2. In some embodiments, if L1 is not equal to L2, it can be considered that the shapes of the ear canal 301 and the ear canal 302 are different, and the ear canal 301 and the ear canal 302 are respectively different ear canal models. In other embodiments, if L1 is within one length range but L2 is within another length range, it can be considered that the ear canal 301 and the ear canal 302 have different shapes, and the ear canal 301 and the ear canal 302 are different ear canals respectively. Model.
规则2:按照耳道的宽度对不同用户的耳道进行分类,耳道的宽度不同或者耳道的宽度在一个范围内时可以定义为一个耳道模型。其中,在一些情况下,耳道的宽度可以是耳道的下边最低点与耳道上边最低点之间的垂直距离。例如,图3中的(a)所示,耳道301的下边最低点与耳道上边最低点之间的垂直距离可以表示为S1。在另一些情况下,耳道301的宽度可以是耳道的下边最低点与耳道上边最高点之间的垂直距离。例如,图3中的(b)所示,耳道302的下边最低点与耳道上边最低点之间的垂直距离可以表示为S2。当两个耳道的宽度不同,或者,当两个耳道的宽度在不同的宽度阈值时,则这两个耳道是不同的耳道。Rule 2: Classify the ear canals of different users according to the width of the ear canal. When the width of the ear canal is different or the width of the ear canal is within a range, it can be defined as an ear canal model. Wherein, in some cases, the width of the ear canal may be the vertical distance between the lowest point of the lower side of the ear canal and the lowest point of the upper side of the ear canal. For example, as shown in (a) of FIG. 3 , the vertical distance between the lowest point on the lower side of the ear canal 301 and the lowest point on the upper side of the ear canal can be expressed as S1. In other cases, the width of the ear canal 301 may be the vertical distance between the lowest point on the lower side of the ear canal and the highest point on the upper side of the ear canal. For example, as shown in (b) of FIG. 3 , the vertical distance between the lowest point on the lower side of the ear canal 302 and the lowest point on the upper side of the ear canal can be expressed as S2. When the widths of the two ear canals are different, or when the widths of the two ear canals are at different width thresholds, the two ear canals are different ear canals.
应该理解的是,还可以按照其他的分类规则对不同的耳道进行分类,得到不同的耳道模型,例如耳道的深度等,本申请实施例对此不作限定。It should be understood that different ear canals can also be classified according to other classification rules to obtain different ear canal models, such as the depth of the ear canal, etc., which are not limited in the embodiments of the present application.
(2)耳机模式(2)Headphone mode
耳机的耳机模式可以表示耳机对音频信号进行何种处理,该处理的处理程度由该耳机模式对应的调整参数(后文中简称为参数)决定。该处理可以包括主动降噪或者透传中的一个或者多个。耳机采用不同耳机模式对声频信号进行处理之后,可以带给用户不同的听感。该音频信号中可以包括环境声音信号或者手机发送给耳机的音频信号,例如播放音乐时的音频信号或者通话时的音频信号中的一个或者多个。The headphone mode of the headset can indicate how the headset processes audio signals, and the degree of processing is determined by the adjustment parameters (hereinafter referred to as parameters for short) corresponding to the headset mode. This processing may include one or more of active noise reduction or transparent transmission. After the earphones use different earphone modes to process audio signals, they can give users different listening sensations. The audio signal may include one or more of environmental sound signals or audio signals sent by the mobile phone to the earphones, such as audio signals when playing music or audio signals during calls.
其中,常见的耳机模式包括主动降噪模式或者透传模式等模式中的一个或者多个。Among them, common headphone modes include one or more of active noise reduction mode or transparent transmission mode.
在用户佩戴耳机的情况下,如果耳机采用主动降噪模式,耳机可以对环境声音信号进行滤除,这样可以减弱用户对当前环境声音信号的感知。其中,在主动降噪模式下,耳机对音频信号的处理程度可以不同,即耳机对环境声音信号减弱的程度可以不同。可以通过设置主动降噪模式中对应的调整参数(后文中简称为参数)以实现对环境声音信号进行不同程度减弱。例如,这里可以使得主动降噪模式对应三组不同的参数,其中包括第一降噪参数、第二降噪参数以及第三降噪参数。主动降噪模式中对应的三组调整参数对环境声音信号减弱程度可以依次增加。When the user wears headphones, if the headphones adopt active noise reduction mode, the headphones can filter out environmental sound signals, which can weaken the user's perception of the current environmental sound signals. Among them, in the active noise reduction mode, the earphones can process audio signals to different degrees, that is, the earphones can weaken environmental sound signals to different degrees. You can achieve different degrees of attenuation of environmental sound signals by setting corresponding adjustment parameters (hereinafter referred to as parameters) in the active noise reduction mode. For example, the active noise reduction mode can be configured to correspond to three different sets of parameters, including first noise reduction parameters, second noise reduction parameters, and third noise reduction parameters. The corresponding three sets of adjustment parameters in the active noise reduction mode can increase the degree of attenuation of environmental sound signals in sequence.
耳机实现主动降噪模式对应的主动降噪功能的方式可以包括:耳机可以利用主动降噪模式对应的第一参数对包括了环境声音信号的音频信号进行处理,例如进行滤波以减弱该音频信号中包括的环境声音信号,然后基于该滤波之后的音频信号得到滤波后的音频信号的反相信号。该反相信号与该滤波后的音频信号的相位差为180°。然后,耳机可以播放该反相信号,这样可以抵消用户实际听到的环境声音信号以实现主动降噪的目的。第一参数不同,则耳机对音频信号中包括的环境声音信号减弱程度不同,播放后对抵消掉用户实际听到的环境声音信号的减弱程度不同,从而实现不同的听感。The method for the earphones to implement the active noise reduction function corresponding to the active noise reduction mode may include: the earphones may use the first parameter corresponding to the active noise reduction mode to process the audio signal including the environmental sound signal, such as filtering to weaken the audio signal. The included environmental sound signal is then used to obtain the inverse signal of the filtered audio signal based on the filtered audio signal. The phase difference between the inverted signal and the filtered audio signal is 180°. The headphones can then play that inverted signal, which can offset the ambient sound signal that the user actually hears for active noise reduction purposes. If the first parameter is different, the earphones will weaken the environmental sound signals included in the audio signal to different degrees, and will offset the environmental sound signals actually heard by the user after playing, thereby achieving different listening sensations.
在用户佩戴耳机的情况下,当耳机采用透传模式时,耳机可以对环境声音信号进行增强,这样可以强化用户对环境声音信号的感知。例如,一种可能的效果为用户在佩戴上耳机时仍然可以实现与不佩戴耳机一样感受环境声音信号,即用户佩戴了耳机前后对环境声音信号的感受一样。其中,在透传模式下,耳机对携带了环境声音信号的音频信号的处理程度可以不同,即耳机对环境声音信号增强的程度可以不同。可以通过设置透传模式中对应的调整参数(后文中简称为参数)以实现对环境声音信号进行不同程度增强。例如,这里可以假设透传模式对应三组不同的参数,其中包括第一透传参数、第二透传参数以及第三透传参数。透传模式对应的三组调整参数对环境声音信号的增强程度可以依次增加。When the user wears headphones, when the headphones adopt the transparent transmission mode, the headphones can enhance the environmental sound signals, which can enhance the user's perception of the environmental sound signals. For example, one possible effect is that the user can still experience the environmental sound signals the same as without wearing the headphones when wearing the headphones, that is, the user feels the same about the environmental sound signals before and after wearing the headphones. Among them, in the transparent transmission mode, the earphones can process the audio signals carrying the environmental sound signals to different degrees, that is, the earphones can enhance the environmental sound signals to different degrees. The environmental sound signal can be enhanced to varying degrees by setting corresponding adjustment parameters (hereinafter referred to as parameters) in the transparent transmission mode. For example, it can be assumed that the transparent transmission mode corresponds to three different sets of parameters, including a first transparent transmission parameter, a second transparent transmission parameter, and a third transparent transmission parameter. The three sets of adjustment parameters corresponding to the transparent transmission mode can increase the degree of enhancement of the environmental sound signal in sequence.
耳机实现透传模式对应的透传功能的方式可以包括:耳机可以利用透传模式对应的第一参数对包括了环境声音信号的音频信号进行处理,例如增强该环境声音信号。然后,耳机可以播放该增强后的音频信号,这样可以使得用户能够通过耳机听到环境声音信号,相比未采用透传模式时听到的环境声音信号强度更大。第一参数不同,则耳机对环境声音信号增强程度不同,播放后用户听到的环境声音信号的增强程度不同,从而实现不同的听感。The way in which the earphones implement the transparent transmission function corresponding to the transparent transmission mode may include: the earphones may use the first parameter corresponding to the transparent transmission mode to process the audio signal including the environmental sound signal, for example, enhance the environmental sound signal. Then, the earphones can play the enhanced audio signal, so that the user can hear the ambient sound signal through the earphones, and the intensity of the ambient sound signal is greater than when the transparent transmission mode is not used. If the first parameter is different, the earphones will enhance the environmental sound signals to different degrees, and the environmental sound signals heard by the user after playing will be enhanced to different degrees, thereby achieving different listening sensations.
应该理解的是,除了主动降噪模式以及透传模式以外还可以包括其他的处理模式,本申请实施例对此不作限定。下文中,以主动降噪模式以及透传模式为例进行说明。It should be understood that in addition to the active noise reduction mode and the transparent transmission mode, other processing modes may also be included, which are not limited in the embodiments of the present application. In the following, active noise reduction mode and transparent transmission mode are used as examples for explanation.
(3)目标听感(3) Target listening sense
目标听感可以是用户通过耳机或者终端设置的听感。不同的耳机模式下,用户可以设置一个目标听感,该目标听感用于反映耳机模式下耳机对音频信号预设的处理程度。该目标听感还可以用于指示该耳机模式下用户的理想听感。在用户没有设置目标听感的情况下,耳机或者终端可以设置一个默认的听感作为目标听感。例如,目标听感可以为弱、中或者强中的一个,或者为从弱到强的过程中的一个状态。The target listening feeling can be the listening feeling set by the user through headphones or terminals. In different headphone modes, the user can set a target hearing feeling, which reflects the preset processing degree of the audio signal by the headset in the headphone mode. The target hearing feeling can also be used to indicate the user's ideal hearing feeling in the headphone mode. When the user does not set a target listening feeling, the headset or terminal can set a default listening feeling as the target listening feeling. For example, the target listening feeling can be one of weak, medium or strong, or a state in the process from weak to strong.
在主动降噪模式下,用户可以设置目标听感,即可以设置耳机对环境声音信号进行减弱的程度,例如用户设置目标听感越强那么耳机进行主动降噪的处理程度越强,则耳机可以采用主动降噪程度越强时对应的参数对音频信号(包括了环境声音信号的)进行处理使得用户听见的环境声音信号可以越少,主动降噪程度最强的时候,可以认为用户听不见环境声音信号;用户设置的主动降噪程度越弱,则耳机可以采用主动降噪程度越弱时对应的参数对音频信号(包括了环境声音信号的)进行处理使得用户可以听见的环境声音信号越多,主动降噪程度最弱的时候,可以认为耳机不作任何降噪处理。In the active noise reduction mode, the user can set the target hearing sense, that is, the degree to which the earphones can weaken the environmental sound signal. For example, the stronger the target hearing sense set by the user, the stronger the active noise reduction processing of the earphones, and the earphones can The audio signal (including the environmental sound signal) is processed using the corresponding parameters when the degree of active noise reduction is stronger, so that the user can hear less environmental sound signals. When the degree of active noise reduction is the strongest, it can be considered that the user cannot hear the environment. Sound signal; the weaker the active noise reduction level set by the user, the headset can process the audio signal (including environmental sound signals) using the corresponding parameters when the active noise reduction level is weaker, so that the user can hear more environmental sound signals. , when the active noise reduction level is the weakest, it can be considered that the headset does not perform any noise reduction processing.
在透传模式下,用户可以设置目标听感,即可以设置耳机对环境声音信号进行增强的程度,例如用户设置目标听感越强那么耳机进行透传的处理程度越强,则耳机可以使用透 传程度越强时对应的参数对音频信号(包括了环境声音信号的)进行处理使得用户听见的环境声音信号可以越多;用户设置的透传程度越弱,则耳机可以使用透传程度越弱时对应的参数对音频信号(包括了环境声音信号的)进行处理使得用户可以听见的环境声音信号越少。In the transparent transmission mode, the user can set the target sense of hearing, that is, the degree to which the earphones can enhance the environmental sound signal. For example, the stronger the user sets the target sense of hearing, the stronger the degree of transparent transmission processing of the earphones, and the earphones can use transparent transmission. The stronger the transmission degree, the corresponding parameters process the audio signal (including the environmental sound signal) so that the user can hear more environmental sound signals; the weaker the transparent transmission degree set by the user, the weaker the transparent transmission degree the headset can use The corresponding parameters are used to process the audio signal (including the environmental sound signal) so that the user can hear less environmental sound signal.
本申请实施例中,耳机可以通过设置耳机模式对应的参数以实现用户在该模式下对应的目标听感。影响耳机模式对应的参数的因素包括但不限于:用户佩戴耳机的情况(耳机的佩戴情况)以及用户的耳道模型中的一种或者多种,下文中以耳机的佩戴情况以及耳道模型为例进行说明。其中,耳机的佩戴情况以及用户的耳道模型对用户听感的影响可以参考前述对术语(1)的相关描述。举个例子,当用户选择主动降噪模式下的目标听感为第一程度的主动降噪程度时,当用户良好佩戴耳机时,进入人耳的环境声音信号为第一环境声音信号,耳机可以使用主动降噪模式对应的参数A对包括了环境声音信号的音频信号进行降噪处理,使得用户听到的环境声音信号实现第一程度的降噪。当用户未良好佩戴耳机时,进入人耳的环境声音信号为第二环境声音信号,参考前述图2中的内容可知第二环境声音信号的能量大于第一环境声音信号的能量,如果此时耳机再采用参数A对包括了环境声音信号的音频信号进行降噪,抵消的是第一环境声音信号的能量而第二环境声音信号比第一环境声音信号多出的能量不会被抵消。则在用户未良好佩戴耳机的情况下,耳机仍然使用参数A对包括了环境声音信号的音频信号进行降噪则不能实现第一程度的降噪,这样会使得用户听到的环境声音信号相比于良好佩戴时更清晰,无法达到目标听感,因此需要重新设置耳机再主动降噪模式下对应用的参数使得耳机可以实现第一程度的降噪。其中,耳道模型对耳机模式对应的参数的设置可以参考对耳机的佩戴情况的描述。In the embodiment of the present application, the earphones can achieve the user's corresponding target hearing sensation in this mode by setting parameters corresponding to the earphone mode. Factors that affect the parameters corresponding to the headphone mode include but are not limited to: one or more of the user's wearing of the headset (the wearing situation of the headset) and the user's ear canal model. In the following, the wearing situation of the headset and the ear canal model are used as examples. Example to illustrate. Among them, the impact of the wearing condition of the earphones and the user's ear canal model on the user's sense of hearing can be referred to the above-mentioned description of term (1). For example, when the user selects the first level of active noise reduction in the active noise reduction mode, and when the user wears the earphones well, the environmental sound signal entering the human ear is the first environmental sound signal, and the earphones can The parameter A corresponding to the active noise reduction mode is used to perform noise reduction processing on the audio signal including the environmental sound signal, so that the environmental sound signal heard by the user achieves the first degree of noise reduction. When the user does not wear the earphones properly, the ambient sound signal entering the human ear is the second ambient sound signal. Referring to the content in Figure 2, it can be seen that the energy of the second ambient sound signal is greater than the energy of the first ambient sound signal. If the earphones are used at this time Parameter A is then used to perform noise reduction on the audio signal including the ambient sound signal. What is offset is the energy of the first ambient sound signal, while the energy of the second ambient sound signal that is more than the first ambient sound signal will not be offset. If the user does not wear the earphones properly, the earphones still use parameter A to de-noise the audio signal including the environmental sound signal, and the first degree of noise reduction cannot be achieved. This will cause the environmental sound signal heard by the user to be compared with It is clearer when worn well and cannot achieve the target listening feeling. Therefore, it is necessary to reset the earphones and apply the parameters in the active noise reduction mode so that the earphones can achieve the first degree of noise reduction. Among them, the settings of parameters corresponding to the earphone mode of the ear canal model can refer to the description of the wearing condition of the earphones.
基于前述描述可知,如果想达到用户的目标听感,则需要对耳机模式对应的参数进行设置,不同的耳机佩戴情况以及耳道模型下要实现同一个耳机模式下的目标听感,则该耳机模式对应的参数可以不同。耳机可以基于耳机佩戴情况以及耳道模型确定一个耳机模式对应的参数以实现一个耳机模式下的目标听感,该过程涉及的详细内容可以参考下文中的相关描述,此处暂不描述。Based on the above description, it can be seen that if you want to achieve the user's target hearing sensation, you need to set the parameters corresponding to the headphone mode. To achieve the target hearing sensation in the same headphone mode under different headphone wearing conditions and ear canal models, the headphones The parameters corresponding to the modes can be different. The headset can determine the parameters corresponding to a headset mode based on the wearing condition of the headset and the ear canal model to achieve the target listening experience in a headset mode. For details of this process, please refer to the relevant description below and will not be described here.
下面介绍本申请实施例提供的示例性耳机。The following introduces exemplary earphones provided by embodiments of the present application.
图4为本申请实施例提供的耳机的结构示意图。Figure 4 is a schematic structural diagram of an earphone provided by an embodiment of the present application.
应该理解的是,本申请实施例涉及的耳机可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that the earphones involved in the embodiments of the present application may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
本申请实施例中的耳机可以是真无线(true wireless stereo,TWS)耳机或者其他类型的蓝牙耳机,本申请实施例对此不作限定。The earphones in the embodiments of the present application may be true wireless stereo (TWS) earphones or other types of Bluetooth earphones, which are not limited in the embodiments of the present application.
在本申请实施例中,耳机可以包括:处理器151、无线通信处理模块152、麦克风集合153以及扬声器154。In this embodiment of the present application, the headset may include: a processor 151, a wireless communication processing module 152, a microphone set 153, and a speaker 154.
处理器151可以用于解析无线通信处理模块152接收到的信号。该信号包括:终端发送的建立连接的请求以及环境声音特征。处理器151还可以用于生成无线通信处理模块152 向外发送的信号,该信号包括:通知终端获取环境声音特征的请求等。其中,环境声音特征将在下文进行详细描述,此处暂不赘述。The processor 151 may be used to parse signals received by the wireless communication processing module 152. The signal includes: a request to establish a connection sent by the terminal and environmental sound characteristics. The processor 151 may also be used to generate a signal sent externally by the wireless communication processing module 152. The signal includes: notifying the terminal of a request to obtain environmental sound characteristics, etc. Among them, the environmental sound characteristics will be described in detail below and will not be described in detail here.
处理器151中还可以设置存储器,用于存储指令。在一些实施例中,该指令可以包括:利用环境声音信号确定环境声音特征的指令、发送信号的指令等。The processor 151 may also be provided with a memory for storing instructions. In some embodiments, the instructions may include: instructions for determining characteristics of environmental sounds using environmental sound signals, instructions for sending signals, and the like.
无线通信处理模块152可以包括蓝牙(bluetooth,BT)通信处理模块152A、WLAN通信处理模块152B中的一项或多项,用于提供和终端建立连接以及进行数据传输等服务。The wireless communication processing module 152 may include one or more of a Bluetooth (BT) communication processing module 152A and a WLAN communication processing module 152B, and is used to provide services such as establishing a connection with the terminal and performing data transmission.
麦克风集合153中可以包括前馈麦克风153A、反馈麦克风153B以及通话麦克风153C。The microphone set 153 may include a feedforward microphone 153A, a feedback microphone 153B, and a talk microphone 153C.
其中,前馈麦克风153A可以采集耳机周围的环境声音信号,并将其发送至处理器。使得处理器可以基于该环境声音信号确定环境声音特征。Among them, the feedforward microphone 153A can collect the environmental sound signals around the earphones and send them to the processor. This allows the processor to determine environmental sound characteristics based on the environmental sound signal.
反馈麦克风153B可以采集耳道中的声音信号,例如扬声器播放的音频信号传输至耳道之后,反馈麦克风可以采集该音频信号,例如,该音频信号可以为下文涉及的提示音频信号。反馈麦克风还可以采集耳机周围的环境声音信号,并将其发送至处理器。使得处理器可以基于该环境声音信号确定环境声音特征。The feedback microphone 153B can collect the sound signal in the ear canal. For example, after the audio signal played by the speaker is transmitted to the ear canal, the feedback microphone can collect the audio signal. For example, the audio signal can be the prompt audio signal mentioned below. The feedback microphone also picks up ambient sound signals around the headphones and sends them to the processor. This allows the processor to determine environmental sound characteristics based on the environmental sound signal.
通话麦克风153C可以采集耳机周围的环境声音信号,并将其发送至处理器。使得处理器可以基于该环境声音信号确定环境声音特征。The call microphone 153C can collect environmental sound signals around the headset and send them to the processor. This allows the processor to determine environmental sound characteristics based on the environmental sound signal.
扬声器154可以用于播放音频信号,例如提示音频信号。耳机可以通过扬声器154收听音乐,或收听通话。Speaker 154 may be used to play audio signals, such as prompt audio signals. The headset can be used to listen to music through the speaker 154, or to listen to phone calls.
本申请实施例中,该处理器151可以存储的计算机指令,以使得耳机执行本申请实施例中的耳机模式对应的参数确定方法。In this embodiment of the present application, the processor 151 can store computer instructions to cause the headset to execute the parameter determination method corresponding to the headset mode in the embodiment of the present application.
下面介绍本申请实施例提供的示例性终端。An exemplary terminal provided by the embodiment of this application is introduced below.
图5是本申请实施例提供的终端的结构示意图。Figure 5 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
下面以终端为例对实施例进行具体说明。应该理解的是,终端可以具有比图中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The following uses a terminal as an example to describe the embodiment in detail. It should be understood that the terminal may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application specific integrated circuits.
终端可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The terminal may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone interface 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194 and user identification Module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对终端的具体限定。在本申请另一些实施例中,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal. In other embodiments of the present application, the terminal may include more or fewer components than shown in the figures, or some components may be combined, or some components may be separated, or may be arranged differently. The components illustrated may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) wait. Among them, different processing units can be independent devices or integrated in one or more processors.
其中,控制器可以是终端的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。Among them, the controller can be the nerve center and command center of the terminal. The controller can generate operation control signals based on the instruction operation code and timing signals to complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have been recently used or recycled by processor 110 . If the processor 110 needs to use the instructions or data again, it can be called directly from the memory. Repeated access is avoided and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. Interfaces may include integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, pulse code modulation (pulse code modulation, PCM) interface, universal asynchronous receiver and transmitter (universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and /or universal serial bus (USB) interface, etc.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端的结构限定。在本申请另一些实施例中,终端也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present application are only schematic illustrations and do not constitute structural limitations on the terminal. In other embodiments of the present application, the terminal may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
终端的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
天线1和天线2用于发射和接收电磁波信号。终端中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in a terminal can be used to cover a single or multiple communication bands. Different antennas can also be reused to improve antenna utilization.
移动通信模块150可以提供应用在终端上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
调制解调处理器可以包括调制器和解调器。A modem processor may include a modulator and a demodulator.
无线通信模块160可以提供应用在终端上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), Bluetooth (bluetooth, BT), etc. applied to the terminal. . The wireless communication module 160 may be one or more devices integrating at least one communication processing module.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
终端可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。The terminal can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端可以通过扬声器170A收听音乐,或收听免提通话。 Speaker 170A, also called "speaker", is used to convert audio electrical signals into sound signals. The terminal can listen to music through the speaker 170A, or listen to hands-free calls.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。 Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the terminal answers a call or voice message, the voice can be heard by bringing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。麦克风可以采集环境声音信号,然后传输至处理器110,使得处理器110可以基于环境声音信号确定环境声音特征,然后通过无线网络(例如蓝牙)将该环境声音特征传输到耳机。 Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. The microphone can collect environmental sound signals and then transmit them to the processor 110, so that the processor 110 can determine environmental sound characteristics based on the environmental sound signals, and then transmit the environmental sound characteristics to the earphones through a wireless network (such as Bluetooth).
下面介绍本申请实施例涉及的通信系统。The communication system involved in the embodiment of this application is introduced below.
图6是本申请实施例提供的通信系统的结构示意图。Figure 6 is a schematic structural diagram of a communication system provided by an embodiment of the present application.
如图6所示,该通信系统包括耳机和终端。其中,耳机的示意性描述可以参考前述对图4的描述。终端的示意性描述可以参考前述对图5的描述。As shown in Figure 6, the communication system includes a headset and a terminal. For a schematic description of the earphones, reference may be made to the aforementioned description of FIG. 4 . For a schematic description of the terminal, reference may be made to the foregoing description of FIG. 5 .
无线网络用于为本申请实施例涉及的终端以及耳机提供各项服务,例如通信服务、连接服务、传输服务等。The wireless network is used to provide various services, such as communication services, connection services, transmission services, etc., for the terminals and headsets involved in the embodiments of this application.
无线网络包括:蓝牙(bluetooth,BT),无线局域网(wireless local area network,WLAN)技术、无线广域网(wirelesswide area network,WWAN)技术等。Wireless networks include: Bluetooth (BT), wireless local area network (WLAN) technology, wireless wide area network (WWAN) technology, etc.
耳机可以和终端通过无线网络建立连接,然后进行数据传输。The headset can establish a connection with the terminal through a wireless network and then transmit data.
例如,终端可以对耳机进行查找,当查找到耳机时,终端可以向耳机发送建立连接的请求,耳机接收到该请求后,可以与终端建立连接。耳机还可以将利用环境声音信号确定环境声音特征的指令通过无线网络传输至终端。终端可以基于环境声音信号确定环境声音特征,然后通过无线网络将该环境声音特征传输到耳机。For example, the terminal can search for the headset. When the headset is found, the terminal can send a connection establishment request to the headset. After receiving the request, the headset can establish a connection with the terminal. The headset can also transmit instructions for determining environmental sound characteristics using environmental sound signals to the terminal through the wireless network. The terminal can determine the environmental sound characteristics based on the environmental sound signals, and then transmit the environmental sound characteristics to the headset through the wireless network.
本申请实施例提供了一种耳机模式对应的参数确定方法。在该方法中,耳机中设置有模式设置数据库。该模式设置数据库中可以包括多个预设播放模型,其中,每一个预设播放模型还与耳机模式相对应,该耳机模式还对应预设听感以及调整参数(后文中可以称为参数),该调整参数为耳机的一种佩戴情况下以及一种耳道模型中该耳机模式能带给用户预设听感时的参数。也可以说该模式设置数据库中包括多个预设播放模型,其中,每一个预设播放模型还与至少一个参数(调整参数)对应,该至少一个参数中的每一个参数都对应一个耳机模式以及一个预设听感。The embodiment of the present application provides a method for determining parameters corresponding to the headphone mode. In this method, a mode setting database is provided in the headset. The mode setting database may include multiple preset playback models, where each preset playback model also corresponds to a headphone mode, and the headphone mode also corresponds to a preset hearing sense and adjustment parameters (hereinafter may be referred to as parameters), The adjustment parameters are parameters when the earphone mode can give the user a preset hearing sensation under a wearing condition of the earphone and an ear canal model. It can also be said that the mode setting database includes a plurality of preset playback models, wherein each preset playback model also corresponds to at least one parameter (adjustment parameter), and each parameter in the at least one parameter corresponds to a headphone mode and A default listening experience.
其中,预设播放模型是指播放前的提示音频信号与反馈音频信号之间的对比关系。该对比关系可以表示为播放前的提示音频信号以及反馈音频信号的频点能量比值的集合,频点能量比值为将播放前的提示音频信号以及反馈音频信号转化到频域上之后,播放前的提示音频信号以及反馈音频信号中相同频率的频点的总能量之比。Among them, the preset playback model refers to the contrast relationship between the prompt audio signal and the feedback audio signal before playback. This comparison relationship can be expressed as a set of frequency point energy ratios of the pre-playback prompt audio signal and the feedback audio signal. The frequency point energy ratio is the value of the pre-playback prompt audio signal and feedback audio signal after they are converted into the frequency domain. The ratio of the total energy of the same frequency points in the prompt audio signal and the feedback audio signal.
该预设播放模型可以反映耳机的佩戴情况以及用户的耳道模型对提示音频信号(播放 前的)的传输状况,也可以说该预设播放模型可以反映耳机的佩戴情况以及用户的耳道属于何种耳道模型。因为同一个提示音频信号(播放前的),在耳机的佩戴情况或者耳道模型不同的情况下,耳机播放该提示音频信号(播放前的,记作提示音频信号1)得到的反馈音频信号(记作参考音频信号1)不同,则基于参考音频信号1以及提示音频信号1确定的预设播放模型不同。The preset playback model can reflect the wearing condition of the earphones and the transmission condition of the prompt audio signal (before playing) by the user's ear canal model. It can also be said that the preset playback model can reflect the wearing condition of the earphones and the type of the user's ear canal. What kind of ear canal model. Because the same prompt audio signal (before playback), when the earphones are worn or the ear canal model is different, the feedback audio signal obtained by playing the prompt audio signal (before playback, recorded as prompt audio signal 1) by the headset ( Denoted as the reference audio signal 1) is different, the preset playback model determined based on the reference audio signal 1 and the prompt audio signal 1 is different.
在一些实施例中,播放前的提示音频信号可以为白噪声,耳机的扬声器可以对其进行播放。播放后的提示音频信号可以在耳道中进行传输,同时该播放后的提示音频信号还可以被耳机的反馈麦克风采集,得到反馈音频信号。该反馈音频信号中可以包括播放后的提示音频信号,还可以包括环境声音信号,当环境声音信号越嘈杂,则该反馈音频信号中包括的环境声音信号越多,能量越大。In some embodiments, the prompt audio signal before playing can be white noise, and the speaker of the earphone can play it. The played prompt audio signal can be transmitted in the ear canal, and at the same time, the played prompt audio signal can also be collected by the feedback microphone of the headset to obtain a feedback audio signal. The feedback audio signal may include a played prompt audio signal, and may also include an environmental sound signal. When the environmental sound signal is noisier, the feedback audio signal includes more environmental sound signals and has greater energy.
这里应该理解的是,耳机确定预设播放模型的过程通常是在安静环境中进行的,因此在确定预设播放模型的过程中涉及的反馈音频信号中通常不包括环境声音信号。因此环境声音信号不会影响预设播放模型的确定。It should be understood here that the process of determining the preset playback model by the headset is usually performed in a quiet environment, so the feedback audio signal involved in the process of determining the preset playback model usually does not include environmental sound signals. Therefore, the ambient sound signal will not affect the determination of the preset playback model.
其中一个示例性模式设置数据库可以参考下述表1。An exemplary mode setting database may be referred to Table 1 below.
预设播放模型Default playback model 耳机模式Headphone mode 预设听感Default listening feeling 调整参数Adjustment parameters
预设播放模型1Default playback model 1 主动降噪模式Active noise reduction mode middle 参数1Parameter 1
预设播放模型1 Default playback model 1 主动降噪模式Active noise reduction mode powerful 参数2Parameter 2
预设播放模型2Default playback model 2 主动降噪模式Active noise reduction mode middle 参数3Parameter 3
预设播放模型2Default playback model 2 主动降噪模式Active noise reduction mode powerful 参数4Parameter 4
…… …… …… ……
表1Table 1
如表1所示,该模式设置数据库中包括第一预设播放模型,其可以反映耳机的第一佩戴情况以及用户的耳道为第一耳道模型时对提示音频信号(播放前的)的传输状况。该第一预设播放模型与第一耳机模式对应,该第一耳机模式实现目标听感时对应的参数为第一参数。例如,该第一预设播放模式为预设播放模式1,其在实现主动降噪模式下的预设听感的情况下,其对应的调整参数为参数1。As shown in Table 1, the mode setting database includes a first preset playback model, which can reflect the first wearing situation of the earphones and the response to the prompt audio signal (before playback) when the user's ear canal is the first ear canal model. Transmission status. The first preset playback model corresponds to the first headphone mode, and the corresponding parameter when the first headphone mode achieves the target listening feeling is the first parameter. For example, the first preset playback mode is preset playback mode 1, and its corresponding adjustment parameter is parameter 1 when achieving the preset listening experience in active noise reduction mode.
其中,该第一预设播放模型为模式设置数据库中包括的全部预设播放模型的任意一个预设播放模型。该第一预设播放模型对应的耳机模式可以为不同耳机模式,例如主动降噪模式或者透传模式中的一个或多个。Wherein, the first preset playback model is any one of all preset playback models included in the mode setting database. The headphone mode corresponding to the first preset playback model may be one or more of different headphone modes, such as active noise reduction mode or transparent transmission mode.
基于前述描述可以知道,在耳机中设置了模式设置数据库的情况下,如果可以确定用户佩戴耳机的情况以及用户的耳道模型与预设播放模型A反映的耳机的佩戴情况以及耳道模型最相似,即该预设播放模型A为最匹配的预设播放模型。并且确定耳机模式以及目标听感的情况下,则可以基于该最匹配的预设播放模型确定该耳机模式以及目标听感对应的参数作为该耳机模式的参数处理音频信号,使得用户可以实现目标听感。Based on the foregoing description, it can be known that when a mode setting database is set up in the headset, if it can be determined that the user's wearing situation of the headset and the user's ear canal model are most similar to the wearing situation of the headset and the ear canal model reflected by the preset playback model A , that is, the default playback model A is the most matching default playback model. And when the headphone mode and the target listening feeling are determined, the parameters corresponding to the headphone mode and the target listening feeling can be determined based on the most matching preset playback model as the parameters of the headphone mode to process the audio signal, so that the user can achieve the target listening feeling. feel.
前述关于耳机模式、调整参数、耳道模型、耳机的佩戴情况以及目标听感的相关描述可以参考前述对术语的相关描述。For the aforementioned descriptions of headphone modes, adjustment parameters, ear canal models, headphone wearing conditions, and target listening sensations, please refer to the aforementioned descriptions of terminology.
用户在佩戴耳机之后,通常会设置耳机的耳机模式,然后耳机会播放提示音频信号以提示用户耳机佩戴好了,在耳机播放该提示音频信号之后,反馈麦克风可以采集该播放后 的提示音频信号得到参考音频信号。耳机可以基于该参考音频信号以及播放前的提示音频信号确定目标播放模型,然后基于该目标播放模型确定模式数据库中与其最匹配的预设播放模型。然后,耳机确定该最匹配的预设播放模型在该耳机模式下实现目标听感时对应的参数。After the user wears the headset, he usually sets the headphone mode of the headset, and then the headset plays a prompt audio signal to remind the user that the headset is worn. After the headset plays the prompt audio signal, the feedback microphone can collect the played prompt audio signal to obtain Reference audio signal. The headset can determine the target playback model based on the reference audio signal and the prompt audio signal before playback, and then determine the preset playback model in the pattern database that best matches it based on the target playback model. Then, the headset determines the parameters corresponding to the most matching preset playback model to achieve the target listening experience in the headset mode.
应该理解的是,由于在确定预设播放模型的过程通常是在安静环境下进行的,但是在实际使用的过程中,耳机确定目标播放模型时往往会受到环境声音信号的干扰。该干扰表现在:在耳机播放提示音频信号时,该播放后的提示音频信号在耳道中传输使得反馈麦克风可以采集该播放后的提示音频信号得到反馈音频信号,但是由于环境声音信号(外界的,例如耳机周围的)中的部分环境声音信号也会进入耳道中则反馈麦克风获取的反馈音频信号中可以包括该部分进入耳道的环境声音信号,该进入耳道的环境声音信号可以被称为反馈环境声音信号。由于反馈音频信号中不仅包括了播放后的提示音频信号还包括反馈环境声音信号(当环境声音信号越嘈杂,则该反馈音频信号中包括的反馈环境声音信号越多,能量越大),则利用该反馈音频信号计算目标播放模型时则不准确,会受到反馈环境声音信号的干扰。则可以通过调整反馈音频信号中包括的提示音频信号的能量,使得其比反馈环境声音信号的能量大从而降低该反馈环境声音信号对参考调整提示音频信号中的能量占比以减少环境声音信号对生成目标播放模型的干扰。则可以在确定目标播放模型的过程中对默认提示音频信号进行调整以减少环境声音信号的干扰,该过程可以参考下述描述。It should be understood that since the process of determining the preset playback model is usually carried out in a quiet environment, during actual use, the headset is often interfered by environmental sound signals when determining the target playback model. This interference is manifested in: when the headset plays the prompt audio signal, the played prompt audio signal is transmitted in the ear canal so that the feedback microphone can collect the played prompt audio signal to obtain the feedback audio signal. However, due to the environmental sound signal (external, For example, part of the ambient sound signal in the ear canal (around the earphone) will also enter the ear canal. The feedback audio signal obtained by the feedback microphone may include this part of the ambient sound signal entering the ear canal. The environmental sound signal entering the ear canal may be called feedback. Environmental sound signals. Since the feedback audio signal not only includes the played prompt audio signal but also the feedback environmental sound signal (when the environmental sound signal is noisier, the feedback audio signal includes more feedback environmental sound signals and the greater the energy), then use The feedback audio signal is inaccurate when calculating the target playback model and will be interfered by the feedback environmental sound signal. Then the energy of the prompt audio signal included in the feedback audio signal can be adjusted to make it larger than the energy of the feedback environmental sound signal, thereby reducing the feedback environmental sound signal to the reference. Adjust the energy proportion of the prompt audio signal to reduce the environmental sound signal's contribution to the reference. Generate interference in the target playback model. In the process of determining the target playback model, the default prompt audio signal can be adjusted to reduce the interference of the environmental sound signal. For this process, please refer to the following description.
耳机可以采集环境声音信号将其转化为第一环境音频信号,然后基于该第一环境音频信号确定环境声音特征。该环境声音特征可以反映环境嘈杂程度(即可以反映环境声音信号的能量大小,还可以包括环境声音信号在不同频段的能量分布),耳机基于该环境声音特征可以对默认提示音频信号进行调整,使得调整后的提示音频信号可以随着环境嘈杂程度变化(即可以随着环境声音信号的能量变化),该变化包括:当环境嘈杂时(即环境声音信号的能量越大时),该调整后的提示音频信号可以相对于默认提示音频信号的能量变大,使得用户听到的调整后的提示音频信号相对于默认提示音频信号分贝(能量)更大。则调整后的提示音频信号相对于默认提示音频信号能量变大,那么在播放该调整后的提示音频信号得到反馈音频信号中包括的反馈环境声音信号的能量可以小于其包括的提示音频信号的能量从而使得反馈音频信号中包括的主要是提示音频信号而不受环境声音信号的影响,这样,环境声音信号不会影响目标播放模型的生成,即保证目标播放模型是调整后的提示音频信号以及反馈音频信号中相同频率的频点的总能量之比,而不会受环境声音信号的影响产生较大误差。当环境安静时(即环境声音信号的能量越小时),该调整后的提示音频信号可以相对于默认提示音频信号的能量变小,使得用户听到的调整后的提示音频信号分贝(能量)适中,不会因为提示音频信号的能量较大而引起不适。The earphone can collect the environmental sound signal and convert it into a first environmental audio signal, and then determine the environmental sound characteristics based on the first environmental audio signal. The environmental sound characteristics can reflect the degree of environmental noise (that is, it can reflect the energy level of the environmental sound signal, and can also include the energy distribution of the environmental sound signal in different frequency bands). The headset can adjust the default prompt audio signal based on the environmental sound characteristics, so that The adjusted prompt audio signal can change with the degree of environmental noise (that is, it can change with the energy of the environmental sound signal). The changes include: when the environment is noisy (that is, when the energy of the environmental sound signal is greater), the adjusted The energy of the prompt audio signal may become larger relative to the default prompt audio signal, so that the adjusted prompt audio signal heard by the user has greater decibel (energy) relative to the default prompt audio signal. Then the energy of the adjusted prompt audio signal becomes larger than that of the default prompt audio signal. Then the energy of the feedback environment sound signal included in the feedback audio signal obtained by playing the adjusted prompt audio signal can be smaller than the energy of the prompt audio signal included therein. As a result, the feedback audio signal mainly includes the prompt audio signal and is not affected by the environmental sound signal. In this way, the environmental sound signal will not affect the generation of the target playback model, that is, it is ensured that the target playback model is the adjusted prompt audio signal and feedback The ratio of the total energy of frequency points of the same frequency in the audio signal without being affected by environmental sound signals to produce large errors. When the environment is quiet (that is, the energy of the ambient sound signal is smaller), the adjusted prompt audio signal can be smaller in energy relative to the default prompt audio signal, so that the decibel (energy) of the adjusted prompt audio signal heard by the user is moderate. , will not cause discomfort due to the large energy of the prompt audio signal.
其中,该环境声音特征中可以包括第一环境音频信号中环境声音信号在不同频段的能量占比、环境声音信号的绝对能量、环境声音信号的相对能量中的一个或者多个,关于环境声音频特征的描述可以参考后文中对步骤S102的详细描述,此处暂不赘述。The environmental sound characteristics may include one or more of the energy proportions of the environmental sound signals in different frequency bands in the first environmental audio signal, the absolute energy of the environmental sound signals, and the relative energy of the environmental sound signals. Regarding the environmental sound audio For the description of the features, please refer to the detailed description of step S102 later, which will not be described again here.
该环境声音信号的能量可以利用环境声音特征中包括的环境声音信号的绝对能量以及相对能量来表征。其中,能量可以用于表示该音频信号对应的电压大小;也可以表示该音频信号的幅值大小;或者分贝大小。The energy of the environmental sound signal can be characterized by the absolute energy and relative energy of the environmental sound signal included in the environmental sound characteristics. Among them, energy can be used to represent the voltage corresponding to the audio signal; it can also represent the amplitude of the audio signal; or the decibel size.
应该理解的是,此处涉及的环境声音特征与下文涉及的目标环境声音特征相同。It should be understood that the environmental sound characteristics referred to here are the same as the target environmental sound characteristics referred to below.
图7为本申请实施例中耳机模式对应的参数确定方法的一个示意性流程图。Figure 7 is a schematic flow chart of a method for determining parameters corresponding to the headphone mode in the embodiment of the present application.
本申请实施例中,耳机确定耳机模式及该耳机模式对应的参数,基于该耳机模式及其对应的参数处理音频信号显示目标听感的过程可以参考下述对步骤S101-步骤S111的描述。In this embodiment of the present application, the headset determines the headphone mode and the parameters corresponding to the headphone mode. The process of processing the audio signal based on the headphone mode and its corresponding parameters to display the target listening feeling can refer to the following description of steps S101 to S111.
S101.耳机确定耳机出盒之后,该耳机获取第一环境音频信号。S101. After the headset determines that the headset comes out of the box, the headset obtains the first environmental audio signal.
第一环境音频信号为耳机的麦克风在第一时间段内采集的环境声音信号转换而来音频信号,该第一环境音频信号中包括X帧音频信号,其中X为大于等于1的正整数。则该第一环境音频信号中可以包括环境声音信号。The first environmental audio signal is an audio signal converted from the environmental sound signal collected by the microphone of the headset in the first time period. The first environmental audio signal includes X frames of audio signals, where X is a positive integer greater than or equal to 1. Then the first environmental audio signal may include an environmental sound signal.
其中,第一时间段为耳机确定出盒之后的一段时间,例如0.5S、1S或者2S等,本申请实施例对该第一时间段的长短不作限定,可以根据实际情况进行调整。The first time period is a period of time after the earphones are determined to be taken out of the box, such as 0.5S, 1S or 2S. The embodiment of the present application does not limit the length of the first time period and can be adjusted according to actual conditions.
麦克风可以为耳机中的任意一个麦克风,例如可以为前馈麦克风、反馈麦克风以及通话麦克风中的任意一个,本申请实施例对此不作限定。The microphone may be any microphone in an earphone, for example, it may be any one of a feedforward microphone, a feedback microphone, and a call microphone, which is not limited in the embodiments of the present application.
具体的,第一时间段内,耳机的麦克风可以采集环境声音信号,然后将该环境声音信号转换为模拟的电信号。然后耳机对该模拟的电信号进行采样,将其转化为时域上的音频信号。该时域上的音频信号为数字音频信号,为W个模拟的电信号的采样点。耳机中可以用数组表示该第一环境音频信号,数组中的任一个元素用于表示一个采样点,任一元素包括两个值,其中一个值表示时间,另一个值表示该时间对应音频信号的幅值,该幅值用于表示该音频信号对应的电压大小。Specifically, during the first period of time, the microphone of the headset can collect environmental sound signals, and then convert the environmental sound signals into analog electrical signals. The headphones then sample the simulated electrical signal and convert it into an audio signal in the time domain. The audio signal in this time domain is a digital audio signal, which is a sampling point of W analog electrical signals. The first environmental audio signal can be represented by an array in the headset. Any element in the array is used to represent a sampling point. Any element includes two values, one of which represents the time, and the other value represents the time corresponding to the audio signal. Amplitude, which is used to represent the voltage corresponding to the audio signal.
应该理解的是,在耳机配置有充电盒(也可以被称为充电仓或者容纳盒等)的情况下,可以执行该步骤S101以获取第一环境音频信号。在耳机没有配置充电盒的情况下,可以执行其他步骤以获取第一环境音频信号,例如当耳机检测到入耳操作时,则可以触发耳机获取第一环境音频信号。It should be understood that, in the case where the earphones are equipped with a charging box (which may also be called a charging compartment or a storage box, etc.), step S101 can be performed to obtain the first environmental audio signal. When the headset is not equipped with a charging box, other steps can be performed to obtain the first environmental audio signal. For example, when the headset detects an in-ear operation, the headset can be triggered to obtain the first environmental audio signal.
耳机确定出盒为耳机检测到出盒操作,即耳机检测到耳机离开充电盒的操作,耳机确定耳机离开充电盒的时机包括但不限于以下:The headset determines that the headset has left the box when the headset detects the out-of-box operation, that is, the headset detects the operation of the headset leaving the charging box. The timing for the headset to determine that the headset leaves the charging box includes but is not limited to the following:
时机1:耳机置于充电盒中时,耳机可以通过连接触点与充电盒中包括的金属探针进行连接以实现充电盒可以与耳机进行充电等操作,当耳机检测到该连接触点与金属探针分离时,耳机可以确定耳机离开了充电盒,响应于该出盒操作,该耳机可以开始采集环境音频信号,将其转化为电信号作为第一环境音频信号,则该第一环境音频信号中包括了环境音频信号。其中,在一些可能的情况下,连接触点可以设置在耳机的表面,金属探针可以设置在充电盒的内壁。Opportunity 1: When the earphones are placed in the charging box, the earphones can be connected to the metal probe included in the charging box through the connection contact so that the charging box can charge the earphones. When the earphones detect that the connection contact is in contact with the metal When the probe is separated, the earphone can determine that the earphone has left the charging box. In response to the operation of taking out the box, the earphone can start to collect the environmental audio signal and convert it into an electrical signal as the first environmental audio signal. Then the first environmental audio signal Ambient audio signals are included. Among them, in some possible cases, the connection contacts can be set on the surface of the earphones, and the metal probes can be set on the inner wall of the charging box.
时机2:当耳机检测到停止充电时,耳机可以确定耳机出盒,该耳机可以获取第一环境音频信号。Opportunity 2: When the headset detects that charging has stopped, the headset can determine that the headset is out of the box, and the headset can obtain the first environmental audio signal.
该步骤S101是可选的,在一些可能的情况下,当耳机检测到入耳操作时,可以触发耳机获取第一环境音频信号。This step S101 is optional. In some possible cases, when the earphone detects an in-ear operation, the earphone can be triggered to acquire the first environmental audio signal.
S102.耳机基于该第一环境音频信号确定第一环境声音特征。S102. The earphone determines the first environmental sound feature based on the first environmental audio signal.
在步骤S102中,耳机可以将该第一环境音频信号从时域转换到频域上,得到频域上的第一环境音频信号。然后基于该频域上的第一环境音频信号计算第一环境声音特征。在一种可能的实现方式中,耳机可以利用快速傅里叶函数(fast fourier transform,FFT)将第一环境音频信号从时域转换到频域上。In step S102, the earphone can convert the first environmental audio signal from the time domain to the frequency domain to obtain the first environmental audio signal in the frequency domain. Then the first environmental sound feature is calculated based on the first environmental audio signal in the frequency domain. In a possible implementation, the headset can use a fast Fourier transform (FFT) to convert the first environmental audio signal from the time domain to the frequency domain.
应该理解的是,时域上的第一环境音频信号以及频域上的第一环境音频信号只是表示形式不同,但是都是包括了环境声音信号的第一环境音频信号。It should be understood that the first environmental audio signal in the time domain and the first environmental audio signal in the frequency domain only have different representation forms, but they are both the first environmental audio signal including the environmental sound signal.
其中,频域上的第一环境音频信号中的任一帧环境音频信号都可以表示为N(N为2的整数次方)个频点,例如N可以为1024、2048等,具体大小可以由耳机的计算能力决定。该N个频点用于表示一定频率范围内的音频信号,例如0khz-15khz之间,也可以为其他的频率范围。也可以理解为,该频点指代的是在对应频率上的第一环境音频信号的信息,该信息包括时间,环境声音信号的频率,以及环境声音信号的能量(分贝或者幅值)大小,其中,能量可以用于表示该环境声音信号对应的电压大小;也可以表示该环境声音信号的幅值大小;或者环境声音信号的分贝大小。任意两帧环境音频信号中的N个频点的频率分布是相同的,即第一环境音频信号中第j帧音频信号的第i个频点的频率与第j+1帧音频信号的第i个频点的频率相同。Among them, any frame of the environmental audio signal in the first environmental audio signal in the frequency domain can be expressed as N (N is an integer power of 2) frequency points. For example, N can be 1024, 2048, etc., and the specific size can be expressed by The computing power of the headset determines. The N frequency points are used to represent audio signals within a certain frequency range, such as between 0khz and 15khz, or other frequency ranges. It can also be understood that the frequency point refers to the information of the first environmental audio signal at the corresponding frequency, which information includes time, frequency of the environmental sound signal, and energy (decibel or amplitude) of the environmental sound signal, Among them, energy can be used to represent the voltage corresponding to the environmental sound signal; it can also represent the amplitude of the environmental sound signal; or the decibel size of the environmental sound signal. The frequency distribution of the N frequency points in any two frames of environmental audio signals is the same, that is, the frequency of the i-th frequency point of the j-th frame audio signal in the first environmental audio signal is the same as the i-th frequency point of the j+1-th frame audio signal. The frequencies of the frequency points are the same.
图8示出了频域上的第一环境音频信号。Figure 8 shows the first ambient audio signal in the frequency domain.
该频域上的第一环境音频信号中可以包括X帧频域上的音频信号。其中任一帧频域上的音频信号可以为N个频点。例如,区域801中包括第一环境音频信号中第一帧音频信号对应的N个频点,区域802中包括第一环境音频信号中第二帧音频信号对应的N个频点,区域803中包括第一环境音频信号中第X帧音频信号对应的N个频点。The first environmental audio signal in the frequency domain may include audio signals in the X frame frequency domain. The audio signal in the frequency domain of any frame can be N frequency points. For example, area 801 includes N frequency points corresponding to the first frame audio signal in the first environmental audio signal, area 802 includes N frequency points corresponding to the second frame audio signal in the first environmental audio signal, and area 803 includes N frequency points corresponding to the X-th frame audio signal in the first environmental audio signal.
结合图8对一种示例性环境声音特征进行描述。An exemplary ambient sound signature is described with reference to FIG. 8 .
第一环境声音特征中可以包括第一环境音频信号中环境声音信号的绝对能量、该环境声音信号在不同频段的能量占比、该环境声音信号的相对能量中的一个或者多个。The first environmental sound feature may include one or more of the absolute energy of the environmental sound signal in the first environmental audio signal, the energy proportion of the environmental sound signal in different frequency bands, and the relative energy of the environmental sound signal.
应该理解的是,第一环境声音特征可以反映环境嘈杂程度。可以表现在:绝对能量或者相对能量越大,则环境越嘈杂。该环境声音信号在不同频段的能量占比体现了环境声音在不同频段的能量分布情况。It should be understood that the first environmental sound characteristic may reflect the environmental noisy level. It can be expressed as: the greater the absolute energy or relative energy, the noisier the environment. The energy proportion of the environmental sound signal in different frequency bands reflects the energy distribution of the environmental sound in different frequency bands.
第一环境音频信号中环境声音信号的绝对能量中包括频域上的第一环境音频信号中全部频点的能量,其描述的是第一环境音频信号中环境声音信号的能量大小。其中,耳机确定该第一环境音频信号中环境声音信号的绝对能量的相关公式可以参考下述公式(1)。The absolute energy of the ambient sound signal in the first ambient audio signal includes the energy of all frequency points in the first ambient audio signal in the frequency domain, which describes the energy level of the ambient sound signal in the first ambient audio signal. The relevant formula for the earphone to determine the absolute energy of the environmental sound signal in the first environmental audio signal may refer to the following formula (1).
Figure PCTCN2022105500-appb-000001
Figure PCTCN2022105500-appb-000001
其中,T表示第一环境音频信号中环境声音信号的绝对能量。w={w∈N+|1≤w≤X},该第一环境音频信号中包括X帧频域上的音频信号,S(w)表示第一环境音频信号中第w帧音频信号(频域上的)的能量。该第w帧音频信号的能量可以为其中每一个频点的能量之和。Wherein, T represents the absolute energy of the environmental sound signal in the first environmental audio signal. w={w∈N+|1≤w≤X}, the first environmental audio signal includes the X-frame audio signal in the frequency domain, S(w) represents the w-th frame audio signal (frequency domain) in the first environmental audio signal ) energy. The energy of the w-th frame audio signal may be the sum of the energy of each frequency point.
第一环境音频信号中环境声音信号在不同频段的能量占比中包括第一频段的能量占比。该第一频段是指将第一环境音频信号的频率划分成不同的频段后其中的一个频段,一 个频段就是环境音频信号的频率的一个子区间。如图8所示,第一频段可以表示为频率w 1至频率w 2,该第一频段的能量占比表示第一环境音频信号中频率为w 1至w 2的音频信号包括的全部频点的能量与绝对能量之比。该频率为w 1至w 2的音频信号包括第一环境音频信号中每一帧中频率为w 1至w 2的音频信号。其中,耳机确定该第一环境音频信号中环境声音信号在第一频段的能量占比的公式可以参考下述公式(2)。 The energy proportion of the environmental sound signal in different frequency bands in the first environmental audio signal includes the energy proportion of the first frequency band. The first frequency band refers to one of the frequency bands after dividing the frequency of the first environmental audio signal into different frequency bands, and one frequency band is a sub-range of the frequency of the environmental audio signal. As shown in Figure 8, the first frequency band can be expressed as frequency w 1 to frequency w 2. The energy proportion of the first frequency band represents all frequency points included in the audio signal with frequencies w 1 to w 2 in the first environmental audio signal. The ratio of energy to absolute energy. The audio signals with frequencies w 1 to w 2 include audio signals with frequencies w 1 to w 2 in each frame of the first environmental audio signal. Wherein, the formula for the earphone to determine the energy proportion of the environmental sound signal in the first frequency band in the first environmental audio signal can refer to the following formula (2).
Figure PCTCN2022105500-appb-000002
Figure PCTCN2022105500-appb-000002
公式(2)中,P(w 1~w 2)表示第一环境音频信号中环境声音信号在第一频段的能量占比。S(w 1~w 2)表示第一环境音频信号中频率为w 1至w 2的音频信号的能量,可以为第一环境音频信号中频率为w 1至w 2的音频信号中每一个频点的能量之和。 In formula (2), P(w 1 ~ w 2 ) represents the energy proportion of the environmental sound signal in the first frequency band in the first environmental audio signal. S(w 1 ~ w 2 ) represents the energy of the audio signal with the frequency w 1 to w 2 in the first environmental audio signal, and can be each frequency of the audio signal with the frequency w 1 to w 2 in the first environmental audio signal. The sum of the energy of the points.
第一环境音频信号中环境声音信号的相对能量中包括频域上的第一环境音频信号中全部频点计权后的能量。因为人耳对不同频率的音频信号的敏感程度或者主观感受不同。因此需要对不同频率的音频信号的能量进行加权修正,使得人耳敏感程度越大的音频信号的计权(可以理解为是权重)更大,则该人耳敏感程度越大的音频信号的能量对相对能量的贡献越大。其中,耳机确定该第一环境音频信号中环境声音信号的绝对能量的相关公式可以参考下述公式(3)。The relative energy of the environmental sound signal in the first environmental audio signal includes the weighted energy of all frequency points in the first environmental audio signal in the frequency domain. Because human ears have different sensitivity or subjective feelings to audio signals of different frequencies. Therefore, it is necessary to perform a weighted correction on the energy of audio signals of different frequencies, so that the weighting (can be understood as a weight) of the audio signal with greater human ear sensitivity is greater, then the energy of the audio signal with greater human ear sensitivity is The greater the contribution to relative energy. The relevant formula for the earphone to determine the absolute energy of the environmental sound signal in the first environmental audio signal can refer to the following formula (3).
Figure PCTCN2022105500-appb-000003
Figure PCTCN2022105500-appb-000003
其中,H表示第一环境音频信号中环境声音信号的相对能量。w={w∈N+|1≤w≤X},该第一环境音频信号中包括X帧频域上的音频信号,S*F_weight(w)表示第一环境音频信号中第w帧音频信号(频域上的)计权后的能量。该第w帧音频信号计权后的能量可以为其中每一个频点计权后的能量之和。F_weight为计权滤波器,该计权滤波器的作用在于对该第w帧音频信号中的频点的能量进行计权,对不同频率的频点的能量进行调整,使得人耳越敏感的频率上的频点的能量变大,对该相对能量的贡献变大。Wherein, H represents the relative energy of the environmental sound signal in the first environmental audio signal. w={w∈N+|1≤w≤X}, the first environmental audio signal includes the audio signal in the frequency domain of the X frame, and S*F_weight(w) represents the w-th frame audio signal in the first environmental audio signal ( (frequency domain) weighted energy. The weighted energy of the w-th frame audio signal may be the sum of the weighted energy of each frequency point. F_weight is a weighting filter. The function of this weighting filter is to weight the energy of frequency points in the w-th frame audio signal and adjust the energy of frequency points at different frequencies to make the human ear more sensitive to the frequency. The energy of the frequency point above becomes larger, and the contribution to the relative energy becomes larger.
在一些可能的实现方式中,步骤S102中获取的第一环境声音特征可以用于下述步骤S105中确定目标环境声音特征。耳机可以利用该目标环境声音特征反映环境嘈杂程度。为了提高目标环境声音特征反映的环境嘈杂程度的准确性以及鲁棒性。还可以通过终端获取的第二环境音频信号确定第二环境声音特征,然后耳机可以获取该第二环境声音特征,基于该第一环境声音特征以及第二环境声音特征进行结合,确定目标环境声音特征。该过程可以参考下述对步骤S103-步骤S105的描述。In some possible implementations, the first environmental sound feature obtained in step S102 may be used to determine the target environmental sound feature in the following step S105. The earphones can use the target environmental sound characteristics to reflect the noisy level of the environment. In order to improve the accuracy and robustness of the environmental noisy level reflected by the target environment sound characteristics. The second environmental sound characteristics can also be determined through the second environmental audio signal obtained by the terminal, and then the headset can obtain the second environmental sound characteristics, and combine the first environmental sound characteristics and the second environmental sound characteristics to determine the target environmental sound characteristics. . For this process, please refer to the following description of steps S103 to S105.
S103.耳机通知终端获取第二环境声音特征,该终端与耳机连接。S103. The headset notifies the terminal to obtain the second environmental sound characteristics, and the terminal is connected to the headset.
该步骤S103是可选的。This step S103 is optional.
耳机确定与耳机连接(例如通过蓝牙等方式进行连接)的终端,向该终端发送获取第二环境声音特征的通知,以使得该终终端执行下述步骤S104。The headset determines the terminal connected to the headset (for example, through Bluetooth or other means), and sends a notification to obtain the second environmental sound characteristics to the terminal, so that the terminal executes the following step S104.
应该理解的是,步骤S102以及步骤S103的执行顺序没有先后之分,耳机可以先执行步骤S102再执行步骤S103,可以先执行步骤S103再执行步骤S102,也可以同时执行,本申请实施例对此不作限定。It should be understood that there is no order of execution of step S102 and step S103. The headset can execute step S102 first and then step S103, it can execute step S103 first and then step S102, or it can also be executed at the same time. In this embodiment of the present application, Not limited.
S104.终端获取第二环境音频信号,基于该第二环境音频信号确定第二环境声音特征并将该第二环境声音特征发送至耳机。S104. The terminal obtains the second environmental audio signal, determines the second environmental sound feature based on the second environmental audio signal, and sends the second environmental sound feature to the headset.
在前述步骤S103执行了的情况下,终端可以执行步骤S104。In the case where the aforementioned step S103 is executed, the terminal may execute step S104.
第二环境音频信号为终端的麦克风在第二时间段内采集的环境声音信号转换而来音频信号,该第二环境音频信号中包括L帧音频信号,其中L为大于等于1的正整数。则该第二环境音频信号中可以包括环境声音信号。该第二环境音频信号可以与前述涉及的第一环境音频信号中包括的音频信号的帧数相同也可以不同。The second environmental audio signal is an audio signal converted from the environmental sound signal collected by the terminal's microphone in the second time period. The second environmental audio signal includes L frames of audio signals, where L is a positive integer greater than or equal to 1. Then the second environmental audio signal may include an environmental sound signal. The second ambient audio signal may have the same number of frames as or may be different from the audio signal included in the aforementioned first ambient audio signal.
其中,该第二时间段可以与前述的第一时间段相同也可以不同。第二时间段为终端确定耳机出盒之后的一段时间。例如0.5S、1S或者2S等,本申请实施例对该第二时间段的长短不作限定,可以根据实际情况进行调整。The second time period may be the same as or different from the aforementioned first time period. The second time period is a period of time after the terminal determines that the headset comes out of the box. For example, 0.5S, 1S or 2S, etc. The embodiment of the present application does not limit the length of the second time period and can be adjusted according to the actual situation.
麦克风可以为终端中的任意一个麦克风,例如可以为顶部麦克风、底部麦克风以及背部麦克风中的任意一个,本申请实施例对此不作限定。The microphone may be any microphone in the terminal, for example, it may be any one of a top microphone, a bottom microphone, and a back microphone, which is not limited in the embodiments of the present application.
终端基于该第二环境音频信号确定第二环境声音特征的过程与耳机基于第一环境音频信号确定第一环境声音特征的过程相同,可以参考前述步骤S102中的相关描述,此处不再赘述。The process by which the terminal determines the second environmental sound characteristics based on the second environmental audio signal is the same as the process by which the headset determines the first environmental sound characteristics based on the first environmental audio signal. Reference may be made to the relevant description in step S102, which will not be described again here.
应该理解的是,第二环境声音特征中可以包括第二环境音频信号中环境声音信号的绝对能量、该环境声音信号在不同频段的能量占比、该环境声音信号的相对能量中的一个或者多个。该第二环境声音特征与第一环境声音特征都可以反映环境嘈杂程度。对第二环境声音特征的详细介绍可以参考前述对第一环境声音特征的示例性描述,此处不再赘述。It should be understood that the second environmental sound feature may include one or more of the absolute energy of the environmental sound signal in the second environmental audio signal, the energy proportion of the environmental sound signal in different frequency bands, and the relative energy of the environmental sound signal. indivual. Both the second environmental sound feature and the first environmental sound feature can reflect the level of environmental noise. For a detailed introduction to the characteristics of the second environmental sound, please refer to the foregoing exemplary description of the characteristics of the first environmental sound, which will not be described again here.
S105.耳机基于第一环境声音特征以及第二环境声音特征或者耳机基于第一环境声音特征确定目标环境声音特征,该目标环境声音特征可以反映环境嘈杂程度。S105. The headset determines the target environmental sound feature based on the first environmental sound feature and the second environmental sound feature, or the headset determines the target environmental sound feature based on the first environmental sound feature. The target environmental sound feature can reflect the degree of environmental noise.
目标环境声音特征可以反映该环境嘈杂程度表现为:目标环境声音特征中环境声音信号的绝对能量和/或相对能量越大,则环境越嘈杂。目标环境声音特征中环境声音信号的绝对能量和/或相对能量越小,则环境越安静。The target environmental sound characteristics can reflect the noisy level of the environment as follows: the greater the absolute energy and/or relative energy of the environmental sound signal in the target environmental sound characteristics, the noisier the environment. The smaller the absolute energy and/or the relative energy of the environmental sound signal in the target environmental sound feature, the quieter the environment.
在终端未执行前述步骤S103以及步骤S104的情况下,则步骤S105中,耳机可以基于第一环境声音特征确定目标环境声音特征。具体的,耳机可以将第一环境声音特征确定为目标环境声音特征。If the terminal does not perform the aforementioned steps S103 and S104, then in step S105, the headset may determine the target environmental sound characteristics based on the first environmental sound characteristics. Specifically, the headset may determine the first environmental sound feature as the target environmental sound feature.
在终端执行了前述步骤S103以及步骤S104的情况下,则步骤S105中,耳机可以基于第一环境声音特征以及第二环境声音特征确定目标环境声音特征。耳机确定目标环境声音特征的过程可以参考下述描述。In the case where the terminal performs the aforementioned steps S103 and S104, in step S105, the headset may determine the target environmental sound characteristics based on the first environmental sound characteristics and the second environmental sound characteristics. The process of earphones determining the sound characteristics of the target environment can be referred to the following description.
在一些可能的情况下,耳机可以确定第一环境声音特征以及第二环境声音特征中绝对能量或者相对能量更大的作为目标环境声音特征。In some possible cases, the earphones may determine the one with greater absolute energy or relative energy among the first environmental sound feature and the second environmental sound feature as the target environmental sound feature.
在另一些可能的情况下,耳机可以基于第一环境声音特征以及第二环境声音特征设置 不同的权重后进行融合,将融合的结果作为目标环境声音特征。In other possible cases, the earphones can set different weights based on the first environmental sound feature and the second environmental sound feature and perform fusion, and use the fusion result as the target environmental sound feature.
特殊的,在第一环境声音特征与第二环境声音特征相同的情况下,耳机还可以将第一环境声音特征或者第二环境声音特征作为目标环境声音特征。Specifically, when the first environmental sound feature and the second environmental sound feature are the same, the headset may also use the first environmental sound feature or the second environmental sound feature as the target environmental sound feature.
S106.耳机检测到选择耳机模式的操作,确定耳机模式以及该耳机模式对应的默认提示音频信号。S106. The headset detects the operation of selecting the headset mode, and determines the headset mode and the default prompt audio signal corresponding to the headset mode.
该步骤S106是可选的。This step S106 is optional.
不同耳机模式对应的默认提示音频信号可不同且可以与其对应的耳机模式相关。例如,主动降噪模式对应的默认提示音频信号可以为:“已选择主动降噪模式”等。透传模式对应的默认提示音频信号可以为:“已选择透传模式”等。默认提示音频信号的作用在于提示用户当前耳机已经佩戴好了或者耳机的耳机模式,其具体内容本申请实施例不作限定。The default prompt audio signals corresponding to different headphone modes may be different and may be related to their corresponding headphone modes. For example, the default prompt audio signal corresponding to the active noise reduction mode can be: "Active noise reduction mode has been selected", etc. The default prompt audio signal corresponding to the transparent transmission mode can be: "Transparent transmission mode has been selected", etc. The function of the default prompt audio signal is to prompt the user that the current headset has been worn or the headset mode of the headset, and its specific content is not limited in the embodiments of this application.
在一种可能的实现方式中,耳机可以为用户提供选择耳机模式的方式。例如,在耳机上设置选择耳机模式时涉及的触点。该触点可以用于检测用户选择耳机模式时涉及的操作。例如,耳机可以设置当检测到用户连续两次触摸触点时,可以确定用户选择的耳机模式为主动降噪模式;在检测到用户连续三次触摸触点时,可以确定用户选的耳机模式为透传模式等。其中,连续是指相邻两次触摸触点的时间间隔在预设时间阈值内,例如0.5s等。其中,用户触摸触点可以包括点击触点。In one possible implementation, the headset can provide the user with a way to select the headset mode. For example, set the contacts on the headset that are involved in selecting headphone mode. This contact can be used to detect actions involved when the user selects headphone mode. For example, the headset can be set to determine that the headphone mode selected by the user is the active noise reduction mode when it detects that the user touches the contact point twice in succession; and that it determines that the headphone mode selected by the user is transparent when it detects that the user touches the contact point three times in a row. transmission mode, etc. Continuous means that the time interval between two adjacent touches is within a preset time threshold, such as 0.5s. Wherein, the user touching the contact point may include clicking the contact point.
耳机检测到选择耳机模式的操作,响应于该操作,可以确定该操作对应的耳机模式。然后,耳机可以确定该耳机模式对应的默认提示音频信号。The headset detects the operation of selecting the headset mode, and in response to the operation, the headset mode corresponding to the operation can be determined. The headset can then determine the default prompt audio signal corresponding to that headset mode.
应该理解的是,在一些可能的情况下,如果步骤S106没有执行,即用户没有选择耳机模式的情况下,耳机可以从多个耳机模式选择一个耳机模式(后文中可以被称为耳机模式A)作为耳机的耳机模式,并且选择该耳机模式A对应的默认提示音频信号。该耳机模式A可以为上一次被用户选择的耳机模式,也可以在一段时间内(例如10天)用户使用时间最长的耳机模式。It should be understood that in some possible cases, if step S106 is not executed, that is, if the user does not select a headphone mode, the headset can select one headphone mode from multiple headphone modes (hereinafter may be referred to as headphone mode A). As the headphone mode of the headset, and select the default prompt audio signal corresponding to the headphone mode A. The headphone mode A may be the headphone mode selected by the user last time, or may be the headphone mode used longest by the user within a period of time (for example, 10 days).
在另一些可能的情况下,如果步骤S106没有执行。耳机可以不选择任何耳机模式,此时默认提示音频信号可以不与任何耳机模式相关,其作用在于提示用户耳机已经佩戴好。此时,该默认提示音频信号可以为“叮”也可以为其他内容。In other possible situations, if step S106 is not executed. The headset does not need to select any headset mode. At this time, the default prompt audio signal does not need to be related to any headset mode. Its function is to remind the user that the headset has been worn. At this time, the default prompt audio signal can be "ding" or other content.
S107.耳机基于目标环境声音特征对默认提示音频信号进行调整得到调整后的提示音频信号,该调整后的提示音频信号可以随着环境嘈杂程度变化。S107. The headset adjusts the default prompt audio signal based on the target environmental sound characteristics to obtain an adjusted prompt audio signal. The adjusted prompt audio signal can change with the degree of environmental noise.
默认提示音频信号的能量(分贝)记为第一能量,该默认提示音频信号在环境嘈杂程度适中(即介于环境安静与环境嘈杂之间)时,适合大多数用户的听感。例如,当环境嘈杂程度适中时,可以认为环境声音信号的能量大于或者等于第一能量阈值,并且小于或者等于第二能量阈值。当环境声音信号的能量小于或者等于第一能量阈值的情况下则环境安静。当环境声音信号的能量大于或者等于第二能量阈值的情况下则环境嘈杂。环境声音信号的能量越大越嘈杂,越小越安静。其中,该环境声音信号的能量可以利用该目标环境声音特征中包括的环境声音信号的绝对能量或者相对能量来表征:该环境声音信号的能量可 以为该目标环境声音特征中包括的环境声音信号的绝对能量或者相对能量。该环境声音信号的能量还可以为该目标环境声音特征中包括的环境声音信号的绝对能量以及相对能量进行结合之后得到的目标能量。该结合可以为将该绝对能量与相对能量设置不同的权重之后相加。The energy (decibel) of the default prompt audio signal is recorded as the first energy. This default prompt audio signal is suitable for most users when the environment is moderately noisy (that is, between a quiet environment and a noisy environment). For example, when the environment is moderately noisy, it can be considered that the energy of the environmental sound signal is greater than or equal to the first energy threshold and less than or equal to the second energy threshold. When the energy of the environmental sound signal is less than or equal to the first energy threshold, the environment is quiet. When the energy of the environmental sound signal is greater than or equal to the second energy threshold, the environment is noisy. The greater the energy of the ambient sound signal, the noisier it is, and the smaller it is, the quieter it is. Wherein, the energy of the environmental sound signal can be characterized by the absolute energy or relative energy of the environmental sound signal included in the target environmental sound feature: the energy of the environmental sound signal can be the energy of the environmental sound signal included in the target environmental sound feature. Absolute energy or relative energy. The energy of the environmental sound signal may also be the target energy obtained by combining the absolute energy and relative energy of the environmental sound signal included in the target environmental sound feature. The combination may be adding the absolute energy and the relative energy after setting different weights.
应该理解的是,该调整后的提示音频信号以及默认提示音频信号中可以包括Y帧音频信号。其中,Y为大于等于1的正整数。It should be understood that the adjusted prompt audio signal and the default prompt audio signal may include Y frame audio signals. Among them, Y is a positive integer greater than or equal to 1.
但是当环境嘈杂时,耳机再播放该环境提示音频信号时,环境声音信号会影响用户听音,使得用户不能清晰听见该默认提示音频信号,且该默认提示音频信号在环境嘈杂时进行播放还会收环境声音信号的影响,使得生成的播放模型不准确,使得耳机无法基于该播放模型确定耳机模式对应的参数以达到目标听感。该部分内容在上文有详细介绍,此处暂不赘述。当环境安静时,耳机再播放该环境提示音频信号时,会使得用户觉得该默认提示音频信号能量太大,影响听感。However, when the environment is noisy and the earphones play the environmental prompt audio signal, the environmental sound signal will affect the user's listening, so that the user cannot clearly hear the default prompt audio signal, and the default prompt audio signal will still be played when the environment is noisy. The influence of ambient sound signals makes the generated playback model inaccurate, making it impossible for the headphones to determine the parameters corresponding to the headphone mode based on the playback model to achieve the target listening experience. This part of the content is introduced in detail above and will not be repeated here. When the environment is quiet, when the earphones play the environmental prompt audio signal, the user will feel that the default prompt audio signal has too much energy, affecting the sense of hearing.
因此耳机对默认提示音频信号进行调整可以包括以下两种方式。Therefore, the headset can adjust the default prompt audio signal in the following two ways.
方式1:在环境嘈杂的情况下,耳机可以将默认提示音频信号与目标环境声音特征进行适配。该适配为将默认提示音频信号在不同频段的能量占比调整为与目标环境声音特征中包括的环境声音信号在不同频段的能量占比相关。同时,将默认提示音频信号的能量从第一能量增大到第二能量,该第二能量大于反馈环境声音信号的能量。将默认提示音频信号的能量从第一能量增大到第二能量的一种方式为将默认提示音频信号中不同频率的频点能量增大相同的值。该方式中,不同频点能量增益(此处增益为增大的程度)是通过目标环境声音特征中包括的环境声音信号的绝对能量以及相对能量决定的,该绝对能量和/或相对能量越大,那么反馈环境声音信号的能量越大,则不同频点能量增益越大。另一种方式为,默认提示音频信号中不同频段的频点能量增大程度也可以不同。Method 1: In a noisy environment, the headset can adapt the default prompt audio signal to the target environmental sound characteristics. The adaptation is to adjust the energy proportion of the default prompt audio signal in different frequency bands to be related to the energy proportion of the environmental sound signal included in the target environmental sound feature in different frequency bands. At the same time, the energy of the default prompt audio signal is increased from the first energy to the second energy, and the second energy is greater than the energy of the feedback environmental sound signal. One way of increasing the energy of the default prompt audio signal from the first energy to the second energy is to increase the energy of frequency points of different frequencies in the default prompt audio signal by the same value. In this method, the energy gain at different frequency points (gain here is the degree of increase) is determined by the absolute energy and relative energy of the environmental sound signal included in the target environmental sound characteristics. The greater the absolute energy and/or relative energy, the greater the energy gain. , then the greater the energy of the feedback environmental sound signal, the greater the energy gain at different frequency points. Another way is that the energy increase degree of frequency points in different frequency bands in the default prompt audio signal can also be different.
其中,能量占比相关包括:默认提示音频信号在不同频段的能量占比调整为与目标环境声音特征中包括的环境声音信号在不同频段的能量占比相同,或者,默认提示音频信号在不同频段的能量占比调整为与目标环境声音特征中包括的环境声音信号在不同频段的能量占比有对应关系,例如,不同频段分为第一频段、第二频段或者第三频段,第一频段上的音频信号在环境声音信号中的能量占比最大、第二频段次之以及第三频段最小,则调整后的提示音频信号中第一频段的能量占比也会变得最大但是可以不与环境声音信号中第一频段的能量占比相同,则调整后的提示音频信号中第三频段的能量占比最小但是可以不与环境声音信号中第三频段的能量占比相同。应该理解的是,不同频段中除了可以包括第一频段、第二频段以及第三频段以外还可以包括更多的频段,本申请实施例对此不作限定。Among them, the energy proportion includes: the energy proportion of the default prompt audio signal in different frequency bands is adjusted to be the same as the energy proportion of the environmental sound signal included in the target environmental sound characteristics in different frequency bands, or the default prompt audio signal is in different frequency bands. The energy proportion is adjusted to correspond to the energy proportion of the environmental sound signal included in the target environmental sound characteristics in different frequency bands. For example, different frequency bands are divided into the first frequency band, the second frequency band or the third frequency band. The first frequency band The audio signal has the largest energy proportion in the environmental sound signal, the second frequency band is the second, and the third frequency band is the smallest. Then the energy proportion of the first frequency band in the adjusted prompt audio signal will also become the largest, but it does not need to be consistent with the environment. If the energy proportion of the first frequency band in the sound signal is the same, the energy proportion of the third frequency band in the adjusted prompt audio signal is the smallest but may not be the same as the energy proportion of the third frequency band in the environmental sound signal. It should be understood that, in addition to the first frequency band, the second frequency band and the third frequency band, different frequency bands may also include more frequency bands, which is not limited in this embodiment of the present application.
其中,该反馈声音信号的能量可以用于表征耳道中的环境声音信号的能量大小,该反馈环境声音信号的能量确定方式包括但不限于以下方式:The energy of the feedback sound signal can be used to characterize the energy of the environmental sound signal in the ear canal. The energy determination method of the feedback environmental sound signal includes but is not limited to the following methods:
(1)第三时间段内,耳机的麦克风(例如反馈麦克风)可以采集耳道中的环境声音信号,得到反馈环境音频信号,基于该反馈环境音频信号确定反馈环境音频信号的能量大小。其中,该第三时间段可以为耳机播放调整后的提示音频信号之前的一段时间。(1) During the third time period, the microphone of the headset (such as the feedback microphone) can collect the environmental sound signal in the ear canal to obtain the feedback environmental audio signal, and determine the energy of the feedback environmental audio signal based on the feedback environmental audio signal. The third time period may be a period of time before the headset plays the adjusted prompt audio signal.
(2)可以基于环境声音信号的能量进行确定,环境声音信号的能量越大则反馈环境声音信号的能量越大。例如,耳机可以确定该反馈环境声音信号的能量可以为环境声音信号 的能量的K倍,K的取值可以根据实际情况进行调整。其中,环境声音信号的能量可以利用目标环境声音特征中包括的环境声音信号的绝对能量以及相对能量来表征。例如,可以为该目标环境声音特征中包括的环境声音信号的绝对能量以及相对能量进行结合之后得到的目标能量。该结合可以为将该绝对能量与相对能量设置不同的权重之后相加。其中,能量可以用于表示该音频信号对应的电压大小;也可以表示该音频信号的幅值大小;或者分贝大小。(2) It can be determined based on the energy of the environmental sound signal. The greater the energy of the environmental sound signal, the greater the energy of the feedback environmental sound signal. For example, the headset can determine that the energy of the feedback environmental sound signal can be K times the energy of the environmental sound signal, and the value of K can be adjusted according to the actual situation. Among them, the energy of the environmental sound signal can be characterized by the absolute energy and relative energy of the environmental sound signal included in the target environmental sound feature. For example, the target energy may be obtained by combining the absolute energy and relative energy of the environmental sound signals included in the target environmental sound characteristics. The combination may be adding the absolute energy and the relative energy after setting different weights. Among them, energy can be used to represent the voltage corresponding to the audio signal; it can also represent the amplitude of the audio signal; or the decibel size.
在环境嘈杂的情况下,耳机基于目标环境声音特征对默认提示音频信号进行调整得到调整后的提示音频信号的相关公式可以参考下述公式(4)。In the case of a noisy environment, the headset adjusts the default prompt audio signal based on the target environmental sound characteristics to obtain the adjusted prompt audio signal. The relevant formula can refer to the following formula (4).
S tishi=G(T,H)*S pri*F_tishi[P(w 1~w 2)}           公式(4) S tishi =G(T, H)*S pri *F_tishi[P(w 1 ~ w 2 )} Formula (4)
其中,S tishi表示调整后的提示音频信号,S pri表示默认提示音频信号,S pri*F_tishi[P(w 1~w 2)]表示对默认提示音频信号不同频段的能量按照目标环境声音特征包括的环境声音信号中不同频段的能量进行调整,使得调整后的提示音频信号在不同频段的能量占比与目标环境声音特征在不同频段的能量占比相关。G(T,H)表示基于目标环境声音特征中包括的环境声音信号的绝对能量以及相对能量确定默认提示音频信号中不同频点能量增益。该绝对能量和/或相对能量越大,则表示反馈环境声音信号的能量越大,则不同频点能量增益越大。 Among them, S tishi represents the adjusted prompt audio signal, S pri represents the default prompt audio signal, and S pri* F_tishi[P(w 1 ~ w 2 )] represents the energy of different frequency bands of the default prompt audio signal according to the target environmental sound characteristics. The energy of different frequency bands in the environmental sound signal is adjusted so that the energy proportion of the adjusted prompt audio signal in different frequency bands is related to the energy proportion of the target environmental sound feature in different frequency bands. G(T,H) indicates that the energy gain of different frequency points in the default prompt audio signal is determined based on the absolute energy and relative energy of the environmental sound signal included in the target environmental sound characteristics. The greater the absolute energy and/or relative energy, the greater the energy of the feedback environmental sound signal, and the greater the energy gain at different frequency points.
图9为方式1中在环境嘈杂的情况下对默认提示音频信号进行调整的一个示意图。Figure 9 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in Method 1.
如图9所示,默认提示音频信号的能量为第一能量,调整后的提示音频信号的能量为第二能量,该第二能量大于第一能量。调整后的提示音频信号中不同频段的能量占比与环境声音信号相同。且调整后的提示音频信号的能量大于环境声音信号的能量。As shown in Figure 9, the energy of the default prompt audio signal is the first energy, and the energy of the adjusted prompt audio signal is the second energy, and the second energy is greater than the first energy. The energy proportion of different frequency bands in the adjusted prompt audio signal is the same as that of the ambient sound signal. And the energy of the adjusted prompt audio signal is greater than the energy of the ambient sound signal.
在环境安静的情况下,耳机可以将默认提示音频信号与目标环境声音特征进行适配。该适配为将默认提示音频信号在不同频段的能量占比调整为与目标环境声音特征相同。同时,将默认提示音频信号的能量从第一能量减小到第三能量。When the environment is quiet, the headset can adapt the default prompt audio signal to the target environmental sound characteristics. This adaptation is to adjust the energy proportion of the default prompt audio signal in different frequency bands to be the same as the target environmental sound characteristics. At the same time, the energy of the default prompt audio signal is reduced from the first energy to the third energy.
在环境适中的情况下,耳机可以对默认提示音频信号进行调整,也可以不进行调整,本申请实施例对此不作限定。When the environment is moderate, the headset may or may not adjust the default prompt audio signal, which is not limited in the embodiments of the present application.
方式2:在环境嘈杂的情况下,耳机可以将默认提示音频信号的能量从第一能量增大到第三能量,该第三能量大于环境声音信号的能量。此时,默认提示音频信号在不同频段的能量占比不作调整。将默认提示音频信号的能量从第一能量增大到第三能量的一种方式为将默认提示音频信号中不同频率的频点能量增大相同的值。该方式中,不同频点能量增益(此处增益为增大的程度)是通过目标环境声音特征中包括的环境声音信号的绝对能量以及相对能量决定的,该绝对能量和/或相对能量越大,则不同频点能量增益越大。另一种方式为,默认提示音频信号中不同频段的频点能量增大程度也可以不同。Method 2: When the environment is noisy, the earphones can increase the energy of the default prompt audio signal from the first energy to the third energy, and the third energy is greater than the energy of the environmental sound signal. At this time, the energy proportion of the audio signal in different frequency bands is not adjusted by default. One way to increase the energy of the default prompt audio signal from the first energy to the third energy is to increase the energy of frequency points of different frequencies in the default prompt audio signal by the same value. In this method, the energy gain at different frequency points (gain here is the degree of increase) is determined by the absolute energy and relative energy of the environmental sound signal included in the target environmental sound characteristics. The greater the absolute energy and/or relative energy, the greater the energy gain. , the greater the energy gain at different frequency points. Another way is that the energy increase degree of frequency points in different frequency bands in the default prompt audio signal can also be different.
图10为方式2中在环境嘈杂的情况下对默认提示音频信号进行调整的一个示意图。Figure 10 is a schematic diagram of adjusting the default prompt audio signal in a noisy environment in Method 2.
如图10所示,默认提示音频信号的能量为第一能量,调整后的提示音频信号的能量为第三能量,该第三能量大于第一能量。调整后的提示音频信号中不同频段的能量占比不作调整,则在一些可能的实现方式中可以与默认提示音频信号相同。且调整后的提示音频信 号的能量大于环境声音信号的能量。As shown in Figure 10, the energy of the default prompt audio signal is the first energy, and the energy of the adjusted prompt audio signal is the third energy, and the third energy is greater than the first energy. If the energy proportions of different frequency bands in the adjusted prompt audio signal are not adjusted, they can be the same as the default prompt audio signal in some possible implementations. And the energy of the adjusted prompt audio signal is greater than the energy of the ambient sound signal.
在环境安静的情况下,耳机可以将默认提示音频信号的能量从第一能量减小到第三能量。When the environment is quiet, the earphones can reduce the energy of the default prompt audio signal from the first energy to the third energy.
在环境适中的情况下,耳机可以对默认提示音频信号进行调整,也可以不进行调整,本申请实施例对此不作限定。When the environment is moderate, the headset may or may not adjust the default prompt audio signal, which is not limited in the embodiments of the present application.
这样,在环境嘈杂的情况下,调整后的提示音频信号的能量可以变大且大于环境声音信号的能量。在环境安静的情况下,默认提示音频信号的能量可以变小。In this way, when the environment is noisy, the energy of the adjusted prompt audio signal can become larger and greater than the energy of the environmental sound signal. When the environment is quiet, the energy of the default prompt audio signal can be reduced.
S108.耳机在确定入耳后,播放该调整后的提示音频信号,耳机通过麦克风采集播放后的提示音频信号得到反馈音频信号。S108. After the earphone is confirmed to be inserted into the ear, the adjusted audio prompt signal is played, and the earphone collects the played audio prompt signal through the microphone to obtain a feedback audio signal.
该麦克风可以是耳机的反馈麦克风,因为反馈麦克风靠近耳道,可以更好地采集在耳道中传输的声音信号。This microphone can be the feedback microphone of the headset, because the feedback microphone is close to the ear canal and can better pick up the sound signal transmitted in the ear canal.
图11示出了耳机播放以及采集调整后的提示音频信号得到反馈音频信号的示意图。Figure 11 shows a schematic diagram of playing the headphones and collecting the adjusted prompt audio signal to obtain the feedback audio signal.
图11中,图标101为耳机的扬声器,图标102为耳机的反馈麦克风,图标103为在耳道中传输的提示音频信号(调整后的)。In Figure 11, icon 101 is the speaker of the earphone, icon 102 is the feedback microphone of the earphone, and icon 103 is the prompt audio signal (after adjustment) transmitted in the ear canal.
耳机在确定入耳后,耳机可以利用扬声器播放该调整后的提示音频信号,该播放后的提示音频信号(调整后的)可以在耳道中进行传输,如图11中的图标103所示,为该播放后的提示音频信号(调整后的)可以在耳道中进行传输时的一种示例性情况。然后,耳机可以通过反馈麦克风采集在耳道中传输的提示音频信号(调整后的)得到反馈音频信号。在一些可能的情况下,该反馈音频信号中还可以包括环境声音信号。但是该反馈音频信号中包括的提示音频信号的能量大于环境声音信号的能量,则在下述步骤S109中确定目标播放模型的过程中可以减少该环境声音信号对目标播放模型的干扰。After the earphone is confirmed to be inserted into the ear, the earphone can use the speaker to play the adjusted prompt audio signal, and the played prompt audio signal (after adjustment) can be transmitted in the ear canal, as shown by icon 103 in Figure 11. An exemplary situation is when the played cue audio signal (modified) can be transmitted in the ear canal. Then, the headset can collect the prompt audio signal (after adjustment) transmitted in the ear canal through the feedback microphone to obtain the feedback audio signal. In some possible cases, the feedback audio signal may also include an environmental sound signal. However, the energy of the prompt audio signal included in the feedback audio signal is greater than the energy of the ambient sound signal. In the process of determining the target playback model in the following step S109, the interference of the ambient sound signal on the target playback model can be reduced.
S109.耳机基于该调整后的提示音频信号以及反馈音频信号确定目标播放模型,该目标播放模型可以反映耳机的佩戴情况以及用户的耳道模型。S109. The headset determines a target playback model based on the adjusted prompt audio signal and feedback audio signal. The target playback model can reflect the wearing condition of the headset and the user's ear canal model.
该目标播放模型是指调整后的提示音频信号与反馈音频信号之间的对比关系。The target playback model refers to the contrast relationship between the adjusted prompt audio signal and the feedback audio signal.
在一种可能的实现方式中,该对比关系可以为调整后的提示音频信号以及反馈音频信号中频点能量比值的集合。该频点能量比值为将调整后的提示音频信号以及反馈音频信号转化到频域上之后,调整后的提示音频信号以及反馈音频信号中相同频率的频点的总能量之比。In a possible implementation, the contrast relationship may be a set of energy ratios of mid-frequency points in the adjusted prompt audio signal and the feedback audio signal. The frequency point energy ratio is the ratio of the total energy of the frequency points of the same frequency in the adjusted prompt audio signal and the feedback audio signal after converting the adjusted prompt audio signal and the feedback audio signal into the frequency domain.
耳机可以将调整后的提示音频信号以及反馈音频信号转化到频域上。得到频域上的调整后的提示音频信号以及频域上的反馈音频信号。后文中可以将该频域上的调整后的提示音频信号仍然称为调整后的提示音频信号,将频域上的反馈音频信号仍然称为反馈音频信号。调整后的提示音频信号(频域上的)以及反馈音频信号(频域上的)中的任一帧音频信号都可以表示为N(N为2的整数次方)个频点,例如N可以为1024、2048等,具体大小可以由耳机的计算能力决定。该N个频点用于表示一定频率范围内的音频信号,例如0khz-15khz之间,也可以为其他的频率范围。也可以理解为,该频点指代的是在对应频率上的音频信号(包括提示音频信号以及环境声音信号)的信息,该信息包括时间,音频信 号的频率,以及音频信号的能量(分贝或者幅值)大小,其中,能量可以用于表示该音频信号对应的电压大小;也可以表示该音频信号的幅值大小;或者音频信号的分贝大小。任意两帧音频信号中的N个频点的频率分布是相同的。例如,反馈音频信号中第j帧音频信号的第i个频点的频率与第j+1帧音频信号的第i个频点的频率相同。The headset can convert the adjusted prompt audio signal and feedback audio signal into the frequency domain. The adjusted prompt audio signal in the frequency domain and the feedback audio signal in the frequency domain are obtained. In the following, the adjusted prompt audio signal in the frequency domain may still be called the adjusted prompt audio signal, and the feedback audio signal in the frequency domain may still be called the feedback audio signal. Any frame audio signal in the adjusted prompt audio signal (in the frequency domain) and the feedback audio signal (in the frequency domain) can be expressed as N (N is an integer power of 2) frequency points. For example, N can be It is 1024, 2048, etc. The specific size can be determined by the computing power of the headset. The N frequency points are used to represent audio signals within a certain frequency range, such as between 0khz and 15khz, or other frequency ranges. It can also be understood that the frequency point refers to the information of the audio signal (including prompt audio signal and environmental sound signal) at the corresponding frequency. This information includes time, frequency of the audio signal, and energy of the audio signal (decibel or Amplitude), where energy can be used to represent the voltage corresponding to the audio signal; it can also represent the amplitude of the audio signal; or the decibel size of the audio signal. The frequency distribution of N frequency points in any two frames of audio signals is the same. For example, the frequency of the i-th frequency point of the j-th frame audio signal in the feedback audio signal is the same as the frequency of the i-th frequency point of the j+1-th frame audio signal.
调整后的提示音频信号以及反馈音频信号中的任一帧音频信号都可以表示为N(N为2的整数次方)个频点,则目标播放模型中包括N个能量比值。其中包括第一总能量比值,该第一总能量比值为调整后的提示音频信号中第一频率的全部频点的总能量与反馈音频信号中第一频率的全部频点的总能量之比。其中,第一频率为一帧音频信号中N个频点对应的N个频率中的一个频率。Any frame audio signal in the adjusted prompt audio signal and feedback audio signal can be expressed as N (N is an integer power of 2) frequency points, then the target playback model includes N energy ratios. It includes a first total energy ratio, which is the ratio of the total energy of all frequency points of the first frequency in the adjusted prompt audio signal to the total energy of all frequency points of the first frequency in the feedback audio signal. The first frequency is one of N frequencies corresponding to N frequency points in one frame of audio signal.
应该理解的是,该目标播放模型可以反映耳机的佩戴情况以及用户的耳道模型。也可以说该目标播放模型可以反映耳机的佩戴情况以及用户的耳道属于何种耳道模型。因为同一个提示音频信号(调整后的),在耳机的佩戴情况或者耳道模型不同的情况下,耳机播放该提示音频信号(调整后的,记作提示音频信号2)得到的反馈音频信号(记作参考音频信号2)不同,则基于参考音频信号2以及提示音频信号2确定的目标播放模型不同。It should be understood that this target playback model can reflect the wearing condition of the headset as well as the user's ear canal model. It can also be said that the target playback model can reflect the wearing situation of the headphones and what kind of ear canal model the user's ear canal belongs to. Because the same prompt audio signal (adjusted), when the headset is worn or the ear canal model is different, the feedback audio signal (after adjustment, recorded as prompt audio signal 2) obtained by the headset playing the prompt audio signal ( Denoted as the reference audio signal 2), the target playback model determined based on the reference audio signal 2 and the prompt audio signal 2 is different.
应该理解的是,在另外的情况下,该对比关系还可以为其他的内容。例如可以为反馈音频信号全部频点的总能量与调整后的提示音频信号的全部频点的总能量之比。以及还可以为部分频段上的调整后的提示音频信号以及反馈音频信号中频点能量比值的集合。本申请实施例对此不作限定。It should be understood that in other circumstances, the comparison relationship can also be other contents. For example, it may be the ratio of the total energy of all frequency points of the feedback audio signal to the total energy of all frequency points of the adjusted prompt audio signal. It can also be a set of energy ratios of mid-frequency points of the adjusted prompt audio signal and the feedback audio signal on some frequency bands. The embodiments of the present application do not limit this.
S110.耳机基于该目标播放模型与模式设置数据库中的预设播放模型匹配,确定该模式设置数据库中与该目标播放模型匹配的预设播放模型,确定该匹配的预设播放模型所对应的耳机模式以及该耳机模式对应的参数。S110. Based on the target playback model matching the preset playback model in the mode setting database, the headset determines the preset playback model in the mode setting database that matches the target playback model, and determines the headset corresponding to the matching preset playback model. mode and the parameters corresponding to the headphone mode.
该模式设置数据库中可以包括多个预设播放模型,其中,每一个预设播放模型还与耳机模式相对应,该耳机模式还对应预设听感以及调整参数,该调整参数为耳机的一种佩戴情况下以及一种耳道模型中该耳机模式能带给用户预设听感时的参数。也可以说该模式设置数据库中包括多个预设播放模型,其中,每一个预设播放模型还与至少一个参数(调整参数)对应,该至少一个参数中的每一个参数都对应一个耳机模式以及一个预设听感。The mode setting database may include multiple preset playback models. Each preset playback model also corresponds to a headphone mode. The headphone mode also corresponds to a preset hearing sense and adjustment parameters. The adjustment parameters are a type of headphone. The headphone mode can give the user preset listening parameters when worn and in an ear canal model. It can also be said that the mode setting database includes a plurality of preset playback models, wherein each preset playback model also corresponds to at least one parameter (adjustment parameter), and each parameter in the at least one parameter corresponds to a headphone mode and A default listening experience.
关于模式设置数据及其中的预设播放模型的详细描述可以参考前述对表1以及相关内容的示例性描述。For a detailed description of the mode setting data and the preset playback model therein, please refer to the aforementioned exemplary description of Table 1 and related content.
在前述步骤S106执行的情况下,耳机确定耳机模式之后,可以确定该耳机模式对应的目标听感。该目标听感可以是用户设置的,在用户没有设置的情况下可以设置一个默认的目标听感。关于目标听感的描述可以参考前述对术语(3)的示例性描述,此处不再赘述。此时,耳机可以基于该目标播放模型匹配的预设播放模型,结合耳机模式以及该耳机模式对应的目标听感,确定该匹配的预设播放模型所对应的参数。该参数也对应该耳机模式以及目标听感。In the case where the aforementioned step S106 is executed, after the earphone determines the earphone mode, the target listening feeling corresponding to the earphone mode can be determined. The target listening feeling can be set by the user. If the user does not set it, a default target listening feeling can be set. For descriptions of the target listening sense, reference may be made to the foregoing exemplary description of term (3), which will not be described again here. At this time, the headset can determine parameters corresponding to the matched preset playback model based on the preset playback model matched to the target playback model, combined with the headphone mode and the target hearing sensation corresponding to the headphone mode. This parameter also corresponds to the headphone mode and target listening experience.
在前述步骤S106没有执行的情况下,耳机确定该匹配的预设播放模型所对应的耳机模式以及该耳机模式对应的参数包括但不限于以下方式。In the case where the aforementioned step S106 is not executed, the headset determines the headphone mode corresponding to the matching preset playback model and the parameters corresponding to the headphone mode include but are not limited to the following methods.
方式1:耳机可以从多个耳机模式中选择一个耳机模式,确定该耳机模式对应的目标 听感。然后,耳机可以基于该目标播放模型匹配的预设播放模型,结合耳机模式以及该耳机模式对应的目标听感,确定该匹配的预设播放模型所对应的参数。该参数也对应该耳机模式以及目标听感。Method 1: The headset can select a headphone mode from multiple headphone modes to determine the target listening experience corresponding to the headphone mode. Then, the headset can determine the parameters corresponding to the matched preset playback model based on the preset playback model matched to the target playback model, combined with the headphone mode and the target hearing sensation corresponding to the headphone mode. This parameter also corresponds to the headphone mode and target listening experience.
方式2:耳机确定该匹配的预设播放模型所对应的全部参数。确定其中满足第一预设条件的参数,该第一预设条件为:该参数对应的耳机模式满足第二预设条件以及该参数对应的预设听感满足第三预设条件。其中,第二预设条件为:该参数对应的耳机模式为上一次被用户选择的耳机模式,也可以在一段时间内(例如10天)用户使用时间最长的耳机模式。该第三预设条件为该参数对应的预设听感为用户设置的目标听感或者在用户没有设置目标听感的情况下,该参数对应的预设听感为默认的目标听感。Method 2: The headset determines all parameters corresponding to the matching preset playback model. Determine the parameters that satisfy a first preset condition. The first preset condition is: the headphone mode corresponding to the parameter satisfies the second preset condition and the preset hearing sense corresponding to the parameter satisfies the third preset condition. The second preset condition is: the headphone mode corresponding to the parameter is the headphone mode last selected by the user, or the headphone mode that the user has used the longest within a period of time (for example, 10 days). The third preset condition is that the preset hearing sense corresponding to the parameter is the target hearing sense set by the user or, if the user does not set the target hearing sense, the preset hearing sense corresponding to the parameter is the default target hearing sense.
应该理解的是,任一个预设播放模型与目标播放模型中包括的能量比值的数量相同。这里假设有N个能量比值。耳机确定该模式设置数据库中与该目标播放模型匹配的预设播放模型的方式可以参考下述描述。It should be understood that the number of energy ratios included in any preset playback model and the target playback model is the same. It is assumed here that there are N energy ratios. The following description may be used to refer to the manner in which the headset determines the preset playback model in the mode setting database that matches the target playback model.
首先,耳机计算目标播放模型与不同预设播放模型中N个能量比值的总差值。该不同预设播放模型中包括第一预设播放模型,该目标播放模型以及第一预设播放模型中N个能量比值的总差值包括:目标播放模型与第一预设播放模型中包括的N个对应的能量比值的差值的绝对值之和。N个对应的能量比值中包括的任意一个对应的能量比值为目标播放模型中的第i个能量比值以及第一预设播放模型中的第i个能量比值。其中,该第一预设播放模型为模式设置数据库中包括的全部预设播放模型的任意一个预设播放模型。First, the headphones calculate the total difference between the N energy ratios in the target playback model and different preset playback models. The different preset playback models include a first preset playback model. The total difference between the N energy ratios in the target playback model and the first preset playback model includes: the target playback model and the first preset playback model. The sum of the absolute values of the differences between N corresponding energy ratios. Any corresponding energy ratio included in the N corresponding energy ratios is the i-th energy ratio in the target playback model and the i-th energy ratio in the first preset playback model. Wherein, the first preset playback model is any one of all preset playback models included in the mode setting database.
然后,耳机从目标播放模型与全部预设播放模型中N个能量比值的总差值中,确定其中,满足第四预设条件的总差值,耳机确定该满足第四预设条件的总差值对应的预设播放模型为与该目标播放模型匹配的预设播放模型。Then, the headset determines the total difference that satisfies the fourth preset condition from the total difference of the N energy ratios in the target playback model and all preset playback models, and the headset determines the total difference that satisfies the fourth preset condition. The default playback model corresponding to the value is the default playback model that matches the target playback model.
在一些可能的情况下,该第四预设条件为匹配的预设播放模型与目标播放模型中N个能量比值的总差值是最小的总差值。In some possible cases, the fourth preset condition is that the total difference between the N energy ratios in the matching preset playback model and the target playback model is the smallest total difference.
在另一些可能的情况下,该第四预设条件为匹配的预设播放模型与目标播放模型中N个能量比值的总差值小于或者等于第一差值阈值。In other possible situations, the fourth preset condition is that the total difference between the N energy ratios in the matching preset playback model and the target playback model is less than or equal to the first difference threshold.
S111.耳机基于该匹配的预设播放模型所对应的耳机模式以及该耳机模式对应的参数处理音频信号。S111. The earphone processes the audio signal based on the earphone mode corresponding to the matched preset playback model and the parameters corresponding to the earphone mode.
耳机可以基于该匹配的预设播放模型所对应的耳机模式以及该耳机模式对应的参数处理音频信号,使得耳机对音频信号的处理程度可以达到预设的处理程度,这样用户可以获得目标听感。耳机处理音频信号获得目标听感的过程可以参考前述术语(2)以及术语(3)中的相关描述,此处不再赘述。The earphone can process the audio signal based on the earphone mode corresponding to the matched preset playback model and the parameters corresponding to the earphone mode, so that the earphone's processing level of the audio signal can reach the preset processing level, so that the user can obtain the target listening experience. The process of processing the audio signal by the earphone to obtain the target hearing sensation can be referred to the related descriptions in the aforementioned term (2) and term (3), which will not be described again here.
应该理解的是,前述步骤S101-步骤S111中执行主体是耳机的步骤可以将该执行主体更换成终端,终端可以将步骤的执行结果发送至耳机。例如,耳机可以第一环境音频信号发送至终端,终端可以基于该第一环境音频信号确定第一环境声音特征,在基于该第一环境声音特征以及第二环境声音特征确定目标环境声音特征等。It should be understood that for steps in the aforementioned steps S101 to S111 where the execution subject is the headset, the execution subject can be replaced by a terminal, and the terminal can send the execution results of the steps to the headset. For example, the headset can send a first environmental audio signal to the terminal, and the terminal can determine a first environmental sound feature based on the first environmental audio signal, and then determine a target environmental sound feature based on the first environmental sound feature and the second environmental sound feature, and so on.
本申请实施例中,第一能量阈值也可以被称为第二阈值,第二能量阈值也可以被称为 第一阈值。In the embodiment of the present application, the first energy threshold may also be called the second threshold, and the second energy threshold may also be called the first threshold.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solution of the present application, but not to limit it. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still make the foregoing technical solutions. The technical solutions described in each embodiment may be modified, or some of the technical features may be equivalently replaced; however, these modifications or substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions in each embodiment of the present application.
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。As used in the above embodiments, the term "when" may be interpreted to mean "if..." or "after" or "in response to determining..." or "in response to detecting..." depending on the context. Similarly, depending on the context, the phrase "when determining..." or "if (stated condition or event) is detected" may be interpreted to mean "if it is determined..." or "in response to determining..." or "on detecting (stated condition or event)” or “in response to detecting (stated condition or event)”.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, e.g., the computer instructions may be transferred from a website, computer, server, or data center Transmission to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available media may be magnetic media (eg, floppy disk, hard disk, tape), optical media (eg, DVD), or semiconductor media (eg, solid state drive), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments are implemented. This process can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, , may include the processes of the above method embodiments. The aforementioned storage media include: ROM, random access memory (RAM), magnetic disks, optical disks and other media that can store program codes.

Claims (13)

  1. 一种耳机模式对应的参数确定方法,其特征在于,应用于耳机,所述方法包括:A method for determining parameters corresponding to a headphone mode, characterized in that it is applied to headphones, and the method includes:
    所述耳机获取目标环境声音特征,并确定耳机模式为第一耳机模式时的目标听感;所述目标环境声音特征用于反映环境声音信号的能量大小;The earphone acquires target environmental sound characteristics and determines the target listening experience when the earphone mode is the first earphone mode; the target environmental sound characteristics are used to reflect the energy of the environmental sound signal;
    所述耳机基于所述目标环境声音特征对所述第一耳机模式的默认提示音频信号进行调整,得到调整后的提示音频信号;所述环境声音信号的能量越大则所述调整后的提示音频信号的能量越大,所述环境声音信号的能量越小则所述调整后的提示音频信号的能量越小;The headset adjusts the default prompt audio signal of the first headphone mode based on the target environmental sound characteristics to obtain an adjusted prompt audio signal; the greater the energy of the environmental sound signal, the greater the adjusted prompt audio signal. The greater the energy of the signal and the smaller the energy of the environmental sound signal, the smaller the energy of the adjusted prompt audio signal;
    所述耳机播放所述调整后的提示音频信号之后,通过麦克风采集播放后的提示音频信号得到反馈音频信号;After the headset plays the adjusted prompt audio signal, the microphone collects the played prompt audio signal to obtain a feedback audio signal;
    所述耳机基于所述调整后的提示音频信号以及反馈音频信号确定目标播放模型;所述目标播放模型用于反映用户佩戴所述耳机的情况以及用户的耳道模型;The headset determines a target playback model based on the adjusted prompt audio signal and feedback audio signal; the target playback model is used to reflect the user's wearing of the headset and the user's ear canal model;
    所述耳机从模式设置数据库中的全部预设播放模型中确定与所述目标播放模型匹配的预设播放模型;所述模式设置数据库中包括多个预设播放模型,其中,每一个预设播放模型还与至少一个参数对应,所述至少一个参数中的每一个参数都对应一个耳机模式以及一个预设听感;The headset determines a preset playback model that matches the target playback model from all preset playback models in a mode setting database; the mode setting database includes a plurality of preset playback models, wherein each preset playback model The model also corresponds to at least one parameter, and each parameter in the at least one parameter corresponds to a headphone mode and a preset hearing sense;
    所述耳机确定所述匹配的预设播放模型对应的目标参数;所述目标参数对应的耳机模式为所述第一耳机模式且所述目标参数对应的预设听感为所述目标听感;The earphone determines the target parameter corresponding to the matched preset playback model; the earphone mode corresponding to the target parameter is the first earphone mode and the preset hearing feeling corresponding to the target parameter is the target hearing feeling;
    所述耳机基于所述第一耳机模式与所述第一耳机模式对应的目标参数对音频信号进行处理。The earphone processes audio signals based on the first earphone mode and target parameters corresponding to the first earphone mode.
  2. 根据权利要求1所述的方法,其特征在于:The method according to claim 1, characterized in that:
    所述麦克风为所述耳机的反馈麦克风。The microphone is a feedback microphone of the earphone.
  3. 根据权利要求1所述的方法,其特征在于:The method according to claim 1, characterized in that:
    所述目标环境声音特征包括环境声音信号的绝对能量、相对能量以及不同频段的能量占比中的一个或者多个。The target environmental sound characteristics include one or more of absolute energy, relative energy, and energy proportions of different frequency bands of the environmental sound signal.
  4. 根据权利要求3所述的方法,其特征在于,所述目标环境声音特征包括环境声音信号的绝对能量、相对能量以及不同频段的能量占,所述耳机获取目标环境声音特征,具体包括:The method according to claim 3, wherein the target environmental sound characteristics include absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal, and the earphone acquires the target environmental sound characteristics, specifically including:
    所述耳机采集环境声音信号得到第一环境音频信号;The earphone collects environmental sound signals to obtain a first environmental audio signal;
    所述耳机基于所述第一环境音频信号确定所述第一环境音频信号中环境声音信号的绝对能量、相对能量以及不同频段的能量占比作为所述目标环境声音特征。The earphone determines the absolute energy, relative energy, and energy proportions of different frequency bands of the environmental sound signal in the first environmental audio signal as the target environmental sound feature based on the first environmental audio signal.
  5. 根据权利要求3所述的方法,其特征在于,所述目标环境声音特征包括环境声音信号的绝对能量、相对能量以及不同频段的能量占,所述耳机获取所述目标环境声音特征,具体包括:The method according to claim 3, wherein the target environmental sound characteristics include absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal, and the earphone acquires the target environmental sound characteristics, specifically including:
    所述耳机采集环境声音信号得到第一环境音频信号;The earphone collects environmental sound signals to obtain a first environmental audio signal;
    所述耳机基于所述第一环境音频信号确定第一环境声音特征,所述第一环境声音特征包括所述第一环境音频信号中环境声音信号的绝对能量、相对能量以及不同频段的能量占比;The headset determines a first environmental sound characteristic based on the first environmental audio signal. The first environmental sound characteristic includes the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal in the first environmental audio signal. ;
    所述耳机接收与所述耳机连接的终端发送的第二环境声音特征,所述第二环境声音特征包括第二环境音频信号中环境声音信号的绝对能量、相对能量以及不同频段的能量占比;所述第二环境音频信号为所述终端采集的环境声音信号;The earphone receives the second environmental sound characteristics sent by the terminal connected to the earphone, and the second environmental sound characteristics include the absolute energy, relative energy and energy proportion of different frequency bands of the environmental sound signal in the second environmental audio signal; The second environmental audio signal is an environmental sound signal collected by the terminal;
    在所述第一环境声音特征与所述第二环境声音特征相同的情况下,所述耳机确定所述第一环境声音特征为所述目标环境声音特征;When the first environmental sound feature is the same as the second environmental sound feature, the headset determines that the first environmental sound feature is the target environmental sound feature;
    在所述第一环境声音特征与所述第二环境声音特征不相同的情况下,所述耳机基于所述第一环境声音特征以及所述第二环境声音特征设置不同的权重后进行融合,将融合的结果作为所述目标环境声音特征。When the first environmental sound characteristics and the second environmental sound characteristics are different, the headset sets different weights based on the first environmental sound characteristics and the second environmental sound characteristics and performs fusion. The fusion result is used as the target environmental sound feature.
  6. 根据权利要求3所述的方法,其特征在于,所述耳机基于所述目标环境声音特征对所述第一耳机模式的默认提示音频信号进行调整,具体包括:The method according to claim 3, wherein the headset adjusts the default prompt audio signal of the first headset mode based on the target environmental sound characteristics, specifically including:
    在确定环境声音信号的能量大于或者等于第一阈值时,所述耳机将所述默认提示音频信号的能量从第一能量增大到第二能量,所述第二能量大于反馈环境声音信号的能量;所述反馈环境声音信号的能量用于表征耳道中的环境声音信号的能量大小;或者,When it is determined that the energy of the environmental sound signal is greater than or equal to the first threshold, the headset increases the energy of the default prompt audio signal from the first energy to a second energy, and the second energy is greater than the energy of the feedback environmental sound signal. ; The energy of the feedback environmental sound signal is used to represent the energy size of the environmental sound signal in the ear canal; or,
    在确定环境声音信号的能量小于或者等于第二阈值时,所述耳机将所述默认提示音频信号的能量从第一能量减小到第三能量。When it is determined that the energy of the environmental sound signal is less than or equal to the second threshold, the earphone reduces the energy of the default prompt audio signal from the first energy to the third energy.
  7. 根据权利要求3所述的方法,其特征在于,所述耳机基于目标环境声音特征对所述第一耳机模式的默认提示音频信号进行调整,具体包括:The method of claim 3, wherein the headset adjusts the default prompt audio signal of the first headset mode based on target environmental sound characteristics, specifically including:
    在确定环境声音信号的能量大于或者等于第一阈值时,所述耳机将所述默认提示音频信号的能量从第一能量增大到第二能量,所述第二能量大于反馈环境声音信号的能量并且将所述默认提示音频信号在不同频段的能量占比调整为与所述目标环境声音特征中包括的环境声音信号在不同频段的能量占比相关;所述反馈环境声音信号的能量用于表征耳道中的环境声音信号的能量大小;或者,When it is determined that the energy of the environmental sound signal is greater than or equal to the first threshold, the headset increases the energy of the default prompt audio signal from the first energy to a second energy, and the second energy is greater than the energy of the feedback environmental sound signal. And the energy proportion of the default prompt audio signal in different frequency bands is adjusted to be related to the energy proportion of the environmental sound signal included in the target environmental sound characteristics in different frequency bands; the energy of the feedback environmental sound signal is used to characterize The energy level of the ambient sound signal in the ear canal; or,
    在确定环境声音信号的能量小于或者等于第二阈值时,所述耳机将所述默认提示音频信号的能量从第一能量减小到第三能量。When it is determined that the energy of the environmental sound signal is less than or equal to the second threshold, the earphone reduces the energy of the default prompt audio signal from the first energy to the third energy.
  8. 根据权利要求6或7所述的方法,其特征在于:The method according to claim 6 or 7, characterized in that:
    所述环境声音信号的能量为所述目标环境声音特征包括环境声音信号的绝对能量、相对能量或者绝对能量以及相对能量进行结合之后得到的目标能量中的一个。The energy of the environmental sound signal is one of the target energy obtained by combining the absolute energy, relative energy, or absolute energy and relative energy of the environmental sound signal including the target environmental sound feature.
  9. 根据权利要求1-7中任一项所述的方法,其特征在于:The method according to any one of claims 1-7, characterized in that:
    所述目标听感是所述用户通过所述耳机或者与所述耳机连接的终端设置的听感;The target listening feeling is the listening feeling set by the user through the earphone or a terminal connected to the earphone;
    在用户没有设置所述目标听感的情况下,所述耳机或者与所述耳机连接的终端设置一 个默认的听感作为目标听感。In the case where the user does not set the target hearing feeling, the headset or the terminal connected to the headset sets a default hearing feeling as the target hearing feeling.
  10. 根据权利要求1-7中任一项所述的方法,其特征在于,所述耳机基于所述调整后的提示音频信号以及反馈音频信号确定目标播放模型,具体包括:The method according to any one of claims 1 to 7, characterized in that the headset determines the target playback model based on the adjusted prompt audio signal and feedback audio signal, specifically including:
    所述耳机将所述调整后的提示音频信号以及所述反馈音频信号转化到频域上之后,使得所述调整后的提示音频信号以及所述反馈音频信号中的任一帧音频信号中包括N个频点,所述N为2的整数次方;After the headset converts the adjusted prompt audio signal and the feedback audio signal into the frequency domain, the audio signal of any frame in the adjusted prompt audio signal and the feedback audio signal includes N frequency points, the N is an integer power of 2;
    所述耳机基于转化到频域上的所述调整后的提示音频信号以及所述反馈音频信号确定目标播放模型;所述目标播放模型中N个能量比值;其中,包括第一总能量比值,所述第一总能量比值为所述调整后的提示音频信号中第一频率的全部频点的总能量与所述反馈音频信号中第一频率的全部频点的总能量之比;所述第一频率为一帧音频信号中N个频点对应的N个频率中的一个频率。The headset determines a target playback model based on the adjusted prompt audio signal converted to the frequency domain and the feedback audio signal; N energy ratios in the target playback model; including a first total energy ratio, the The first total energy ratio is the ratio of the total energy of all frequency points of the first frequency in the adjusted prompt audio signal to the total energy of all frequency points of the first frequency in the feedback audio signal; the first The frequency is one of N frequencies corresponding to N frequency points in one frame of audio signal.
  11. 一种通信系统,其特征在于,所述通信系统中包括终端和耳机,其中:A communication system, characterized in that the communication system includes a terminal and a headset, wherein:
    所述耳机,用于采集环境声音信号得到第一环境音频信号,并且,基于所述第一环境音频信号确定第一环境声音特征;The earphone is used to collect environmental sound signals to obtain a first environmental audio signal, and determine first environmental sound characteristics based on the first environmental audio signal;
    所述终端,用于采集环境声音信号得到第二环境音频信号,并且,基于所述第二环境音频信号确定第二环境声音特征;The terminal is used to collect environmental sound signals to obtain a second environmental audio signal, and determine second environmental sound characteristics based on the second environmental audio signal;
    所述终端,还用于将所述第二环境声音特征发送至所述耳机;The terminal is also configured to send the second environmental sound characteristics to the earphone;
    所述耳机,还用于基于所述第一环境声音特征以及第二环境声音特征确定目标环境声音特征;The earphone is also used to determine target environmental sound characteristics based on the first environmental sound characteristics and the second environmental sound characteristics;
    所述耳机,还用于基于所述目标环境声音特征对第一耳机模式的默认提示音频信号进行调整;The earphone is also used to adjust the default prompt audio signal of the first earphone mode based on the target environmental sound characteristics;
    所述耳机,还用于播放所述调整后的提示音频信号之后,通过麦克风采集播放后的提示音频信号得到反馈音频信号;The earphone is also used to collect the played audio prompt signal through a microphone to obtain a feedback audio signal after playing the adjusted prompt audio signal;
    所述耳机,还用于基于所述调整后的提示音频信号以及反馈音频信号确定目标播放模型;The earphone is also used to determine a target playback model based on the adjusted prompt audio signal and feedback audio signal;
    所述耳机,还用于从模式设置数据库中的全部预设播放模型中确定与所述目标播放模型匹配的预设播放模型;The earphone is also used to determine a preset playback model that matches the target playback model from all preset playback models in the mode setting database;
    所述耳机,还用于确定所述匹配的预设播放模型对应的目标参数;The headset is also used to determine the target parameters corresponding to the matched preset playback model;
    所述耳机,还用于基于所述第一耳机模式与所述第一耳机模式对应的目标参数对音频信号进行处理。The earphone is also used to process audio signals based on the first earphone mode and target parameters corresponding to the first earphone mode.
  12. 一种耳机,其特征在于,所述耳机包括:一个或多个处理器、存储器、麦克风和扬声器;所述存储器与所述一个或多个处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,所述一个或多个处理器调用所述计算机指令以使得终端执行如权利要求1至10中任一项所述的方法。An earphone, characterized in that the earphone includes: one or more processors, memory, microphones and speakers; the memory is coupled to the one or more processors, and the memory is used to store computer program code, The computer program code includes computer instructions, which are invoked by the one or more processors to cause the terminal to perform the method according to any one of claims 1 to 10.
  13. 一种计算机存储介质,其特征在于,所述计算机存储介质中存储有计算机程序,所述计算机程序包括可执行指令,所述可执行指令当被处理器执行时使所述处理器执行如权利要求1至10中任一项所述的方法。A computer storage medium, characterized in that a computer program is stored in the computer storage medium, and the computer program includes executable instructions. When executed by a processor, the executable instructions cause the processor to execute the claims. The method described in any one of 1 to 10.
PCT/CN2022/105500 2022-04-11 2022-07-13 Method for determining parameter corresponding to earphone mode, and earphone, terminal and system WO2023197474A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210371139.1A CN114466278B (en) 2022-04-11 2022-04-11 Method for determining parameters corresponding to earphone mode, earphone, terminal and system
CN202210371139.1 2022-04-11

Publications (1)

Publication Number Publication Date
WO2023197474A1 true WO2023197474A1 (en) 2023-10-19

Family

ID=81416498

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/105500 WO2023197474A1 (en) 2022-04-11 2022-07-13 Method for determining parameter corresponding to earphone mode, and earphone, terminal and system

Country Status (2)

Country Link
CN (1) CN114466278B (en)
WO (1) WO2023197474A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114466278B (en) * 2022-04-11 2022-08-16 北京荣耀终端有限公司 Method for determining parameters corresponding to earphone mode, earphone, terminal and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160353196A1 (en) * 2015-06-01 2016-12-01 Doppler Labs, Inc. Real-time audio processing of ambient sound
CN112291664A (en) * 2020-10-30 2021-01-29 歌尔光学科技有限公司 Volume adjusting method, device and system of head-mounted display equipment
US20210097970A1 (en) * 2019-09-27 2021-04-01 Apple Inc. Headphone acoustic noise cancellation and speaker protection
CN113556654A (en) * 2021-07-16 2021-10-26 RealMe重庆移动通信有限公司 Audio data processing method and device and electronic equipment
CN113873378A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Earphone noise processing method and device and earphone
CN113938782A (en) * 2021-09-30 2022-01-14 安克创新科技股份有限公司 Earphone in-ear state recognition and earphone mode self-adaptive adjustment method and earphone
CN113949955A (en) * 2020-07-16 2022-01-18 Oppo广东移动通信有限公司 Noise reduction processing method and device, electronic equipment, earphone and storage medium
CN114157945A (en) * 2020-09-07 2022-03-08 华为技术有限公司 Data processing method and related device
CN114466278A (en) * 2022-04-11 2022-05-10 荣耀终端有限公司 Method for determining parameters corresponding to earphone mode, earphone, terminal and system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007082579A2 (en) * 2006-12-18 2007-07-26 Phonak Ag Active hearing protection system
WO2008138349A2 (en) * 2007-05-10 2008-11-20 Microsound A/S Enhanced management of sound provided via headphones
JP2010268188A (en) * 2009-05-14 2010-11-25 Panasonic Corp Feedback type noise canceling headphone
EP2362678B1 (en) * 2010-02-24 2017-07-26 GN Audio A/S A headset system with microphone for ambient sounds
CN105992099A (en) * 2015-02-03 2016-10-05 中兴通讯股份有限公司 Terminal and method for terminal to broadcast audio signals directionally
CN106254990B (en) * 2016-09-12 2019-03-26 歌尔股份有限公司 Earphone noise-reduction method and noise cancelling headphone
DE112017006512T5 (en) * 2016-12-22 2019-10-24 Synaptics, Inc. Methods and systems for tuning an active noise canceling audio device by an end user
EP3660835A1 (en) * 2018-11-29 2020-06-03 AMS Sensors UK Limited Method for tuning a noise cancellation enabled audio system and noise cancellation enabled audio system
CN110740413B (en) * 2019-09-12 2022-01-28 广东思派康电子科技有限公司 Environmental sound monitoring parameter calibration system and method
CN110996215B (en) * 2020-02-26 2020-06-02 恒玄科技(北京)有限公司 Method, device and computer readable medium for determining noise reduction parameters of earphone
CN113873379B (en) * 2020-06-30 2023-05-02 华为技术有限公司 Mode control method and device and terminal equipment
CN113080948A (en) * 2021-03-31 2021-07-09 北京有竹居网络技术有限公司 Health detection method, apparatus, device, storage medium and computer program product

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160353196A1 (en) * 2015-06-01 2016-12-01 Doppler Labs, Inc. Real-time audio processing of ambient sound
US20210097970A1 (en) * 2019-09-27 2021-04-01 Apple Inc. Headphone acoustic noise cancellation and speaker protection
CN113873378A (en) * 2020-06-30 2021-12-31 华为技术有限公司 Earphone noise processing method and device and earphone
CN113949955A (en) * 2020-07-16 2022-01-18 Oppo广东移动通信有限公司 Noise reduction processing method and device, electronic equipment, earphone and storage medium
CN114157945A (en) * 2020-09-07 2022-03-08 华为技术有限公司 Data processing method and related device
CN112291664A (en) * 2020-10-30 2021-01-29 歌尔光学科技有限公司 Volume adjusting method, device and system of head-mounted display equipment
CN113556654A (en) * 2021-07-16 2021-10-26 RealMe重庆移动通信有限公司 Audio data processing method and device and electronic equipment
CN113938782A (en) * 2021-09-30 2022-01-14 安克创新科技股份有限公司 Earphone in-ear state recognition and earphone mode self-adaptive adjustment method and earphone
CN114466278A (en) * 2022-04-11 2022-05-10 荣耀终端有限公司 Method for determining parameters corresponding to earphone mode, earphone, terminal and system

Also Published As

Publication number Publication date
CN114466278B (en) 2022-08-16
CN114466278A (en) 2022-05-10

Similar Documents

Publication Publication Date Title
WO2020228095A1 (en) Real-time voice wake-up audio device, operation method and apparatus, and storage medium
US9613028B2 (en) Remotely updating a hearing and profile
CN104521247B (en) Bluetooth headset hearing aid and anti-noise method and apparatus
WO2020019846A1 (en) Method for controlling volume of wireless headset, wireless headset and mobile terminal
CN110493678B (en) Earphone control method and device, earphone and storage medium
WO2020057419A1 (en) Audio control method and device, and terminal
US10932076B2 (en) Automatic control of binaural features in ear-wearable devices
WO2022252781A1 (en) Noise reduction control method, electronic device, and computer-readable storage apparatus
US11595766B2 (en) Remotely updating a hearing aid profile
CN111541966B (en) Uplink noise reduction method and device of wireless earphone and wireless earphone
WO2023197474A1 (en) Method for determining parameter corresponding to earphone mode, and earphone, terminal and system
CN111063363B (en) Voice acquisition method, audio equipment and device with storage function
CN113207056B (en) Wireless earphone and transparent transmission method, device and system thereof
CN116193311A (en) Sound quality optimization method of wireless earphone, related equipment, medium and program product
WO2023284406A1 (en) Call method and electronic device
WO2022199222A1 (en) Noise reduction method and apparatus for audio playing device, and electronic device and storage medium
WO2023087468A1 (en) Method and apparatus for controlling transparency mode of earphones, and earphone device and storage medium
US11528549B2 (en) Method for improving electrical endurance of batteries of wireless headphones and the wireless headphones
CN115499744A (en) Earphone noise reduction method and device, computer readable storage medium and earphone
CN107493376A (en) A kind of ringing volume adjusting method and device
CN114257910A (en) Audio processing method and device, computer readable storage medium and electronic equipment
CN114071307A (en) Earphone volume adjusting method, device, equipment and medium
Kąkol et al. A study on signal processing methods applied to hearing aids
WO2021103262A1 (en) Earphone control method, earphone and readable storage medium
WO2020019822A1 (en) Microphone hole blockage detecting method and related product

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22937112

Country of ref document: EP

Kind code of ref document: A1