WO2017121245A1 - Method for achieving surround sound, electronic device, and storage medium - Google Patents

Method for achieving surround sound, electronic device, and storage medium Download PDF

Info

Publication number
WO2017121245A1
WO2017121245A1 PCT/CN2016/113113 CN2016113113W WO2017121245A1 WO 2017121245 A1 WO2017121245 A1 WO 2017121245A1 CN 2016113113 W CN2016113113 W CN 2016113113W WO 2017121245 A1 WO2017121245 A1 WO 2017121245A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio data
channel audio
channel
value
amplitude value
Prior art date
Application number
PCT/CN2016/113113
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 WO2017121245A1 publication Critical patent/WO2017121245A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04SSTEREOPHONIC SYSTEMS 
    • H04S1/00Two-channel systems

Definitions

  • the present invention relates to the field of audio technologies, and in particular, to a surround sound implementation method, an electronic device, and a storage medium.
  • Surround sound is a special sound effect.
  • the sound field generated by surround sound preserves the sound source direction of the original signal, which gives the listener a strong sense of space and can realistically reproduce the spatial reverberation process of the performance hall. It has a more touching sense of presence.
  • surround sound is usually required to use the simulated head recording method during recording.
  • the simulated head recording method is to place two miniature omnidirectional microphones in the ear canal of a simulated human head which is basically consistent with the human head (close to the eardrum of the human ear). ), simulating the entire process of recording the human ear.
  • the current recording process of the human head recording method is complicated and costly; and the artificial head recording method is a special processing taken during recording, and the ordinary audio data cannot be surrounded by this method because the artificial head recording method is not used.
  • Stereo poor universality.
  • a surround sound implementation method an electronic device, and a storage medium are provided.
  • a surround sound implementation method comprising:
  • the first channel audio data and the second channel audio data are output through different sounding units, respectively.
  • An electronic device comprising a memory and a processor, the memory storing computer readable instructions, wherein the computer readable instructions are executed by the processor such that the processor performs the following steps:
  • the first channel audio data and the second channel audio data are output through different sounding units, respectively.
  • One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
  • the first channel audio data and the second channel audio data are output through different sounding units, respectively.
  • FIG. 1 is a structural diagram and an application environment diagram of an electronic device for implementing a surround sound implementation method in an embodiment
  • FIG. 2 is a schematic flow chart of a method for implementing surround sound in an embodiment
  • FIG. 3 is a schematic diagram showing changes in the position of a sound image in a human brain when the time difference between the two ears changes in one embodiment
  • FIG. 4 is a schematic diagram of performing sound image splitting processing on first channel audio data and second channel audio data in one embodiment
  • FIG. 5 is a schematic diagram showing an equivalent circuit for performing weighting enhancement processing on the first channel audio data and the second channel audio data after the sound image splitting process in one embodiment
  • FIG. 6 is a flow chart showing the steps of compressing the amplitude values of the first channel audio data and the second channel audio data to a range of effective amplitude values in one embodiment
  • FIG. 7 is a structural block diagram of an electronic device in an embodiment
  • FIG. 8 is a structural block diagram of an amplitude value adjustment module in an embodiment
  • FIG. 9 is a structural block diagram of an electronic device in another embodiment.
  • FIG. 10 is a structural block diagram of an electronic device in still another embodiment.
  • an electronic device includes a processor coupled through a system bus, a non-volatile storage medium, an internal memory, and an audio output interface.
  • the processor has a computing function and a function of controlling the operation of the electronic device, the processor being configured to perform a surround sound implementation method.
  • Non-volatile storage media include magnetic storage media, optical storage media, and flash memory At least one of the storage mediums, the non-volatile storage medium storing an operating system.
  • the audio output interface is used for outputting an analog signal of audio data, and the sound signal can be converted into sound waves through a sounding unit connected to the audio output interface, so that the human ear can hear the sound content recorded by the audio data.
  • the electronic device can be a mobile terminal such as a mobile phone, a tablet computer, a music player, or a personal digital assistant (PDA), or can be a desktop computer.
  • PDA personal digital assistant
  • a surround sound implementation method is provided. This embodiment is exemplified by the method applied to the electronic device in FIG. 1 described above. As shown in FIG. 2, the method specifically includes the following steps:
  • Step 202 Acquire first channel audio data.
  • the electronic device acquires the first channel audio data from the audio data source
  • the audio data source may be stored locally in the electronic device, that is, the terminal may obtain the first channel audio data locally from the electronic device; the audio data source may also be stored in the network.
  • the electronic device can acquire the first channel audio data from the audio data source through the network.
  • the audio data source may use an audio format such as MP3 (Moving Picture Experts Group Audio Layer III), WMA (Windows Media Audio) or APE (a lossless audio format).
  • Step 204 Acquire second channel audio data having a fixed delay compared to the first channel audio data.
  • the first channel audio data and the second channel audio data are used to distinguish audio data of different channels. If the first channel audio data is left channel audio data, the second channel audio data may be right channel audio data; or, if the first channel audio data is right channel audio data, second channel audio data It can be left channel audio data.
  • the acquired second channel audio data is delayed by a fixed delay than the first channel audio data, and the fixed delay is an Interdural Time Difference (ITD), and the fixed delay is used to widen the sound field, specifically for splitting. Sound image to broaden the sound field.
  • the sound image is a human perception sound source, and the fixed delay is used to split the sound image, which means that if the first channel audio data and the second channel audio data with a fixed delay are respectively converted into sound waves, the sound is output to the human ear. People will perceive that there are two sound sources with the same or similar sound content but different positions in their heads.
  • the sound image position is moved from the center of the human brain along the axial direction between the ears.
  • the time difference between the two ears changes from 0.6ms to 10ms, the position of the sound image no longer moves along the axial direction between the ears, but the shape changes, resulting in widening of the sound image, and the variation range increases with the increase of the time difference between the two ears.
  • the time difference between the two ears continues to increase to a certain value, the widened sound image produced in the human brain is split into two symmetrical and unwidened sound images.
  • the specific value here is generally between 15ms and 50ms, and the specific value is also related to the characteristics of the audio data source, such as the channel difference existing in the audio data source itself.
  • the fixed delay can take values between 15ms and 50ms.
  • Step 206 Adjust amplitude values of the first channel audio data and/or the second channel audio data such that the amplitude value of the first channel audio data is smaller than the amplitude value of the second channel audio data.
  • the electronic device may adjust the amplitude value of the first channel audio data, or adjust the amplitude value of the second channel audio data, or simultaneously adjust the amplitude value of the first channel audio data and the amplitude of the second channel audio data.
  • the amplitude value here refers to the time domain amplitude value. After adjustment, the amplitude value of the first channel audio data is smaller than the amplitude value of the corresponding second channel audio data.
  • Step 208 outputting first channel audio data and second channel audio data through different sounding units, respectively.
  • the electronic device can connect two sounding units, that is, a first sounding unit and a second sounding unit, and the two sounding units can be a left ear sounding unit and a right ear sounding unit of the earphone, respectively.
  • the electronic device can convert the first channel audio data into an analog signal, output the sound wave through the first sounding unit, convert the second channel audio data into an analog signal, and then generate the sound wave through the second sounding unit.
  • the second channel audio data has a fixed delay compared to the first channel audio data, and the fixed delay can split the sound image, so that the sound source perceived by the human ear is more than one, and the sound field is broadened. .
  • the fixed delay generates a bias phenomenon, and the amplitude value of the first channel audio data is smaller than the second channel audio data by adjusting the amplitude values of the first channel audio data and/or the second channel audio data. Amplitude value.
  • the amplitude value of the delayed second channel audio data is enhanced compared to the amplitude of the undelayed first channel audio data, and the bias caused by the delay is compensated by the change of the amplitude value, and the surround sound is realized. At the same time avoid the phenomenon of partial sound. It is not necessary to simulate the human head recording mode, and ordinary audio data can be realized by computer program processing, and has a strong general Fitness.
  • step 204 specifically includes: acquiring second channel audio data that is time synchronized with the first channel audio data, and inserting one frame of audio data into the time synchronized second channel audio data.
  • the electronic device can directly acquire the second channel audio data that is time-synchronized with the first channel audio data from the audio data source. If the audio data source itself has no channel distinction, the two channels can be obtained from the audio data source. The same audio data is used as time-synchronized first channel audio data and second channel audio data, respectively.
  • the length of time of one frame of audio data is generally between 15ms and 50ms of a fixed delay.
  • the audio data of one frame in the MP3 audio format is 26ms, so that the sound can be quickly realized by inserting one frame of audio data in the second audio data.
  • the fixed delay is the length of time of one frame of audio data.
  • z denotes a z-transformation, which can transform a time domain signal (ie, a discrete time series) into an expression in a complex frequency domain.
  • T represents a fixed delay
  • the inserted audio data can be generated according to the previous frame audio data and the subsequent frame audio data at the insertion point, so that the previous frame audio data smoothly transitions to the inserted one frame of audio data, and the inserted one frame of audio data smoothly transitions to the rear.
  • the inserted audio data may be generated according to the previous frame audio data and the subsequent frame audio data at the insertion point, specifically according to the last sample point value of the previous frame audio data and the first sample point value of the subsequent frame audio data. generate. This prevents noise from being generated by inserting one frame of audio data.
  • step 204 specifically includes: acquiring the same time as the first channel audio data.
  • the second channel audio data of the step deletes one frame of audio data in the first channel audio data.
  • the electronic device can not only insert one frame of audio data into the second channel audio data, but also delete one frame of audio data from the first channel audio data, so that the second channel audio data is compared with the first Channel audio data has a fixed delay.
  • the fixed delay is the length of time of one frame of audio data.
  • the length of time for one frame of audio data is generally between 15ms and 50ms for a fixed delay.
  • the audio data of one frame in the MP3 audio format is 26ms, which can be quickly deleted by deleting one frame of audio data in the first channel audio data. Realizes sound image splitting, and does not have too much impact on the original audio data, efficient and accurate.
  • the audio data of the previous frame of the deleted one frame of audio data and the audio data of the latter frame are smoothly transitioned.
  • the first sample point value of the deleted audio data and the last sample point value are equal or the difference satisfies the minimum condition; or, the previous frame audio of the deleted one frame of the audio data may also be
  • the data and the subsequent frame of audio data are processed such that the previous frame of audio data and the subsequent frame of audio data are smoothly transitioned. This prevents noise from being generated by deleting one frame of audio data.
  • the step 206 specifically includes: adding the first channel audio data to the first channel center gain value, where the first channel center gain value is the sum of the first channel audio data and the second channel audio data. Multiplying the first center coefficient; adding the second channel center data gain value to the second channel audio data, and the second channel center gain value is the sum of the first channel audio data and the second channel audio data Then multiplied by the second center coefficient; the first center coefficient is smaller than the second center coefficient.
  • the first centering coefficient may take one, and the corresponding second centering factor may take (1, 1.2). In one embodiment, the first centering factor is taken as 1 and the second centering factor is taken as 1.2.
  • Li is the first channel audio after the sound image splitting process.
  • Ri is the second channel audio data after the sound image split processing
  • Lo is the first channel audio data after the weight enhancement processing
  • Ro is the second channel audio data after the weight enhancement processing.
  • "-" means that the input signal is made worse
  • "+” means that the input signals are summed
  • the inverter is used. Reverse the phase of the signal that will pass.
  • n represents the center coefficient
  • p represents the spatial sense gain parameter
  • Chinese represents the head correlation transform function, and is a sound effect localization algorithm.
  • the weighting enhancement processing of the first channel audio data Li and the second channel audio data Ri after the sound image splitting processing may adopt the following formula (2):
  • Lo represents the first channel audio data that is output after the first channel audio data Li is subjected to the weight enhancement processing
  • Ro represents the second channel audio data that is output after the second channel audio data Ri is subjected to the weight enhancement processing.
  • n L represents the first mid-coefficient and n R represents the second mid-coefficient. Indicates that the convolution is sought.
  • the first centering coefficient n L may take 1 and the corresponding second center coefficient n R may take (1, 1.2). In one embodiment, the first center coefficient n L takes 1 and the second The center coefficient n R can be taken as 1.2.
  • the sound image is split into two: the original sound image and the rear sound image, while the sound field is pulled to both ears, leaving less sound field in the head.
  • the sound image field at both ears will spread to the surroundings, thus increasing the sound field distribution in the head; at the same time, giving the non-delay channel a small n value in the calculation can weaken the partial sound effect.
  • step 206 further comprising: performing high pass filtering and low pass filtering on the first channel audio data and the second channel audio data.
  • the electronic device may be filtered in the order of low-pass filtering and high-pass filtering first, or may be filtered in the order of high-pass filtering and low-pass filtering. Both high-pass filtering and low-pass filtering can be implemented by a computer program calling the corresponding function.
  • the extremely low frequency portion and the extremely high frequency portion of the audio do not affect the sound perception.
  • the audio data of the two channels are subjected to high and low cut processing to reduce high frequency sound and low frequency. The effect of the sound on the finite amplitude value and does not affect the original audio quality.
  • the electronic device may first filter the first channel audio data and the second channel audio data by using a low pass filter function, and then filter the first channel audio data and the second channel audio data by using a high pass filter function. It can be expressed by the following formula (3):
  • Li represents first channel audio data before high pass filtering and low pass filtering
  • Ri represents second channel audio data before high pass filtering and low pass filtering
  • LP() represents a low-pass filter function
  • HP() represents a high-pass filter function
  • Lo represents the first channel audio data after high-pass filtering and low-pass filtering
  • Ro represents the second channel audio data after high-pass filtering and low-pass filtering.
  • the method further includes the step of compressing the amplitude values of the first channel audio data and the second channel audio data into a range of effective amplitude values.
  • the method further includes the following steps:
  • Step 602 When the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds the effective amplitude value range, the corresponding amplitude value is obtained according to the maximum effective amplitude value of the effective amplitude value range, and the segmentation value sequence is obtained.
  • the effective amplitude value range can be expressed as [-A, A], where A represents the maximum effective amplitude value and A can take 1.
  • Segmentation according to the maximum effective amplitude value means that the segmentation is performed in units of the maximum effective amplitude value, and the obtained segmentation values constitute a sequence of segmentation values in the order of segmentation. For example, assuming that the maximum effective amplitude value is 1, and the absolute value of the corresponding amplitude value is 3.2, the sequence of segmentation values obtained by segmentation according to the maximum effective amplitude value is 1, 1, 1, 0.2.
  • Step 604 Obtain a weight of each segment value in the sequence of segment values, and the obtained values of the weights are sequentially decremented and the sum of the obtained weights is less than or equal to 1.
  • the electronic device acquires a weight assigned to each segment value in the sequence of segment values, and the acquired weights are sequentially decremented in the order of the sequence of segment values, and the sum of the weights of all segment values in the sequence of segment values is smaller than Equal to 1.
  • the sum of the weights is less than or equal to 1 is that the weight is required to satisfy the condition, and does not mean that the sum of the weights is to be calculated.
  • the sequence of segmentation values is 1, 1, 1, 0.2; then the weights can be 0.5, 0.25, 0.1, 0.08 in turn, and these weights are decremented, and the sum is 0.93, satisfying the weight and the condition less than 1. .
  • Step 606 Calculate a weighted sum of the sequence of segment values according to the obtained weights.
  • Step 608 resetting the corresponding amplitude value according to the weighted sum.
  • the amplitude value of the reset should be the same as the sign of the corresponding amplitude value. If the corresponding amplitude value is originally a positive value, the corresponding amplitude value is reset to a weighted sum; if the corresponding amplitude value is originally a negative value, the corresponding amplitude value is reset to the opposite of the weighted sum.
  • the portion where the corresponding amplitude value does not exceed the effective amplitude value range and the portion exceeding the effective amplitude value range are respectively compressed by different compression ratios, so that the corresponding amplitude value after compression belongs within the effective amplitude value range.
  • the compression ratio of the portion exceeding the effective amplitude value range is larger than the compression ratio of the portion not exceeding the effective amplitude value range.
  • step 604 specifically includes: obtaining a weight parameter K greater than one; and sequentially selecting each of the segments in the sequence of segment values according to a ratio of 1-1/K and a ratio of 1/K. Segment values are assigned weights.
  • the weight parameter K is a control parameter used to control the weight allocation strategy. By adjusting the size of K, the weighting ratio of each segment value in the segment value sequence can be controlled. K is greater than 1, so 1-1/K is greater than 0, and 1/K is greater than 0, and all of the constituent geometric series are positive.
  • the weights are assigned to the segment values in the sequence of segment values in the order of 1-1/K and the ratio of 1/K, which may be any from the series of equals. From the position (for example, from the first item), the values in the equal series are taken continuously or intermittently to assign weights to the respective segment values in the sequence of segment values, and the assigned weights must satisfy the successive decrement and the sum of the weights is less than or equal to 1. condition.
  • an electronic device 700 includes a first obtaining module 701 , a second acquiring module 702 , an amplitude value adjusting module 703 , and an output module 704 .
  • the first obtaining module 701 is configured to acquire first channel audio data.
  • the first obtaining module 701 can be configured to locally acquire the first channel audio data from the electronic device, and can also be used to obtain the first channel audio data from the audio data source on the network.
  • the second obtaining module 702 is configured to acquire second channel audio data having a fixed delay compared to the first channel audio data.
  • the acquired second channel audio data is delayed by a fixed delay than the first channel audio data.
  • the fixed delay is ITD, and the fixed delay is used to widen the sound field, specifically for widening the sound field by splitting the sound image.
  • the sound image is a human perception sound source, and the fixed delay is used to split the sound image, which means that if the first channel audio data and the second channel audio data with a fixed delay are respectively converted into sound waves, the sound is output to the human ear. People will perceive that there are two sound sources with the same or similar sound content but different positions in their heads.
  • the amplitude value adjustment module 703 is configured to adjust amplitude values of the first channel audio data and/or the second channel audio data such that the amplitude value of the first channel audio data is smaller than the amplitude value of the second channel audio data.
  • the amplitude value adjustment module 703 can be used to adjust the amplitude value of the first channel audio data, or adjust the amplitude value of the second channel audio data, or simultaneously adjust the amplitude value of the first channel audio data and the second channel.
  • the amplitude value of the audio data here refers to the time domain amplitude value. After adjustment, the amplitude value of the first channel audio data is smaller than the amplitude value of the corresponding second channel audio data.
  • An output module 704 configured to output first channel audio data and respectively through different sounding units Second channel audio data.
  • the output module 704 may never convert the first channel audio data into an analog signal, and then output the sound wave through the first sounding unit, convert the second channel audio data into an analog signal, and then generate the sound wave through the second sounding unit.
  • the second channel audio data has a fixed delay compared to the first channel audio data, and the fixed time delay can split the sound image, so that the sound source perceived by the human ear is more than one, and the sound field is widened.
  • the fixed delay generates a bias phenomenon, and the amplitude value of the first channel audio data is smaller than the second channel audio data by adjusting the amplitude values of the first channel audio data and/or the second channel audio data. Amplitude value.
  • the amplitude value of the delayed second channel audio data is enhanced compared to the amplitude of the undelayed first channel audio data, and the bias caused by the delay is compensated by the change of the amplitude value, and the surround sound is realized. At the same time avoid the phenomenon of partial sound.
  • the second obtaining module 702 is further configured to acquire second channel audio data that is time-synchronized with the first channel audio data, and insert one frame of audio data into the time-synchronized second channel audio data.
  • the second acquisition module 702 can be configured to obtain second channel audio data that is time synchronized with the first channel audio data directly from the audio data source. If the audio data source itself does not have a distinction of channels, the first obtaining module 701 and the second obtaining module 702 may respectively obtain two identical audio data from the audio data source, respectively, as time-synchronized first channel audio data. And second channel audio data.
  • the length of time of one frame of audio data is generally between 15ms and 50ms of a fixed delay.
  • the audio data of one frame in the MP3 audio format is 26ms, so that the sound can be quickly realized by inserting one frame of audio data in the second audio data.
  • the fixed delay is the length of time of one frame of audio data.
  • the inserted audio data can be generated according to the previous frame audio data and the subsequent frame audio data at the insertion point, so that the previous frame audio data smoothly transitions to the inserted one frame of audio data, and the inserted one frame of audio data smoothly transitions to the rear.
  • the inserted audio data can be based on the front of the insertion point
  • One frame of audio data and the next frame of audio data are generated, which may be generated according to the last sample point value of the previous frame of audio data and the first sample point value of the subsequent frame of audio data. This prevents noise from being generated by inserting one frame of audio data.
  • the second obtaining module 702 is further configured to acquire second channel audio data that is time-synchronized with the first channel audio data, where the first acquiring module 701 is further configured to delete one in the first channel audio data.
  • Frame audio data is further configured to acquire second channel audio data that is time-synchronized with the first channel audio data.
  • the length of time for one frame of audio data is generally between 15ms and 50ms for a fixed delay.
  • the audio data of one frame in the MP3 audio format is 26ms, which can be quickly deleted by deleting one frame of audio data in the first channel audio data. Realizes sound image splitting, and does not have too much impact on the original audio data, efficient and accurate.
  • the audio data of the previous frame of the deleted one frame of audio data and the audio data of the latter frame are smoothly transitioned.
  • the first sample point value of the deleted audio data and the last sample point value are equal or the difference satisfies the minimum condition; or, the previous frame audio of the deleted one frame of the audio data may also be
  • the data and the subsequent frame of audio data are processed such that the previous frame of audio data and the subsequent frame of audio data are smoothly transitioned. This prevents noise from being generated by deleting one frame of audio data.
  • the amplitude value adjustment module 703 includes a first channel amplitude value adjustment module 703a and a second channel amplitude value adjustment module 703b.
  • the first channel amplitude value adjustment module 703a is configured to add the first channel center gain value to the first channel audio data, where the first channel center gain value is the first channel audio data and the second channel audio data. And multiply by the first mid-coefficient.
  • the second channel amplitude value adjustment module 703b is configured to add the second channel center gain value to the second channel audio data, and the second channel center gain value is the first channel audio data and the second channel audio.
  • the sum of the data is multiplied by the second center coefficient; the first center coefficient is smaller than the second center coefficient.
  • the sound image is split into two: the original sound image and the rear sound image, while the sound field is pulled to both ears, leaving less sound field in the head.
  • the sound image field at both ears will spread to the surroundings, thus increasing the sound field distribution in the head; The smaller n value of the non-delay channel can attenuate the partial sound effect.
  • the electronic device 700 further includes a high pass filtering module 705 and a low pass filtering module 706.
  • the high pass filtering module 705 is configured to perform high pass filtering on the first channel audio data and the second channel audio data
  • the low pass filtering module 706 is configured to perform low pass filtering on the first channel audio data and the second channel audio data.
  • the extremely low frequency portion and the extremely high frequency portion of the audio do not affect the sound perception.
  • the audio data of the two channels are subjected to high and low cut processing to reduce high frequency sound and low frequency. The effect of the sound on the finite amplitude value and does not affect the original audio quality.
  • the electronic device 700 further includes a segmentation module 707, a weight acquisition module 708, and an amplitude value assignment module 709.
  • the segmentation module 707 is configured to obtain, according to the maximum effective amplitude value of the effective amplitude value range, the corresponding amplitude value when the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds the effective amplitude value range Sequence of values.
  • the weight obtaining module 708 is configured to obtain weights of the segment values in the sequence of segment values, and the obtained values of the weights are sequentially decremented and the sum of the obtained weights is less than or equal to 1.
  • the amplitude value assignment module 709 is configured to calculate a weighted sum of the sequence of segment values according to the obtained weights; and reset the corresponding amplitude values according to the weighted sum.
  • the weight obtaining module 708 and the amplitude value assigning module 709 may be included in an amplitude value pressure limiting module (not shown) for respectively respectively filtering a portion of the corresponding amplitude value that does not exceed the effective amplitude value range and a portion exceeding the effective amplitude value range. Compression of different compression ratios is performed such that the corresponding amplitude values after compression are within the range of effective amplitude values.
  • the compression ratio of the portion exceeding the effective amplitude value range is larger than the compression ratio of the portion not exceeding the effective amplitude value range
  • the weight obtaining module 708 is further configured to obtain a weight parameter K greater than 1; and the equal ratio sequence with the first item of 1-1/K and the ratio of 1/K is sequentially in the sequence of segment values. Each segment value is assigned a weight.
  • the weight parameter K is a control parameter used to control the weight allocation strategy. By adjusting the size of K, the weighting ratio of each segment value in the segment value sequence can be controlled. K is greater than 1, so 1-1/K is greater than 0, and 1/K is greater than 0, and all of the constituent geometric series are positive.
  • the segment values are assigned weights, which can ensure that the sum of the weights is less than 1, and can quickly assign appropriate weights to the segment values in the segmentation value sequence, which is very efficient.
  • the weight obtaining module 708 assigns weights to the segment values in the sequence of segment values in the order of 1-1/K and the ratio of 1/K. Starting from any position of the sequence, the values in the equal series are taken continuously or at intervals to assign weights to the respective segment values in the sequence of segment values, and the assigned weights necessarily satisfy the condition that the sum of the weights is successively decremented and the sum of the weights is less than or equal to one.
  • the storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Stereophonic System (AREA)

Abstract

The present invention relates to a method for achieving surround sound, an electronic device, and a storage medium, wherein said method comprises: acquiring audio data of a first channel; acquiring audio data of a second channel which has a fixed delay compared to said first channel audio data; adjusting the amplitude value of said first channel audio data and/or said second channel audio data, such that the amplitude value of said first channel audio data is less than the amplitude value of said second channel audio data; and respectively exporting said first channel audio data and said second channel audio data by means of different sound producing units.

Description

环绕立体声实现方法、电子设备及存储介质Surround sound implementation method, electronic device and storage medium
本申请要求于2016年1月14日提交中国专利局,申请号为201610025695.8,发明名称为“环绕立体声实现方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201610025695.8, filed on Jan.
技术领域Technical field
本发明涉及音频技术领域,特别是涉及一种环绕立体声实现方法、电子设备及存储介质。The present invention relates to the field of audio technologies, and in particular, to a surround sound implementation method, an electronic device, and a storage medium.
背景技术Background technique
环绕立体声是一种特殊的音响效果,环绕立体声所产生的重放声场,保留着原信号的声源方向感,使听者有着较强的空间感,可以逼真地再现演出厅的空间混响过程,具有更为动人的临场感。目前实现环绕立体声,一般需要在录音时采用仿真人头录音方式,仿真人头录音方式就是把两个微型全指向性话筒安置在一个与真人头基本一致的仿真人头的耳道内(接近人耳鼓膜的位置),模拟人耳进行录音的整个过程。Surround sound is a special sound effect. The sound field generated by surround sound preserves the sound source direction of the original signal, which gives the listener a strong sense of space and can realistically reproduce the spatial reverberation process of the performance hall. It has a more touching sense of presence. At present, surround sound is usually required to use the simulated head recording method during recording. The simulated head recording method is to place two miniature omnidirectional microphones in the ear canal of a simulated human head which is basically consistent with the human head (close to the eardrum of the human ear). ), simulating the entire process of recording the human ear.
然而,目前仿真人头录音方式录制过程复杂,成本高;而且仿真人头录音方式是在录制时采取的特殊处理,而普通的音频数据由于没有采用仿真人头录音方式,就无法通过这种方式来实现环绕立体声,普适性差。However, the current recording process of the human head recording method is complicated and costly; and the artificial head recording method is a special processing taken during recording, and the ordinary audio data cannot be surrounded by this method because the artificial head recording method is not used. Stereo, poor universality.
发明内容Summary of the invention
根据本申请的各种实施例,提供一种环绕立体声实现方法、电子设备及存储介质。According to various embodiments of the present application, a surround sound implementation method, an electronic device, and a storage medium are provided.
一种环绕立体声实现方法,所述方法包括:A surround sound implementation method, the method comprising:
获取第一声道音频数据; Obtaining first channel audio data;
获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据;Acquiring second channel audio data having a fixed delay compared to the first channel audio data;
调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值;以及Adjusting amplitude values of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude value of the second channel audio data; as well as
分别通过不同的发声单元输出所述第一声道音频数据和所述第二声道音频数据。The first channel audio data and the second channel audio data are output through different sounding units, respectively.
一种电子设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:An electronic device comprising a memory and a processor, the memory storing computer readable instructions, wherein the computer readable instructions are executed by the processor such that the processor performs the following steps:
获取第一声道音频数据;Obtaining first channel audio data;
获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据;Acquiring second channel audio data having a fixed delay compared to the first channel audio data;
调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值;以及Adjusting amplitude values of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude value of the second channel audio data; as well as
分别通过不同的发声单元输出所述第一声道音频数据和所述第二声道音频数据。The first channel audio data and the second channel audio data are output through different sounding units, respectively.
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
获取第一声道音频数据;Obtaining first channel audio data;
获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据;Acquiring second channel audio data having a fixed delay compared to the first channel audio data;
调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值;以及Adjusting amplitude values of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude value of the second channel audio data; as well as
分别通过不同的发声单元输出所述第一声道音频数据和所述第二声道音频数据。The first channel audio data and the second channel audio data are output through different sounding units, respectively.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
附图说明 DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为一个实施例中用于实现环绕立体声实现方法的电子设备的结构及应用环境图;1 is a structural diagram and an application environment diagram of an electronic device for implementing a surround sound implementation method in an embodiment;
图2为一个实施例中环绕立体声实现方法的流程示意图;2 is a schematic flow chart of a method for implementing surround sound in an embodiment;
图3为一个实施例中当两耳时间差变化时人脑中声像位置变化示意图;3 is a schematic diagram showing changes in the position of a sound image in a human brain when the time difference between the two ears changes in one embodiment;
图4为一个实施例中对第一声道音频数据和第二声道音频数据进行声像分裂处理的示意图;4 is a schematic diagram of performing sound image splitting processing on first channel audio data and second channel audio data in one embodiment;
图5为一个实施例中对声像分裂处理后的第一声道音频数据和第二声道音频数据进行加权增强处理的等效电路示意图;FIG. 5 is a schematic diagram showing an equivalent circuit for performing weighting enhancement processing on the first channel audio data and the second channel audio data after the sound image splitting process in one embodiment; FIG.
图6为一个实施例中将第一声道音频数据和第二声道音频数据的振幅值压限到有效振幅值范围内的步骤的流程示意图;6 is a flow chart showing the steps of compressing the amplitude values of the first channel audio data and the second channel audio data to a range of effective amplitude values in one embodiment;
图7为一个实施例中电子设备的结构框图;7 is a structural block diagram of an electronic device in an embodiment;
图8为一个实施例中振幅值调整模块的结构框图;8 is a structural block diagram of an amplitude value adjustment module in an embodiment;
图9为另一个实施例中电子设备的结构框图;9 is a structural block diagram of an electronic device in another embodiment;
图10为再一个实施例中电子设备的结构框图。FIG. 10 is a structural block diagram of an electronic device in still another embodiment.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
如图1所示,在一个实施例中,提供了一种电子设备,包括通过系统总线连接的处理器、非易失性存储介质、内存储器和音频输出接口。其中处理器具有计算功能和控制电子设备工作的功能,该处理器被配置为执行一种环绕立体声实现方法。非易失性存储介质包括磁存储介质、光存储介质和闪存式 存储介质中的至少一种,非易失性存储介质存储有操作系统。音频输出接口用于输出音频数据的模拟信号,可通过与音频输出接口连接的发声单元将模拟信号转化为声波,使人耳可以听到音频数据所记录的声音内容。电子设备可以是手机、平板电脑、音乐播放器或者个人数字助理(PDA)等移动终端,也可以是台式计算机。As shown in FIG. 1, in one embodiment, an electronic device is provided that includes a processor coupled through a system bus, a non-volatile storage medium, an internal memory, and an audio output interface. Wherein the processor has a computing function and a function of controlling the operation of the electronic device, the processor being configured to perform a surround sound implementation method. Non-volatile storage media include magnetic storage media, optical storage media, and flash memory At least one of the storage mediums, the non-volatile storage medium storing an operating system. The audio output interface is used for outputting an analog signal of audio data, and the sound signal can be converted into sound waves through a sounding unit connected to the audio output interface, so that the human ear can hear the sound content recorded by the audio data. The electronic device can be a mobile terminal such as a mobile phone, a tablet computer, a music player, or a personal digital assistant (PDA), or can be a desktop computer.
在一个实施例中,提供了一种环绕立体声实现方法,本实施例以该方法应用于上述图1中的电子设备来举例说明。如图2所示,该方法具体包括如下步骤:In one embodiment, a surround sound implementation method is provided. This embodiment is exemplified by the method applied to the electronic device in FIG. 1 described above. As shown in FIG. 2, the method specifically includes the following steps:
步骤202,获取第一声道音频数据。Step 202: Acquire first channel audio data.
具体地,电子设备从音频数据源获取第一声道音频数据,音频数据源可以存储在电子设备本地,即终端可从电子设备本地获取第一声道音频数据;音频数据源也可以存储在网络中,电子设备可通过网络从音频数据源获取第一声道音频数据。音频数据源可以采用MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、WMA(Windows Media Audio,微软音频格式)或者APE(一种无损音频格式)等音频格式。Specifically, the electronic device acquires the first channel audio data from the audio data source, and the audio data source may be stored locally in the electronic device, that is, the terminal may obtain the first channel audio data locally from the electronic device; the audio data source may also be stored in the network. The electronic device can acquire the first channel audio data from the audio data source through the network. The audio data source may use an audio format such as MP3 (Moving Picture Experts Group Audio Layer III), WMA (Windows Media Audio) or APE (a lossless audio format).
步骤204,获取相较于第一声道音频数据具有固定延时的第二声道音频数据。Step 204: Acquire second channel audio data having a fixed delay compared to the first channel audio data.
其中,第一声道音频数据和第二声道音频数据用于区分不同声道的音频数据。若第一声道音频数据为左声道音频数据,第二声道音频数据可以是右声道音频数据;或者,若第一声道音频数据为右声道音频数据,第二声道音频数据可以是左声道音频数据。Among them, the first channel audio data and the second channel audio data are used to distinguish audio data of different channels. If the first channel audio data is left channel audio data, the second channel audio data may be right channel audio data; or, if the first channel audio data is right channel audio data, second channel audio data It can be left channel audio data.
获取的第二声道音频数据比第一声道音频数据延迟了固定延时,该固定延时为ITD(Interaural Time Difference,两耳时间差),固定延时用于拓宽声场,具体用于通过分裂声像来拓宽声场。声像是人的感知声源,固定延时用于分裂声像,是指若将该第一声道音频数据和具有固定延时的第二声道音频数据分别转换为声波输出到人两耳,人会感知到自己头部存在两个声音内容相同或相似但位置不同的声源。 The acquired second channel audio data is delayed by a fixed delay than the first channel audio data, and the fixed delay is an Interdural Time Difference (ITD), and the fixed delay is used to widen the sound field, specifically for splitting. Sound image to broaden the sound field. The sound image is a human perception sound source, and the fixed delay is used to split the sound image, which means that if the first channel audio data and the second channel audio data with a fixed delay are respectively converted into sound waves, the sound is output to the human ear. People will perceive that there are two sound sources with the same or similar sound content but different positions in their heads.
参照图3,当将两耳时间差从0到0.6ms(毫秒)变化时,声像位置从人脑中心沿两耳间的轴向移动。当两耳时间差从0.6ms到10ms变化时,声像位置不再沿两耳间的轴向移动,而是形状发生变化,导致声像拓宽,且变化幅度随着两耳时间差的上升而不断增加。当两耳时间差继续增大到特定数值时,人脑中产生的拓宽的声像被分裂成两个对称且未拓宽的声像。这里的特定数值一般在15ms到50ms之间,具体的值还与音频数据源特性相关,比如音频数据源本身存在的声道差异。固定延时可取15ms到50ms之间的值。Referring to Fig. 3, when the time difference between the two ears is changed from 0 to 0.6 ms (milliseconds), the sound image position is moved from the center of the human brain along the axial direction between the ears. When the time difference between the two ears changes from 0.6ms to 10ms, the position of the sound image no longer moves along the axial direction between the ears, but the shape changes, resulting in widening of the sound image, and the variation range increases with the increase of the time difference between the two ears. . When the time difference between the two ears continues to increase to a certain value, the widened sound image produced in the human brain is split into two symmetrical and unwidened sound images. The specific value here is generally between 15ms and 50ms, and the specific value is also related to the characteristics of the audio data source, such as the channel difference existing in the audio data source itself. The fixed delay can take values between 15ms and 50ms.
步骤206,调整第一声道音频数据和/或第二声道音频数据的振幅值,以使第一声道音频数据的振幅值小于第二声道音频数据的振幅值。Step 206: Adjust amplitude values of the first channel audio data and/or the second channel audio data such that the amplitude value of the first channel audio data is smaller than the amplitude value of the second channel audio data.
具体地,电子设备可调整第一声道音频数据的振幅值,或者调整第二声道音频数据的振幅值,或者同时调整第一声道音频数据的振幅值和第二声道音频数据的振幅值。这里的振幅值是指时域振幅值。经过调整后,第一声道音频数据的振幅值小于相应的第二声道音频数据的振幅值。Specifically, the electronic device may adjust the amplitude value of the first channel audio data, or adjust the amplitude value of the second channel audio data, or simultaneously adjust the amplitude value of the first channel audio data and the amplitude of the second channel audio data. value. The amplitude value here refers to the time domain amplitude value. After adjustment, the amplitude value of the first channel audio data is smaller than the amplitude value of the corresponding second channel audio data.
步骤208,分别通过不同的发声单元输出第一声道音频数据和第二声道音频数据。 Step 208, outputting first channel audio data and second channel audio data through different sounding units, respectively.
具体地,电子设备可连接两个发声单元,即第一发声单元和第二发声单元,两个发声单元可以分别是耳机的左耳发声单元和右耳发声单元。电子设备可将第一声道音频数据转化为模拟信号后通过第一发声单元输出声波,将第二声道音频数据转化为模拟信号后通过第二发声单元发出声波。Specifically, the electronic device can connect two sounding units, that is, a first sounding unit and a second sounding unit, and the two sounding units can be a left ear sounding unit and a right ear sounding unit of the earphone, respectively. The electronic device can convert the first channel audio data into an analog signal, output the sound wave through the first sounding unit, convert the second channel audio data into an analog signal, and then generate the sound wave through the second sounding unit.
上述环绕立体声实现方法,第二声道音频数据相较于第一声道音频数据具有固定延时,通过该固定延时可分裂声像,使得人耳所感知的声源多余一个,拓宽了声场。而且,固定延时会产生偏音现象,通过调整第一声道音频数据和/或第二声道音频数据的振幅值,使得第一声道音频数据的振幅值小于第二声道音频数据的振幅值。这样延时的第二声道音频数据的振幅值相较于未延时的第一声道音频数据的振幅值得以增强,延时造成的偏音通过振幅值的变化来弥补,在实现环绕立体声的同时避免偏音现象。不需要通过仿真人头录音方式,普通音频数据通过计算机程序处理便可以实现,具有较强的普 适性。In the above-mentioned surround sound implementation method, the second channel audio data has a fixed delay compared to the first channel audio data, and the fixed delay can split the sound image, so that the sound source perceived by the human ear is more than one, and the sound field is broadened. . Moreover, the fixed delay generates a bias phenomenon, and the amplitude value of the first channel audio data is smaller than the second channel audio data by adjusting the amplitude values of the first channel audio data and/or the second channel audio data. Amplitude value. The amplitude value of the delayed second channel audio data is enhanced compared to the amplitude of the undelayed first channel audio data, and the bias caused by the delay is compensated by the change of the amplitude value, and the surround sound is realized. At the same time avoid the phenomenon of partial sound. It is not necessary to simulate the human head recording mode, and ordinary audio data can be realized by computer program processing, and has a strong general Fitness.
在一个实施例中,步骤204具体包括:获取与第一声道音频数据时间同步的第二声道音频数据,在时间同步的第二声道音频数据中插入一帧音频数据。In one embodiment, step 204 specifically includes: acquiring second channel audio data that is time synchronized with the first channel audio data, and inserting one frame of audio data into the time synchronized second channel audio data.
具体地,电子设备可直接从音频数据源中获取与第一声道音频数据时间同步的第二声道音频数据,若音频数据源本身没有声道的区分,则可以从音频数据源获取两路相同的音频数据分别作为时间同步的第一声道音频数据和第二声道音频数据。Specifically, the electronic device can directly acquire the second channel audio data that is time-synchronized with the first channel audio data from the audio data source. If the audio data source itself has no channel distinction, the two channels can be obtained from the audio data source. The same audio data is used as time-synchronized first channel audio data and second channel audio data, respectively.
一帧音频数据的时间长度一般在固定延时可取的15ms到50ms之间,比如MP3音频格式中一帧音频数据为26ms,这样通过在第二音频数据中插入一帧音频数据可以快速地实现声像分裂,而且不会对原本的音频数据造成太大影响,高效而且准确。此时固定延时为一帧音频数据的时间长度。The length of time of one frame of audio data is generally between 15ms and 50ms of a fixed delay. For example, the audio data of one frame in the MP3 audio format is 26ms, so that the sound can be quickly realized by inserting one frame of audio data in the second audio data. Like splitting, and will not have too much impact on the original audio data, efficient and accurate. At this time, the fixed delay is the length of time of one frame of audio data.
参照图4,假设获取的时间同步的第一声道音频数据Li和第二声道音频数据Ri,通过声像分裂处理后输出的第一声道音频数据为Lo,输出的第二声道音频数据为Ro。则存在以下公式(1):Referring to FIG. 4, assuming that the acquired time-synchronized first channel audio data Li and second channel audio data Ri are outputted by the sound image splitting process, the first channel audio data is Lo, and the output second channel audio is The data is Ro. Then there is the following formula (1):
Lo=LiLo=Li
Ro=z-TRi     公式(1)Ro=z -T Ri formula (1)
其中,z表示进行Z变换(z-transformation),可将时域信号(即:离散时间序列)变换为在复频域的表达式。T表示固定延时,Ro=z-TRi表示Ro相较于Ri延迟固定延时T。Where z denotes a z-transformation, which can transform a time domain signal (ie, a discrete time series) into an expression in a complex frequency domain. T represents a fixed delay, and Ro = z - T Ri indicates that Ro is delayed by a fixed delay T from Ri.
插入的音频数据可根据插入点处的前一帧音频数据和后一帧音频数据生成,使得前一帧音频数据平滑过渡到插入的一帧音频数据,并且插入的一帧音频数据平滑过渡到后一帧音频数据。插入的音频数据可根据插入点处的前一帧音频数据和后一帧音频数据生成,具体可根据前一帧音频数据的最后一个采样点值和后一帧音频数据中第一个采样点值生成。这样可防止因插入一帧音频数据而产生噪声。The inserted audio data can be generated according to the previous frame audio data and the subsequent frame audio data at the insertion point, so that the previous frame audio data smoothly transitions to the inserted one frame of audio data, and the inserted one frame of audio data smoothly transitions to the rear. One frame of audio data. The inserted audio data may be generated according to the previous frame audio data and the subsequent frame audio data at the insertion point, specifically according to the last sample point value of the previous frame audio data and the first sample point value of the subsequent frame audio data. generate. This prevents noise from being generated by inserting one frame of audio data.
在一个实施例中,步骤204具体包括:获取与第一声道音频数据时间同 步的第二声道音频数据,在第一声道音频数据中删除一帧音频数据。In an embodiment, step 204 specifically includes: acquiring the same time as the first channel audio data. The second channel audio data of the step deletes one frame of audio data in the first channel audio data.
具体地,电子设备不仅可以在第二声道音频数据中插入一帧音频数据,也可以从第一声道音频数据中删除一帧音频数据,以使得第二声道音频数据相较于第一声道音频数据具有固定延时。此时固定延时为一帧音频数据的时间长度。Specifically, the electronic device can not only insert one frame of audio data into the second channel audio data, but also delete one frame of audio data from the first channel audio data, so that the second channel audio data is compared with the first Channel audio data has a fixed delay. At this time, the fixed delay is the length of time of one frame of audio data.
一帧音频数据的时间长度一般在固定延时可取的15ms到50ms之间,比如MP3音频格式中一帧音频数据为26ms,这样通过在第一声道音频数据中删除一帧音频数据可以快速地实现声像分裂,而且不会对原本的音频数据造成太大影响,高效而且准确。The length of time for one frame of audio data is generally between 15ms and 50ms for a fixed delay. For example, the audio data of one frame in the MP3 audio format is 26ms, which can be quickly deleted by deleting one frame of audio data in the first channel audio data. Realizes sound image splitting, and does not have too much impact on the original audio data, efficient and accurate.
删除一帧音频数据后,删除的一帧音频数据的前一帧音频数据和后一帧音频数据平滑过渡。具体在删除一帧音频数据时,删除的音频数据的第一个采样点值和最后一个采样点值相等或者相差满足最小化条件;或者,也可以将删除的一帧音频数据的前一帧音频数据和后一帧音频数据进行处理,使得前一帧音频数据和后一帧音频数据平滑过渡。这样可防止因删除一帧音频数据而产生噪声。After deleting one frame of audio data, the audio data of the previous frame of the deleted one frame of audio data and the audio data of the latter frame are smoothly transitioned. Specifically, when deleting one frame of audio data, the first sample point value of the deleted audio data and the last sample point value are equal or the difference satisfies the minimum condition; or, the previous frame audio of the deleted one frame of the audio data may also be The data and the subsequent frame of audio data are processed such that the previous frame of audio data and the subsequent frame of audio data are smoothly transitioned. This prevents noise from being generated by deleting one frame of audio data.
在一个实施例中,步骤206具体包括:将第一声道音频数据附加第一声道中置增益值,第一声道中置增益值为第一声道音频数据与第二声道音频数据的和再乘以第一中置系数;将第二声道音频数据附加第二声道中置增益值,第二声道中置增益值为第一声道音频数据与第二声道音频数据的和再乘以第二中置系数;第一中置系数小于第二中置系数。In an embodiment, the step 206 specifically includes: adding the first channel audio data to the first channel center gain value, where the first channel center gain value is the sum of the first channel audio data and the second channel audio data. Multiplying the first center coefficient; adding the second channel center data gain value to the second channel audio data, and the second channel center gain value is the sum of the first channel audio data and the second channel audio data Then multiplied by the second center coefficient; the first center coefficient is smaller than the second center coefficient.
在一个实施例中,第一中置系数可取1,相应的第二中置系数可取(1,1.2]。在一个实施例中,第一中置系数取1,第二中置系数可取1.2。In one embodiment, the first centering coefficient may take one, and the corresponding second centering factor may take (1, 1.2). In one embodiment, the first centering factor is taken as 1 and the second centering factor is taken as 1.2.
具体地,参照图5,需要对声像分裂处理后的第一声道音频数据和第二声道音频数据进行加权增强处理,图5中Li为经过声像分裂处理后的第一声道音频数据,Ri为经过声像分裂处理后的第二声道音频数据,Lo为经过加权增强处理后的第一声道音频数据,Ro为经过加权增强处理后的第二声道音频数据。“-”表示将输入的信号作差,“+”表示将输入的信号求和,反相器用 于将通过的信号的相位反转。n表示中置系数,p表示空间感增益参数,HRTF全称Head Related Transfer Function,中文表示头相关变换函数,是一种音效定位算法。Specifically, referring to FIG. 5, it is necessary to perform weighting enhancement processing on the first channel audio data and the second channel audio data after the sound image splitting process. In FIG. 5, Li is the first channel audio after the sound image splitting process. Data, Ri is the second channel audio data after the sound image split processing, Lo is the first channel audio data after the weight enhancement processing, and Ro is the second channel audio data after the weight enhancement processing. "-" means that the input signal is made worse, "+" means that the input signals are summed, and the inverter is used. Reverse the phase of the signal that will pass. n represents the center coefficient, p represents the spatial sense gain parameter, HRTF full name Head Related Transfer Function, Chinese represents the head correlation transform function, and is a sound effect localization algorithm.
对经过声像分裂处理后的第一声道音频数据Li和第二声道音频数据Ri进行加权增强处理可采用如下公式(2):The weighting enhancement processing of the first channel audio data Li and the second channel audio data Ri after the sound image splitting processing may adopt the following formula (2):
Figure PCTCN2016113113-appb-000001
Figure PCTCN2016113113-appb-000001
Figure PCTCN2016113113-appb-000002
Figure PCTCN2016113113-appb-000002
其中,Lo表示将第一声道音频数据Li经过加权增强处理后输出的第一声道音频数据,Ro表示将第二声道音频数据Ri经过加权增强处理后输出的第二声道音频数据。nL表示第一中置系数,nR表示第二中置系数。
Figure PCTCN2016113113-appb-000003
表示求取卷积。
Wherein, Lo represents the first channel audio data that is output after the first channel audio data Li is subjected to the weight enhancement processing, and Ro represents the second channel audio data that is output after the second channel audio data Ri is subjected to the weight enhancement processing. n L represents the first mid-coefficient and n R represents the second mid-coefficient.
Figure PCTCN2016113113-appb-000003
Indicates that the convolution is sought.
在一个实施例中,第一中置系数nL可取1,相应的第二中置系数nR可取(1,1.2]。在一个实施例中,第一中置系数nL取1,第二中置系数nR可取1.2。In one embodiment, the first centering coefficient n L may take 1 and the corresponding second center coefficient n R may take (1, 1.2). In one embodiment, the first center coefficient n L takes 1 and the second The center coefficient n R can be taken as 1.2.
经过声像分裂的处理后,声像被分裂为两个:原始声像和后声像,同时声场被拉至两耳,头部中剩下较少声场。通过加权增强处理后,两耳处的声像声场会向四周扩散,因而增加了头部中的声场分布;同时,在计算时给予非延迟声道较小的n值,可以减弱偏音效果。After the processing of the sound image splitting, the sound image is split into two: the original sound image and the rear sound image, while the sound field is pulled to both ears, leaving less sound field in the head. After the weighting enhancement process, the sound image field at both ears will spread to the surroundings, thus increasing the sound field distribution in the head; at the same time, giving the non-delay channel a small n value in the calculation can weaken the partial sound effect.
在一个实施例中,在步骤206之后,还包括:对第一声道音频数据和第二声道音频数据进行高通滤波和低通滤波。其中电子设备可采用先低通滤波再高通滤波的顺序过滤,也可以采用先高通滤波再低通滤波的顺序过滤。高通滤波和低通滤波均可以通过计算机程序调用相应的函数来实现。In an embodiment, after step 206, further comprising: performing high pass filtering and low pass filtering on the first channel audio data and the second channel audio data. The electronic device may be filtered in the order of low-pass filtering and high-pass filtering first, or may be filtered in the order of high-pass filtering and low-pass filtering. Both high-pass filtering and low-pass filtering can be implemented by a computer program calling the corresponding function.
本实施例中,根据人耳听觉特性,音频中极低频率部分和极高频率部分不会对声音感知造成影响,这里对两个声道的音频数据进行高低切处理,减少高频音和低频音对有限振幅值的影响,并且不影响原有的音频音质。In this embodiment, according to the auditory characteristics of the human ear, the extremely low frequency portion and the extremely high frequency portion of the audio do not affect the sound perception. Here, the audio data of the two channels are subjected to high and low cut processing to reduce high frequency sound and low frequency. The effect of the sound on the finite amplitude value and does not affect the original audio quality.
举例说明,电子设备可先采用低通滤波函数过滤第一声道音频数据和第二声道音频数据,再采用高通滤波函数过滤第一声道音频数据和第二声道音频数据。可以用以下公式(3)表示: For example, the electronic device may first filter the first channel audio data and the second channel audio data by using a low pass filter function, and then filter the first channel audio data and the second channel audio data by using a high pass filter function. It can be expressed by the following formula (3):
Lo=HP(LP(Li))Lo=HP(LP(Li))
Ro=HP(LP(Ri))    公式(3)Ro=HP(LP(Ri)) formula (3)
其中,Li表示进行高通滤波和低通滤波之前的第一声道音频数据,Ri表示进行高通滤波和低通滤波之前的第二声道音频数据。LP()表示低通滤波函数,HP()表示高通滤波函数。Lo表示经过高通滤波和低通滤波之后的第一声道音频数据,Ro表示进行高通滤波和低通滤波之后的第二声道音频数据。Wherein, Li represents first channel audio data before high pass filtering and low pass filtering, and Ri represents second channel audio data before high pass filtering and low pass filtering. LP() represents a low-pass filter function and HP() represents a high-pass filter function. Lo represents the first channel audio data after high-pass filtering and low-pass filtering, and Ro represents the second channel audio data after high-pass filtering and low-pass filtering.
在一个实施例中,步骤206之后,还包括将第一声道音频数据和第二声道音频数据的振幅值压限到有效振幅值范围内的步骤,参照图6,具体包括如下步骤:In an embodiment, after step 206, the method further includes the step of compressing the amplitude values of the first channel audio data and the second channel audio data into a range of effective amplitude values. Referring to FIG. 6, the method further includes the following steps:
步骤602,当第一声道音频数据或者第二声道音频数据的相应振幅值超过有效振幅值范围时,则将相应振幅值按照有效振幅值范围的最大有效振幅值,获得分段值序列。Step 602: When the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds the effective amplitude value range, the corresponding amplitude value is obtained according to the maximum effective amplitude value of the effective amplitude value range, and the segmentation value sequence is obtained.
具体地,有效振幅值范围可表示为[-A,A],其中A表示最大有效振幅值,A可以取1。按照最大有效振幅值进行分段,是指以最大有效振幅值为单位进行切分,获得的分段值按照分段的顺序构成分段值序列。举例说明,假设最大有效振幅值为1,相应振幅值的绝对值为3.2,那么按照最大有效振幅值进行分段获得的分段值序列为1,1,1,0.2。Specifically, the effective amplitude value range can be expressed as [-A, A], where A represents the maximum effective amplitude value and A can take 1. Segmentation according to the maximum effective amplitude value means that the segmentation is performed in units of the maximum effective amplitude value, and the obtained segmentation values constitute a sequence of segmentation values in the order of segmentation. For example, assuming that the maximum effective amplitude value is 1, and the absolute value of the corresponding amplitude value is 3.2, the sequence of segmentation values obtained by segmentation according to the maximum effective amplitude value is 1, 1, 1, 0.2.
步骤604,获取分段值序列中各个分段值的权重,获取的权重的值依次递减且获取的权重的和小于等于1。Step 604: Obtain a weight of each segment value in the sequence of segment values, and the obtained values of the weights are sequentially decremented and the sum of the obtained weights is less than or equal to 1.
具体地,电子设备获取为分段值序列中的每个分段值分配的权重,获取的权重按照分段值序列的顺序依次递减,并且分段值序列中所有分段值的权重的和小于等于1。这里权重的和小于等于1是需要权重满足该条件,并不意味着要计算权重的和。举例说明,假设分段值序列为1,1,1,0.2;则权重可以依次为0.5,0.25,0.1,0.08,这些权重呈递减趋势,且相加和为0.93,满足权重和小于1的条件。Specifically, the electronic device acquires a weight assigned to each segment value in the sequence of segment values, and the acquired weights are sequentially decremented in the order of the sequence of segment values, and the sum of the weights of all segment values in the sequence of segment values is smaller than Equal to 1. Where the sum of the weights is less than or equal to 1 is that the weight is required to satisfy the condition, and does not mean that the sum of the weights is to be calculated. For example, suppose the sequence of segmentation values is 1, 1, 1, 0.2; then the weights can be 0.5, 0.25, 0.1, 0.08 in turn, and these weights are decremented, and the sum is 0.93, satisfying the weight and the condition less than 1. .
步骤606,根据获取的权重计算分段值序列的加权和。 Step 606: Calculate a weighted sum of the sequence of segment values according to the obtained weights.
举例说明,假设分段值序列为1,1,1,0.2,则计算加权和为1*0.5+1*0.25+1*0.1+0.2*0.08=0.866。For example, if the sequence of segment values is 1, 1, 1, 0.2, then the calculated weighted sum is 1*0.5+1*0.25+1*0.1+0.2*0.08=0.866.
步骤608,根据加权和重置相应振幅值。 Step 608, resetting the corresponding amplitude value according to the weighted sum.
具体地,重置的振幅值应当与相应振幅值的正负符号相同。若相应振幅值原本为正值,则将相应振幅值重置为加权和;若相应振幅值原本为负值,则将相应振幅值重置为加权和的相反值。Specifically, the amplitude value of the reset should be the same as the sign of the corresponding amplitude value. If the corresponding amplitude value is originally a positive value, the corresponding amplitude value is reset to a weighted sum; if the corresponding amplitude value is originally a negative value, the corresponding amplitude value is reset to the opposite of the weighted sum.
上述步骤604至步骤608,将相应振幅值未超过有效振幅值范围的部分和超过有效振幅值范围的部分分别进行不同压缩比例的压缩,使得压缩后相应振幅值属于有效振幅值范围之内。其中超过有效振幅值范围的部分的压缩比例大于未超过有效振幅值范围的部分的压缩比例。In the above steps 604 to 608, the portion where the corresponding amplitude value does not exceed the effective amplitude value range and the portion exceeding the effective amplitude value range are respectively compressed by different compression ratios, so that the corresponding amplitude value after compression belongs within the effective amplitude value range. The compression ratio of the portion exceeding the effective amplitude value range is larger than the compression ratio of the portion not exceeding the effective amplitude value range.
通过高通滤波和低通滤波,可将过高的振幅值和过低的振幅值切掉,但不能对所有超过有效振幅值范围都进行一刀切的处理,否则会导致音频失真。本实施例中,当相应振幅值超过有效振幅值范围时,将相应振幅值压限到有效振幅值范围之内,可以尽可能准确地保留相应振幅值原本的振幅值大小特性,尽量避免音频失真。With high-pass filtering and low-pass filtering, too high amplitude values and too low amplitude values can be cut off, but all ranges beyond the effective amplitude value range cannot be processed one by one, otherwise audio distortion will result. In this embodiment, when the corresponding amplitude value exceeds the effective amplitude value range, the corresponding amplitude value is limited to the effective amplitude value range, and the original amplitude value size characteristic of the corresponding amplitude value can be retained as accurately as possible to avoid audio distortion as much as possible. .
在一个实施例中,步骤604具体包括:获取大于1的权重参数K;按照以1-1/K为首项且以1/K为公比的等比数列依次为分段值序列中的各个分段值分配权重。In an embodiment, step 604 specifically includes: obtaining a weight parameter K greater than one; and sequentially selecting each of the segments in the sequence of segment values according to a ratio of 1-1/K and a ratio of 1/K. Segment values are assigned weights.
其中,权重参数K是一个用来控制权重分配策略的控制参数,通过调整K的大小,可以控制分段值序列中各个分段值的权重的分配比例。K大于1,因此1-1/K大于0,1/K大于0,构成的等比数列中均为正值。The weight parameter K is a control parameter used to control the weight allocation strategy. By adjusting the size of K, the weighting ratio of each segment value in the segment value sequence can be controlled. K is greater than 1, so 1-1/K is greater than 0, and 1/K is greater than 0, and all of the constituent geometric series are positive.
对上述等比数列求和可采用以下公式(4):The following equation (4) can be used to sum the above-mentioned geometric ratios:
Sn=(1-1/K)*(1-1/Kn)(1-1/K)=1-1/Kn      公式(4)Sn = (1-1 / K) * (1-1 / K n) (1-1 / K) = 1-1 / K n Equation (4)
根据公式(4),Sn=1-1/Kn的极限为1,就是说该等比数列的和小于1,按照该等比数列依次为分段值序列中的各个分段值分配权重,可以保证权重的和小于1,可快速地为分段值序列中的各个分段值分配合适的权重,非常高效。 According to the formula (4), the limit of Sn=1-1/K n is 1, that is, the sum of the equal series is less than 1, and weights are assigned to the segment values in the sequence of segment values in order according to the ratio series. It can be ensured that the sum of the weights is less than 1, and it is very efficient to quickly assign appropriate weights to the respective segment values in the sequence of segment values.
在一个实施例中,按照以1-1/K为首项且以1/K为公比的等比数列依次为分段值序列中的各个分段值分配权重,具体可以从等比数列的任意位置起(比如从首项起),连续或者间隔地取等比数列中的值以为分段值序列中的各个分段值分配权重,分配的权重必然满足依次递减且权重的和小于等于1的条件。In one embodiment, the weights are assigned to the segment values in the sequence of segment values in the order of 1-1/K and the ratio of 1/K, which may be any from the series of equals. From the position (for example, from the first item), the values in the equal series are taken continuously or intermittently to assign weights to the respective segment values in the sequence of segment values, and the assigned weights must satisfy the successive decrement and the sum of the weights is less than or equal to 1. condition.
在一个实施例中,本申请还提供一种电子设备,电子设备的内部结构可对应于如图1所示的结构,下述每个模块可全部或部分通过软件、硬件或其组合来实现。如图7所示,在一个实施例中,一种电子设备700,包括第一获取模块701、第二获取模块702、振幅值调整模块703和输出模块704。In one embodiment, the present application further provides an electronic device. The internal structure of the electronic device may correspond to the structure shown in FIG. 1. Each of the following modules may be implemented in whole or in part by software, hardware, or a combination thereof. As shown in FIG. 7 , in an embodiment, an electronic device 700 includes a first obtaining module 701 , a second acquiring module 702 , an amplitude value adjusting module 703 , and an output module 704 .
第一获取模块701,用于获取第一声道音频数据。The first obtaining module 701 is configured to acquire first channel audio data.
具体地,第一获取模块701可用于从电子设备本地获取第一声道音频数据,还可以用于从网络上的音频数据源获取第一声道音频数据。Specifically, the first obtaining module 701 can be configured to locally acquire the first channel audio data from the electronic device, and can also be used to obtain the first channel audio data from the audio data source on the network.
第二获取模块702,用于获取相较于第一声道音频数据具有固定延时的第二声道音频数据。The second obtaining module 702 is configured to acquire second channel audio data having a fixed delay compared to the first channel audio data.
获取的第二声道音频数据比第一声道音频数据延迟了固定延时,该固定延时为ITD,固定延时用于拓宽声场,具体用于通过分裂声像来拓宽声场。声像是人的感知声源,固定延时用于分裂声像,是指若将该第一声道音频数据和具有固定延时的第二声道音频数据分别转换为声波输出到人两耳,人会感知到自己头部存在两个声音内容相同或相似但位置不同的声源。The acquired second channel audio data is delayed by a fixed delay than the first channel audio data. The fixed delay is ITD, and the fixed delay is used to widen the sound field, specifically for widening the sound field by splitting the sound image. The sound image is a human perception sound source, and the fixed delay is used to split the sound image, which means that if the first channel audio data and the second channel audio data with a fixed delay are respectively converted into sound waves, the sound is output to the human ear. People will perceive that there are two sound sources with the same or similar sound content but different positions in their heads.
振幅值调整模块703,用于调整第一声道音频数据和/或第二声道音频数据的振幅值,以使第一声道音频数据的振幅值小于第二声道音频数据的振幅值。The amplitude value adjustment module 703 is configured to adjust amplitude values of the first channel audio data and/or the second channel audio data such that the amplitude value of the first channel audio data is smaller than the amplitude value of the second channel audio data.
具体地,振幅值调整模块703可用于调整第一声道音频数据的振幅值,或者调整第二声道音频数据的振幅值,或者同时调整第一声道音频数据的振幅值和第二声道音频数据的振幅值。这里的振幅值是指时域振幅值。经过调整后,第一声道音频数据的振幅值小于相应的第二声道音频数据的振幅值。Specifically, the amplitude value adjustment module 703 can be used to adjust the amplitude value of the first channel audio data, or adjust the amplitude value of the second channel audio data, or simultaneously adjust the amplitude value of the first channel audio data and the second channel. The amplitude value of the audio data. The amplitude value here refers to the time domain amplitude value. After adjustment, the amplitude value of the first channel audio data is smaller than the amplitude value of the corresponding second channel audio data.
输出模块704,用于分别通过不同的发声单元输出第一声道音频数据和 第二声道音频数据。An output module 704, configured to output first channel audio data and respectively through different sounding units Second channel audio data.
具体地,输出模块704可永不将第一声道音频数据转化为模拟信号后通过第一发声单元输出声波,将第二声道音频数据转化为模拟信号后通过第二发声单元发出声波。Specifically, the output module 704 may never convert the first channel audio data into an analog signal, and then output the sound wave through the first sounding unit, convert the second channel audio data into an analog signal, and then generate the sound wave through the second sounding unit.
上述电子设备700,第二声道音频数据相较于第一声道音频数据具有固定延时,通过该固定延时可分裂声像,使得人耳所感知的声源多余一个,拓宽了声场。而且,固定延时会产生偏音现象,通过调整第一声道音频数据和/或第二声道音频数据的振幅值,使得第一声道音频数据的振幅值小于第二声道音频数据的振幅值。这样延时的第二声道音频数据的振幅值相较于未延时的第一声道音频数据的振幅值得以增强,延时造成的偏音通过振幅值的变化来弥补,在实现环绕立体声的同时避免偏音现象。不需要通过仿真人头录音方式,普通音频数据通过计算机程序处理便可以实现,具有较强的普适性。In the electronic device 700, the second channel audio data has a fixed delay compared to the first channel audio data, and the fixed time delay can split the sound image, so that the sound source perceived by the human ear is more than one, and the sound field is widened. Moreover, the fixed delay generates a bias phenomenon, and the amplitude value of the first channel audio data is smaller than the second channel audio data by adjusting the amplitude values of the first channel audio data and/or the second channel audio data. Amplitude value. The amplitude value of the delayed second channel audio data is enhanced compared to the amplitude of the undelayed first channel audio data, and the bias caused by the delay is compensated by the change of the amplitude value, and the surround sound is realized. At the same time avoid the phenomenon of partial sound. There is no need to simulate the human head recording mode, and ordinary audio data can be realized by computer program processing, and has strong universality.
在一个实施例中,第二获取模块702还用于获取与第一声道音频数据时间同步的第二声道音频数据,在时间同步的第二声道音频数据中插入一帧音频数据。In an embodiment, the second obtaining module 702 is further configured to acquire second channel audio data that is time-synchronized with the first channel audio data, and insert one frame of audio data into the time-synchronized second channel audio data.
具体地,第二获取模块702可用于直接从音频数据源中获取与第一声道音频数据时间同步的第二声道音频数据。若音频数据源本身没有声道的区分,则可以第一获取模块701和第二获取模块702可分别从音频数据源获取两路相同的音频数据,以分别作为时间同步的第一声道音频数据和第二声道音频数据。In particular, the second acquisition module 702 can be configured to obtain second channel audio data that is time synchronized with the first channel audio data directly from the audio data source. If the audio data source itself does not have a distinction of channels, the first obtaining module 701 and the second obtaining module 702 may respectively obtain two identical audio data from the audio data source, respectively, as time-synchronized first channel audio data. And second channel audio data.
一帧音频数据的时间长度一般在固定延时可取的15ms到50ms之间,比如MP3音频格式中一帧音频数据为26ms,这样通过在第二音频数据中插入一帧音频数据可以快速地实现声像分裂,而且不会对原本的音频数据造成太大影响,高效而且准确。此时固定延时为一帧音频数据的时间长度。The length of time of one frame of audio data is generally between 15ms and 50ms of a fixed delay. For example, the audio data of one frame in the MP3 audio format is 26ms, so that the sound can be quickly realized by inserting one frame of audio data in the second audio data. Like splitting, and will not have too much impact on the original audio data, efficient and accurate. At this time, the fixed delay is the length of time of one frame of audio data.
插入的音频数据可根据插入点处的前一帧音频数据和后一帧音频数据生成,使得前一帧音频数据平滑过渡到插入的一帧音频数据,并且插入的一帧音频数据平滑过渡到后一帧音频数据。插入的音频数据可根据插入点处的前 一帧音频数据和后一帧音频数据生成,具体可根据前一帧音频数据的最后一个采样点值和后一帧音频数据中第一个采样点值生成。这样可防止因插入一帧音频数据而产生噪声。The inserted audio data can be generated according to the previous frame audio data and the subsequent frame audio data at the insertion point, so that the previous frame audio data smoothly transitions to the inserted one frame of audio data, and the inserted one frame of audio data smoothly transitions to the rear. One frame of audio data. The inserted audio data can be based on the front of the insertion point One frame of audio data and the next frame of audio data are generated, which may be generated according to the last sample point value of the previous frame of audio data and the first sample point value of the subsequent frame of audio data. This prevents noise from being generated by inserting one frame of audio data.
在一个实施例中,第二获取模块702还用于获取与第一声道音频数据时间同步的第二声道音频数据,第一获取模块701还用于在第一声道音频数据中删除一帧音频数据。In an embodiment, the second obtaining module 702 is further configured to acquire second channel audio data that is time-synchronized with the first channel audio data, where the first acquiring module 701 is further configured to delete one in the first channel audio data. Frame audio data.
一帧音频数据的时间长度一般在固定延时可取的15ms到50ms之间,比如MP3音频格式中一帧音频数据为26ms,这样通过在第一声道音频数据中删除一帧音频数据可以快速地实现声像分裂,而且不会对原本的音频数据造成太大影响,高效而且准确。The length of time for one frame of audio data is generally between 15ms and 50ms for a fixed delay. For example, the audio data of one frame in the MP3 audio format is 26ms, which can be quickly deleted by deleting one frame of audio data in the first channel audio data. Realizes sound image splitting, and does not have too much impact on the original audio data, efficient and accurate.
其中,删除一帧音频数据后,删除的一帧音频数据的前一帧音频数据和后一帧音频数据平滑过渡。具体在删除一帧音频数据时,删除的音频数据的第一个采样点值和最后一个采样点值相等或者相差满足最小化条件;或者,也可以将删除的一帧音频数据的前一帧音频数据和后一帧音频数据进行处理,使得前一帧音频数据和后一帧音频数据平滑过渡。这样可防止因删除一帧音频数据而产生噪声。Wherein, after deleting one frame of audio data, the audio data of the previous frame of the deleted one frame of audio data and the audio data of the latter frame are smoothly transitioned. Specifically, when deleting one frame of audio data, the first sample point value of the deleted audio data and the last sample point value are equal or the difference satisfies the minimum condition; or, the previous frame audio of the deleted one frame of the audio data may also be The data and the subsequent frame of audio data are processed such that the previous frame of audio data and the subsequent frame of audio data are smoothly transitioned. This prevents noise from being generated by deleting one frame of audio data.
如图8所示,在一个实施例中,振幅值调整模块703包括:第一声道振幅值调整模块703a和第二声道振幅值调整模块703b。As shown in FIG. 8, in one embodiment, the amplitude value adjustment module 703 includes a first channel amplitude value adjustment module 703a and a second channel amplitude value adjustment module 703b.
第一声道振幅值调整模块703a,用于将第一声道音频数据附加第一声道中置增益值,第一声道中置增益值为第一声道音频数据与第二声道音频数据的和再乘以第一中置系数。The first channel amplitude value adjustment module 703a is configured to add the first channel center gain value to the first channel audio data, where the first channel center gain value is the first channel audio data and the second channel audio data. And multiply by the first mid-coefficient.
第二声道振幅值调整模块703b,用于将第二声道音频数据附加第二声道中置增益值,第二声道中置增益值为第一声道音频数据与第二声道音频数据的和再乘以第二中置系数;第一中置系数小于第二中置系数。The second channel amplitude value adjustment module 703b is configured to add the second channel center gain value to the second channel audio data, and the second channel center gain value is the first channel audio data and the second channel audio. The sum of the data is multiplied by the second center coefficient; the first center coefficient is smaller than the second center coefficient.
经过声像分裂的处理后,声像被分裂为两个:原始声像和后声像,同时声场被拉至两耳,头部中剩下较少声场。通过加权增强处理后,两耳处的声像声场会向四周扩散,因而增加了头部中的声场分布;同时,在计算时给予 非延迟声道较小的n值,可以减弱偏音效果。After the processing of the sound image splitting, the sound image is split into two: the original sound image and the rear sound image, while the sound field is pulled to both ears, leaving less sound field in the head. After the weighting enhancement process, the sound image field at both ears will spread to the surroundings, thus increasing the sound field distribution in the head; The smaller n value of the non-delay channel can attenuate the partial sound effect.
如图9所示,在一个实施例中,电子设备700还包括高通滤波模块705和低通滤波模块706。高通滤波模块705用于对第一声道音频数据和第二声道音频数据进行高通滤波,低通滤波模块706用于对第一声道音频数据和第二声道音频数据进行低通滤波。As shown in FIG. 9, in one embodiment, the electronic device 700 further includes a high pass filtering module 705 and a low pass filtering module 706. The high pass filtering module 705 is configured to perform high pass filtering on the first channel audio data and the second channel audio data, and the low pass filtering module 706 is configured to perform low pass filtering on the first channel audio data and the second channel audio data.
本实施例中,根据人耳听觉特性,音频中极低频率部分和极高频率部分不会对声音感知造成影响,这里对两个声道的音频数据进行高低切处理,减少高频音和低频音对有限振幅值的影响,并且不影响原有的音频音质。In this embodiment, according to the auditory characteristics of the human ear, the extremely low frequency portion and the extremely high frequency portion of the audio do not affect the sound perception. Here, the audio data of the two channels are subjected to high and low cut processing to reduce high frequency sound and low frequency. The effect of the sound on the finite amplitude value and does not affect the original audio quality.
如图10所示,在一个实施例中,电子设备700还包括:分段模块707、权重获取模块708和振幅值赋值模块709。As shown in FIG. 10, in one embodiment, the electronic device 700 further includes a segmentation module 707, a weight acquisition module 708, and an amplitude value assignment module 709.
分段模块707,用于当第一声道音频数据或者第二声道音频数据的相应振幅值超过有效振幅值范围时,将相应振幅值按照有效振幅值范围的最大有效振幅值,获得分段值序列。The segmentation module 707 is configured to obtain, according to the maximum effective amplitude value of the effective amplitude value range, the corresponding amplitude value when the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds the effective amplitude value range Sequence of values.
权重获取模块708,用于获取分段值序列中各个分段值的权重,获取的权重的值依次递减且获取的权重的和小于等于1。The weight obtaining module 708 is configured to obtain weights of the segment values in the sequence of segment values, and the obtained values of the weights are sequentially decremented and the sum of the obtained weights is less than or equal to 1.
振幅值赋值模块709,用于根据获取的权重计算分段值序列的加权和;根据加权和重置相应振幅值。The amplitude value assignment module 709 is configured to calculate a weighted sum of the sequence of segment values according to the obtained weights; and reset the corresponding amplitude values according to the weighted sum.
上述权重获取模块708和振幅值赋值模块709可以包括于振幅值压限模块(图中未示出),用于将相应振幅值未超过有效振幅值范围的部分和超过有效振幅值范围的部分分别进行不同压缩比例的压缩,使得压缩后相应振幅值属于有效振幅值范围之内。其中超过有效振幅值范围的部分的压缩比例大于未超过有效振幅值范围的部分的压缩比例The weight obtaining module 708 and the amplitude value assigning module 709 may be included in an amplitude value pressure limiting module (not shown) for respectively respectively filtering a portion of the corresponding amplitude value that does not exceed the effective amplitude value range and a portion exceeding the effective amplitude value range. Compression of different compression ratios is performed such that the corresponding amplitude values after compression are within the range of effective amplitude values. The compression ratio of the portion exceeding the effective amplitude value range is larger than the compression ratio of the portion not exceeding the effective amplitude value range
通过高通滤波和低通滤波,可将过高的振幅值和过低的振幅值切掉,但不能对所有超过有效振幅值范围都进行一刀切的处理,否则会导致音频失真。本实施例中,当相应振幅值超过有效振幅值范围时,将相应振幅值压限到有效振幅值范围之内,可以尽可能准确地保留相应振幅值原本的振幅值大小特性,尽量避免音频失真。 With high-pass filtering and low-pass filtering, too high amplitude values and too low amplitude values can be cut off, but all ranges beyond the effective amplitude value range cannot be processed one by one, otherwise audio distortion will result. In this embodiment, when the corresponding amplitude value exceeds the effective amplitude value range, the corresponding amplitude value is limited to the effective amplitude value range, and the original amplitude value size characteristic of the corresponding amplitude value can be retained as accurately as possible to avoid audio distortion as much as possible. .
在一个实施例中,权重获取模块708还用于获取大于1的权重参数K;按照以1-1/K为首项且以1/K为公比的等比数列依次为分段值序列中的各个分段值分配权重。In an embodiment, the weight obtaining module 708 is further configured to obtain a weight parameter K greater than 1; and the equal ratio sequence with the first item of 1-1/K and the ratio of 1/K is sequentially in the sequence of segment values. Each segment value is assigned a weight.
其中,权重参数K是一个用来控制权重分配策略的控制参数,通过调整K的大小,可以控制分段值序列中各个分段值的权重的分配比例。K大于1,因此1-1/K大于0,1/K大于0,构成的等比数列中均为正值。The weight parameter K is a control parameter used to control the weight allocation strategy. By adjusting the size of K, the weighting ratio of each segment value in the segment value sequence can be controlled. K is greater than 1, so 1-1/K is greater than 0, and 1/K is greater than 0, and all of the constituent geometric series are positive.
根据公式(4),等比数列的和Sn=1-1/Kn的极限为1,就是说该等比数列的和小于1,按照该等比数列依次为分段值序列中的各个分段值分配权重,可以保证权重的和小于1,可快速地为分段值序列中的各个分段值分配合适的权重,非常高效。According to the formula (4), the limit of the sum of the ratio series and Sn=1-1/K n is 1, that is, the sum of the ratio series is less than 1, and the points in the sequence of the segment values are sequentially arranged according to the ratio series. The segment values are assigned weights, which can ensure that the sum of the weights is less than 1, and can quickly assign appropriate weights to the segment values in the segmentation value sequence, which is very efficient.
在一个实施例中,权重获取模块708按照以1-1/K为首项且以1/K为公比的等比数列依次为分段值序列中的各个分段值分配权重,具体可以从等比数列的任意位置起,连续或者间隔地取等比数列中的值以为分段值序列中的各个分段值分配权重,分配的权重必然满足依次递减且权重的和小于等于1的条件。In an embodiment, the weight obtaining module 708 assigns weights to the segment values in the sequence of segment values in the order of 1-1/K and the ratio of 1/K. Starting from any position of the sequence, the values in the equal series are taken continuously or at intervals to assign weights to the respective segment values in the sequence of segment values, and the assigned weights necessarily satisfy the condition that the sum of the weights is successively decremented and the sum of the weights is less than or equal to one.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the foregoing embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-described embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction between the combinations of these technical features, All should be considered as the scope of this manual.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干 变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。 The above-described embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a person skilled in the art can also make certain numbers without departing from the inventive concept. Modifications and improvements are within the scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (20)

  1. 一种环绕立体声实现方法,包括:A method of implementing surround sound, comprising:
    获取第一声道音频数据;Obtaining first channel audio data;
    获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据;Acquiring second channel audio data having a fixed delay compared to the first channel audio data;
    调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值;以及Adjusting amplitude values of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude value of the second channel audio data; as well as
    分别通过不同的发声单元输出所述第一声道音频数据和所述第二声道音频数据。The first channel audio data and the second channel audio data are output through different sounding units, respectively.
  2. 根据权利要求1所述的方法,其特征在于,所述获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据包括:The method according to claim 1, wherein said acquiring second channel audio data having a fixed delay compared to said first channel audio data comprises:
    获取与所述第一声道音频数据时间同步的第二声道音频数据,在时间同步的第二声道音频数据中插入一帧音频数据。Acquiring second channel audio data synchronized with the first channel audio data, inserting one frame of audio data into the time synchronized second channel audio data.
  3. 根据权利要求1所述的方法,其特征在于,所述获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据包括:The method according to claim 1, wherein said acquiring second channel audio data having a fixed delay compared to said first channel audio data comprises:
    获取与所述第一声道音频数据时间同步的第二声道音频数据,在所述第一声道音频数据中删除一帧音频数据。Acquiring second channel audio data that is time synchronized with the first channel audio data, and deleting one frame of audio data in the first channel audio data.
  4. 根据权利要求3所述的方法,其特征在于,删除的音频数据的第一个采样点值和最后一个采样点值相等或者相差满足最小化条件;或者,The method according to claim 3, wherein the first sample point value and the last sample point value of the deleted audio data are equal or different from each other to satisfy a minimum condition; or
    删除的一帧音频数据的前一帧音频数据和后一帧音频数据被处理后平滑过渡。The previous frame of audio data of the deleted frame of audio data and the subsequent frame of audio data are processed and smoothly transitioned.
  5. 根据权利要求1所述的方法,其特征在于,所述调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值包括:The method according to claim 1, wherein said adjusting amplitude values of said first channel audio data and/or said second channel audio data to cause said first channel audio data The amplitude value is smaller than the amplitude value of the second channel audio data, including:
    将所述第一声道音频数据附加第一声道中置增益值,所述第一声道中置增益值为所述第一声道音频数据与所述第二声道音频数据的和再乘以第一中置系数;及Adding a first channel center gain value to the first channel audio data, the first channel center gain value being a sum of the first channel audio data and the second channel audio data multiplied by First center factor; and
    将所述第二声道音频数据附加第二声道中置增益值,所述第二声道中置 增益值为所述第一声道音频数据与所述第二声道音频数据的和再乘以第二中置系数;所述第一中置系数小于所述第二中置系数。Adding a second channel centered gain value to the second channel audio data, the second channel is centered The gain value is a sum of the first channel audio data and the second channel audio data and multiplied by a second center coefficient; the first center coefficient is smaller than the second center coefficient.
  6. 根据权利要求1所述的方法,其特征在于,所述调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值的步骤之后,所述方法还包括:The method according to claim 1, wherein said adjusting amplitude values of said first channel audio data and/or said second channel audio data to cause said first channel audio data After the step of the amplitude value being smaller than the amplitude value of the second channel audio data, the method further includes:
    当所述第一声道音频数据或者所述第二声道音频数据的相应振幅值超过有效振幅值范围时,则When the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds a valid amplitude value range, then
    将所述相应振幅值按照所述有效振幅值范围的最大有效振幅值,获得分段值序列;And obtaining the segmentation value sequence according to the maximum effective amplitude value of the effective amplitude value range;
    获取所述分段值序列中各个分段值的权重,获取的权重的值依次递减且获取的权重的和小于等于1;Obtaining a weight of each segment value in the sequence of segmentation values, the value of the obtained weight is sequentially decreased, and the sum of the obtained weights is less than or equal to 1;
    根据获取的权重计算所述分段值序列的加权和;及Calculating a weighted sum of the sequence of segmentation values based on the obtained weights; and
    根据所述加权和重置所述相应振幅值。The respective amplitude values are reset according to the weighted sum.
  7. 根据权利要求6所述的方法,其特征在于,所述获取所述分段值序列中各个分段值的权重包括:The method according to claim 6, wherein the obtaining weights of each segment value in the sequence of segmentation values comprises:
    获取大于1的权重参数K;及Obtaining a weight parameter K greater than 1;
    按照以1-1/K为首项且以1/K为公比的等比数列依次为所述分段值序列中的各个分段值分配权重。The equal-number series with 1-1/K as the first item and 1/K as the common ratio are sequentially assigned weights for the respective segment values in the sequence of segmentation values.
  8. 一种电子设备,包括存储器和处理器,所述存储器中储存有计算机可读指令,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:An electronic device comprising a memory and a processor, the memory storing computer readable instructions, wherein the computer readable instructions are executed by the processor such that the processor performs the following steps:
    获取第一声道音频数据;Obtaining first channel audio data;
    获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据;Acquiring second channel audio data having a fixed delay compared to the first channel audio data;
    调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值;以及Adjusting amplitude values of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude value of the second channel audio data; as well as
    分别通过不同的发声单元输出所述第一声道音频数据和所述第二声道音频数据。 The first channel audio data and the second channel audio data are output through different sounding units, respectively.
  9. 根据权利要求8所述的电子设备,其特征在于,所述获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据包括:The electronic device according to claim 8, wherein the acquiring the second channel audio data having a fixed delay compared to the first channel audio data comprises:
    获取与所述第一声道音频数据时间同步的第二声道音频数据,在时间同步的第二声道音频数据中插入一帧音频数据。Acquiring second channel audio data synchronized with the first channel audio data, inserting one frame of audio data into the time synchronized second channel audio data.
  10. 根据权利要求8所述的电子设备,其特征在于,所述获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据包括:The electronic device according to claim 8, wherein the acquiring the second channel audio data having a fixed delay compared to the first channel audio data comprises:
    获取与所述第一声道音频数据时间同步的第二声道音频数据,在所述第一声道音频数据中删除一帧音频数据。Acquiring second channel audio data that is time synchronized with the first channel audio data, and deleting one frame of audio data in the first channel audio data.
  11. 根据权利要求10所述的电子设备,其特征在于,删除的音频数据的第一个采样点值和最后一个采样点值相等或者相差满足最小化条件;或者,The electronic device according to claim 10, wherein the first sample point value and the last sample point value of the deleted audio data are equal or the difference satisfies a minimum condition; or
    删除的一帧音频数据的前一帧音频数据和后一帧音频数据被处理后平滑过渡。The previous frame of audio data of the deleted frame of audio data and the subsequent frame of audio data are processed and smoothly transitioned.
  12. 根据权利要求8所述的电子设备,其特征在于,所述调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值包括:The electronic device according to claim 8, wherein said adjusting amplitude values of said first channel audio data and/or said second channel audio data to cause said first channel audio data The amplitude value less than the amplitude value of the second channel audio data includes:
    将所述第一声道音频数据附加第一声道中置增益值,所述第一声道中置增益值为所述第一声道音频数据与所述第二声道音频数据的和再乘以第一中置系数;及Adding a first channel center gain value to the first channel audio data, the first channel center gain value being a sum of the first channel audio data and the second channel audio data multiplied by First center factor; and
    将所述第二声道音频数据附加第二声道中置增益值,所述第二声道中置增益值为所述第一声道音频数据与所述第二声道音频数据的和再乘以第二中置系数;所述第一中置系数小于所述第二中置系数。Adding a second channel center gain value to the second channel audio data, and the second channel center gain value is a sum of the first channel audio data and the second channel audio data Multiplied by a second center coefficient; the first center coefficient is less than the second center coefficient.
  13. 根据权利要求8所述的电子设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行所述调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值的步骤之后,执行以下步骤:The electronic device of claim 8 wherein said computer readable instructions are executed by said processor such that said processor is performing said adjusting said first channel audio data and/or After the step of describing the amplitude value of the second channel audio data such that the amplitude value of the first channel audio data is smaller than the amplitude value of the second channel audio data, the following steps are performed:
    当所述第一声道音频数据或者所述第二声道音频数据的相应振幅值超过有效振幅值范围时,则 When the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds a valid amplitude value range, then
    将所述相应振幅值按照所述有效振幅值范围的最大有效振幅值,获得分段值序列;And obtaining the segmentation value sequence according to the maximum effective amplitude value of the effective amplitude value range;
    获取所述分段值序列中各个分段值的权重,获取的权重的值依次递减且获取的权重的和小于等于1;Obtaining a weight of each segment value in the sequence of segmentation values, the value of the obtained weight is sequentially decreased, and the sum of the obtained weights is less than or equal to 1;
    根据获取的权重计算所述分段值序列的加权和;及Calculating a weighted sum of the sequence of segmentation values based on the obtained weights; and
    根据所述加权和重置所述相应振幅值。The respective amplitude values are reset according to the weighted sum.
  14. 根据权利要求13所述的电子设备,其特征在于,所述获取所述分段值序列中各个分段值的权重包括:The electronic device according to claim 13, wherein the obtaining weights of each segment value in the sequence of segmentation values comprises:
    获取大于1的权重参数K;及Obtaining a weight parameter K greater than 1;
    按照以1-1/K为首项且以1/K为公比的等比数列依次为所述分段值序列中的各个分段值分配权重。The equal-number series with 1-1/K as the first item and 1/K as the common ratio are sequentially assigned weights for the respective segment values in the sequence of segmentation values.
  15. 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause the one or more processors to perform the steps of:
    获取第一声道音频数据;Obtaining first channel audio data;
    获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据;Acquiring second channel audio data having a fixed delay compared to the first channel audio data;
    调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值;以及Adjusting amplitude values of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude value of the second channel audio data; as well as
    分别通过不同的发声单元输出所述第一声道音频数据和所述第二声道音频数据。The first channel audio data and the second channel audio data are output through different sounding units, respectively.
  16. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据包括:The computer readable non-volatile storage medium according to claim 15, wherein the acquiring the second channel audio data having a fixed delay compared to the first channel audio data comprises:
    获取与所述第一声道音频数据时间同步的第二声道音频数据,在时间同步的第二声道音频数据中插入一帧音频数据。Acquiring second channel audio data synchronized with the first channel audio data, inserting one frame of audio data into the time synchronized second channel audio data.
  17. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述获取相较于所述第一声道音频数据具有固定延时的第二声道音频数据包 括:A computer readable nonvolatile storage medium according to claim 15 wherein said acquiring a second channel audio data packet having a fixed delay compared to said first channel audio data include:
    获取与所述第一声道音频数据时间同步的第二声道音频数据,在所述第一声道音频数据中删除一帧音频数据。Acquiring second channel audio data that is time synchronized with the first channel audio data, and deleting one frame of audio data in the first channel audio data.
  18. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值包括:A computer readable non-volatile storage medium according to claim 15 wherein said adjusting said amplitude values of said first channel audio data and/or said second channel audio data is such that The amplitude value of the first channel audio data is smaller than the amplitude value of the second channel audio data, including:
    将所述第一声道音频数据附加第一声道中置增益值,所述第一声道中置增益值为所述第一声道音频数据与所述第二声道音频数据的和再乘以第一中置系数;及Adding a first channel center gain value to the first channel audio data, the first channel center gain value being a sum of the first channel audio data and the second channel audio data multiplied by First center factor; and
    将所述第二声道音频数据附加第二声道中置增益值,所述第二声道中置增益值为所述第一声道音频数据与所述第二声道音频数据的和再乘以第二中置系数;所述第一中置系数小于所述第二中置系数。Adding a second channel center gain value to the second channel audio data, and the second channel center gain value is a sum of the first channel audio data and the second channel audio data Multiplied by a second center coefficient; the first center coefficient is less than the second center coefficient.
  19. 根据权利要求15所述的计算机可读非易失性存储介质,其特征在于,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器在执行所述调整所述第一声道音频数据和/或所述第二声道音频数据的振幅值,以使所述第一声道音频数据的振幅值小于所述第二声道音频数据的振幅值的步骤之后,执行以下步骤:A computer readable non-volatile storage medium according to claim 15 wherein said computer readable instructions are executed by said one or more processors such that said one or more processors are executing Adjusting an amplitude value of the first channel audio data and/or the second channel audio data such that an amplitude value of the first channel audio data is smaller than an amplitude of the second channel audio data After the value step, perform the following steps:
    当所述第一声道音频数据或者所述第二声道音频数据的相应振幅值超过有效振幅值范围时,则When the corresponding amplitude value of the first channel audio data or the second channel audio data exceeds a valid amplitude value range, then
    将所述相应振幅值按照所述有效振幅值范围的最大有效振幅值,获得分段值序列;And obtaining the segmentation value sequence according to the maximum effective amplitude value of the effective amplitude value range;
    获取所述分段值序列中各个分段值的权重,获取的权重的值依次递减且获取的权重的和小于等于1;Obtaining a weight of each segment value in the sequence of segmentation values, the value of the obtained weight is sequentially decreased, and the sum of the obtained weights is less than or equal to 1;
    根据获取的权重计算所述分段值序列的加权和;及Calculating a weighted sum of the sequence of segmentation values based on the obtained weights; and
    根据所述加权和重置所述相应振幅值。The respective amplitude values are reset according to the weighted sum.
  20. 根据权利要求19所述的计算机可读非易失性存储介质,其特征在于,所述获取所述分段值序列中各个分段值的权重包括: The computer readable non-volatile storage medium according to claim 19, wherein the obtaining weights of each segment value in the sequence of segmentation values comprises:
    获取大于1的权重参数K;及Obtaining a weight parameter K greater than 1;
    按照以1-1/K为首项且以1/K为公比的等比数列依次为所述分段值序列中的各个分段值分配权重。 The equal-number series with 1-1/K as the first item and 1/K as the common ratio are sequentially assigned weights for the respective segment values in the sequence of segmentation values.
PCT/CN2016/113113 2016-01-14 2016-12-29 Method for achieving surround sound, electronic device, and storage medium WO2017121245A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610025695.8A CN106973355B (en) 2016-01-14 2016-01-14 Surround sound implementation method and device
CN201610025695.8 2016-01-14

Publications (1)

Publication Number Publication Date
WO2017121245A1 true WO2017121245A1 (en) 2017-07-20

Family

ID=59310755

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113113 WO2017121245A1 (en) 2016-01-14 2016-12-29 Method for achieving surround sound, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN106973355B (en)
WO (1) WO2017121245A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109032038B (en) * 2018-09-04 2021-03-16 南宁学院 Sewage treatment control system based on reinforcement learning
CN113875265A (en) * 2020-04-20 2021-12-31 深圳市大疆创新科技有限公司 Audio signal processing method, audio processing device and recording equipment
CN113514148B (en) * 2021-07-09 2023-06-27 西安因联信息科技有限公司 Equipment vibration early warning method and system based on low-delay data smoothing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155440A (en) * 2007-09-17 2008-04-02 昊迪移通(北京)技术有限公司 Three-dimensional around sound effect technology aiming at double-track audio signal
CN101924317A (en) * 2009-06-12 2010-12-22 扬智科技股份有限公司 Dual-channel processing device, method and sound playing system thereof
WO2011097916A1 (en) * 2010-02-12 2011-08-18 华为技术有限公司 Stereo decoding method and device
CN104967965A (en) * 2015-06-29 2015-10-07 北京芝视界科技有限公司 Method and system for controlling audio frequency playing

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4456601B2 (en) * 2004-06-02 2010-04-28 パナソニック株式会社 Audio data receiving apparatus and audio data receiving method
JP4946305B2 (en) * 2006-09-22 2012-06-06 ソニー株式会社 Sound reproduction system, sound reproduction apparatus, and sound reproduction method
KR101336237B1 (en) * 2007-03-02 2013-12-03 삼성전자주식회사 Method and apparatus for reproducing multi-channel audio signal in multi-channel speaker system
US8817992B2 (en) * 2008-08-11 2014-08-26 Nokia Corporation Multichannel audio coder and decoder
CN103796150B (en) * 2012-10-30 2017-02-15 华为技术有限公司 Processing method, device and system of audio signals

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155440A (en) * 2007-09-17 2008-04-02 昊迪移通(北京)技术有限公司 Three-dimensional around sound effect technology aiming at double-track audio signal
CN101924317A (en) * 2009-06-12 2010-12-22 扬智科技股份有限公司 Dual-channel processing device, method and sound playing system thereof
WO2011097916A1 (en) * 2010-02-12 2011-08-18 华为技术有限公司 Stereo decoding method and device
CN104967965A (en) * 2015-06-29 2015-10-07 北京芝视界科技有限公司 Method and system for controlling audio frequency playing

Also Published As

Publication number Publication date
CN106973355B (en) 2019-07-02
CN106973355A (en) 2017-07-21

Similar Documents

Publication Publication Date Title
US7613305B2 (en) Method for treating an electric sound signal
CN106572419B (en) A kind of stereo audio enhancing system
US11611828B2 (en) Systems and methods for improving audio virtualization
EP3075072A1 (en) Audio signal processing
US10652686B2 (en) Method of improving localization of surround sound
CN111131970B (en) Audio signal processing apparatus and method for filtering audio signal
KR20180075610A (en) Apparatus and method for sound stage enhancement
US9100767B2 (en) Converter and method for converting an audio signal
TW201927010A (en) Crosstalk processing B-chain
WO2017121245A1 (en) Method for achieving surround sound, electronic device, and storage medium
US20190245503A1 (en) Method for dynamic sound equalization
TW201926323A (en) Crosstalk cancellation for opposite-facing transaural loudspeaker systems
KR20160034942A (en) Sound spatialization with room effect
KR20170092669A (en) An audio signal processing apparatus and method for modifying a stereo image of a stereo signal
US9794717B2 (en) Audio signal processing apparatus and audio signal processing method
CN116367076A (en) In-vehicle audio processing method, in-vehicle audio processing device and storage medium
CN109923877B (en) Apparatus and method for weighting stereo audio signal
EP4264963A1 (en) Binaural signal post-processing
US9641953B2 (en) Sound spatialization with room effect, optimized in terms of complexity
CN113645531A (en) Earphone virtual space sound playback method and device, storage medium and earphone
JP2010217268A (en) Low delay signal processor generating signal for both ears enabling perception of direction of sound source
US20240080608A1 (en) Perceptual enhancement for binaural audio recording
EP3513573A1 (en) A method, apparatus and computer program for processing audio signals
CN117202083A (en) Earphone stereo audio processing method and earphone
CN116636233A (en) Perceptual enhancement for binaural audio recording

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: 16884796

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16884796

Country of ref document: EP

Kind code of ref document: A1