Audio processing method, device, medium and electronic equipment
By detecting voice signals and adjusting the encoding parameters of the headphones according to the audio energy value, the problem of headphone transmission bandwidth not being reasonably allocated in online meetings and other situations is solved, which improves resource utilization and audio quality and reduces power consumption.
Patent Information
- Application Number
- CN202210734236.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2042-06-24
AI Technical Summary
In voice calls in online meetings and other situations, users are often in a state where they only listen to audio but not speak, resulting in the headset's transmission bandwidth not being reasonably allocated, low resource utilization, high power consumption, short battery life, and low audio quality.
By detecting whether the current uplink audio signal is a voice signal, if it is a voice signal, the encoding parameters are adjusted according to the audio energy value, including the sampling rate and encoding rate, so as to reasonably allocate the transmission bandwidth of the headset.
It realizes the rational adjustment of encoding parameters when users speak, improves the utilization rate of headphone resources, reduces power consumption, extends battery life, and improves the quality of audio.
Smart Images

Figure CN115273870B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of speech processing technology, and in particular to an audio processing method, device, medium and electronic device. Background Art
[0002] With the development of wireless communication technology, online meetings, online teaching, and online office work have become more and more normalized. In voice calls in online meetings and other situations, users are often in a state of only listening to audio without speaking. In this state, the headset still uses the same uplink coding rate as when speaking to encode and transmit wirelessly, occupying the bandwidth of wireless transmission. Summary of the invention
[0003] The present disclosure provides an audio processing method, device, medium and electronic device, aiming to reasonably allocate the transmission bandwidth of headphones, thereby improving the resource utilization of the headphones.
[0004] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0005] According to a first aspect of the present disclosure, there is provided an audio processing method, comprising: detecting whether a current uplink audio signal is a speech signal; if the uplink audio signal is a speech signal, adjusting a coding parameter corresponding to the uplink audio signal according to an audio energy value of the uplink audio signal; the coding parameter comprises a sampling rate and a coding rate.
[0006] According to a second aspect of the present disclosure, there is provided an audio processing device, comprising: a detection module: configured to detect whether a current uplink audio signal is a speech signal;
[0007] The first adjustment module is used to adjust the encoding parameter corresponding to the uplink audio signal according to the audio energy value of the uplink audio signal when the uplink audio signal is a speech signal.
[0008] According to a third aspect of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the audio processing method in the above embodiment when executing the computer program.
[0009] According to a fourth aspect of the present disclosure, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the audio processing method in the above embodiment is implemented.
[0010] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0011] In the technical solutions provided by some embodiments of the present disclosure, it is detected whether the current uplink audio signal is a voice signal; if the uplink audio signal is a voice signal, the coding parameters corresponding to the uplink audio signal are adjusted according to the audio energy value of the uplink audio signal. Through the above steps, it is realized that when the user is speaking, it is detected whether there is a voice signal and the coding parameters corresponding to the voice are adjusted according to the energy value of the voice signal emitted by the current user, which can reasonably allocate the transmission bandwidth of the headset, improve the utilization rate of the headset resources, reduce the power consumption required for the headset to transmit audio, extend the battery life of the headset, and improve the quality of the audio transmitted by the headset.
[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0014] Figure 1 A schematic diagram schematically shows an exemplary application scenario to which the audio processing method according to an embodiment of the present disclosure can be applied;
[0015] Figure 2 A schematic diagram of a flow chart of an audio processing method according to an exemplary embodiment of the present disclosure is shown;
[0016] Figure 3 A schematic diagram of a process for adjusting encoding parameters according to an exemplary embodiment of the present disclosure is shown;
[0017] Figure 4 A schematic diagram of a process for adjusting encoding parameters according to another exemplary embodiment of the present disclosure is shown;
[0018] Figure 5 A schematic diagram of a process for controlling a noise reduction control according to an exemplary embodiment of the present disclosure is schematically shown;
[0019] Figure 6 The following schematically shows a flow chart of adjusting encoding parameters according to another exemplary embodiment of the present disclosure;
[0020] Figure 7 The following schematically shows a flow chart of control signal transmission according to an exemplary embodiment of the present disclosure;
[0021] Figure 8 The structure diagram of the audio processing device in the exemplary embodiment of the present disclosure is schematically shown;
[0022] Fig. 9 The structure diagram of an electronic device in an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0023] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
[0024] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.
[0025] In the description of the present disclosure, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances. In addition, in the description of the present disclosure, unless otherwise specified, "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previously associated objects are in an "or" relationship.
[0026] refer to Figure 1 , schematically shows a schematic diagram of an exemplary application scenario to which the audio processing method of an embodiment of the present disclosure can be applied.
[0027] like Figure 1 As shown, it includes earphone 110 and user 120.
[0028] The earphone 110 is equipped with a VAD (Voice Activity Detection) module for detecting whether the audio signal is a voice signal. The earphone 110 can also be a device for communication such as a speaker or a microphone, which is not limited in the present disclosure.
[0029] Exemplarily, the headset 110 detects whether the current uplink audio signal is a voice signal through the voice activity detection module; if the uplink audio signal is a voice signal, the encoding parameters corresponding to the uplink audio signal are adjusted according to the audio energy value of the uplink audio signal; if the uplink audio signal is not a voice signal, the encoding parameters corresponding to the uplink audio signal are reduced.
[0030] For example, Figure 2 The flowchart of the audio processing method in the exemplary embodiment of the present disclosure is schematically shown.
[0031] Specifically, refer to Figure 2 , the audio processing method shown in the figure includes:
[0032] S210: Detect whether the current uplink audio signal is a voice signal.
[0033] In an exemplary embodiment, the headset 110 detects whether the current uplink audio signal is a voice signal through a voice activity detection module. The uplink audio signal refers to an audio signal that needs to be uploaded through the headset 110, such as uplink data encoded by the headset 110 and transmitted wirelessly. The detection period of the voice activity detection module can be set by the user 120.
[0034] S220: If the uplink audio signal is a speech signal, adjust a coding parameter corresponding to the uplink audio signal according to an audio energy value of the uplink audio signal.
[0035] In an exemplary embodiment, the audio energy value refers to the sum of the energies of the uploaded audio signal within a preset time period, and the unit of the preset time period may be seconds, milliseconds, or minutes. The adjustment refers to modifying the coding parameters corresponding to the audio signal so that the coding parameters are adapted to the uplink audio signal. If the uplink audio signal is a speech signal, the headset 110 adjusts the coding parameters corresponding to the uplink audio signal according to the audio energy value of the uplink audio signal. The coding parameters include but are not limited to: sampling rate and coding rate.
[0036] Exemplarily, the audio energy value can be divided into energy levels, and different energy levels can be further corresponded to different encoding parameters. The sampling rate and encoding rate of the audio signal are adjusted according to the sampling rate and encoding rate corresponding to different energy levels and the energy level to which the audio energy value belongs.
[0037] exist Figure 2In the technical solution provided by the illustrated embodiment, it is detected whether the current uplink audio signal is a voice signal; if the uplink audio signal is a voice signal, the encoding parameters corresponding to the uplink audio signal are adjusted according to the audio energy value of the uplink audio signal. Through the above steps, it is realized that when the user speaks, it is detected whether there is a voice signal and the encoding parameters corresponding to the voice are adjusted according to the energy value of the voice signal emitted by the current user, which can reasonably allocate the transmission bandwidth of the headset, improve the utilization rate of the headset resources, reduce the power consumption required for the headset to transmit audio, extend the battery life of the headset, and improve the quality of the audio transmitted by the headset.
[0038] The following combination Figures 3 to 7 The embodiment shown in the figure is Figure 2 The specific implementation methods of each step of the embodiment shown are described in detail:
[0039] For example, Figure 3 The flowchart of adjusting encoding parameters according to an exemplary embodiment of the present disclosure is schematically shown.
[0040] Specifically, refer to Figure 3 , the steps of adjusting the encoding parameters shown in the figure include:
[0041] S310: Obtain an audio energy value of an uplink audio signal.
[0042] In an exemplary embodiment, the earphone 110 obtains the audio energy value of the uplink audio signal.
[0043] S320: Determine whether the audio energy value is greater than a first threshold.
[0044] In an exemplary embodiment, the headset 110 determines the magnitude relationship between the audio energy value and the first threshold value. If the audio energy value is greater than the first threshold value, S330 is executed; if the audio energy value is not greater than the first threshold value, S310 is executed.
[0045] S330: Adaptively adjust the sampling rate and coding rate corresponding to the uplink audio signal according to the audio energy value.
[0046] In an exemplary embodiment, the earphone 110 adaptively adjusts the sampling rate and the coding rate corresponding to the uplink audio signal according to the audio energy value. The adaptive adjustment refers to: adjusting the sampling rate according to the corresponding relationship between the sampling rate and the audio energy value, and adjusting the coding rate according to the corresponding relationship between the coding rate and the audio energy value. Exemplarily, a correspondence table between energy levels and coding parameters can be pre-set, in which the audio energy values are divided into energy levels, and different energy levels correspond to different coding parameters, that is, different energy levels correspond to different sampling rates and coding rates. According to the energy level to which the audio energy value belongs and the coding parameter corresponding to the energy level, the sampling rate and coding rate of the audio signal are adjusted.
[0047] For example, it is assumed that when user 120 speaks normally, the corresponding audio energy value is quantized to level 1, the corresponding sampling rate is 40kHZ, and the corresponding encoding rate is 1411.2Kbps. During a meeting, user 120 increases the volume of his speech. At this time, the audio energy value corresponding to the volume of user 120's speech is quantized to level 3. The corresponding relationship table is queried to obtain the corresponding sampling rate of 60kHZ and the encoding rate of 2116.8Kbps. Then, the headset 110 automatically adjusts the above sampling rate to 60kHZ and the above encoding rate to 2116.8Kbps. Among them, the method of quantizing the audio energy value includes but is not limited to: firstly calculating the audio energy value corresponding to the uplink audio signal, and then dividing the audio energy value by the preset unit audio energy value to obtain the above audio energy level.
[0048] exist Figure 3 In the technical solution provided by the illustrated embodiment, the audio energy value of the uplink audio signal is obtained, and it is determined whether the audio energy value is greater than a first threshold value; according to the audio energy value, the sampling rate and the coding rate corresponding to the uplink audio signal are adaptively adjusted. Through the above steps, the sampling rate and the coding rate corresponding to the audio signal can be adaptively adjusted according to the energy level to which the audio energy value belongs, and the sampling rate and the coding rate can be increased when the audio energy value is high, thereby achieving high-quality voice calls and reducing the power consumption of the headset.
[0049] For example, Figure 4 A schematic diagram of a process of adjusting encoding parameters according to another exemplary embodiment of the present disclosure is schematically shown, which can be used as a specific implementation of S330.
[0050] Specifically, refer to Figure 4 , the steps of adjusting the encoding parameters shown in the figure include:
[0051] S410, determining an energy level of the audio energy value.
[0052] In an exemplary embodiment, the earphone 110 obtains the energy level to which the audio energy value belongs, wherein the energy level may be linear, nonlinear, or an energy level that follows a piecewise function.
[0053] S420: Determine a sampling rate and a coding rate corresponding to the uplink audio signal according to a corresponding relationship between the energy level and the coding parameter.
[0054] In an exemplary embodiment, the headset 110 determines the sampling rate and the coding rate corresponding to the uplink audio signal according to the corresponding relationship between the energy level and the coding parameter.
[0055] Exemplarily, the earphone 110 can classify the audio energy value into energy levels, and then adjust the sampling rate and encoding rate of the audio signal according to the sampling rates and encoding rates corresponding to different energy levels and the energy level to which the audio energy value belongs.
[0056] For example, assuming that when the user 120 speaks normally, the corresponding voice energy level is level 2, the corresponding sampling rate is 40kHZ, and the corresponding coding rate is 1411.2Kbps. During the meeting, the user 120 speaks for 100 seconds, and the headset 110 performs energy analysis on the 100 seconds of voice, and finds that the energy level corresponding to the 100 seconds of voice is level 3, then the sampling rate is adjusted to 60kHZ, and the coding rate is adjusted to 2116.8Kbps.
[0057] exist Figure 4 In the technical solution provided by the illustrated embodiment, the energy level of the audio energy value is first determined, and then the sampling rate and coding rate corresponding to the uplink audio signal are determined according to the corresponding relationship between the energy level and the coding parameter. Through the above steps, the sampling rate and coding rate corresponding to the audio signal can be adaptively adjusted according to the energy level to which the audio energy value belongs, thereby achieving high-quality voice calls and reducing the power consumption of the headset.
[0058] In an exemplary embodiment, Figure 5 A flowchart of controlling a noise reduction control according to an exemplary embodiment of the present disclosure is schematically shown.
[0059] refer to Figure 5 , the process of controlling the noise reduction control shown in the figure includes:
[0060] S510: If the uplink audio signal is a voice signal, enable a noise reduction control.
[0061] In an exemplary embodiment, if the earphone 110 detects that the audio signal is a voice signal, the noise reduction control is turned on. The noise reduction control may be disposed inside the earphone 110 or on the surface of the earphone 110 .
[0062] Exemplarily, the above-mentioned noise reduction controls include but are not limited to: ANC (Active Noise Control) control, ENC (Environmental Noise Cancellation) control, DSP (digital signal processing) noise reduction control, and CVC (Clear Voice Capture) control.
[0063] Among them, the working principle of ANC is that the microphone collects external environmental noise, and then the system transforms it into an inverted sound wave and adds it to the speaker end. The final sound heard by the human ear is: environmental noise + inverted environmental noise. ENC can effectively suppress 90% of the reverse environmental noise, thereby reducing the environmental noise by up to 35dB, allowing gamers to communicate more freely. Through the dual microphone array, the direction of the caller's speech is accurately calculated, while protecting the target voice in the main direction, various interference noises in the environment are removed. DSP is mainly aimed at high and low frequency noise. The working principle is that the microphone collects external environmental noise, and then the system copies a reverse sound wave equal to the external environmental noise to offset the noise, thereby achieving a better noise reduction effect. CVC is mainly aimed at the echo generated during the call. Through the full-duplex microphone noise cancellation software, it provides the echo and environmental noise cancellation function of the call, which is currently the most advanced noise reduction in Bluetooth call headsets.
[0064] S520: If the uplink audio signal is not a speech signal, reduce or turn off the noise reduction control according to the current environmental noise energy.
[0065] In an exemplary embodiment, if the earphone 110 detects that the audio signal is not a speech signal, the noise reduction control is reduced or turned off according to the current environmental noise energy.
[0066] Among them, the earphone 110 can reduce the noise reduction level of the noise reduction control to a preset level. The above noise reduction level has multiple levels, and different noise reduction levels correspond to different noise reduction powers.
[0067] Exemplarily, the noise reduction control may adaptively select a noise reduction level that matches the current ambient noise to perform noise reduction according to the energy of the current ambient noise.
[0068] Through the above steps, the power consumption of the headphone noise reduction can be further reduced.
[0069] Exemplarily, the user 120 can manually control the opening or closing of the noise reduction control by touch.
[0070] Figure 5The technical solution provided by the illustrated embodiment determines whether the uplink audio signal is a voice signal through the VAD module, and turns on the noise reduction control when the uplink audio signal is a voice signal; when the uplink audio signal is not a voice signal, the noise reduction control is reduced or turned off according to the current environmental noise energy. Through the above steps, the noise reduction control can be turned on when the user is speaking, and turned off when the user is not speaking, which can further save the power consumption of the headset.
[0071] For example, Figure 6 A flowchart of adjusting encoding parameters according to another exemplary embodiment of the present disclosure is schematically shown.
[0072] refer to Figure 6 In S610, it is detected whether the current uplink audio signal is a voice signal.
[0073] In an exemplary embodiment, the specific implementation of S610 is the same as that of S210 and will not be described in detail herein.
[0074] In S620, if the uplink audio signal is a speech signal, an audio energy value of the uplink audio signal is obtained.
[0075] In an exemplary embodiment, the specific implementation of S620 is the same as that of S220 and will not be described in detail herein.
[0076] In S620', if the uplink audio signal is not a speech signal, the encoding parameter corresponding to the uplink audio signal is reduced to a preset threshold.
[0077] In an exemplary embodiment, if the voice activity detection module detects that the uplink audio signal is not a voice signal, the headset 110 reduces the encoding parameter corresponding to the uplink audio signal to a preset threshold. The preset threshold can be set in advance in the headset 110 by the user 120, and the method of setting the preset threshold includes but is not limited to: voice setting or touch setting.
[0078] Exemplarily, the reduction refers to reducing the frequency corresponding to the coding parameter. For example, if the frequency corresponding to the initial coding parameter is 40 kHz, the coding parameter can be reduced to 20 kHz.
[0079] For example, in the first 10 seconds after the headset 110 successfully establishes communication, the sampling rate and coding rate of the uplink audio signal are normal values, that is, in the initial 10 seconds after the headset 110 establishes communication, the audio signal is assumed to be voice. When the voice activity detection module detects that the audio signal is not a voice signal, the headset 110 reduces the sampling rate and coding rate corresponding to the uplink audio signal.
[0080] Exemplarily, when the user 120 determines that he does not need to speak, the voice activity detection module can be turned off, and the sampling module and the encoding module of the headset can be turned off, so as to further reduce the power consumption of the headset 110.
[0081] In S630, the encoding parameters corresponding to the uplink audio signal are adjusted according to the audio energy value.
[0082] In an exemplary embodiment, the specific implementation of S630 is the same as that of S230 and will not be described in detail herein.
[0083] In S630 ′, the uplink audio signal is sampled based on the reduced sampling rate, and the uplink audio signal is encoded based on the reduced encoding rate.
[0084] The earphone 110 samples the uplink audio signal based on the reduced sampling rate, and encodes the uplink audio signal based on the reduced encoding rate.
[0085] Through the above solution, the power consumption of the headset 110 can be reduced, and the resources of the headset 110 occupied by encoding the audio can be saved.
[0086] Figure 6 The technical solution provided by the illustrated embodiment first detects whether the current uplink audio signal is a voice signal. If the uplink audio signal is a voice signal, the audio energy value of the uplink audio signal is obtained, and then the encoding parameters corresponding to the uplink audio signal are adjusted according to the audio energy value; if the uplink audio signal is not a voice signal, the sampling rate and encoding rate corresponding to the uplink audio signal are reduced, and then the uplink audio signal is sampled based on the reduced sampling rate, and the uplink audio signal is encoded based on the reduced encoding rate. Through the above scheme, the sampling rate and encoding rate are adjusted to a suitable range according to whether the uplink audio signal is a voice signal, which further reduces the power consumption of the headset, adjusts the resource allocation of the headset, and improves the call quality of the user.
[0087] In an exemplary embodiment, Figure 7 A schematic diagram of a flow chart of control signal sending according to an exemplary embodiment of the present disclosure is schematically shown, which can be used as a specific implementation of any of the above embodiments.
[0088] refer to Figure 7 , the process of sending the above control signal includes:
[0089] S710: In the process of sending an uplink audio signal, obtain a current resource occupancy rate of the headset.
[0090] In an exemplary embodiment, during the process of sending the uplink audio signal, the headset 110 obtains its current resource occupancy rate in real time, wherein the resource occupancy rate includes but is not limited to: the computing power occupancy rate and the cache occupancy rate of the processor.
[0091] S720: Determine whether the resource occupancy rate reaches a second threshold.
[0092] In an exemplary embodiment, the headset 110 determines whether the resource occupancy rate reaches a second threshold value. The second threshold value can be set by the user 120 on a terminal device, and the terminal device has a built-in application for controlling the headset 110 and is connected to the headset 110 in a wireless manner.
[0093] S730: Determine whether the resource occupancy rate reaches a third threshold.
[0094] In an exemplary embodiment, the headset 110 determines whether the resource occupancy rate reaches a third threshold value. The third threshold value may be set by the user 120 on the terminal device.
[0095] S740: Suspend sending of uplink audio signals.
[0096] In an exemplary embodiment, the headset 110 suspends sending of the uplink audio signal and buffers the audio signal.
[0097] S740', compress the uplink audio signal, and send the compressed uplink audio signal.
[0098] In an exemplary embodiment, the headset 110 compresses the uplink audio signal and sends the compressed uplink audio signal.
[0099] Exemplarily, the user 110 can control the headset 110 to pause or not pause sending the uplink audio signal through the terminal device.
[0100] Figure 7The technical solution provided by the illustrated embodiment, in the process of sending an uplink audio signal, first obtains the current resource occupancy rate of the headset, and determines whether the resource occupancy rate reaches the second threshold. When the resource occupancy rate reaches the second threshold, further determine whether the resource occupancy rate reaches the third threshold. When the resource occupancy rate reaches the third threshold, suspend the sending of the uplink audio signal; when the resource occupancy rate does not reach the third threshold, compress the uplink audio signal, and send the compressed uplink audio signal. Through the above scheme, it is achieved that the uplink audio signal is compressed and sent when the headset resources are tight. It also achieves the suspension of the sending of the uplink audio signal when the headset resources are tight, and continues to send the uplink audio signal when the headset resources are not tight, thereby solving the packet loss problem caused by tight headset resources and improving the user's call quality.
[0101] In an exemplary embodiment, as a specific implementation of any of the above embodiments, before detecting whether the current uplink audio signal is a voice signal, it also includes:
[0102] In response to the headset 110 successfully establishing a call, the VAD module and the ENC are automatically initialized, and the initial sampling rate and the initial coding rate are set. The user 120 can view the initialization state of the headset 110 through the terminal device, and set the initial sampling rate and the initial coding rate through the terminal device.
[0103] Through the above solution, the initialization of the headset is made more visual, and the portability of controlling the headset is improved.
[0104] In an exemplary embodiment, the present disclosure also provides an audio processing method in another exemplary embodiment, specifically comprising:
[0105] 1. When a call starts, the headset 110 turns on ENC by default, sets a normal sampling rate and encoding rate, and then initializes the VAD module.
[0106] 2. Within a specified period of time after the call is established, the headset 110 assumes that the uplink audio signal is in a voice state, at which time the encoding parameters of the audio signal are normal parameters, and ENC is also enabled by default. After this period of time, VAD real-time voice detection is started.
[0107] 3. VAD detects in real time whether the current uplink audio is voice.
[0108] 4. Determine whether the current user has voice output, that is, whether the uplink audio signal is valid voice data. If it is valid data, execute part 6.
[0109] 5. Determine whether the current user has voice output, that is, whether the uplink audio signal is valid voice data. If VAD does not detect valid voice for a continuous period of time, execute part 7;
[0110] 6. ENC is turned on, the encoding parameters are set to normal parameters, and uplink data is continuously sent. If the current voice energy is detected to be higher than the threshold, the sampling rate and encoding bit rate are adaptively adjusted to provide high-quality voice audio output, and then continue to execute part 3.
[0111] 7. Turn off ENC, reduce the encoding bit rate, and reduce the size of the data packets sent. If the current headset resources are tight, you can (pause / wait) the sending of voice data packets.
[0112] Through the above solution, it is possible to detect in real time whether the user has voice output. When there is no voice output, it can effectively save the resources and power consumption of the headset and improve performance. At the same time, it can also provide high-quality voice data when there is voice output.
[0113] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0114] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0115] in, Figure 8 The structure diagram of the audio processing device according to the exemplary embodiment of the present disclosure is schematically shown. Figure 8 The audio processing device 800 shown in the figure includes: a detection module 810 and a first adjustment module 820.
[0116] Specifically, the detection module 810 is used to detect whether the current uplink audio signal is a voice signal.
[0117] The first adjustment module 820 is configured to adjust a coding parameter corresponding to the uplink audio signal according to an audio energy value of the uplink audio signal when the uplink audio signal is a speech signal.
[0118] In an exemplary embodiment, based on the above-mentioned scheme, the above-mentioned first adjustment module 820 is also used to: obtain the audio energy value of the above-mentioned uplink audio signal; when the above-mentioned audio energy value is greater than the first threshold, adaptively adjust the sampling rate and encoding rate corresponding to the above-mentioned uplink audio signal according to the above-mentioned audio energy value.
[0119] In an exemplary embodiment, based on the above scheme, the first adjustment module 820 is further used to: determine the energy level of the audio energy value; and determine the sampling rate and coding rate corresponding to the uplink audio signal according to the corresponding relationship between the energy level and the coding parameter.
[0120] In an exemplary embodiment, based on the aforementioned scheme, the audio processing device 800 further includes a control module for: if the uplink audio signal is a speech signal, turning on the noise reduction control; if the uplink audio signal is not a speech signal, reducing or turning off the noise reduction control according to the current ambient noise energy.
[0121] In an exemplary embodiment, based on the above-mentioned solution, the audio processing device 800 further includes a second adjustment module, which is used to: if the uplink audio signal is not a speech signal, reduce the encoding parameter corresponding to the uplink audio signal to a preset threshold.
[0122] In an exemplary embodiment, based on the above-mentioned solution, the audio processing device 800 further includes a coding module, which is used to: sample the uplink audio signal based on the reduced sampling rate, and encode the uplink audio signal based on the reduced coding rate.
[0123] In an exemplary embodiment, based on the aforementioned scheme, the audio processing device 800 further includes a sending module, which is used to: obtain the current resource occupancy rate of the headset during the process of sending the uplink audio signal; when the resource occupancy rate reaches a second threshold, compress the uplink audio signal and send the compressed uplink audio signal; when the resource occupancy rate reaches a third threshold, suspend the sending of the uplink audio signal.
[0124] It should be noted that when the audio processing device provided in the above embodiment executes the audio processing method, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the audio processing device provided in the above embodiment belongs to the same concept as the audio processing method embodiment. Therefore, for details not disclosed in the embodiment of the device disclosed in the present invention, please refer to the embodiment of the audio processing method disclosed in the present invention, which will not be repeated here.
[0125] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0126] The present disclosure also provides a readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method of any of the above embodiments are implemented. The readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD (Digital Video Disc), a CD-ROM (Compact Disc Read-Only Memory), a micro drive and a magneto-optical disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electrically Erasable Programmable Read Only Memory), a DRAM (Dynamic Random Access Memory), a VRAM (Video RAM), a flash memory device, a magnetic card or an optical card, a nano system, or any type of medium or device suitable for storing instructions and / or data.
[0127] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the program.
[0128] Fig. 9 Schematically shows a structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. Fig. 9 As shown, the electronic device 900 includes: a processor 910 and a memory 920 .
[0129] In the embodiment of the present disclosure, the processor 910 is the control center of the computer system, which can be a processor of a physical machine or a processor of a virtual machine. The processor 910 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 910 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 910 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state.
[0130] In the embodiment of the present disclosure, the processor 910 is specifically used for:
[0131] Detect whether the current uplink audio signal is a voice signal;
[0132] If the uplink audio signal is a speech signal, the encoding parameter corresponding to the uplink audio signal is adjusted according to the audio energy value of the uplink audio signal.
[0133] Furthermore, adjusting the encoding parameters corresponding to the uplink audio signal according to the audio energy value of the uplink audio signal includes: obtaining the audio energy value of the uplink audio signal; and adaptively adjusting the sampling rate and encoding rate corresponding to the uplink audio signal according to the audio energy value when the audio energy value is greater than a first threshold.
[0134] Furthermore, the adaptively adjusting the sampling rate and coding rate corresponding to the uplink audio signal according to the audio energy value includes: determining an energy level of the audio energy value; and determining the sampling rate and coding rate corresponding to the uplink audio signal according to a correspondence between the energy level and the coding parameter.
[0135] Furthermore, the method further includes: if the uplink audio signal is a voice signal, turning on the noise reduction control; if the uplink audio signal is not a voice signal, reducing or turning off the noise reduction control according to the current ambient noise energy.
[0136] Furthermore, the method further comprises: if the uplink audio signal is not a speech signal, reducing the encoding parameter corresponding to the uplink audio signal to a preset threshold.
[0137] Furthermore, the method further includes: sampling the uplink audio signal based on the reduced sampling rate, and encoding the uplink audio signal based on the reduced coding rate.
[0138] Furthermore, the method also includes: in the process of sending the uplink audio signal, obtaining the current resource occupancy rate of the headset; when the resource occupancy rate reaches a second threshold, compressing the uplink audio signal and sending the compressed uplink audio signal; when the resource occupancy rate reaches a third threshold, suspending the sending of the uplink audio signal.
[0139] The memory 920 may include one or more readable storage media, which may be non-transitory. The memory 920 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments of the present disclosure, the non-transitory readable storage medium in the memory 920 is used to store at least one instruction, which is used to be executed by the processor 910 to implement the method in the embodiment of the present disclosure.
[0140] In some embodiments, the electronic device 900 further includes: a peripheral device interface 930 and at least one peripheral device. The processor 910, the memory 920 and the peripheral device interface 930 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 930 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a display screen, a camera and an audio circuit.
[0141] The peripheral device interface 930 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 910 and the memory 920. In some embodiments of the present disclosure, the processor 910, the memory 920, and the peripheral device interface 930 are integrated on the same chip or circuit board; in some other embodiments of the present disclosure, any one or two of the processor 910, the memory 920, and the peripheral device interface 930 may be implemented on a separate chip or circuit board. The embodiments of the present disclosure are not specifically limited to this.
[0142] The noise reduction control 940 is used to reduce environmental noise and extract speech from the environmental noise.
[0143] The voice activity detection module 950 is used to detect whether the user has uttered a voice.
[0144] The terminal structure block diagram shown in the embodiment of the present disclosure does not constitute a limitation on the electronic device 900. The electronic device 900 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0145] In the present disclosure, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or order; the term "plurality" refers to two or more, unless otherwise expressly defined. The terms "installed", "connected", "connected", "fixed", etc. should be understood in a broad sense. For example, "connected" can be a fixed connection, a detachable connection, or an integral connection; "connected" can be a direct connection or an indirect connection through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in the present disclosure can be understood according to the specific circumstances.
[0146] In the description of the present disclosure, it is necessary to understand that the orientation or positional relationship indicated by the terms "upper" and "lower" etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present disclosure and simplifying the description, rather than indicating or implying that the device or unit referred to must have a specific direction, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present disclosure.
[0147] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure. Therefore, equivalent changes made according to the claims of the present disclosure are still within the scope covered by the present disclosure.
Claims
1. An audio processing method, characterized in that: Applied to headphones, the method comprises: Detect whether the current uplink audio signal is a voice signal; If the uplink audio signal is a speech signal, adjusting the encoding parameters corresponding to the uplink audio signal according to the audio energy value of the uplink audio signal; the encoding parameters include a sampling rate and a coding rate, and the audio energy value is the sum of the energies of the uplink audio signal within a preset time period; The step of adjusting the encoding parameter corresponding to the uplink audio signal according to the audio energy value of the uplink audio signal includes: In a case where the audio energy value is greater than a first threshold, determining an energy level of the audio energy value; Determining a sampling rate and a coding rate corresponding to the uplink audio signal according to a correspondence between the energy level and the coding parameter; If the uplink audio signal is not a speech signal, the encoding parameter corresponding to the uplink audio signal is reduced to a preset threshold.
2. The audio processing method according to claim 1, characterized in that: The headset is also configured with a noise reduction control, and the method further includes: If the uplink audio signal is a voice signal, turning on the noise reduction control; If the uplink audio signal is not a speech signal, the noise reduction control is reduced or turned off according to the current environmental noise energy.
3. The audio processing method according to claim 1 or 2, characterized in that: The method further comprises: In the process of sending the uplink audio signal, obtaining the current resource occupancy rate of the headset; When the resource occupancy rate reaches a second threshold, compressing the uplink audio signal and sending the compressed uplink audio signal; When the resource occupancy rate reaches a third threshold, the sending of the uplink audio signal is suspended.
4. An audio processing device, characterized in that: Applied to earphones, the earphones are equipped with a voice activity detection module, including: Detection module: used to detect whether the current uplink audio signal is a voice signal; A first adjustment module: used for adjusting the encoding parameter corresponding to the uplink audio signal according to the audio energy value of the uplink audio signal when the uplink audio signal is a speech signal, wherein the audio energy value is the sum of the energy of the uplink audio signal within a preset time period; The first adjustment module is specifically configured to determine an energy level of the audio energy value when the audio energy value is greater than a first threshold; According to the correspondence between the energy level and the coding parameter, adjusting the sampling rate and the coding rate corresponding to the uplink audio signal; The second adjustment module is used for reducing the encoding parameter corresponding to the uplink audio signal to a preset threshold value if the uplink audio signal is not a speech signal.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the audio processing method according to any one of claims 1 to 3 is implemented.
6. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the audio processing method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Method for determining coding rate of audio and video data, terminal, and storage medium
CN108702352A
High-efficiency noise canceling earphone and noise canceling system with low power consumption
CN108712703A
Method and device for optimizing voice coding rate and operand, and storage medium
CN112599140A
Data storage system and operating method of controller
US20210311656A1