WO2018040431A1 - 一种信号数据的处理方法、装置及智能会议设备 - Google Patents

一种信号数据的处理方法、装置及智能会议设备 Download PDF

Info

Publication number
WO2018040431A1
WO2018040431A1 PCT/CN2016/113263 CN2016113263W WO2018040431A1 WO 2018040431 A1 WO2018040431 A1 WO 2018040431A1 CN 2016113263 W CN2016113263 W CN 2016113263W WO 2018040431 A1 WO2018040431 A1 WO 2018040431A1
Authority
WO
WIPO (PCT)
Prior art keywords
buffer area
data length
data
signal data
input buffer
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/113263
Other languages
English (en)
French (fr)
Inventor
刘荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Publication of WO2018040431A1 publication Critical patent/WO2018040431A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M3/00Automatic or semi-automatic exchanges
    • H04M3/42Systems providing special services or facilities to subscribers
    • H04M3/56Arrangements for connecting several subscribers to a common circuit, i.e. affording conference facilities
    • H04M3/568Arrangements for connecting several subscribers to a common circuit, i.e. affording conference facilities audio processing specific to telephonic conferencing, e.g. spatial distribution, mixing of participants
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M9/00Arrangements for interconnection not involving centralised switching
    • H04M9/08Two-way loud-speaking telephone systems with means for conditioning the signal, e.g. for suppressing echoes for one or both directions of traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M3/00Automatic or semi-automatic exchanges
    • H04M3/42Systems providing special services or facilities to subscribers
    • H04M3/56Arrangements for connecting several subscribers to a common circuit, i.e. affording conference facilities

Definitions

  • the embodiments of the present invention relate to the field of signal processing technologies, and in particular, to a method and an apparatus for processing signal data, and an intelligent conference device.
  • a voice call system is generally used to establish a connection with other electronic devices to implement a voice call; when a voice call is made, an echo cancellation technique is generally used to eliminate the echo generated by the call.
  • the process of performing echo cancellation may be summarized as: first reading one frame of audio signal data in the reference buffer, simultaneously reading one frame of input signal data in the input buffer, and then using the audio signal data as an adaptive filter. The input value is iteratively processed to output the simulated echo signal data, and then the input signal data is subtracted from the output echo signal data, and finally the input signal data after the echo signal data is removed is obtained.
  • the reference buffer area corresponds to a speaker in the electronic device for storing audio signal data based on the speaker
  • the input buffer area corresponds to a microphone in the electronic device, and is used for storing input signal data picked up by the microphone.
  • the input signal data includes echo signal data associated with the audio signal data.
  • the signal data associated with the signal data is first played through the speaker, and then the associated signal data is picked up by the microphone and stored in the input buffer area, where the association will be formed.
  • the time elapsed between signal data and storage into the input buffer is called the echo delay.
  • the resulting echo delay tends to affect the echo cancellation.
  • the technician has designed a processing method, that is, in the input buffer area when the voice call system is activated. The input signal data is discarded based on the set rules.
  • the length of the signal data in the input buffer area will be smaller than the length of the signal data in the reference buffer area, thereby ensuring that the signal data stored in the reference buffer area and the associated signal data stored in the input buffer area can be simultaneously Perform echo cancellation processing.
  • the signal data length and input in the reference buffer area can be ensured as long as the sampling rate is the same when the two buffer areas are sampled.
  • the difference in the length of the signal data in the buffer area remains unchanged, thereby ensuring that the signal data subsequently stored in the input buffer area and the reference buffer area can always perform echo cancellation processing at the same time.
  • the speaker and the microphone on the electronic device may not use the same clock source, so there is no guarantee that the buffer area corresponding to the speaker has the same sampling rate as the buffer area corresponding to the microphone.
  • the embodiment of the invention provides a method and a device for processing signal data and a smart conference device, which can perform real-time processing on the signal data buffered during a voice call to ensure that the signal data for echo cancellation is simultaneously subjected to echo cancellation processing.
  • an embodiment of the present invention provides a method for processing signal data, where the method includes:
  • the reference buffer area is used for buffering audio signal data played by the audio output device during a voice call; and the input buffer area is used for buffering input signal data picked up by the audio input device during the voice call.
  • an embodiment of the present invention further provides a signal data processing apparatus, where the apparatus includes:
  • a length information obtaining module configured to acquire data length information of the signal data of the reference buffer area in the current processing period and data length information of the signal data of the input buffer area in the processing period;
  • a length difference information obtaining module configured to determine data length difference information of the reference buffer area and the input buffer area buffer signal data based on the reference buffer area and the data length information corresponding to the input buffer area;
  • a signal data processing module configured to determine a comparison result of the data length difference information and the set standard data length difference information, based on the comparison result pair being stored in the reference buffer area and/or the input buffer area
  • the signal data in the data is subjected to resampling processing so that the data length difference between the reference buffer area and the signal data in the input buffer area remains unchanged;
  • the reference buffer area is used for buffering audio signal data played by the audio output device during a voice call; and the input buffer area is used for buffering input signal data picked up by the audio input device during the voice call.
  • the embodiment of the present invention further provides an intelligent conference device, which integrates a signal data processing device provided by an embodiment of the present invention.
  • the embodiment of the invention provides a method and a device for processing signal data and an intelligent conference device.
  • the processing method firstly obtains data length information of the reference buffer area and the buffer data of the input buffer area in the current processing period, and then based on the two
  • the data length information corresponding to the buffer area is used to determine the data length difference information existing in the two buffer areas; then the determined data length difference information is compared with the standard data length difference information, and finally, based on the comparison result, the reference buffer area and/or may be The signal data in the input buffer is discarded.
  • the difference of the sampling rate of the signal data in the two buffer areas during the voice call is determined simply and effectively, so that the data length difference of the signal data in the reference buffer area and the input buffer area is guaranteed in real time, thereby ensuring the voice.
  • the signal data for echo cancellation in the two buffer areas during the call can be simultaneously subjected to echo cancellation processing.
  • FIG. 1 is a flowchart of a method for processing signal data according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart of a method for processing signal data according to Embodiment 2 of the present invention
  • FIG. 3a is a flowchart of a preferred embodiment of a method for processing signal data according to Embodiment 3 of the present invention
  • 3b is an operational flowchart of determining a data length average value and a parameter variable value in Embodiment 3 of the present invention
  • 3c is a flowchart of operations for performing signal data discarding processing in Embodiment 3 of the present invention.
  • FIG. 4 is a structural block diagram of a signal data processing apparatus according to Embodiment 4 of the present invention.
  • FIG. 1 is a flowchart of a method for processing signal data according to Embodiment 1 of the present invention.
  • This embodiment is applicable to a process for processing signal data to be echo-removed at the local end and a peer voice call, and the method may be It is executed by a processing device of signal data, which can be implemented by means of hardware and/or software, and can generally be integrated in an electronic device having a call function.
  • the difference between the signal data length in the reference buffer area and the length of the signal data in the input buffer area during the voice call is changed due to the difference in the sampling rate of the reference buffer area and the input buffer area, thereby enabling the input buffer.
  • the signal data associated with the zone and the reference buffer can not be read simultaneously and subjected to echo cancellation processing.
  • an embodiment of the present invention provides a signal number
  • the processing method can discard the signal data in the reference buffer area or the input buffer area simply and quickly, thereby ensuring the length of the signal data in the reference buffer area during voice call and the length of the signal data in the input buffer area.
  • the difference is always fixed.
  • a method for processing signal data specifically includes:
  • the reference buffer is used to buffer audio signal data played by the audio output device during a voice call; the input buffer is used to buffer input signal data picked up by the audio input device during the voice call,
  • the audio output device may specifically refer to an audio playback device for playing audio data, such as an earpiece and a speaker in the electronic device; the audio input device may specifically refer to a microphone of the electronic device and a device capable of audio pickup, such as a microphone.
  • the processing cycle can be specifically understood as a preset time period (can be expressed in basic time units (such as seconds); can also be expressed in units of frames), mainly used for statistical reference buffer area and input buffer area in one Data length information during the time period.
  • the data length information may be a total data length obtained by accumulating data lengths in a buffer area (reference buffer area and an input buffer area) in a current processing period, or may be accumulated in a buffer area in a current processing period.
  • the data length is mainly represented by the number of discrete signal data that the buffer has.
  • the data length difference information is equal to a difference between the data length information of the reference buffer area and the data length information of the input buffer area.
  • the data length difference information is a difference between the reference data buffer and the input buffer area corresponding to the total data length value in the processing period;
  • the data length is The information is the average value of the data length determined after the data length is accumulated in the processing period, and the data length difference information is a difference between the average value of the data length corresponding to the reference buffer area and the input buffer area in the processing period.
  • S103 Determine a comparison result between the data length difference information and the set standard data length difference information, and perform, according to the comparison result, signal data stored in the reference buffer area and/or the input buffer area.
  • the resampling process is such that the data length difference between the reference buffer and the signal data in the input buffer remains unchanged.
  • the standard data length difference information can be specifically understood as a standard difference value of data length information of two buffer areas preset, and can also be understood as being based on two buffer areas during processing of signal data.
  • the difference value determined by the data length information for example, the data length difference information obtained for the first time can be determined as the standard data length difference information when the signal data processing is performed.
  • the setting of the standard data length difference information differs based on the specific content indicated by the data length difference information, for example, when the specific content indicated by the data length difference information is the difference of the data length average value
  • the set value of the standard data length difference information is relatively smaller than the set value corresponding to the difference in the data length difference information as the total data length.
  • the difference between the data length difference information and the standard data length difference information may be used as a comparison result, and may be stored in the reference buffer or based on the determined comparison result pair.
  • the signal data in the input buffer area is subjected to resampling processing, thereby ensuring that the data length difference between the reference buffer area and the signal data in the input buffer area remains unchanged.
  • the resampling can be specifically understood as re-entering the signal data with different sampling rates.
  • Line sampling allows the sample rate to be converted to the same sample rate for different signal data, including downsampling and upsampling.
  • one of the signal data may be downsampled or used for the other signal data.
  • Upsampling is performed by inserting signal data at intervals. Since the difference between the sampling rate corresponding to the reference buffer area and the input buffer area is small in this embodiment, the resampling processing can be performed in the above two manners.
  • the implementation process of performing downsampling based on the interval discarding signal data may be described as: comparing the result of comparing the data length difference information with the standard data length difference information as a data length variation, and then, based on the data The value of the length change amount and the set discard rule discard the signal data in the selected buffer area.
  • the discarding rule is specifically used to determine a discarding timing for performing the discarding process, and determine whether it is necessary to discard the signal data of which one of the two buffers. It should be noted that, according to the specific content indicated by the data length information and the data length difference information, the calculated value of the data length change is different, and the corresponding discarding rules are also different, but both are different. The correctness of the discarding process on the signal data can be guaranteed.
  • the implementation process of performing upsampling based on the above-described intervening insertion signal data may be described as: comparing the result of the comparison of the data length difference information and the standard data length difference information as a data length variation amount, and then, based on the data length
  • the value of the change amount and the set insertion rule are inserted into the signal data in the selected buffer area.
  • the insertion rule is specifically used to determine an insertion timing for performing an insertion process, and determine whether it is necessary to perform insertion processing on which one of the two buffer regions. It should be noted that, based on the data length information and the specific content indicated by the data length difference information, the calculated value of the data length change is different, and the corresponding insertion rule is also different, but Both can guarantee the insertion processing of the signal data Authenticity.
  • the embodiment of the present invention determines a comparison result between the data length difference information and the set standard data length difference information, and stores the result in the reference buffer area and/or the input buffer based on the comparison result pair.
  • the signal data in the area is subjected to resampling processing, and specifically preferably:
  • a method for processing signal data is provided in the first embodiment of the present invention.
  • the processing method first obtains data length information of a reference buffer area and an input buffer area for buffering signal data in a current processing period, and then respectively corresponding to the two buffer areas.
  • the data length information determines data length difference information of the reference buffer area and the input buffer area buffer signal data; and then compares the data length difference information with the set standard data length difference information, and finally stores the reference value based on the comparison result pair.
  • the signal data in the buffer area and/or the input buffer area is discarded.
  • the difference of the sampling rate of the signal data in the two buffer areas during the voice call is determined simply and effectively, so that the data length difference of the signal data in the reference buffer area and the input buffer area is guaranteed in real time, thereby ensuring the voice.
  • the signal data for echo cancellation in the two buffer areas during the call can be simultaneously subjected to echo cancellation processing.
  • FIG. 2 is a flowchart of a method for processing signal data according to Embodiment 2 of the present invention.
  • the second embodiment of the present invention is optimized based on the foregoing embodiment.
  • the data length information is further optimized to an average value of the data length determined after the data length is accumulated in the processing period;
  • the length difference information is optimized based on the reference buffer area and the data length corresponding to the input buffer area The average value of the average data length determined by the average.
  • the optimization includes: determining The reference buffer area and the input buffer area have a data length of signal data at a current frame; and the reference buffer area and the input buffer are respectively determined based on data lengths corresponding to the reference buffer area and the input buffer area a corresponding data length cumulative value in the current processing period, wherein the processing period is set in units of frames; determining a location based on the data length integrated value corresponding to the reference buffer area and the input buffer area and the processing period The average of the data lengths corresponding to the reference buffer and the input buffer.
  • the comparison result of determining the data length difference information and the set standard data length difference information is stored in the reference buffer area and/or the input buffer area based on the comparison result pair
  • the signal data is subjected to discarding processing, and the optimizing includes: determining a difference between the average data length difference and the standard data length difference information, and recording the difference as a data length change amount; determining an average discard interval and accumulating And discarding the current value of the amount, and summing the accumulated discard amount and the data length change amount as a processing determination amount, wherein the average discard interval and the cumulative discard variable are both set initial values of 0 a parameter variable; if the value of the data length change amount is not 0 and the value of the process determination amount is not 0, determining the value of the average discard interval based on the set discard amount calculation formula and as a new a current value; discarding signal data stored in the reference buffer and/or the input buffer based on a current value of the average discard interval.
  • the method further includes: pairing from the reference buffer area and the inputting The signal data of the set length read in the storage area is subjected to echo cancellation processing.
  • a method for processing signal data according to Embodiment 2 of the present invention specifically includes the following operations:
  • the data length of the two buffer areas currently having the signal data may be determined based on the set time interval, and the time interval may be manually set.
  • the unit frame is preferably used to represent the set. Time interval, exemplarily, assuming that the set time interval is 10 ms, the time length of the unit frame can be regarded as 10 ms, and can be regarded as the start time of the first frame at 0 ms, and the start time of the second frame at 10 ms. At the beginning time, 20 ms is the start time of the third frame, and thus it can be determined that the two buffer areas have the data length of the signal data at each frame.
  • the reference buffer it can be determined that the reference buffer has a data length of 4000 in the first frame, a data length of 4000 in the second frame, and a data length of 6000 in the current frame, etc. Wait.
  • continuous signal data is sampled based on a certain sampling rate to form discrete signal data, which may specifically refer to the number of samples extracted from the continuous signal and composed of discrete signals per second.
  • discrete signal data may specifically refer to the number of samples extracted from the continuous signal and composed of discrete signals per second.
  • the reference buffer has the same sampling rate as the input buffer, then the difference between the data length of the reference buffer in the unit frame and the data length of the input buffer in the unit frame will remain unchanged.
  • the sampling rate corresponding to the input buffer area may be different, generally, the sampling rate of the thread corresponding to the two buffer areas may have a difference of one ten thousandth, and therefore, the reference buffer of statistics The difference between the data length of the current frame and the data length of the input buffer in the current frame may vary.
  • step S202 and step S203 are required to obtain the average of the data lengths of the two buffer areas in a certain period of time.
  • the value, and the difference between the data length averages corresponding to the two buffer areas is used to represent the data length variation of the two buffer areas.
  • S202 Determine, according to the data length corresponding to the reference buffer area and the input buffer area, a data length cumulative value corresponding to the reference buffer area and the input buffer area in a current processing period, where the processing period is a frame. Set for the unit.
  • the processing cycle is a preset value
  • the set processing cycle includes at least one time interval set as described above, which may be understood to include at least one unit frame. Based on the corresponding data length of the reference buffer area and the input buffer area in each frame of the current processing period, the corresponding data length integrated value in the current processing period may be determined.
  • the processing period is 6 frames, taking the reference buffer area as an example, if the corresponding data length of the reference buffer area in each frame is 4000, 4000, 4000, 6000, 6000, and 6000, respectively, The corresponding data length of the reference buffer in the processing cycle is 30000.
  • S203 Determine, according to the data length integrated value corresponding to the reference buffer area and the input buffer area, and the processing period, an average value of the data length corresponding to the reference buffer area and the input buffer area.
  • the processing period is 1 minute, that is, 60 ⁇ 100 frames
  • the data length corresponding to the reference buffer in the processing period is 300,000 ⁇ 100
  • the data length corresponding to the input buffer is accumulated.
  • the value of the data buffer corresponds to an average of 5000 in the reference buffer, and the average length of the data in the input buffer is 500.
  • the processing operation of the signal data is performed based on the average value of the data length corresponding to the reference buffer area and the input buffer area, and the signal data directly based on the accumulated value of the data in the first embodiment is performed. Compared with the processing operation, the accuracy based on the data length average is more assured.
  • the average data length difference is equal to a difference between a data length average value 5000 corresponding to the reference buffer area and a data length average value 500 corresponding to the input buffer area, that is, the average data length difference is 4500.
  • the standard data length difference information may be preset or may be determined during processing of the signal data.
  • the standard data length difference information is preferably an average data length difference determined based on an average value of the data length of the reference buffer area acquired for the first time and an average value of the data length of the input buffer area.
  • the sampling rate corresponding to the reference buffer area and the input buffer area may change during a voice call, and the value of the average data length difference obtained in different processing periods may be different.
  • the average data length difference determined in the first processing cycle when the signal data processing is performed is determined as the standard data length difference information.
  • the average may be obtained.
  • the data length difference 4500 is determined as the standard data length difference information.
  • the average data length difference determined in the subsequent processing period is compared with the standard data length difference information, and finally the signal data discarding process can be implemented based on the comparison result.
  • the reference buffer can be determined to be processed.
  • the average length of the corresponding data in the period is about 5120, and the average value of the corresponding data length in the processing buffer is about 500 in the processing period, that is, the average length of the data of the reference buffer in the processing period can be determined.
  • the average data length difference corresponding to the data length average of the input buffer area is 4620, and based on the determined standard data length difference information 4500, the value of the data change amount may be determined to be 120.
  • the reference buffer area buffers 120 signal data more than the input buffer area, so as to ensure that the difference between the data length corresponding to the reference buffer area and the input buffer area is maintained. If it is unchanged, it is necessary to discard the multi-cached signal data in the reference buffer. Steps S206 to S208 describe the discarding processing operation of the signal data.
  • the average discard interval and the cumulative discard variable are all parameter variables whose initial value is set to 0, and are mainly used for processing operations of signal data, and the average discard interval is specifically understood as a pair of signals.
  • the time limit for the data to be discarded, that is, the discarding operation can be performed after every value of the average discard interval; the cumulative discard amount can be specifically understood as the cumulative discard value from the start signal data processing to the current co-discard signal data. .
  • the current values of the average discard interval and the accumulated discard amount are still the initial value of 0, otherwise, the The calculation results of the calculation operations of the average discard interval and the cumulative discard amount are taken as respective current values.
  • the value of the average discard interval is determined as a new current value based on the set discard calculation formula.
  • the value of the average discard interval changes as the signal data processing operation proceeds, and can be calculated based on the discard amount calculation formula.
  • the discarding amount calculation formula may directly be the quotient of the processing period and the data variation amount.
  • the average discard interval may be determined based on the above formula.
  • the current value is 50 frames, that is, one signal data can be discarded from the reference buffer every 50 frames.
  • the calculation data change amount is mainly based on the reference buffer area and the data length average corresponding to the input buffer area, the value of the calculated data change amount is not necessarily accurate, and is directly discarded based on the above discard calculation formula.
  • the signal data will cause large fluctuations or even oscillations of the signal data. Therefore, it is necessary to set a new discard calculation formula to calculate the average discard interval value, thereby ensuring accurate transmission of voice content during voice calls.
  • I represents the average discard interval
  • C1 represents the first count variable
  • S d represents the processing discretion
  • P represents the processing period
  • d represents the data length change
  • f 1 and f 2 represent the set weight coefficient
  • the count variable is set in units of frames and represents the number of frames accumulated from the start frame of the buffer signal data to the reference buffer and the input buffer to the current frame.
  • the quotient of the first count variable and the processing determination amount (the sum of the cumulative discard amount and the current data change amount) is added to the set discard amount calculation formula, and then based on the respective weight coefficients Get a more accurate average discard interval value.
  • the average discard interval is The current value is 52.14, which is about 52 frames, wherein the average discard interval is also expressed in units of frames.
  • steps S201 to S205 can generally be performed only after the time length of the signal data processing reaches one processing cycle. Otherwise, the step S206 to the step S208 can be directly performed to discard the signal data. deal with.
  • the timing of performing the signal data discarding process is mainly controlled based on the current value of the average discarding interval, and at the same time, the discarding process of the signal data in which buffer area is specifically controlled.
  • the discarding the signal data stored in the reference buffer area and/or the input buffer area according to the current value of the average discard interval includes:
  • the second count variable is a parameter variable whose initial value is set to 0; if the average discard interval is If the current value is greater than 0, when the current value of the second count variable is determined to be greater than the current value of the average discard interval, the current value of the second count variable is initialized to 0, and is discarded from the reference buffer.
  • the current value of the average discard interval is less than 0, determining that a current value of the second count variable is greater than a current value of the average discard interval In the absolute value, the current value of the second count variable is initialized to 0, a signal data is discarded from the input buffer, and the accumulated discard is subjected to a self-decrement operation.
  • the setting of the second count variable is specifically applicable to the current value of the average discard interval, thereby determining whether the timing of performing the discarding process is reached.
  • the current value of the average discard interval may be a value greater than 0, or may be a value less than 0, when a current value of the average discard interval is greater than 0 and the current value is less than the second count variable.
  • the signal data in the reference buffer area may be discarded, and the accumulated discard variable needs to be added at this time.
  • the row is incremented by 1 and the current value of the second count variable is initialized to 0; when the current value of the average discard interval is less than and the absolute value of the current value is less than the current value of the second count variable, The signal data in the input buffer area is discarded, and at this time, the accumulated discard variable needs to be decremented by 1 and the current value of the second count variable is initialized to 0.
  • the reference buffer area and the input buffer area can be regarded as cache queues, and have the characteristics of first-in first-out, so the embodiment of the present invention always refers to the signal data of the head of the queue in the reference buffer area or the input buffer area. Discard the operation.
  • step S209 when the current value of the average discard interval is 0, there is no need to discard the reference buffer or the input buffer, and only the current value of the second count variable needs to be initialized to 0, after which The operation of step S209 can be continued.
  • step S209 describes an operation of performing echo cancellation processing on the signal data of the reference buffer area and the input buffer area. It can be understood that, since the discarding processing operation of the above steps S201 to S208 is performed, the signal data read from the reference buffer area can be echo-canned at the same time as the signal data associated with the input buffer area. The processing, thereby saving the processing of echo cancellation, ensures the efficiency of echo cancellation.
  • the set length is preferably a data length of the signal data corresponding to the unit frame, and thus may be further regarded as a frame signal read from the reference buffer area and the input buffer area. The data is subjected to echo cancellation processing.
  • a method for processing signal data provided by Embodiment 2 of the present invention optimizes and limits the obtained data length information and data length difference information, and on the basis of this, the data length information acquisition process and signal data are embodied. Discarding process. Using this processing method, it is simple and effective The difference of the signal data sampling rate in the two buffer areas during the voice call is determined, so that the data length difference between the reference buffer area and the input buffer area is fixed in real time, thereby ensuring echo in the two buffer areas during the voice call. The eliminated signal data can simultaneously enter the echo cancellation module.
  • the second embodiment further describes that the data length information is the signal data corresponding to the total data length obtained by accumulating the data length in the buffer area (reference buffer area and input buffer area) in the current processing period.
  • the implementation steps of the processing method are the following steps.
  • the total data length obtained by accumulating the data length of the reference buffer in the current processing period may be obtained based on the foregoing step S201 and step S202, and the total length of the input buffer in the current processing period may be obtained.
  • Data length; then, step S203 may be omitted to directly determine the total data length difference based on the reference buffer area and the total data length corresponding to the input buffer area; at this time, the set value and the standard data length difference information are set.
  • the total data length difference corresponds to the standard deviation determined by the subtraction between the total data lengths, and then the difference between the total data length difference and the standard data length difference may be determined as the data length variation, and And performing a summation operation between the obtained data change amount and the accumulated discard amount to determine the process determination amount; thereafter, the determining operation of the average discard interval may be performed based on step S206; finally, based on step S208 Discard the signal data in the reference buffer or input buffer. Thereby, an operation of discarding the signal data based on the total data length is realized.
  • the data change amount determination operation may be first performed based on the above steps S201 to S205, and then the insertion rule needs to be set and the buffer area is set based on the insertion rule.
  • the setting of the insertion rule is mainly to determine an average insertion interval value, since the determination process is similar to the determination process of the average discard interval, and details are not described herein;
  • One of the buffers The signal data is subjected to interval insertion processing to thereby ensure that the data length difference between the two buffer areas is constant.
  • FIG. 3 is a flowchart of a preferred embodiment of a method for processing signal data according to Embodiment 3 of the present invention.
  • the electronic device A and the electronic device B having the call function establish a voice call based on the voice call system as an application background. Specifically, after the audio signal data of the B end of the electronic device is transmitted to the electronic device A, it is first stored in a set data buffer, and then the audio signal data is read from the data buffer and played based on the audio output device of the electronic device A.
  • the audio signal data will be buffered into the reference buffer area while being played based on the audio output device; in addition, the audio signal data after the audio output device is played back is picked up by the audio input device of the electronic device A again after being reflected by the room. Input signal data is formed that is buffered to the input buffer before the echo cancellation process is performed.
  • Embodiment 3 of the present invention specifically describes a process of discarding signal data buffered to a reference buffer area and an input buffer area.
  • a preferred embodiment of a method for processing signal data according to Embodiment 3 of the present invention specifically includes the following operations:
  • the parameter variable includes a first count variable, a second count variable, a first cumulative length, and a second Cumulative length, average discard interval, and cumulative discard amount.
  • step S301 is a pre-processing operation, and parameter variables, processing periods, weight coefficients, and the like required for signal processing are set.
  • the first accumulated length may be specifically understood as a data length integrated value of the data buffer corresponding to the reference buffer in the current processing period; the second cumulative length The degree can be specifically understood as the data length integrated value of the input buffer area in the current processing period in the data length corresponding to each frame.
  • step S304 is specifically used to determine whether the time length of the current signal data buffering has reached the length of time corresponding to the set processing period. If yes, step S305 is required; if not, steps need to be performed. S306.
  • step S305 when the current value of the first count variable is an integer multiple of the processing period, the operation of step S305 may be performed. It should be noted that the preferred embodiment selects the data length average value as The data length information.
  • step S305 the operation flow of the step S305 can be expressed as follows:
  • S3051 Determine, according to the current value of the first accumulated length and the second accumulated length, and the processing period, an average value of data lengths corresponding to the reference buffer area and the input buffer area.
  • this step can be used to set the value of the standard data length difference information.
  • S3055 Determine a difference between the average data length difference and the standard data length difference information as a data change amount, determine a current value of an average discard interval and an accumulated discard amount, and calculate the accumulated discard amount and the data length. The sum of the changes is recorded as the processing amount.
  • the discarding amount calculation formula is the formula described in the second embodiment above, and details are not described herein again.
  • step S3501 to step S3508 determine the average data length difference between the reference buffer area and the input buffer area, and determine the current value of the average discard interval, which is ready for discarding the signal data. Condition, and after performing step S3058, the step can be continued S306.
  • S306. Perform discard processing on the signal data stored in the reference buffer area and/or the input buffer area according to the set discard rule.
  • step S306 the operation flow of the step S306 can be expressed as follows:
  • S3061 Determine a current value of the second count variable and an average discard interval, and perform a self-addition operation on the second count variable.
  • the value of the second count variable is initialized to 0, a signal data discarded from the reference buffer area, and the cumulative discard amount is self-added 1 operation, after which step S307 is performed;
  • the above steps S3061 to S3068 specifically describe the process of discarding the signal data. Based on the above operations, it can be found that the main purpose of discarding the signal data is to ensure that the data length difference between the reference buffer and the input buffer remains unchanged. Thereby, the echo canceling processing of step S307 is better performed.
  • S307. Perform echo cancellation processing on one frame of signal data respectively read from the reference buffer area and the input buffer area.
  • step S308 If the voice call is not over, return to step S302; otherwise, end the loop operation.
  • step S308 embodies that the processing method of the signal data provided by the embodiment of the present invention may be executed cyclically, and the processing operation may be performed throughout the entire voice call process, and the real-time performance of the processing method is reflected.
  • a third embodiment of the present invention provides a preferred embodiment of a method for processing signal data, and describes a specific implementation process for processing signal data for echo cancellation during a voice call.
  • the difference between the signal data sampling rates in the two buffer areas during the voice call is determined simply and effectively, so that the data length difference between the reference buffer area and the input buffer area is fixed in real time, thereby ensuring the two buffer areas during the voice call.
  • the signal data in which echo cancellation is performed can simultaneously enter the echo cancellation module, which effectively confirms the feasibility of the processing method of the signal data.
  • FIG. 4 is a structural block diagram of a signal data processing apparatus according to Embodiment 4 of the present invention. This embodiment can be applied to the case where the signal data to be echo-removed is processed at the local end and the peer voice call.
  • the device can be implemented in hardware and/or software and can generally be integrated into an electronic device having a call function.
  • the processing apparatus includes a length information acquiring module 41, a length difference information acquiring module 42, and a signal data processing module 43.
  • the length information obtaining module 41 is configured to obtain data length information of the signal data in the current processing period of the reference buffer area and signal data of the input buffer area in the processing period. Data length information.
  • the reference buffer is used for buffering audio signal data played by the audio output device during a voice call; and the input buffer is used for buffering input signal data picked up by the audio input device during the voice call.
  • the length difference information obtaining module 42 is configured to determine data length difference information of the reference buffer area and the input buffer area buffer signal data based on the reference buffer area and the data length information corresponding to the input buffer area.
  • the signal data processing module 43 is configured to determine a comparison result of the data length difference information and the set standard data length difference information, and store the information in the reference buffer area and/or the input buffer based on the comparison result pair
  • the signal data in the area is subjected to resampling processing so that the data length difference between the reference buffer area and the signal data in the input buffer area remains unchanged.
  • the processing device first acquires, by the length information acquiring module 41, the data length information of the signal data that the reference buffer has in the current processing period and the data length of the signal data that the input buffer has in the processing period.
  • the data length difference information obtaining module 42 determines the data length difference information of the reference buffer area and the input buffer area buffer signal data based on the reference buffer area and the data length information corresponding to the input buffer area; and finally passes the signal data processing module 43. Determining, by the comparison result of the data length difference information and the set standard data length difference information, resampling signal data stored in the reference buffer area and/or the input buffer area based on the comparison result deal with.
  • a signal data processing apparatus provided in Embodiment 4 of the present invention simply and effectively determines a difference in signal data sampling rates in two buffer areas during a voice call, thereby ensuring data of signal data in the reference buffer area and the input buffer area in real time.
  • the length difference is a fixed value, thereby ensuring that the signal data for echo cancellation in the two buffer areas during the voice call can simultaneously enter the echo cancellation module.
  • the signal data processing module 43 is specifically configured to: determine a comparison result of the data length difference information and the set standard data length difference information, and store the result in the reference buffer area and/or based on the comparison result pair Or the signal data in the input buffer area is subjected to down sampling processing to keep the data length difference between the reference buffer area and the signal data in the input buffer area unchanged.
  • the data length information is an average value of the data length determined after the data length is accumulated in the processing period; the data length difference information is determined based on an average value of the data length corresponding to the reference buffer area and the input buffer area.
  • the average data length is poor.
  • the length information obtaining module 41 is specifically configured to:
  • the standard data length difference information is an average data length difference determined based on an average value of the data length of the reference buffer obtained for the first time and an average value of the data length of the input buffer.
  • the signal data processing module 43 includes:
  • a length change amount determining unit configured to determine a difference between the average data length difference and the standard data length difference information, and record the difference value as a data length change amount
  • a parameter variable determining unit configured to determine a current value of the average discard interval and the accumulated discard amount, and record the sum of the accumulated discard amount and the data length change amount as a processing discriminant, wherein the average discard interval and the The cumulative discard variable is a parameter variable whose initial value is set to 0;
  • a parameter variable updating unit configured to determine a value of the average discard interval based on a set discarding amount calculation formula when a value of the data length change amount is not 0 and a value of the processing discriminating amount is not 0 As a new current value;
  • a discarding processing unit configured to discard the signal data stored in the reference buffer area and/or the input buffer area based on the current value of the average discard interval.
  • the discarding amount calculation formula is expressed as:
  • I represents the average discard interval
  • C1 represents the first count variable
  • S d represents the processing discretion
  • P represents the processing period
  • d represents the data length change
  • f 1 and f 2 represent the set weight coefficient
  • the count variable is set in units of frames and represents the number of frames accumulated from the start frame of the buffer signal data to the reference buffer and the input buffer to the current frame.
  • the discarding processing unit is specifically configured to:
  • the second count variable is a parameter variable whose initial value is set to 0; if the average discard interval is If the current value is greater than 0, when the current value of the second count variable is determined to be greater than the current value of the average discard interval, the current value of the second count variable is initialized to 0, and is discarded from the reference buffer.
  • the current value of the average discard interval is less than 0, determining that a current value of the second count variable is greater than a current value of the average discard interval In the absolute value, the current value of the second count variable is initialized to 0, a signal data is discarded from the input buffer, and the accumulated discard is subjected to a self-decrement operation.
  • the processing device further includes:
  • An echo cancellation module configured to determine a comparison result of the data length difference information and the set standard data length difference information, based on the comparison result pair being stored in the reference buffer area and/or the input buffering After the signal data in the storage area is discarded, one frame of signal data is read from the reference buffer area and the input buffer area to perform echo cancellation processing.
  • the embodiment of the invention provides an intelligent conference device, which integrates a signal data processing device provided in the fourth embodiment.
  • the signal data processing method in the reference buffer area and the input buffer area may be discarded by the signal data processing method provided in the first embodiment to the third embodiment.
  • the smart conference device belongs to a type of electronic device having a call function, and the smart conference device is integrated with a voice call system, and also has an audio input device and an audio output device.
  • the difference of the signal data sampling rate in the two buffer areas during the voice call can be determined simply and effectively, thereby ensuring the reference buffer area in real time.
  • the difference between the data length of the signal data in the input buffer area is constant, thereby ensuring that the signal data for echo cancellation in the two buffer areas can simultaneously enter the echo cancellation module during the voice call.

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)

Abstract

本发明公开了一种信号数据的处理方法、装置及智能会议设备,该方法包括:分别获取参考缓存区及输入缓存区在当前处理周期内所具有信号数据的数据长度信息;基于参考缓存区以及输入缓存区的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;确定数据长度差信息与标准数据长度差信息的比对结果,基于比对结果对存放于参考缓存区和/或输入缓存区中的信号数据进行重采样处理。利用该方法,简单有效地确定了语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进行回音消除处理。

Description

一种信号数据的处理方法、装置及智能会议设备 技术领域
本发明实施例涉及信号处理技术领域,尤其涉及一种信号数据的处理方法、装置及智能会议设备。
背景技术
对于具有通话功能的电子设备而言,一般通过语音通话系统与其他电子设备建立连接,实现语音通话;在进行语音通话时,通常基于回声消除技术来消除通话产生的回声。具体地,进行回声消除的过程可以概括为:首先读取参考缓存区中的一帧音频信号数据,同时读取输入缓存区中的一帧输入信号数据,然后将音频信号数据作为自适应滤波器的输入值迭代处理后输出模拟的回声信号数据,之后将输入信号数据与所输出的回声信号数据相减,最终获得去除回声信号数据之后的输入信号数据。其中,上述的参考缓存区对应于电子设备中的扬声器,用于存放基于扬声器播放的音频信号数据,上述的输入缓存区对应于电子设备中的麦克风,用于存放由麦克风拾取的输入信号数据,该输入信号数据中包括了与音频信号数据关联的回声信号数据。
一般地,在信号数据存放到参考缓存区后,首先经扬声器播放并形成与该信号数据的关联信号数据,之后该关联信号数据会被麦克风拾取并存放到输入缓存区中,这里将从形成关联信号数据到存放至输入缓存区所经过的时间称为回声时延。但是所产生的回声时延往往会对回声消除产生影响,为了消除上述回声时延对回声消除处理操作的影响,技术人员设计了一个处理方法,即在启动语音通话系统时对输入缓存区中的输入信号数据基于设定规则进行丢弃处理, 在丢弃处理后,输入缓存区中的信号数据长度将小于参考缓存区中的信号数据长度,由此可以保证存放在参考缓存区中的信号数据与存放在输入缓存区中的关联信号数据能够同时进行回音消除处理。
理论上,经过上述技术人员提供的处理方法对上述输入缓存区的信号数据处理后,只要保证上述两缓存区采样信号数据时的采样率相同,就可以保证参考缓存区中的信号数据长度与输入缓存区中信号数据长度的差值保持不变,由此保证输入缓存区以及参考缓存区中后续存放的信号数据一直能够同时进行回声消除处理。然而,在实际应用中,电子设备上的扬声器和麦克风使用的可能不是同一个时钟源,因此无法保证扬声器所对应缓存区与麦克风所对应缓存区具有相同的采样率。在进行语音通话时,当两缓存区的采样率不同时,参考缓存区中的信号数据长度与输入缓存区中信号数据长度的差值将会发生变化,从而导致输入缓存区与参考缓存区中所存放的相关联的信号数据不能同时被读取并进行回音消除处理,进而影响电子设备语音通话时进行回声消除的工作效率。现有技术中并没有一个方法能够有效地解决上述问题。
发明内容
本发明实施例提供了一种信号数据的处理方法、装置及智能会议设备,能够对语音通话时所缓存的信号数据进行实时处理,以保证进行回声消除的信号数据同时进行回音消除处理。
本发明实施例采用以下技术方案:
第一方面,本发明实施例提供了一种信号数据的处理方法,该方法包括:
获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输 入缓存区在所述处理周期内所具有信号数据的数据长度信息;
基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;
确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变;
其中,所述参考缓存区用于缓存语音通话时基于音频输出设备播放的音频信号数据;所述输入缓存区用于缓存语音通话时基于音频输入设备拾取的输入信号数据。
第二方面,本发明实施例还提供了一种信号数据的处理装置,该装置包括:
长度信息获取模块,用于获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息;
长度差信息获取模块,用于基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;
信号数据处理模块,用于确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变;
其中,所述参考缓存区用于缓存语音通话时基于音频输出设备播放的音频信号数据;所述输入缓存区用于缓存语音通话时基于音频输入设备拾取的输入信号数据。
第三方面,本发明实施例又提供了一种智能会议设备,该智能会议设备集成了本发明实施例提供的一种信号数据的处理装置。
本发明实施例提供了一种信号数据的处理方法、装置及智能会议设备,该处理方法首先分别获取参考缓存区以及输入缓存区在当前处理周期内所缓存信号数据的数据长度信息,然后基于两缓存区对应的数据长度信息来确定两缓存区存在的数据长度差信息;之后将确定的数据长度差信息与标准数据长度差信息进行比对,最终基于比对结果可以对参考缓存区和/或输入缓存区中的信号数据进行丢弃处理。利用该处理方法,简单有效地确定了语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进行回音消除处理。
附图说明
图1为本发明实施例一提供的一种信号数据的处理方法的流程图;
图2为本发明实施例二提供的一种信号数据的处理方法的流程图;
图3a为本发明实施例三提供的一种信号数据的处理方法的优选实施例的流程图;
图3b为本发明实施例三中确定数据长度平均值及参数变量值的操作流程图;
图3c为本发明实施例三中进行信号数据丢弃处理的操作流程图;
图4为本发明实施例四提供的一种信号数据的处理装置的结构框图。
具体实施方式
下面结合附图和实施例对本发明作进一步地详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本发明,而非对本发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本发明相关的部分而非全部内容。在更加详细地讨论示例性实施例之前应当提到的是,一些示例性实施例被描述成作为流程图描绘的处理或方法。虽然流程图将各项操作(或步骤)描述成顺序的处理,但是其中的许多操作可以被并行地、并发地或者同时实施。此外,各项操作的顺序可以被重新安排。当其操作完成时所述处理可以被终止,但是还可以具有未包括在附图中的附加步骤。所述处理可以对应于方法、函数、规程、子例程、子程序等等。
实施例一
图1为本发明实施例一提供的一种信号数据的处理方法的流程图,本实施例可适用于本端与对端语音通话时对待进行回声消除的信号数据进行处理的情况,该方法可以由信号数据的处理装置来执行,该装置可通过硬件和/或软件的方式实现,并一般可集成于具有通话功能的电子设备中。
基于上述背景技术可知,因参考缓存区和输入缓存区所具有采样率的不同导致语音通话时参考缓存区中的信号数据长度与输入缓存区中信号数据长度的差值发生变化,进而使输入缓存区与参考缓存区中所存放的相关联的信号数据不能同时被读取并进行回音消除处理。由此,本发明实施例提供了一种信号数 据的处理方法,基于此处理方法能够简单快速的对参考缓存区或输入缓存区中的信号数据进行丢弃处理,进而保证语音通话时参考缓存区中的信号数据长度与输入缓存区中信号数据长度的差值一直为定值。
如图1所示,本实施例提供的一种信号数据的处理方法,具体包括:
S101、获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息。
在本实施例中,所述参考缓存区用于缓存语音通话时基于音频输出设备播放的音频信号数据;所述输入缓存区用于缓存语音通话时基于音频输入设备拾取的输入信号数据,其中,所述音频输出设备具体可指电子设备中的听筒和扬声器等用于播放音频数据的音频播放器件;所述音频输入设备具体可指电子设备的话筒以及麦克风等能够进行音频拾取的器件。所述处理周期具体可理解为预先设定的一个时间段(可以用基本的时间单位(如秒)表示;也可以用帧为单位表示),主要用于统计参考缓存区及输入缓存区在一个时间段内的数据长度信息。
在本实施例中,所述数据长度信息可以是当前处理周期内缓存区(参考缓存区和输入缓存区)中累加数据长度后得到的总数据长度,也可以是当前处理周期内缓存区中累加数据长度后确定的数据长度平均值。在本实施例中,所述数据长度主要以缓存区所具有离散信号数据的个数表示。
S102、基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息。
在本实施例中,所述数据长度差信息等于所述参考缓存区的数据长度信息与所述输入缓存区的数据长度信息的差值。具体地,当所述数据长度信息为处 理周期内累加数据长度后得到的总数据长度时,所述数据长度差信息为所述参考缓存区与输入缓存区在处理周期内所对应的总数据长度值的差值;当所述数据长度信息为在所述处理周期内累加数据长度后确定的数据长度平均值时,所述数据长度差信息为所述参考缓存区与输入缓存区在处理周期内所对应的数据长度平均值的差值。
S103、确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变。
在本实施例中,所述标准数据长度差信息具体可理解为预先设定的两缓存区的数据长度信息的标准差值,也可理解为在进行信号数据的处理过程中基于两缓存区的数据长度信息确定的差值,例如,可以在进行信号数据处理时将首次获取的数据长度差信息确定标准数据长度差信息。此外,对所述标准数据长度差信息的设定基于所述数据长度差信息所表示具体内容的不同而存在不同,例如,当所述数据长度差信息表示的具体内容为数据长度平均值的差值时,所述标准数据长度差信息的设定值相对小于数据长度差信息为总数据长度的差值时对应的设定值。
在本实施例中,可以将所述数据长度差信息与所述标准数据长度差信息的差值作为比对结果,并且可以基于所确定的比对结果对存放于所述参考缓存区或者存放于输入缓存区中的信号数据进行重采样处理,由此保证所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变。
在本实施例中,所述重采样具体可理解为对采样率不同的信号数据重新进 行采样,使得采样率不同信号数据的能够转换为相同的采样率,包括降采样和升采样。一般地,对于采样率不同的两路信号数据而言,如果两路信号的采样率差别很小,则可以对其中一路信号数据使用间隔丢弃信号数据的方式进行降采样或对另一路信号数据使用间隔插入信号数据的方式进行升采样。由于本实施例中参考缓存区与输入缓存区所对应采样率的差别很小,因此可以采用上述两种方式进行重采样处理。
具体地,基于上述间隔丢弃信号数据进行降采样的实现过程可以描述为:将所述数据长度差信息与标准数据长度差信息的比对结果记为数据长度变化量,之后,可以基于所述数据长度变化量的值以及设定的丢弃规则对所选定缓存区中的信号数据进行丢弃处理。在本实施例中,所述丢弃规则具体用于确定进行丢弃处理的丢弃时机,以及判定需要对两缓存区中哪一个缓存区的信号数据进行丢弃处理。需要说明的是,基于所述数据长度信息以及所述数据长度差信息所表示的具体内容不同,计算得到的数据长度变化量的值就不同,相应所设定的丢弃规则也有所不同,但均可以保证对所述信号数据进行丢弃处理的正确性。
此外,基于上述间隔插入信号数据进行升采样的实现过程可以描述为:将所述数据长度差信息与标准数据长度差信息的比对结果记为数据长度变化量,之后,可以基于所述数据长度变化量的值以及设定的插入规则对所选定缓存区中的信号数据进行插入处理。在本实施例中,所述插入规则具体用于确定进行插入处理的插入时机,以及判定需要对两缓存区中哪一个缓存区的信号数据进行插入处理。同样需要说明的是,基于所述数据长度信息以及所述数据长度差信息所表示的具体内容不同,计算得到的数据长度变化量的值就不同,相应所设定的插入规则也有所不同,但均可以保证对所述信号数据进行插入处理的正 确性。
进一步地,本发明实施例将确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,具体优选为:
确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行降采样的丢弃处理。
本发明实施例一提供的一种信号数据的处理方法,该处理方法首先分别获取参考缓存区以及输入缓存区在当前处理周期内缓存信号数据的数据长度信息;然后基于两个缓存区分别对应的数据长度信息确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;之后将数据长度差信息与设定的标准数据长度差信息作比对,最终基于比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理。利用该处理方法,简单有效地确定了语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进行回音消除处理。
实施例二
图2为本发明实施例二提供的一种信号数据的处理方法的流程图。本发明实施例二以上述实施例为基础进行优化,在本实施例中,进一步将所述数据长度信息优化为在所述处理周期内累加数据长度后确定的数据长度平均值;将所述数据长度差信息优化为基于所述参考缓存区以及输入缓存区对应的数据长度 平均值确定的平均数据长度差。
在上述优化的基础上,所述获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息,优化包括了:确定所述参考缓存区以及所述输入缓存区在当前帧时所具有信号数据的数据长度;基于所述参考缓存区和输入缓存区对应的数据长度,分别确定所述参考缓存区以及所述输入缓存区在当前处理周期内对应的数据长度累计值,其中,所述处理周期以帧为单位设定;基于所述参考缓存区和输入缓存区对应的数据长度累计值以及所述处理周期,确定所述参考缓存区和输入缓存区对应的数据长度平均值。
进一步地,所述确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理,优化包括了:确定所述平均数据长度差与所述标准数据长度差信息之间的差值,并将所述差值记为数据长度变化量;确定平均丢弃间隔和累计丢弃量的当前值,并将所述累计丢弃量与所述数据长度变化量的和记为处理判定量,其中,所述平均丢弃间隔及所述累计丢弃变量均为设定的初始值为0的参数变量;如果所述数据长度变化量的值不为0且所述处理判定量的值也不为0,则基于设定的丢弃量计算公式确定所述平均丢弃间隔的值并作为新的当前值;基于所述平均丢弃间隔的当前值对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理。
进一步地,在确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理之后,还包括了:对从所述参考缓存区及所述输入缓 存区中读取的设定长度的信号数据进行回声消除处理。
如图2所示,本发明实施例二提供的一种信号数据的处理方法,具体包括如下操作:
S201、确定所述参考缓存区以及所述输入缓存区在当前帧时所具有信号数据的数据长度。
在本实施例中,可以基于设定的时间间隔去确定两缓存区在当前所具有信号数据的数据长度,所述时间间隔可以人为设定,本实施例优选地用单位帧去表示设定的时间间隔,示例性地,假设所设定的时间间隔为10ms,则可认为单位帧的时间长度为10ms,且可认为0ms时为第1帧的起始时刻,10ms时为第2帧的起始时刻,20ms时为第3帧的起始时刻,由此可以确定两缓存区在各帧时分别具有信号数据的数据长度。以参考缓存区为例,可以确定参考缓存区在第1帧时具有的数据长度为4000,在第2帧时具有的数据长度也为4000,以及在当前帧时具有的数据长度为6000,等等。
一般地,连续的信号数据基于一定的采样率被采样后形成离散的信号数据,所述采样率具体可指每秒从连续信号中提取并组成离散信号的采样个数。理论上,如果参考缓存区与输入缓存区具有相同的采样率,那么参考缓存区在单位帧内数据长度与所述输入缓存区在单位帧内数据长度的差值将保持不变。
然而,由于所述参考缓存区与所述输入缓存区对应的采样率有可能不同,一般地,两缓存区所对应线程的采样率可能存在万分之一的差别,因此,所统计的参考缓存区在当前帧内数据长度与所述输入缓存区在当前帧内数据长度的差值有可能发生变化。
需要注意的是,如果仅基于某单位帧确定的所述参考缓存区和输入缓存区对应数据长度来计算两缓存区数据长度之间的差值,则所确定的两缓存区数据长度之间的差值有可能存在较大的误差,不能准确表示两缓存区的数据长度变化规律,因此需要进行步骤S202和步骤S203的操作,来求取两缓存区在一定时间段内所具有数据长度的平均值,并用与两缓存区对应的数据长度平均值之间的差值来表示两缓存区的数据长度变化。
S202、基于所述参考缓存区和输入缓存区对应的数据长度,分别确定所述参考缓存区以及所述输入缓存区在当前处理周期内对应的数据长度累计值,其中,所述处理周期以帧为单位设定。
在本实施例中,所述处理周期为预先设定的值,所设定的处理周期包括上述设定的至少1个时间间隔,即可理解为包括至少1个单位帧。基于所述参考缓存区和输入缓存区在当前处理周期的各帧内对应的数据长度,就可以确定当前处理周期内对应的数据长度累计值。
示例性地,假设处理周期为6帧,以参考缓存区为例,如果所述参考缓存区在各帧时对应的数据长度分别为4000,、4000、4000、6000、6000以及6000,则所述参考缓存区在该处理周期内对应的数据长度累计值为30000。
S203、基于所述参考缓存区和输入缓存区对应的数据长度累计值以及所述处理周期,确定所述参考缓存区和输入缓存区对应的数据长度平均值。
示例性地,假设处理周期为1分钟,即60×100帧,假设该处理周期内所述参考缓存区对应的数据长度累计值为300000×100个,假设所述输入缓存区对应的数据长度累计值为30000×100个,则所述参考缓存区对应的数据长度平均值为5000,而所述输入缓存区对应的数据长度平均值为500个。
需要说明的是,本实施例中提供的基于所述参考缓存区和输入缓存区对应数据长度平均值进行信号数据的处理操作,与实施例一中所提的直接基于数据累计长度值进行信号数据的处理操作相比,基于数据长度平均值进行处理的准确性更有保证。
S204、基于所述参考缓存区以及输入缓存区对应数据长度平均值,确定参考缓存区与输入缓存区缓存信号数据的平均数据长度差。
接上述示例,所述平均数据长度差等于所述参考缓存区对应的数据长度平均值5000与所述输入缓存区对应的数据长度平均值500的差值,即,所述平均数据长度差为4500。
S205、确定所述平均数据长度差与所述标准数据长度差信息之间的差值,并将所述差值记为数据长度变化量。
在本实施例中,所述标准数据长度差信息可以是预先设定的,也可以是在信号数据的处理过程中确定的。具体地,本实施例将所述标准数据长度差信息优选为基于首次获取的所述参考缓存区的数据长度平均值以及所述输入缓存区的数据长度平均值确定的平均数据长度差。
一般地,由于所述参考缓存区和所述输入缓存区对应的采样率在语音通话过程中有可能发生变化,所以不同处理周期内所获得的平均数据长度差的值可能存在不同,本实施例将进行信号数据处理时首个处理周期内确定的平均数据长度差确定为标准数据长度差信息,示例性地,假设上述计算所得的平均数据长度差4500为首次获取的,则可将所述平均数据长度差4500确定为标准数据长度差信息。之后再将在后续处理周期内确定的平均数据长度差与所述标准数据长度差信息作比对,最终可以基于该比对结果实现信号数据的丢弃处理。
接上述示例,假设参考缓存区所对应的采样率为16KHz,所述输入缓存区所对应的采样率为15.998KHz,所对应处理周期为60×100帧,则可以确定所述参考缓存区在处理周期内对应的数据长度平均值约为5120,所述输入缓存区在处理周期内对应的数据长度平均值约为500,即,可以确定在该处理周期内所述参考缓存区的数据长度平均值与所述输入缓存区的数据长度平均值对应的平均数据长度差为4620,基于已确定的标准数据长度差信息4500,可确定所述数据变化量的值为120。由此可知,在该处理周期内,所述参考缓存区比所述输入缓存区多缓存了120个信号数据,为保证所述参考缓存区与所述输入缓存区所对应数据长度的差值保持不变,就需要对参考缓存区中多缓存的信号数据进行丢弃处理。步骤S206至步骤S208描述了信号数据的丢弃处理操作过程。
S206、确定平均丢弃间隔和累计丢弃量的当前值,并将所述累计丢弃量与所述数据长度变化量的和记为处理判定量。
在本实施例中,所述平均丢弃间隔及所述累计丢弃变量均为设定的初始值为0的参数变量,主要用于信号数据的处理操作,所述平均丢弃间隔具体可理解为对信号数据进行丢弃处理时的时间限制,即每隔所述平均丢弃间隔的值之后才能进行一次丢弃操作;所述累计丢弃量具体可理解为从开始信号数据处理到当前共丢弃信号数据的累计丢弃值。
具体地,如果在当前处理周期之前没有进行过平均丢弃间隔和累计丢弃量的计算操作,则所述所述平均丢弃间隔和累计丢弃量的当前值仍为初始值0,否则,可获取将之前对平均丢弃间隔和累计丢弃量进行计算操作的计算结果作为各自的当前值。
S207、如果所述数据长度变化量的值不为0且所述处理判定量的值也不为 0,则基于设定的丢弃量计算公式确定所述平均丢弃间隔的值并作为新的当前值。
在本实施例中,所述平均丢弃间隔的值随着信号数据处理操作的进行而发生变化,且可基于所述丢弃量计算公式计算获得。理论上,所述丢弃量计算公式可以直接是处理周期与数据变化量的商,示例性地,假设处理周期为60×100帧,数据变化量为120,基于上述公式可确定其平均丢弃间隔的当前值为50帧,即可以每隔50帧从参考缓存区中丢弃一个信号数据。
然而,由于计算数据变化量时所基于的主要是参考缓存区以及输入缓存区对应的数据长度平均值,而计算所得数据变化量的值也不一定准确,如果直接基于上述丢弃量计算公式来丢弃信号数据,会导致信号数据的较大波动甚至震荡,因此,需要设定一个新的丢弃量计算公式来计算平均丢弃间隔值,由此保证语音通话时能够准确地传输语音内容。
进一步地,所述丢弃量计算公式表示为:
Figure PCTCN2016113263-appb-000001
其中,I表示平均丢弃间隔,C1表示第一计数变量,Sd表示处理判定量,P表示处理周期,d表示数据长度变化量,f1和f2表示设定的权重系数;所述第一计数变量以帧为单位设定,表示从向所述参考缓存区和输入缓存区缓存信号数据的起始帧到当前帧所累计的帧数。
在本实施例中,所设定的丢弃量计算公式中增加了第一计数变量与处理判定量的商(累计丢弃量与当前数据变化量之和),之后基于各自所占的权重系数就能够得到较准确的平均丢弃间隔值。
接上述示例,假设所述第一计数变量为10×60×100,累计丢弃量为1000,数据变化量为120,权重系数f1为0.6,权重系数f2为0.4,则所述平均丢弃间隔的当前值为52.14,约为52帧,其中,所述平均丢弃间隔也以帧为单位表示。
需要说明的是,在实际应用过程中,上述步骤S201至S205一般只有在进行信号数据处理的时间长度达到一次处理周期后才可以执行,否则,可以直接执行步骤S206至步骤S208进行信号数据的丢弃处理。
S208、基于所述平均丢弃间隔的当前值对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理。
在本实施例中,主要基于所述平均丢弃间隔的当前值来控制进行信号数据丢弃处理的时机,同时还可控制具体对哪个缓存区中的信号数据进行丢弃处理。
进一步地,所述基于所述平均丢弃间隔的当前值对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理,包括:
确定第二计数变量的当前值,并对所述第二计数变量进行自加1操作,其中,所述第二计数变量为设定的初始值为0的参数变量;如果所述平均丢弃间隔的当前值大于0,则当确定所述第二计数变量的当前值大于所述平均丢弃间隔的当前值时,将所述第二计数变量的当前值初始化为0,从所述参考缓存区中丢弃一个信号数据,并对所述累计丢弃量进行自加1操作;如果所述平均丢弃间隔的当前值小于0,则当确定所述第二计数变量的当前值大于所述平均丢弃间隔当前值的绝对值时,将所述第二计数变量的当前值初始化为0,从所述输入缓存区中丢弃一个信号数据,并对所述累计丢弃量进行自减1操作。
在本实施例中,所述第二计数变量的设定具体可用于与所述平均丢弃间隔的当前值相比对,由此判定是否达到进行丢弃处理的时机。具体地,所述平均丢弃间隔的当前值可以为大于0的值,也可以是小于0的值,当所述平均丢弃间隔的当前值大于0且所述当前值小于所述第二计数变量的当前值时,可以对所述参考缓存区中的信号数据进行丢弃处理,且此时还需要对累计丢弃变量进 行自加1操作,以及将第二计数变量的当前值初始化为0;当所述平均丢弃间隔的当前值小于且所述当前值的绝对值小于所述第二计数变量的当前值时,可以对所述输入缓存区中的信号数据进行丢弃处理,而此时需要对累计丢弃变量进行自减1操作,并将第二计数变量的当前值初始化为0。
需要说明的是,所述参考缓存区和输入缓存区均可认为是缓存队列,具有先进先出的特点,所以本发明实施例总是对参考缓存区或输入缓存区中处于队首的信号数据进行丢弃操作。
在本实施例中,当所述平均丢弃间隔的当前值为0时,不需要对参考缓存区或输入缓存区进行丢弃处理,只需要将所述第二计数变量的当前值初始化为0,之后可以继续进行步骤S209的操作。
S209、对从所述参考缓存区及所述输入缓存区中读取的设定长度的信号数据进行回声消除处理。
在本实施例中,步骤S209描述了对参考缓存区及输入缓存区的信号数据进行回声消除处理的操作。可以理解的是,由于进行了上述步骤S201至S208的丢弃处理操作,因此,从所述参考缓存区中读取的信号数据恰好可以与所述输入缓存区中相关联的信号数据同时进行回声消除处理,由此节省了回声消除的处理时将,保证了回声消除的工作效率。此外,本实施例将所述设定长度优选为单位帧所对应信号数据的数据长度,由此,可进一步认为是对从所述参考缓存区及所述输入缓存区中读取的一帧信号数据进行回声消除处理。
本发明实施例二提供的一种信号数据的处理方法,对所获取的数据长度信息以及数据长度差信息进行了优化限定,并在此基础上了具体化了数据长度信息的获取过程以及信号数据的丢弃处理过程。利用该处理方法,简单有效地确 定了语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进入回音消除模块。
在上述实施例的基础上,本实施例二还阐述了所述数据长度信息为当前处理周期内缓存区(参考缓存区和输入缓存区)中累加数据长度得到总数据长度时所对应信号数据的处理方法的实现步骤。
首先,可以基于上述步骤S201和步骤S202求取所述参考缓存区在当前处理周期内累加数据长度得到的总数据长度,还可获取所述输入缓存区在当前处理周期内累加数据长度得到的总数据长度;然后,可以省去步骤S203直接基于所述参考缓存区以及所述输入缓存区对应的总数据长度确定总数据长度差;此时,所述标准数据长度差信息的设定值与所述总数据长度差相对应,表示为总数据长度之间相减确定的标准差,之后,可以将所述总数据长度差与所述标准数据长度差的差值确定为数据长度变化量,并将得出的数据变化量与所述累计丢弃量进行求和操作,确定出所述处理判定量;其后,可以基于步骤S206进行所述平均丢弃间隔的确定操作;最终,再基于步骤S208对参考缓存区或输入缓存区中的信号数据进行丢弃处理。由此实现了基于总数据长度对信号数据的进行丢弃处理的操作。
此外,当对采样率不同的信号数据进行间隔插入的升采样处理时,首先也可以基于上述步骤S201至步骤S205进行数据变化量的确定操作,之后需要设定插入规则并基于插入规则对缓存区进行信号数据的插入处理,其中,所述插入规则的设定主要在于确定平均插入间隔值,由于其确定过程与所述平均丢弃间隔的确定过程相似,这里不再赘述;最终,对两缓存区的其中一个缓存区的 信号数据进行间隔插入处理由此保证两缓存区数据长度差为定值。
实施例三
图3为本发明实施例三提供的一种信号数据的处理方法的优选实施例的流程图。本发明实施例以具有通话功能的电子设备A和电子设备B基于语音通话系统建立语音通话为应用背景。具体地,电子设备B端的音频信号数据传送到电子设备A之后,首先存放在一个设定的数据缓存区中,然后从该数据缓存区读取音频信号数据并基于电子设备A的音频输出设备播放,且在基于音频输出设备播放的同时该音频信号数据将被缓存到参考缓存区中;此外,基于音频输出设备播放后的音频信号数据经过房间反射后会再次被电子设备A的音频输入设备拾取形成输入信号数据,该输入信号数据在进行回声消除处理前将被缓存至输入缓存区。
本发明实施例三具体描述了对缓存至参考缓存区以及输入缓存区的信号数据进行丢弃处理的过程。
如图3所示,本发明实施例三提供的一种信号数据的处理方法的优选实施例,具体包括如下操作:
S301、设定信号处理所需的参数变量、处理周期以及权重系数,并将所述参数变量初始化为0,所述参数变量包括第一计数变量、第二计数变量、第一累计长度、第二累计长度、平均丢弃间隔以及累计丢弃量。
在本实施例中,步骤S301为一个预处理操作,设定了信号处理所需的参数变量、处理周期及权重系数等。所述第一累计长度具体可理解为当前处理周期内所述参考缓存区在各帧所对应数据长度的数据长度累计值;所述第二累计长 度具体可理解为当前处理周期内所述输入缓存区在各帧所对应数据长度的数据长度累计值。
S302、确定所述参考缓存区以及所述输入缓存区在当前帧时所具有信号数据的数据长度。
S303、对所述第一计数变量进行自加1操作,并将当前帧内参考缓存区所具有的数据长度累加到第一累计长度中,将当前帧内输入缓存区所具有的数据长度累加到第二累计长度中。
在本实施例中,在向所述参考缓存区和输入缓存区缓存单位帧的信号数据后,对所述第一计数变量进行一次自加1操作,同时将当前帧时两缓存区所具有的数据长度累加到各自的累计长度中。
S304、判定所述第一计数变量是否整除所述处理周期,若是,则执行步骤S305;若否,则执行步骤S306;
在本实施例中,所述步骤S304具体用于判定当前进行信号数据缓存的时间长度是否达到了所设定处理周期对应的时间长度,若是,则需要执行步骤S305;若否,则需要执行步骤S306。
S305、确定参考缓存区在当前处理周期内累加数据长度后的数据长度平均值以及输入缓存区在所述处理周期内累加数据长度后的数据长度平均值,并确定信号数据处理所需参数变量的当前值,之后执行S306。
在本实施例中,在所述第一计数变量的当前值为所述处理周期的整数倍时,可以执行步骤S305的操作,需要说明的是,本优选实施例选择所述数据长度平均值为所述数据长度信息。
进一步地,如图3b所示,所述步骤S305的操作流程可表述为:
S3051、基于所述第一累计长度和第二累计长度的当前值以及所述处理周期,确定所述参考缓存区以及输入缓存区对应的数据长度平均值。
S3052、判定所述参考缓存区以及输入缓存区对应的数据长度平均值是否为首次获取,若是,则执行步骤S3053,若否,则执行步骤S3054。
示例性地,该步骤具体可用来设定所述标准数据长度差信息的值。
S3053、将所述参考缓存区对应数据长度平均值与所述输入缓存区对应数据长度平均值的差值确定为标准数据长度差信息,之后执行步骤S3058。
S3054、将所述参考缓存区对应数据长度平均值与所述输入缓存区对应数据长度平均值的差值确定为平均数据长度差。
S3055、将所述平均数据长度差与所述标准数据长度差信息的差值确定为数据变化量,确定平均丢弃间隔和累计丢弃量的当前值,并将所述累计丢弃量与所述数据长度变化量的和记为处理判定量。
S3056、判定所述数据长度变化量的值和所述处理判定量的值是否均不为0,若是,则执行步骤S3057;若否,则执行步骤S3058。
S3057、基于设定的丢弃量计算公式确定所述平均丢弃间隔的值并作为新的当前值。
示例性地,所述丢弃量计算公式为上述实施例二描述的公式,这里不再赘述。
S3058、将所述第一累计长度和第二累计长度的当前值初始化为0。
在本实施例中,上述步骤S3501至步骤S3508的操作,确定了参考缓存区与输入缓存区的平均数据长度差,还确定了平均丢弃间隔的当前值,为信号数据的丢弃处理做好了准备条件,且在执行步骤S3058之后,可以继续执行步骤 S306。
S306、基于设定的丢弃规则对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理。
进一步地,如图3c所示,所述步骤S306的操作流程可表述为:
S3061、确定所述第二计数变量和平均丢弃间隔的当前值,并对所述第二计数变量进行自加1操作。
S3062、判定所述平均丢弃间隔的当前值是否为0,若是,则执行步骤S3063;若否,则执行步骤S3064。
S3063、将所述第二计数变量的值初始化为0,直接执行步骤S307。
S3064、判定所述平均丢弃间隔的当前值是否大于0,若是,则执行步骤S3065;若否,则执行步骤S3067;
S3065、判定所述平均丢弃间隔的当前值是否大于所述第二计数变量的当前值,若否,则执行步骤S3066;若是,则执行步骤S307;
S3066、将所述第二计数变量的值初始化为0,从所述参考缓存区中丢弃的一个信号数据,并对所述累计丢弃量进行自加1操作,之后执行步骤S307;
S3067、判定所述平均丢弃间隔当前值的绝对值是否大于所述第二计数变量的当前值,若否,则执行步骤S3068;若是,则执行步骤S307;
S3068、将所述第二计数变量的值初始化为0,从所述输入缓存区中丢弃一个信号数据,对所述累计丢弃量进行自减1操作,之后执行步骤S307。
在本实施例中,上述步骤S3061至步骤S3068具体描述了信号数据的丢弃处理的过程。基于上述操作可以发现,对信号数据进行丢弃处理的主要目的就是保证所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变, 从而更好地进行步骤S307的回声消除处理。
S307、对从所述参考缓存区和所述输入缓存区中分别读取的一帧信号数据进行回声消除处理。
S308、如果语音通话没有结束,则返回步骤S302;否则,结束循环操作。
在本实施例中,步骤S308体现出了本发明实施例提供的信号数据的处理方法可以是循环执行的,其处理操作可以贯穿整个语音通话的过程,体现出该处理方法的实时性。
本发明实施例三提供了一种信号数据的处理方法的优选实施例,描述了语音通话过程中对待进行回音消除的信号数据进行处理的具体实施过程。简单有效地确定了语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进入回音消除模块,有效证实了信号数据的处理方法的可行性。
实施例四
图4为本发明实施例四提供的一种信号数据的处理装置的结构框图。本实施例可适用于本端与对端语音通话时对待进行回声消除的信号数据进行处理的情况。该装置可通过硬件和/或软件的方式实现,并一般可集成于具有通话功能的电子设备中。如图4所示,该处理装置包括:长度信息获取模块41、长度差信息获取模块42以及信号数据处理模块43。
其中,长度信息获取模块41,用于获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据 的数据长度信息。
进一步地,所述参考缓存区用于缓存语音通话时基于音频输出设备播放的音频信号数据;所述输入缓存区用于缓存语音通话时基于音频输入设备拾取的输入信号数据。
长度差信息获取模块42,用于基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息。
信号数据处理模块43,用于确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变。
在本实施例中,该处理装置首先通过长度信息获取模块41获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息;然后通过长度差信息获取模块42基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;最后通过信号数据处理模块43确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理。
本发明实施例四提供的一种信号数据的处理装置,简单有效地确定了语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进入回音消除模块。
进一步地,信号数据处理模块43,具体用于:确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行降采样的丢弃处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变。
进一步地,所述数据长度信息为在所述处理周期内累加数据长度后确定的数据长度平均值;所述数据长度差信息为基于所述参考缓存区以及输入缓存区对应的数据长度平均值确定的平均数据长度差。
在上述实施例的基础上,所述长度信息获取模块41,具体用于:
确定所述参考缓存区以及所述输入缓存区在当前帧时所具有信号数据的数据长度;基于所述参考缓存区和输入缓存区对应的数据长度,分别确定所述参考缓存区以及所述输入缓存区在当前处理周期内对应的数据长度累计值,其中,所述处理周期以帧为单位设定;基于所述参考缓存区和输入缓存区对应的数据长度累计值以及所述处理周期,确定所述参考缓存区和输入缓存区对应的数据长度平均值。
进一步地,所述标准数据长度差信息为基于首次获取的所述参考缓存区的数据长度平均值以及所述输入缓存区的数据长度平均值确定的平均数据长度差。
在上述实施例的基础上,所述信号数据处理模块43,包括:
长度变化量确定单元,用于确定所述平均数据长度差与所述标准数据长度差信息之间的差值,并将所述差值记为数据长度变化量;
参数变量确定单元,用于确定平均丢弃间隔和累计丢弃量的当前值,并将所述累计丢弃量与所述数据长度变化量的和记为处理判定量,其中,所述平均丢弃间隔及所述累计丢弃变量均为设定的初始值为0的参数变量;
参数变量更新单元,用于当所述数据长度变化量的值不为0且所述处理判定量的值也不为0时,基于设定的丢弃量计算公式确定所述平均丢弃间隔的值并作为新的当前值;
丢弃处理单元,用于基于所述平均丢弃间隔的当前值对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理。
在上述实施例的基础上,所述丢弃量计算公式表示为:
Figure PCTCN2016113263-appb-000002
其中,I表示平均丢弃间隔,C1表示第一计数变量,Sd表示处理判定量,P表示处理周期,d表示数据长度变化量,f1和f2表示设定的权重系数;所述第一计数变量以帧为单位设定,表示从向所述参考缓存区和输入缓存区缓存信号数据的起始帧到当前帧所累计的帧数。
进一步地,所述丢弃处理单元,具体用于:
确定第二计数变量的当前值,并对所述第二计数变量进行自加1操作,其中,所述第二计数变量为设定的初始值为0的参数变量;如果所述平均丢弃间隔的当前值大于0,则当确定所述第二计数变量的当前值大于所述平均丢弃间隔的当前值时,将所述第二计数变量的当前值初始化为0,从所述参考缓存区中丢弃一个信号数据,并对所述累计丢弃量进行自加1操作;如果所述平均丢弃间隔的当前值小于0,则当确定所述第二计数变量的当前值大于所述平均丢弃间隔当前值的绝对值时,将所述第二计数变量的当前值初始化为0,从所述输入缓存区中丢弃一个信号数据,并对所述累计丢弃量进行自减1操作。
在上述实施例的基础上,所述处理装置还包括:
回声消除模块,用于在确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓 存区中的信号数据进行丢弃处理之后,从所述参考缓存区中和所述输入缓存区中分别读取一帧信号数据进行回声消除处理。
实施例五
本发明实施例提供了一种智能会议设备,该智能会议设备集成了上述实施例四提供的一种信号数据的处理装置。可以通过上述实施例一至实施例三提供的信号数据的处理方法对参考缓存区以及输入缓存区中待进行回声消除的信号数据进行丢弃处理。
在本实施例中,所述智能会议设备属于具有通话功能的电子设备的一种,所述智能会议设备中集成有语音通话系统,同时还具备音频输入设备以及音频输出设备。
在所述智能会议设备中集成本发明上述实施例提供的一种信号数据的处理装置之后,能够简单有效地确定语音通话时两缓存区中信号数据采样率的差异,从而实时保证了参考缓存区与输入缓存区中信号数据的数据长度差为定值,进而保证了语音通话时两缓存区中进行回声消除的信号数据能够同时进入回音消除模块。
注意,上述仅为本发明的较佳实施例及所运用技术原理。本领域技术人员会理解,本发明不限于这里所述的特定实施例,对本领域技术人员来说能够进行各种明显的变化、重新调整和替代而不会脱离本发明的保护范围。因此,虽然通过以上实施例对本发明进行了较为详细的说明,但是本发明不仅仅限于以上实施例,在不脱离本发明构思的情况下,还可以包括更多其他等效实施例,而本发明的范围由所附的权利要求范围决定。

Claims (11)

  1. 一种信号数据的处理方法,其特征在于,包括:
    获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息;
    基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;
    确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变;
    其中,所述参考缓存区用于缓存语音通话时基于音频输出设备播放的音频信号数据;所述输入缓存区用于缓存语音通话时基于音频输入设备拾取的输入信号数据。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,包括:
    确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行降采样的丢弃处理。
  3. 根据权利要求2所述的方法,其特征在于,所述数据长度信息为在所述处理周期内累加数据长度后确定的数据长度平均值;
    所述数据长度差信息为基于所述参考缓存区以及输入缓存区对应的数据长度平均值确定的平均数据长度差。
  4. 根据权利要求3所述的方法,其特征在于,所述获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息,包括:
    确定所述参考缓存区以及所述输入缓存区在当前帧时所具有信号数据的数据长度;
    基于所述参考缓存区和输入缓存区对应的数据长度,分别确定所述参考缓存区以及所述输入缓存区在当前处理周期内对应的数据长度累计值,其中,所述处理周期以帧为单位设定;
    基于所述参考缓存区和输入缓存区对应的数据长度累计值以及所述处理周期,确定所述参考缓存区和输入缓存区对应的数据长度平均值。
  5. 根据权利要求3所述的方法,其特征在于,所述标准数据长度差信息为基于首次获取的所述参考缓存区的数据长度平均值以及所述输入缓存区的数据长度平均值确定的平均数据长度差。
  6. 根据权利要求3所述的方法,其特征在于,所述确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理,包括:
    确定所述平均数据长度差与所述标准数据长度差信息之间的差值,并将所述差值记为数据长度变化量;
    确定平均丢弃间隔和累计丢弃量的当前值,并将所述累计丢弃量与所述数据长度变化量的和记为处理判定量,其中,所述平均丢弃间隔及所述累计丢弃变量均为设定的初始值为0的参数变量;
    如果所述数据长度变化量的值不为0且所述处理判定量的值也不为0,则 基于设定的丢弃量计算公式确定所述平均丢弃间隔的值并作为新的当前值;
    基于所述平均丢弃间隔的当前值对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理。
  7. 根据权利要求6所述的方法,其特征在于,所述丢弃量计算公式表示为:
    Figure PCTCN2016113263-appb-100001
    其中,I表示平均丢弃间隔,C1表示第一计数变量,Sd表示处理判定量,P表示处理周期,d表示数据长度变化量,f1和f2表示设定的权重系数;
    所述第一计数变量以帧为单位设定,表示从向所述参考缓存区和输入缓存区缓存信号数据的起始帧到当前帧所累计的帧数。
  8. 根据权利要求6所述的方法,其特征在于,所述基于所述平均丢弃间隔的当前值对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行丢弃处理,包括:
    确定第二计数变量的当前值,并对所述第二计数变量进行自加1操作,其中,所述第二计数变量为设定的初始值为0的参数变量;
    如果所述平均丢弃间隔的当前值大于0,则当确定所述第二计数变量的当前值大于所述平均丢弃间隔的当前值时,将所述第二计数变量的当前值初始化为0,从所述参考缓存区中丢弃一个信号数据,并对所述累计丢弃量进行自加1操作;
    如果所述平均丢弃间隔的当前值小于0,则当确定所述第二计数变量的当前值大于所述平均丢弃间隔当前值的绝对值时,将所述第二计数变量的当前值初始化为0,从所述输入缓存区中丢弃一个信号数据,并对所述累计丢弃量进行自减1操作。
  9. 根据权利要求1-8任一所述的方法,其特征在于,在确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理之后,还包括:
    对从所述参考缓存区及所述输入缓存区中读取的设定长度的信号数据进行回声消除处理。
  10. 一种信号数据的处理装置,其特征在于,包括:
    长度信息获取模块,用于获取参考缓存区在当前处理周期内所具有信号数据的数据长度信息以及输入缓存区在所述处理周期内所具有信号数据的数据长度信息;
    长度差信息获取模块,用于基于所述参考缓存区以及输入缓存区对应的数据长度信息,确定参考缓存区与输入缓存区缓存信号数据的数据长度差信息;
    信号数据处理模块,用于确定所述数据长度差信息与设定的标准数据长度差信息的比对结果,基于所述比对结果对存放于所述参考缓存区和/或所述输入缓存区中的信号数据进行重采样处理,以使所述参考缓存区与所述输入缓存区中信号数据的数据长度差保持不变;
    其中,所述参考缓存区用于缓存语音通话时基于音频输出设备播放的音频信号数据;所述输入缓存区用于缓存语音通话时基于音频输入设备拾取的输入信号数据。
  11. 一种智能会议设备,其特征在于,该智能会议设备集成了权利要求10所述的信号数据的处理装置。
PCT/CN2016/113263 2016-08-31 2016-12-29 一种信号数据的处理方法、装置及智能会议设备 Ceased WO2018040431A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610799051.4 2016-08-31
CN201610799051.4A CN106341564B (zh) 2016-08-31 2016-08-31 一种信号数据的处理方法、装置及智能会议设备

Publications (1)

Publication Number Publication Date
WO2018040431A1 true WO2018040431A1 (zh) 2018-03-08

Family

ID=57823722

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113263 Ceased WO2018040431A1 (zh) 2016-08-31 2016-12-29 一种信号数据的处理方法、装置及智能会议设备

Country Status (2)

Country Link
CN (1) CN106341564B (zh)
WO (1) WO2018040431A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335701B (zh) * 2018-01-24 2021-04-13 青岛海信移动通信技术股份有限公司 一种进行声音降噪的方法及设备
CN109378019B (zh) * 2018-10-31 2020-12-08 成都极米科技股份有限公司 音频数据读取方法及处理系统
CN109600700B (zh) * 2018-11-16 2020-11-17 珠海市杰理科技股份有限公司 音频数据处理方法、装置、计算机设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101409808A (zh) * 2008-10-15 2009-04-15 北京创毅视讯科技有限公司 一种音频重采样方法、装置及一种数字电视芯片
WO2012046256A2 (en) * 2010-10-08 2012-04-12 Optical Fusion Inc. Audio acoustic echo cancellation for video conferencing
CN102568494A (zh) * 2012-02-23 2012-07-11 贵阳朗玛信息技术股份有限公司 消除回声的优化方法、装置及系统
CN102625006A (zh) * 2011-01-31 2012-08-01 深圳三石科技有限公司 一种回声消除数据同步对齐方法、系统及音频通信设备
CN104822001A (zh) * 2015-04-23 2015-08-05 腾讯科技(深圳)有限公司 回声消除数据同步控制方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8958897B2 (en) * 2012-07-03 2015-02-17 Revo Labs, Inc. Synchronizing audio signal sampling in a wireless, digital audio conferencing system
CN104394286A (zh) * 2014-08-27 2015-03-04 贵阳朗玛信息技术股份有限公司 一种回声消除方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101409808A (zh) * 2008-10-15 2009-04-15 北京创毅视讯科技有限公司 一种音频重采样方法、装置及一种数字电视芯片
WO2012046256A2 (en) * 2010-10-08 2012-04-12 Optical Fusion Inc. Audio acoustic echo cancellation for video conferencing
CN102625006A (zh) * 2011-01-31 2012-08-01 深圳三石科技有限公司 一种回声消除数据同步对齐方法、系统及音频通信设备
CN102568494A (zh) * 2012-02-23 2012-07-11 贵阳朗玛信息技术股份有限公司 消除回声的优化方法、装置及系统
CN104822001A (zh) * 2015-04-23 2015-08-05 腾讯科技(深圳)有限公司 回声消除数据同步控制方法和装置

Also Published As

Publication number Publication date
CN106341564A (zh) 2017-01-18
CN106341564B (zh) 2019-12-17

Similar Documents

Publication Publication Date Title
US10205830B2 (en) Echo cancellation data synchronization control method, terminal, and storage medium
CN107610713B (zh) 基于时延估计的回声消除方法及装置
CN106210371B (zh) 一种回声时延的确定方法、装置及智能会议设备
JP5741281B2 (ja) 音声信号処理装置、撮像装置、音声信号処理方法、プログラム及び記録媒体
WO2018040431A1 (zh) 一种信号数据的处理方法、装置及智能会议设备
WO2016127699A1 (zh) 一种实现参考信号调整的方法及装置
CN112489670A (zh) 时延估计方法、装置、终端设备和计算机可读存储介质
CN112116927A (zh) 实时检测音频信号中的语音活动
CN112669878A (zh) 声音增益值的计算方法、装置和电子设备
WO2018040432A1 (zh) 一种音频通话的实现方法、系统及智能会议设备
WO2017036175A1 (zh) 一种语音处理的方法及终端
US20180061424A1 (en) Audio compensation techniques for network outages
CN112492112B (zh) 一种基于对讲系统的回音消除方法和装置
US7600032B2 (en) Temporal drift correction
CN112151051B (zh) 音频数据的处理方法和装置及存储介质
US8259928B2 (en) Method and apparatus for reducing timestamp noise in audio echo cancellation
US7039193B2 (en) Automatic microphone detection
CN118486317A (zh) 一种非线性回声抑制方法、装置、电子设备及存储介质
CN110349592B (zh) 用于输出信息的方法和装置
WO2017045512A1 (zh) 一种语音识别的方法、装置、终端及语音识别设备
CN110363132B (zh) 活体检测方法、装置、电子设备及存储介质
CN111145770A (zh) 音频处理方法和装置
CN119233178A (zh) 一种基于双麦的时域助听器去啸叫的方法及系统
CN111613238A (zh) 信号之间延时的确定方法、装置、设备以及存储介质
KR20240031117A (ko) 지연 판단 시스템 및 그 방법

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

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

Country of ref document: EP

Kind code of ref document: A1