Method and device for detecting attacks in an audio signal to be coded and for coding the detected attacks - Patents.com

JP7608362B2Active Publication Date: 2025-01-06VOICEAGE CORPORATION
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2021566035
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-05-07
Filing Date
2020-05-01
Publication Date
2025-01-06
Estimated Expiration
2040-05-01

Smart Images

  • Figure 0007608362000015
    Figure 0007608362000015
  • Figure 0007608362000016
    Figure 0007608362000016
  • Figure 0007608362000017
    Figure 0007608362000017
Patent Text Reader

Abstract

A method and device for detecting attacks in a speech signal to be coded, where the speech signal is processed in successive frames, each including several subframes. The device includes a first-stage attack detector for detecting attacks in the last subframe of the current frame and a second-stage attack detector for detecting attacks in one of the subframes of the current frame, including the subframe before the last subframe. An attack is not detected when the current frame is not determined to be an active frame already classified to be coded using a generic coding mode. A method and device for coding attacks in a speech signal are also provided. The coding device includes the above-mentioned attack detection device and an encoder of the subframe containing the detected attack using a transition coding mode with a glottal shape codebook inputted with a glottal impulse shape.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] SUMMARY This disclosure relates to techniques for coding audio signals, for example speech or audio signals, with consideration given to transmitting and synthesizing the audio signals.

[0002] More particularly, but not exclusively, the present disclosure relates to methods and devices for detecting attacks in an audio signal to be coded, e.g., a speech or audio signal, and coding the detected attacks.

[0003] In this disclosure and the accompanying claims: - The term "attack" refers to a change from low to high energy in a signal, e.g., a voiced onset (a transition from an unvoiced speech segment to a voiced speech segment) or other voiced onsets, transitions, plosives, etc., that is generally characterized by a sudden increase in energy in a speech signal segment. - The term "onset" refers to a significant audio event, e.g., the beginning of speech, musical notation, or other audio. - The term "plosive" in phonetics refers to a consonant in which the vocal tract is closed so that all air flow stops. The term "coding of a detected attack" refers to the coding of an audio signal segment, typically a few milliseconds in length from the beginning of the attack. [Background technology]

[0004] A speech encoder converts a speech signal into a digital bitstream that is transmitted over a communication channel or stored on a storage medium. The speech signal is digitized, i.e. sampled, and quantized, usually at 16 bits per sample. The speech encoder is responsible for representing these digital samples with a smaller number of bits while maintaining good subjective speech quality. A speech decoder or synthesizer operates on the transmitted or stored digital bitstream and converts it back into a speech signal.

[0005] CELP (Code Excited Linear Prediction) coding is one of the best techniques to achieve a good compromise between subjective quality and bit rate. This coding technique forms the basis of several speech coding standards for both wireless and wired applications. In CELP coding, a sampled speech signal is processed in consecutive blocks of M samples, usually called frames, where M is a predefined number of speech samples, typically corresponding to 10-30 ms. An LP (Linear Prediction) filter is calculated and transmitted every frame. The calculation of the LP filter typically requires a look-ahead, e.g. a speech segment of 5-15 ms from the following frame. Each M sample frame is divided into smaller blocks, called subframes. Typically the number of subframes is 2 to 5, resulting in subframes of 4-10 ms. In each subframe, the excitation is usually obtained from two components: the contribution of the past excitation and the contribution of the excitation of an innovative fixed codebook. The past excitation contribution is often referred to as the pitch or adaptive codebook excitation contribution. Parameters characterizing the excitation are coded and transmitted to the decoder, where the excitation is reconstructed and provided as input to the LP synthesis filter.

[0006] CELP-based speech codecs rely heavily on prediction to achieve their high performance. Such prediction can be of various kinds, but usually involves the use of an adaptive codebook that stores the adaptive codebook excitation contribution selected from previous frames. CELP encoders exploit the quasi-periodicity of voiced speech by searching for the most similar segment to the currently coded segment among the past adaptive codebook excitation contributions. The same past adaptive codebook excitation contributions are also stored in the decoder. Then, it is sufficient for the encoder to transmit the pitch delay and pitch gain for the decoder to reconstruct the same adaptive codebook excitation contribution used in the encoder. The evolution (difference) between the previous speech segment and the currently coded speech segment is further modeled using the fixed codebook excitation contribution selected from the fixed codebook.

[0007] Prediction-related problems inherent to CELP-based speech codecs appear when the encoder and decoder states become desynchronized, in the presence of transmission errors (lost frames or packets). Due to prediction, the effect of a lost frame does not remain with the lost frame, but continues to propagate after the frame loss, often for several subsequent frames. Naturally, the perceptual effects can be very annoying. Attacks such as transitions from an unvoiced to a voiced speech segment (e.g., a transition between a consonant or inactive speech period and a lyric) or transitions between two different voiced segments (e.g., a transition between two lyric) are present in the most problematic cases for concealing the loss of a frame. When a transition from an unvoiced to a voiced speech segment (a voiced onset) is lost, the frame immediately preceding the frame of the voiced onset is unvoiced or inactive, and therefore no meaningful excitation contribution is found in the buffer of the adaptive codebook. In the encoder, past excitation contributions accumulate in the adaptive codebook during a voiced onset frame, and subsequent voiced frames are coded using past adaptive codebook excitation contributions. Most frame error concealment techniques use information from the last correctly received frame to conceal missing frames. When a voiced onset frame is lost, the decoder's adaptive codebook buffer is therefore updated using the noise-like adaptive codebook excitation contributions of previous frames (unvoiced or inactive frames). Thus, the periodic part of the excitation (adaptive codebook excitation contribution) is never found in the decoder adaptive codebook after a lost voiced onset, and it may take several frames for the decoder to recover from this loss. A similar situation occurs in the case of a lost voiced-to-voiced transition. In that case, the excitation contributions stored in the adaptive codebook before the transition frame generally have very different characteristics than the excitation contributions stored in the adaptive codebook after the transition.Again, since the decoder usually conceals the lost frames using past frame information, the encoder and decoder states may become very different and the synthesized signal may suffer from severe distortion. A solution to this problem is introduced in [2], where the adaptive codebook with inter-frame dependency is replaced by a non-predictive glottal-shape codebook in the frames following the transition frame.

[0008] Another problem when coding transitional frames in CELP-based codecs is the coding efficiency. The coding efficiency decreases when the codec processes transitions where the excitations of the previous and current segments are very different. Usually, these cases occur in frames that code voiced onsets (transitions from an unvoiced speech segment to a voiced speech segment), other voiced onsets, transitions between two different voiced segments (for example, a transition between two rhymes), attacks such as plosives, etc. Generally, the following two problems are responsible for such a decrease in efficiency (see mainly [1]). The first problem is the inefficiency of the long-term prediction and therefore the weak contribution of the excitation of the adaptive codebook to the overall excitation. The second problem is related to the gain quantizer, which is often designed as a vector quantizer with a limited bit-budget, which is usually unable to react appropriately to a sudden energy increase within a frame. The closer this sudden energy increase is to the end of the frame, the more critical the second problem becomes. Summary of the Invention [Problem to be solved by the invention]

[0009] To overcome the problems discussed above, there is a need for methods and devices for improving the efficiency of coding of frames that include attacks, such as onset frames and transition frames, and more broadly, for improving the coding quality of CELP-based codecs. [Means for solving the problem]

[0010] According to a first aspect, the present disclosure relates to a method for detecting attacks in a coded audio signal, where the audio signal is processed in successive frames, each including several subframes, the method comprising a first stage attack detection for detecting attacks in a last subframe of a current frame and a second stage attack detection for detecting attacks in one of the subframes of the current frame including the subframe before the last subframe.

[0011] The present disclosure also relates to a method for coding an attack in an audio signal, comprising the attack detection method defined above, the coding method comprising the step of encoding a subframe comprising the detected attack using a coding mode that employs a non-predictive codebook.

[0012] According to another aspect, the present disclosure relates to a device for detecting attacks in a coded audio signal, where the audio signal is processed in successive frames, each including several subframes, including a first stage attack detector for detecting attacks in a last subframe of a current frame and a second stage attack detector for detecting attacks in one of the subframes of the current frame including the subframe before the last subframe.

[0013] Furthermore, the present disclosure relates to a device for coding attacks in an audio signal, comprising an attack detection device as defined above and an encoder of a subframe containing the detected attack using a coding mode with a non-predictive codebook.

[0014] The above and other objects, advantages and features of methods and devices for detecting attacks in an audio signal to be coded and for coding the detected attacks will become more apparent on reading the following non-limiting description of exemplary embodiments of those methods and devices, given by way of example only with reference to the accompanying drawings. [Brief description of the drawings]

[0015] [Figure 1] 1 is a schematic block diagram of an audio processing and communication system illustrating a possible context of implementation of a method and device for detecting attacks in an encoded audio signal and coding the detected attacks. [Diagram 2] FIG. 2 is a schematic block diagram illustrating the structure of a CELP-based encoder and decoder forming part of the speech processing and communication system of FIG. 1; [Diagram 3] FIG. 2 is a block diagram illustrating simultaneously the operation of the coding mode classification method of EVS (Enhanced Voice Services) and the modules of the coding mode classifier of EVS. [Figure 4] 1 is a block diagram illustrating simultaneously the operation of a method for detecting attacks in an audio signal to be coded and the modules of an attack detector for implementing the method; [Diagram 5] FIG. 5 is a graph of a first non-limiting illustrative example showing the effect of the attack detector and TC (Transition Coding) coding mode of FIG. 4 on the quality of a decoded speech signal, where curve a) represents the input speech signal, curve b) represents the synthesis of a reference speech signal, and curve c) represents the synthesis of an improved speech signal when the attack detector and TC coding mode of FIG. 4 are used to process the onset frame. [Figure 6]5 is a graph of a second non-limiting illustrative example showing the effect of the attack detector and TC coding mode of FIG. 4 on the quality of a decoded speech signal, where curve a) represents the input speech signal, curve b) represents the synthesis of a reference speech signal, and curve c) represents the synthesis of an improved speech signal when the attack detector and TC coding mode of FIG. 4 is used to process the onset frame. [Figure 7] FIG. 2 is a simplified block diagram of an exemplary configuration of hardware components for implementing a method and device for detecting attacks in an audio signal to be coded and coding the detected attacks. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0016] Non-limiting exemplary embodiments of methods and devices for detecting attacks in a speech signal to be coded and for coding the detected attacks are described in the following description in relation to speech signals and CELP-based codecs, but it should be noted that these methods and devices are not limited to application to speech signals and CELP-based codecs, and that their principles and concepts may be applied to any other kind of speech signals and codecs.

[0017] The following description relates to detecting attacks in a voice signal, e.g., a speech or audio signal, and forcing a transition coding (TC) mode in subframes where an attack is detected. Detection of an attack may also be used to select subframes where a glottal shape codebook is used as part of a TC coding mode instead of an adaptive codebook.

[0018] In the EVS codec described in [4], when the detection algorithm detects an attack in the last subframe of the current frame, the glottal shape codebook of the TC coding mode is used in this last subframe. In this disclosure, the detection algorithm is supplemented with a second stage logic to not only detect a larger number of frames containing attacks, but also to enforce the use of the TC coding mode and the corresponding glottal shape codebook when coding such frames in all subframes where an attack is detected.

[0019] The techniques described above improve the efficiency of coding of specific musical segments (eg, castanets) as well as attacks detected in the audio signal being coded. More broadly, the quality of the coding is improved.

[0020] FIG. 1 is a schematic block diagram of an audio processing and communication system 100 illustrating a possible context for implementation of the methods and devices for detecting attacks in a coded audio signal and coding the detected attacks disclosed in the following description.

[0021] The voice processing and communication system 100 of FIG. 1 supports the transmission of voice signals over a communication channel 101. The communication channel 101 may include, for example, a wired or fiber optic link. Alternatively, the communication channel 101 may include, at least in part, a radio frequency link. Radio frequency links often support multiple simultaneous communications requiring shared bandwidth resources such as may be found in cellular telephony. Although not shown, the communication channel 101 may be replaced by a storage device in a single device implementation of the system 100 that records and stores the encoded voice signals for later playback.

[0022] 1, for example, microphone 102 generates an original analog audio signal 103. As noted above, audio signal 103 may include, but is not limited to, speech and / or audio.

[0023] The analog audio signal 103 is provided to an analog-to-digital (A / D) converter 104 for converting the analog audio signal 103 into an original digital audio signal 105. The original digital audio signal 105 may also be recorded on and provided from a storage device (not shown).

[0024] The speech encoder 106 encodes the digital speech signal 105, thereby generating a set of encoding parameters that are multiplexed in the form of a bitstream 107 that is delivered to an optional error correction channel encoder 108. The optional error correction channel encoder 108, when present, adds redundancy to the binary representation of the encoding parameters in the bitstream 107 before transmitting the resulting bitstream 111 over the communication channel 101.

[0025] At the receiver side, an optional error correction channel decoder 109 utilizes the above-mentioned redundant information in the received digital bit stream 111 to detect and correct errors that may have occurred during transmission over the communication channel 101, and generates an error-corrected bit stream 112 with the received coding parameters. A speech decoder 110 converts the received coding parameters in the bit stream 112 to generate a synthesized digital speech signal 113. The reconstructed digital speech signal 113 in the speech decoder 110 is converted to a synthesized analog speech signal 114 in a digital-to-analog (D / A) converter 115.

[0026] The synthesized analog audio signal 114 is reproduced on a loudspeaker unit 116 (of course, the loudspeaker unit 116 could be replaced by headphones). Alternatively, the digital audio signal 113 from the audio decoder 110 could be fed to and recorded on a storage device (not shown).

[0027] As a non-limiting example, the method and device for detecting attacks in a coded audio signal and coding the detected attacks according to the present disclosure may be implemented in the audio encoder 106 and the decoder 110 of FIG. 1. It should be noted that the audio processing and communication system 100 of FIG. 1, together with the method and device for detecting attacks in a coded audio signal and coding the detected attacks, may be extended to cover the spatial audio case where the input of the encoder 106 and the output of the decoder 110 consist of the left and right channels of a stereo audio signal. The audio processing and communication system 100 of FIG. 1, together with the method and device for detecting attacks in a coded audio signal and coding the detected attacks, may be further extended to cover the multi-channel and / or scene-based audio and / or independent stream encoding and decoding (e.g., surround and higher order Ambisonics) cases.

[0028] Figure 2 is a schematic block diagram illustrating the structure of a CELP-based encoder and decoder that is part of the speech processing and communication system 100 of Figure 1 according to an exemplary embodiment. As shown in Figure 2, the speech codec includes two basic parts: a speech encoder 106 and a speech decoder 110, both introduced in the above description of Figure 1. The encoder 106 is supplied with an original digital speech signal 105 and determines coding parameters 107, described herein below, that represent the original analog speech signal 103. These parameters 107 are coded into a digital bitstream 111. As already explained, the bitstream 111 is transmitted to the decoder 110 using a communication channel, for example the communication channel 101 of Figure 1. The speech decoder 110 reconstructs a synthesized digital speech signal 113 that is as similar as possible to the original digital speech signal 105.

[0029] Currently, most popular speech coding techniques are based on Linear Prediction (LP), in particular CELP. In LP-based coding, a synthesized digital speech signal 230 (FIG. 2) is generated by filtering an excitation 214 by an LP synthesis filter 216 with transfer function 1 / A(z). An example of a procedure for finding the filter parameters A(z) of an LP filter can be found in reference [4].

[0030] In CELP, the excitation 214 is generally divided into two parts: by selecting a past excitation signal v(n) from an adaptive codebook 218 according to an index t (the pitch lag), and by selecting the gain g of the adaptive codebook. p The first stage is the adaptive codebook contribution 222, which is generated by amplifying the past excitation signal v(n) by 226, and the innovative code vector c from the fixed codebook 220 according to the index k. k (n) and the fixed codebook gain g c 228 innovative code vector c k(n) and a second stage, the fixed codebook contribution 224, which is generated by amplifying (n). In general, the adaptive codebook 222 models the periodic part of the excitation, and the fixed codebook excitation contribution 224 is added to model the evolution of the speech signal.

[0031] The speech signal is processed in frames, typically of 20 ms, and the filter parameters A(z) of the LP filter are sent from the encoder 106 to the decoder 110 once per frame. In CELP, a frame is divided into several subframes for coding the excitation. Typically, the length of a subframe is 5 ms.

[0032] CELP uses a principle called analysis-by-synthesis, where possible decoder outputs have already been tried (synthesized) during the coding process in the encoder 106 and are then compared to the original digital speech signal 105. The encoder 106 therefore contains elements similar to those of the decoder 110. These elements ensure that the output y1(n) is a function of the adaptive codebook gain g p 230. The adaptive codebook excitation contribution 250 (corresponding to adaptive codebook contribution 222 of decoder 110) is selected as a function of index t (pitch lag) from adaptive codebook 242 (corresponding to adaptive codebook 218 of decoder 110) which provides a past excitation signal v(n) to be convolved with the impulse response of weighted synthesis filter H(z) 238 (a cascade of LP synthesis filter 1 / A(z) and perceptual weighting filter W(z)) amplified by 240. These elements are used to select the output y(n) from the fixed codebook gain g (corresponding to fixed codebook gain 228 of decoder 110). c The weighted synthesis filter H(z) amplified by 248. The innovative code vector c is convolved with the impulse response of 246. k(n) is selected as a function of index k from a fixed codebook 244 (corresponding to fixed codebook contribution 224 of decoder 110).

[0033] The encoder 106 includes a perceptual weighting filter W(z) 233 and a calculator 234 of the zero-input response of the cascade (H(z)) of the LP synthesis filter 1 / A(z) and the perceptual weighting filter W(z). Subtractors 236, 254, and 256 subtract the zero-input response from calculator 234, the adaptive codebook contribution 250, and the fixed codebook contribution 252, respectively, from the original digital speech signal 105 filtered by the perceptual weighting filter 233 to provide an error signal that is used to calculate a mean squared error 232 between the original digital speech signal 105 and the synthesized digital speech signal 113 (FIG. 1).

[0034] The adaptive codebook 242 and the fixed codebook 244 are searched to minimize the mean squared error 232 between the original digital speech signal 105 and the synthesized digital speech signal 113 in a perceptually weighted domain, for discrete time indexes n=0, 1, ..., N-1, where N is the length of a subframe. The minimization of the mean squared error 232 is determined by finding the best candidate past excitation signal v(n) (identified by index t) and innovative code vector c(n) (identified by index k) for coding the digital speech signal 105. k (n). The perceptual weighting filter W(z) exploits frequency masking effects and is typically derived from the LP filter A(z). An example of a perceptual weighting filter W(z) for a WB (wideband, typically 50-7000 Hz bandwidth) signal can be found in reference [4].

[0035] The memory-searched innovative code vector c of the LP synthesis filter 1 / A(z) and the weighting filter W(z) kSince this memory (the zero-input response of the cascade (H(z)) of the LP synthesis filter 1 / A(z) and the perceptual weighting filter W(z)) can be subtracted (subtractor 236) from the original digital speech signal 105 before the fixed codebook search. Then, the candidate innovative code vector c k The filtering of (n) may be performed by convolution with the impulse response of the cascade of filters 1 / A(z) and W(z), represented in FIG.

[0036] The digital bit stream 111 transmitted from the encoder 106 to the decoder 110 generally includes the following parameters 107: the quantized parameters of the LP filter A(z), the index t of the adaptive codebook 242 and the index k of the fixed codebook 244, and the gains g of the adaptive codebook 242 and the fixed codebook 244. p 240 and g c 248. In the decoder 110, - the received quantized parameters of the LP filter A(z) are used to construct the LP synthesis filter 216, - the received index t is applied to an adaptive codebook 218, - the received index k is applied to a fixed codebook 220, - the received gain g p is used as the gain 226 of the adaptive codebook, - the received gain g c is used as the fixed codebook gain 228.

[0037] Further description of the structure and operation of CELP-based encoders and decoders can be found, for example, in reference [4].

[0038] Also, please note that although the following description refers to the EVS standard (Reference [4]), the concepts, principles, structures, and operations described therein may apply to other voice / speech processing and communications standards.

[0039] Coding voiced onsets To obtain better coding performance, the LP-based core of the EVS codec described in reference [4] uses a signal classification algorithm and six different coding modes tailored for each category of signal: Inactive Coding (IC) mode, Unvoiced Coding (UC) mode, Transitional Coding (TC) mode, Voiced Coding (VC) mode, Generic Coding (GC) mode, and Audio Coding (AC) mode (not shown).

[0040] FIG. 3 is a simplified high-level block diagram illustrating simultaneously the operation of an EVS coding mode classification method 300 and the modules of an EVS coding mode classifier 320.

[0041] Referring to FIG. 3, the coding mode classification method 300 includes an active frame detection operation 301 , an unvoiced frame detection operation 302 , a post-onset frame detection operation 303 , and a stable voiced frame detection operation 304 .

[0042] To perform the active frame detection operation 301, an active frame detector 311 determines whether the current frame is active or inactive. For that purpose, sound activity detection (SAD) or voice activity detection (VAD) can be used. If an inactive frame is detected, IC coding mode 321 is selected and the procedure is terminated.

[0043] If the detector 311 detects an active frame during the active frame detection operation 301, an unvoiced frame detection operation 302 is performed using an unvoiced frame detector 312. In particular, if an unvoiced frame is detected, the unvoiced frame detector 312 selects a UC coding mode 322 for coding the detected unvoiced frame. The UC coding mode is designed for coding unvoiced frames. In the UC coding mode, no adaptive codebook is used, and the excitation consists of two vectors selected from a linear Gaussian codebook. Alternatively, the UC coding mode may consist of a fixed algebraic codebook and a Gaussian codebook.

[0044] If the current frame is not classified as unvoiced by detector 312, then post-onset frame detection operation 303 and corresponding post-onset frame detector 313 as well as stable voiced frame detection operation 304 and corresponding stable voiced frame detector 314 are used.

[0045] In the post-onset frame detection operation 303, the detector 313 detects voiced frames following a voiced onset and selects a TC coding mode 323 for coding these frames. The TC coding mode 323 is designed to improve the performance of the codec in the presence of frame erasures by limiting the use of past information (adaptive codebook). To simultaneously minimize the impact of the TC coding mode 323 on the performance of a perfect channel (without frame erasures), the mode 323 is used only for the most critical frames in terms of frame erasures. These most critical frames are the voiced frames following a voiced onset.

[0046] If the current frame is not a voiced frame following a voiced onset, a stable voiced frame detection operation 304 is performed. During this operation, a stable voiced frame detector 314 is designed to detect quasi-periodic stable voiced frames. If the current frame is detected as a quasi-periodic stable voiced frame, the detector 314 selects a VC coding mode 324 to code the stable voiced frame. The selection of the VC coding mode by the detector 314 is conditioned by the smooth pitch evolution. It uses an Algebraic Code-Excited Linear Prediction (ACELP) technique, but more bits are allocated to a fixed (algebraic) codebook than the GC coding mode, assuming that the pitch evolution is smooth throughout the frame.

[0047] If the current frame is not classified into one of the above mentioned frame categories during operations 301-304, then this frame is likely to contain a non-stationary speech segment and the detector 314 selects a GC coding mode 325, e.g., a generic ACELP coding mode, for encoding such a frame.

[0048] Finally, the speech / music classification algorithm of the EVS standard (not shown) is executed to determine whether the current frame is to be coded using AC mode, which is designed for efficient coding of generic audio signals, especially but not limited to music.

[0049] To improve the performance of the codec on noisy channels, an improvement of the coding mode classification method described in the previous paragraph with reference to FIG. 3, called frame classification for frame error concealment (FEC), is applied (reference [4]). The basic idea behind using different frame classification techniques for FEC is the fact that the ideal strategy for FEC should be different for quasi-stationary speech segments and for speech segments with rapidly changing characteristics. In the EVS standard (reference [4]), the frame classification for FEC used in the encoder defines five different classes as follows: The UNVOICED class includes all unvoiced speech frames and all frames without active speech. Voiced offset frames can also be classified as UNVOICED class if the end of the frame tends to be unvoiced. The UNVOICED TRANSITION class includes unvoiced frames with a possible voiced onset at the end of the frame. The VOICED TRANSITION class includes voiced frames with relatively weak voiced characteristics. The VOICED class includes voiced frames with stationary characteristics. The ONSET class includes all voiced frames with stable features following a frame classified as either the UNVOICED or UNVOICED TRANSITION class.

[0050] Further description of the EVS coding mode classification method 300 and the EVS coding mode classifier 320 of FIG. 3 may be found, for example, in Reference [4].

[0051] Originally, TC coding modes were introduced to be used in frames following a transition to help stop error propagation if the transition frame is lost (reference [4]). Furthermore, TC coding modes can be used in transition frames to increase the efficiency of coding. In particular, just before the voiced onset, the adaptive codebook usually contains a noise-like signal that is not very useful or efficient for coding the beginning of a voiced segment. The aim is to complement the adaptive codebook with a better non-predictive codebook that is input with a simplified quantized version of the glottal impulse shape to code the voiced onset. The glottal shape codebook is designed to encode the LP residual signal (s in Figure 2) in one subframe that contains the first glottal impulse in the frame, or more precisely, within the first pitch period of the frame. w (n)) is used only in the subframe in which it has its maximum energy. Further explanations regarding the TC coding mode of FIG.

[0052] This disclosure proposes to further extend the concept of EVS to code the voiced onsets using a glottal shape codebook in TC coding mode. It is proposed to force the use of as much of the bit budget (number of available bits) as possible to code the excitation towards the end of the frame, since when an attack occurs towards the end of the frame, coding the preceding part of the frame (the subframes before the subframe containing the attack) with a small number of bits is sufficient. The difference with the TC coding mode of EVS described in [4] is that the glottal shape codebook is usually used in the last subframe in the frame, regardless of the actual maximum energy of the LP residual signal in the first pitch period of the frame.

[0053] By forcing most of the bit budget to code the end of the frame, the waveform of the speech signal at the beginning of the frame may not be modeled well, especially at low bit rates where the fixed codebook is formed with, for example, only 1 or 2 pulses / subframe. However, the sensitivity of the human ear is exploited here. The human ear is less sensitive to inaccurate coding of the speech signal before an attack, but is much more sensitive to any imperfections in the coding of speech signal segments after such an attack, e.g. voiced segments. By forcing a larger number of bits to build the attack, the adaptive codebook of the subsequent speech signal frame is more efficient since it benefits from past excitations corresponding to the well-modeled segments of the attack. As a result, the subjective quality is improved.

[0054] This disclosure proposes a method for detecting attacks and a corresponding attack detector that operates on frames coded by a GC coding mode to determine whether these frames should be coded by a TC coding mode. In particular, when an attack is detected, these frames are coded using the TC coding mode. Thus, the overall number of frames coded using the TC coding mode increases. Furthermore, since the TC coding mode does not use past excitation, the inherent robustness of the codec against frame erasures is enhanced by this approach.

[0055] Attack detection method and attack detector FIG. 4 is a block diagram illustrating simultaneously the operation of an attack detection method 400 and the modules of an attack detector 450.

[0056] The attack detection method 400 and the attack detector 450 appropriately select the frames to be coded using the TC coding mode. The following describes an example of the attack detection method 400 and the attack detector 450 that can be used in a codec, in this illustrative example the CELP codec, with an internal sampling rate of 12.8 kbps, frames of length 20 ms and consisting of 4 subframes, in relation to FIG. 4. An example of such a codec is the EVS codec (reference [4]) with a lower bit rate (≦13.2 kbps). Application to other types of codecs with different internal bit rates, frame lengths and number of subframes can also be envisaged.

[0057] The detection of an attack starts with a pre-processing where the energy in several segments of the input audio signal of the current frame is calculated, followed by a detection performed in two stages in sequence and a final decision: the first stage detection is based on comparing the calculated energy in the current frame, while the second stage detection also takes into account the energy values ​​of past frames.

[0058] Segment Energy In the energy calculation operation 401 of FIG. 4, an energy calculator 451 calculates a perceptually weighted input speech signal s w Calculate the energy in (n) consecutive analysis segments, n=0,...,N-1, where N is the length of the frame in number of samples. To calculate such energy, calculator 451 may, for example, use the following equation (1):

[0059]

number

[0060] where K is the length of the analysis audio signal segment in number of samples, i is the index of the segment, and N / K is the total number of segments. In the EVS standard operating at an internal sampling rate of 12.8 kbps, the length of the frame is N=256 samples and the length of the segments can be set, for example, to K=8, resulting in a total of N / K=32 analysis segments. Thus, segment i=0,...,7 corresponds to the first subframe, segment i=8,...,15 corresponds to the second subframe, segment i=16,...,23 corresponds to the third subframe, and finally, segment i=24,...,31 corresponds to the last (fourth) subframe of the current frame. In a non-limiting illustrative example of equation (1), the segments are contiguous. In another possible embodiment, partially overlapping segments may be used.

[0061] Next, in a find maximum energy segment operation 402, a maximum energy segment finder 452 finds the segment i that has the maximum energy. To that end, the finder 452 may use, for example, the following equation (2):

[0062]

number

[0063] The segment with the maximum energy represents the candidate attack location to be verified in the two stages below (hereafter referred to as the first and second stages).

[0064] In an exemplary embodiment given as an example in this description, only active frames already classified to be processed using the GC coding mode (VAD=1, local VAD is considered in the current frame) are subjected to the first and second stage attack detection below. Further description on VAC (Voice Activity Detection) can be found, for example, in reference [4]. In a decision operation 403, a decision module 453 determines whether VAD=1 and the current frame has been classified to be processed using the GC coding mode. If so, a first stage attack detection is performed on the current frame. If not, no attack is detected and the current frame is processed according to its previous classification as shown in FIG. 3.

[0065] Both speech and music frames can be classified into the GC coding mode, and therefore attack detection is applied in coding regular voice signals as well as speech signals.

[0066] First stage attack detection The first stage attack detection operation 404 and the corresponding first stage attack detector 454 are described below with reference to FIG.

[0067] The first stage attack detection operation 404 includes an average energy calculation operation 405. To perform operation 405, the first stage attack detector 454 may, for example, calculate an average energy using the following equation (3):

[0068]

number

[0069] where P is the number of segments before the last subframe. In a non-limiting example implementation where N / K=32, the parameter P is equal to 24.

[0070] Similarly, in the average energy calculation operation 405, the calculator 455 may, for example, calculate the average energy by:

[0071]

number

[0072] Using the segment I of the current frame att Calculate the average energy over the entire analysis segment starting from to the last segment.

[0073] The first stage attack detection operation 404 further includes a comparison operation 406. To perform the comparison operation 406, the first stage attack detector 454 includes a comparator 456 for comparing the ratio of the average energy E1 from equation (3) and the average energy E2 from equation (4) with a threshold value depending on the signal classification of the previous frame, denoted "last_class", performed by the frame classification discussed above for frame error concealment (FEC) (reference [4]). The comparator 456 is, as a non-limiting example, the following logic of equation (5):

[0074]

number

[0075] Location of attack from first stage attack detection using I att1 where β1 and β2 are thresholds that may be set to β1=8 and β2=20, respectively, by way of non-limiting example. att1 When = 0, the attack will not be detected. Using the logic of equation (5), all attacks that are not strong enough are eliminated.

[0076] To further reduce the number of falsely detected attacks, the first stage attack detection operation 404 further includes a segment energy comparison operation 407. To perform the segment energy comparison operation 407, the first stage attack detector 454 compares the maximum energy Eseg (I att ) to the energy E of the other analysis segments of the current frame. seg (i). Thus, operation 406 and comparator 456 result in I att1 >0, comparator 457 performs, by way of a non-limiting example, the following equation (6) for i=2,...,P-3:

[0077]

number

[0078] The comparison is performed with the threshold value β3 being experimentally determined to reduce falsely detected attacks as much as possible without impeding the efficiency of detecting real attacks. In a non-limiting experimental implementation, the threshold value β3 is set to 2. Again, I att1 When = 0, no attacks are detected.

[0079] Second stage attack detection The second stage attack detection operation 410 and the corresponding second stage attack detector 460 are described below with reference to FIG.

[0080] The second stage attack detection operation 410 includes a voiced class comparison operation 411. To perform the voiced class comparison operation 411, the second stage attack detector 460 includes a voiced class decision module 461 to obtain information from the EVS FEC classification method discussed above to determine whether the class of the current frame is VOICED or not. If the class of the current frame is VOICED, the decision module 461 outputs a decision that no attack is detected.

[0081] No attack was detected in the first stage attack detection operation 404 and the first stage attack detector 454 (particularly, the comparison operation 406 and the comparator 456 or the comparison operation 407 and the comparator 457), i.e., I att1=0 and the classification of the current frame is other than VOICED, then second stage attack detection operation 410 and second stage attack detector 460 are applied.

[0082] The second stage attack detection operation 410 includes an average energy calculation operation 412. To perform operation 412, the second stage attack detector 460 calculates the average energy of the candidate attacks I att The average energy of the previous N / K analysis segments, including segments from the previous frame, is calculated using, for example, equation (7).

[0083]

number

[0084] an average energy calculator 462 for calculating using E seg,past (i) is the energy per segment from the previous frame.

[0085] The second stage attack detection operation 410 includes a logical decision operation 413. To perform operation 413, the second stage attack detector 460 applies a logical decision to the average energy from equation (7), for example,

[0086]

number

[0087] By applying att2 a logic decision module 463 for finding I att is found in equation (2), where β4 and β5 are thresholds that are set to β4=16 and β5=12, respectively, in this non-limiting exemplary implementation. att2 When it determines that =0, no attack is detected.

[0088] Finally, the second stage attack detection operation 410 includes an energy comparison operation 414. To perform operation 414, the second stage attack detector 460 compares the I determined in the comparison operation 413 and the comparator 463. att2 To further reduce the number of falsely detected attacks when is greater than 0, we set the following ratio as the threshold, e.g., Eq. (9):

[0089]

number

[0090] where β6 is a threshold value set to β6=20 in a non-limiting exemplary implementation, and E LT As a non-limiting example, formula (10)

[0091]

number

[0092] In this non-limiting exemplary implementation, the parameter α is set to 0.95. Again, I att2 When = 0, no attacks are detected.

[0093] Finally, in the energy comparison operation 414, the energy comparator 464 compares the location of the attack I if the attack was not detected in the previous frame. att2 Set to 0. In this case, no attacks will be detected.

[0094] Final attack detection decision The final decision of whether the current frame is determined as an attack frame to be coded using the TC coding mode is made based on the attack positions I obtained during the detection operations of the first stage 404 and the second stage 410, respectively. att1 and I att2 This is based on the following:

[0095] If the current frame is active (VAD=1) and has already been classified for coding in the GC coding mode, as determined in the decision operation 403 and the decision module 453, then, for example, the logic under equation (11)

[0096]

number

[0097] applies.

[0098] In particular, the attack detection method 400 includes a first stage attack decision operation 430. To perform operation 430, if the current frame is active (VAD=1) and has already been classified for coding in the GC coding mode, as determined in decision operation 403 and decision module 453, the attack detector 450 att1 It further includes a first stage attack decision module 470 for determining whether I ≧ P. att1 If ≧P, then I att1 is the position of the detected attack in the last subframe of the current frame, I att,final and is used to determine that the glottal shape codebook of the TC coding mode is used in this last subframe. Otherwise, no attack is detected.

[0099] With respect to the second stage of attack detection, if the comparison in equation (9) is true, or an attack was detected in the previous frame, as determined in the energy comparison operation 414 and the energy comparator 464, then I att2 = 0 and no attack is detected. Otherwise, in the attack determination operation 440 of the attack detection method 400, the attack determination module 480 of the attack detector 450 determines whether the attack is located at the position I att,final =I att2 The position of the detected attack is I att,finalis used to determine in which subframe the glottal shape codebook of the TC coding mode is used.

[0100] Final location of detected attack I att,final The information about is used to determine which subframes of the current frame the glottal shape codebook in the TC coding mode will be used and which TC mode configuration (see reference [3]) will be used. For example, for a frame with N = 256 samples divided into 4 subframes and N / K = 32 analysis segments, the glottal shape codebook is determined by the final attack position I att,final is detected in segments 1 to 7, it is used in the first subframe and the final attack position I att,final If is detected within segments 8 to 15, it is used in the second subframe to determine the location of the final attack, I att,final is detected in segments 16-23, then it is used in the third subframe, and finally, the location of the final attack I att,final If is detected in segments 24 to 31, it is used in the last (fourth) subframe of the current frame. att,final =0 signals that no attack was found and that the current frame will be coded according to the original classification (usually using the GC coding mode).

[0101] Example implementation of an immersive voice / audio codec The attack detection method 400 includes a glottal shape codebook allocation operation 445. To perform operation 445, the attack detector 450 allocates the glottal shape codebook in the TC coding mode to a given subframe of a current frame consisting of four subframes according to the logic under Equation (12):

[0102]

number

[0103] where sbfr is a subframe index, sbfr=0,...3, with index 0 indicating the first subframe, index 1 indicating the second subframe, index 2 indicating the third subframe, and index 3 indicating the fourth subframe.

[0104] The above description of a non-limiting example of implementation assumes a pre-processing module operating at an internal sampling rate of 12.8 kHz and having 4 subframes and therefore frames with a number of samples N=256. If the core codec uses ACELP with an internal sampling rate of 12.8 kHz, the position of the final attack I att,final are allocated to the subframes as defined in equation (12). However, the situation is different when the core codec operates at a different internal sampling rate, e.g., at a higher bit rate (16.4 kbps or higher for EVS) where the internal sampling rate is 16 kHz. Given a frame length of 20 ms, a frame consists of 5 subframes in this case, and the length of such a frame is N 16 = 320 samples. In this example of implementation, since the pre-processing classification and analysis may still be performed in the domain of the internal sampling rate of 12.8 kHz, the glottal shape codebook allocation module 485 allocates the subframes to be coded using the glottal shape codebook in the TC coding mode in the glottal shape codebook allocation operation 445 according to the logic under equation (13):

[0105]

number

[0106] Use the operators

[0107]

number

[0108] denotes the largest integer less than or equal to x. In the case of (13), sbfr = 0,...4 is different from (12), but the number of analysis segments is the same as in (12), that is, N / K = 32. Therefore, the glottal shape codebook is att,final is detected in segments 1 to 6, it is used in the first subframe and the final attack position I att,final If is detected within segments 7 to 12, it is used in the second subframe to determine the location of the final attack, I att,final If is detected within segments 13 to 19, it is used in the third subframe to determine the location of the final attack, I att,final is detected within segments 20 to 25, then it is used in the fourth subframe, and finally, the location of the final attack I att,final If is detected in segments 26-31, it is used in the last (fifth) subframe of the current frame.

[0109] Figure 5 is a graph of a first non-limiting illustrative example showing the effect of the attack detector and TC coding mode of Figure 4 on the quality of the decoded music signal. In particular, in Figure 5, a castanet music segment is shown, where curve a) represents the input (uncoded) music signal, curve b) represents the decoded reference signal synthesis when only the first stage attack detection is used, and curve c) represents the decoded improved synthesis when the entire first and second stage attack detection and coding using the TC coding mode are used. Comparing curves b) and c), it can be seen that the attack of the synthesis of curve c) (low amplitude to high amplitude onset such as 500 in Figure 5) is significantly more accurate both in terms of maintaining the energy and sharpness of the castanet signal at the beginning of the onset.

[0110] 6 is a graph of a second non-limiting illustrative example showing the effect of the attack detector and TC coding mode of FIG. 4 on the quality of a decoded speech signal, where curve a) represents the input (uncoded) speech signal, curve b) represents the synthesis of the decoded reference speech signal when the onset frame is coded using the GC coding mode, and curve c) represents the synthesis of the decoded improved speech signal when the entire first and second stage attack detection and coding using the TC coding mode are used in the onset frame. Comparing curves b) and c), it can be seen that the coding of the attack (onset from low amplitude to high amplitude such as 600 in FIG. 6) is improved when the attack detection operation 400 and the attack detector 450 and the TC coding mode are used in the onset frame. Furthermore, it can be seen that the frame after the onset is coded using the GC coding mode in both curves b) and c), and the quality of the coding of the frame after the onset is also improved in curve c). This is because the adaptive codebook of the GC coding mode in the frames after the onset exploits the excitation that is well constructed when the onset frame is coded using the TC coding mode.

[0111] FIG. 7 is a simplified block diagram of an exemplary configuration of hardware components forming a device for detecting attacks in an audio signal to be coded and coding the detected attacks and implementing a method for detecting attacks in an audio signal to be coded and coding the detected attacks.

[0112] The device for detecting attacks in an audio signal to be coded and coding the detected attacks may be implemented as part of a mobile terminal, as part of a portable media player, or in any similar device. The device for detecting attacks in an audio signal to be coded (identified as 700 in FIG. 7) includes an input 702, an output 704, a processor 706, and a memory 708.

[0113] The input 702 is configured, for example, to receive the digital input audio signal 105 (FIG. 1). The output 704 is configured to provide the encoded bitstream 111. The input 702 and the output 704 may be implemented in a common module, for example a serial input / output device.

[0114] The processor 706 is operatively connected to the input 702, the output 704, and the memory 708. The processor 706 is implemented as one or more processors for executing code instructions in support of the functions of the various modules of the speech encoder 106, including the modules of Figures 2, 3, and 4.

[0115] The memory 708 may include non-transitory memory for storing code instructions executable by the processor 706, in particular processor-readable memory containing non-transitory instructions that, when executed, cause the processor to perform the operations and modules of the speech encoder 106, including those of Figures 2, 3, and 4. The memory 708 may also include random access memory or buffers for storing intermediate processed data from the various functions performed by the processor 706.

[0116] Those skilled in the art will recognize that the description of the methods and devices for detecting attacks in a coded audio signal and coding the detected attacks is merely illustrative and is in no way intended to be limiting. Other embodiments will readily suggest themselves to such skilled artisans having the benefit of this disclosure. Moreover, the disclosed methods and devices for detecting attacks in a coded audio signal and coding the detected attacks may be customized to provide useful solutions to existing needs and problems related to bit budget allocation or distribution.

[0117] For purposes of clarity, not all of the routine features of the implementation of the methods and devices for detecting attacks in a coded audio signal and coding the detected attacks are shown and described. Of course, it will be understood that in the development of any such actual implementation of the methods and devices for detecting attacks in a coded audio signal and coding the detected attacks, numerous implementation-specific decisions may need to be made to achieve the developer's particular objectives, such as compliance with application, system, network, and business related constraints, and that these particular objectives will vary from implementation to implementation and developer to developer. Moreover, it will be understood that the development effort may be complex and time consuming, but will nevertheless be a routine undertaking of engineering for those skilled in the art of audio processing having the benefit of this disclosure.

[0118] In accordance with this disclosure, the modules, processing operations, and / or data structures described herein may be implemented using various types of operating systems, computing platforms, network devices, computer programs, and / or general-purpose machines. In addition, those skilled in the art will recognize that devices of a less general-purpose nature, such as hardwired devices, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), etc., may also be used. When a method including a series of operations and sub-operations is implemented by a processor, computer, or machine, and the operations and sub-operations may be stored as a series of non-transitory code instructions readable by a processor, computer, or machine, the operations and sub-operations may be stored in a tangible and / or non-transitory medium.

[0119] The modules of the methods and devices for detecting attacks in an audio signal to be coded and coding the detected attacks described herein may include software, firmware, hardware, or any combination of software, firmware, or hardware suitable for the purposes described herein.

[0120] In the methods and devices for detecting attacks in an audio signal to be coded and coding the detected attacks described herein, various operations and sub-operations may be performed in various orders, and some of the operations and sub-operations may be optional.

[0121] Although the above disclosure is provided as non-limiting exemplary embodiments, these embodiments may be modified as desired within the scope of the appended claims without departing from the spirit and essence of the disclosure.

[0122] References The following references are referenced herein and are incorporated herein by reference in their entireties: (1) V. Eksler, R. Salami, and M. Jelinek, "Efficient handling of mode switching and speech transitions in the EVS codec," in Proc. IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), Brisbane, Australia, 2015 (2) V. Eksler, M. Jelinek, and R. Salami, "Method and Device for the Encoding of Transition Frames in Speech and Audio," WIPO Patent Application No. WO / 2008 / 049221, 24 Oct. 2006 (3) V. Eksler and M. Jelinek, "Glottal-Shape Codebook to Improve Robustness of CELP Codecs," IEEE Trans. on Audio, Speech and Language Processing, vol. 18, no. 6, pp. 1208 - 1217, Aug. 2010 (4) 3GPP TS 26.445: "Codec for Enhanced Voice Services (EVS); Detailed Algorithmic Description"

[0123] As additional disclosure, below is pseudocode of a non-limiting example of the disclosed attack detector implemented in an Immersive Voice and Audio Services (IVAS) codec.

[0124] The pseudocode is based on the EVS. The new IVAS logic is highlighted with a shaded background.

[0125] void detector(...) { attack_flag = 0; / * initialization * / attack = attack_det( . . . ); / * attack detection * / . . . if (localVAD == 1 && *coder_type == GENERIC && attack > 0 && !(*sp_aud_decision2 == 1 && ton > 0.65f)) { / * change coder_type to TC if attack has been detected * / *sp_aud_decision1 = 0; *sp_aud_decision2 = 0; *coder_type = TRANSITION; *attack_flag = attack + 1; } return attack_flag; } static short attack_det( const float *inp, / * i : input signal * / const short last_clas, / * i : last signal clas * / const short localVAD, / * i : local VAD flag * / const short coder_type, / * i : coder type * / const long total_brate, / * i : total bit-rate * / const short element_mode, / * i : IVAS element mode * / const short clas, / * i : signal class * / float finc_prev[], / * i / o: previous finc * / float *lt_finc, / * i / o: long-term mean finc * / short *last_strong_attack / * i / o: last strong attack flag * / ) { short i, attack; float etmp, etmp2, finc[ATT_NSEG]; short att_3lsub_pos; short attack1; att_3lsub_pos = ATT_3LSUB_POS; if( total_brate >= ACELP_24k40 ) { att_3lsub_pos = ATT_3LSUB_POS_16k; / * applicable only in EVS * / } / * compute energy per section * / for( i=0; i<ATT_NSEG; i++ ) { finc[i] = sum2_f( inp + i*ATT_SEG_LEN, ATT_SEG_LEN ); } attack = maximum( finc, ATT_NSEG, &etmp ); attack1 = attack; if( localVAD == 1 && coder_type == GENERIC ) { / * compute mean energy in the first three sub-frames * / etmp = mean( finc, att_3lsub_pos ); / * compute mean energy after the attack * / etmp2 = mean( finc + attack, ATT_NSEG - attack ); / * and compare them * / if( etmp * 8 > etmp2 ) { / * stop, if the attack is not sufficiently strong * / attack = 0; } if( last_clas == VOICED_CLAS && etmp * 20 > etmp2 ) { / * stop, if the signal was voiced and the attack is not sufficiently strong* / attack = 0; } / * compare wrt. other sections (reduces miss-classification) * / if( attack > 0 ) { etmp2 = finc[attack]; for( i=2; i<att_3lsub_pos-2; i++ ) { if( finc[i] * 2.0f > etmp2 ) { / * stop, if the attack is not sufficiently strong * / attack = 0; break; } } } if( attack == 0 && element_mode > EVS_MONO && (clas < VOICED_TRANSITION || clas == ONSET) ) { mvr2r( finc, finc_prev, attack1 ); / * compute mean energy before the attack * / etmp = mean( finc_prev, ATT_NSEG ); etmp2 = finc[attack1]; if((etmp * 16 < etmp2) || (etmp * 12 < etmp2 && last_clas == UNVOICED_CLAS)) { attack = attack1;} if( 20 * *lt_finc > etmp2 || *last_strong_attack ) { attack = 0; } } *last_strong_attack = attack; } / * compare wrt. other sections (reduces miss-classification) * / else if( attack > 0 ) { etmp2 = finc[attack]; for( i=2; i<att_3lsub_pos-2; i++ ) { if( i != attack && finc[i] * 1.3f > etmp2 ) { / * stop, if the attack is not sufficiently strong * / attack = 0; break; } } *last_strong_attack = 0; } / * updates * / mvr2r( finc, finc_prev, ATT_NSEG ); *lt_finc = 0.95f * *lt_finc + 0.05f * mean( finc, ATT_NSEG ); return attack; } / * function to determine the sub-frame with glottal-shape codebook in TC mode frame * / void tc_classif_enc( const short L_frame, / * i : length of the frame * / short *tc_subfr, / * o : TC sub-frame index * / short *position, / * o : maximum of residual signal index * / const short attack_flag, / * i : attack flag * / const short T_op[], / * i : open loop pitch estimates * / const float *res / * i : LP residual signal * / ) { float temp; *tc_subfr = -1; if( attack_flag ) { *tc_subfr = 3*L_SUBFR; if( attack_flag > 0 ) { if( L_frame == L_FRAME ) { *tc_subfr = NB_SUBFR * (attack_flag-1) / 32 / *ATT_NSEG* / ; } else { *tc_subfr = NB_SUBFR16k * (attack_flag-1) / 32 / *ATT_NSEG* / ; } *tc_subfr *= L_SUBFR; } } if( attack_flag ) { *position = emaximum( res + *tc_subfr,min(T_op[0]+2,L_SUBFR), &temp ) + *tc_subfr; } else . . . [Explanation of symbols]

[0126] 100 Voice Processing and Communication Systems 101 Communication Channels 102 Microphone 103 Analog Audio Signal 104 Analog-to-Digital (A / D) Converter 105 Digital Audio Signal 106 Audio Encoder 107 Bitstream, coding parameters 108 Error Correction Channel Encoder 109 Error Correction Channel Decoder 110 Audio Decoder 111 Bitstream 112 Error corrected bitstream 113 Synthesized digital audio signal 114 Synthesized Analog Audio Signal 115 Digital-to-Analog (D / A) Converter 116 Loudspeaker unit 214 Excitation 216 LP synthesis filter 218 Adaptive Codebook 220 Fixed Codebook 222 Adaptive Codebook Contributions 224 Fixed Codebook Contribution 226 Adaptive codebook gain g p 228 Fixed codebook gain g c 230 Synthesized digital audio signal 232 Mean Square Error 233 Perceptual Weighting Filter W(z) 234 Calculator 236 Subtractor 238 Weighted synthesis filter H(z) 240 Adaptive codebook gain g p 242 Adaptive Codebook 244 fixed codebook 246 Weighted synthesis filter H(z) 248 Fixed codebook gain g c 250 Adaptive Codebook Excitation Contribution 252 Fixed Codebook Excitation Contribution 254 Subtractor 256 Subtractor 300 EVS coding mode classification method 301 Active frame detection operation 302 Silent Frame Detection Operation 303 Post-onset frame detection operation 304 Stable Voiced Frame Detection Operation 311 Active Flame Detector 312 Silent Frame Detector 313 Post-onset frame detector 314 Stable Voiced Frame Detector 320 EVS coding mode classifier 321 IC coding mode 322 UC coding mode 323 TC coding mode 324 VC coding mode 325 GC coding mode 400 Attack Detection Method 401 Energy Calculation Operation 402 Maximum Energy Segment Discovery Operation 403 Judgment action 404 First stage attack detection operation 405 Average Energy Calculation Operation 406 Compare Action 407 Segment Energy Comparison Operation 410 Second stage attack detection operation 411 Voiced Class Comparison Operations 412 Average Energy Calculation Operation 413 Logical Judgment Operation 414 Energy Comparison Operation 430 First stage attack decision action 440 Attack Judgment Action 445 Glottal Shape Codebook Allocation Operation 450 Attack Detector 451 Energy Calculator 452 Maximum Energy Segment Detector 453 Judgment Module 454 First-stage attack detector 455 Calculator 456 Comparator 457 Segment Energy Comparator 460 Second stage attack detector 461 Voice Classification Module 462 Average Energy Calculator 463 Logical Judgment Module 464 Energy Comparator 470 First stage attack decision module 480 Attack Judgment Module 485 Glottal Shape Codebook Allocation Module 700 devices 702 Input 704 Output 706 Processor 708 Memory

Claims

1. A device for coding attacks in an audio signal, comprising:

1. A device for detecting the attacks in the audio signal, the audio signal being processed in successive frames each comprising a number of subframes, the device comprising: a first stage attack detector for detecting the attack in a last subframe of a current frame; a second stage attack detector used when no attack is detected by the first stage attack detector for detecting the attack in one of the subframes of the current frame including the subframe before the last subframe; an encoder for the subframe containing the detected attack using a coding mode with a non-predictive codebook, the coding mode being a transitional coding mode and the non-predictive codebook being a glottal shape codebook populated with a glottal impulse shape; A device for coding attacks, including

2. 2. The attack coding device of claim 1, further comprising: a determination module for determining that the current frame is an active frame already classified as being coded using a generic coding mode, and for indicating that no attack is detected when the current frame is not determined as an active frame already classified as being coded using a generic coding mode.

3. a calculator of the energy of the speech signal within a number of analysis segments of the current frame; 3. The attack coding device of claim 1 or 2, further comprising: a detector for one of the analysis segments having a maximum energy that represents the location of a candidate attack verified by the first stage attack detector and the second stage attack detector.

4. The first stage attack detector comprises: a calculator of a first average energy over the analysis segment before the last subframe in the current frame; 4. An attack coding device according to claim 3, further comprising: a second average energy calculator for all the analysis segments of the current frame starting from the analysis segment with the maximum energy up to the last analysis segment of the current frame.

5. The first stage attack detector comprises: - the first threshold, or - The second threshold when the previous frame is classified as VOICED.

5. The attack coding device of claim 4, further comprising a first comparator of a ratio between the first average energy and the second average energy.

6. said first stage attack detector detecting when a comparison by said first comparator indicates that a first stage attack is detected; 6. An attack coding device according to claim 5, comprising a second comparator of the ratio between the energy of the analysis segment with the maximum energy and the energies of the other analysis segments of the current frame with a third threshold.

7. when the comparison by the first comparator and the second comparator indicates that the first stage attack location is the analysis segment having the maximum energy representing the candidate attack location; 7. The attack coding device of claim 6, further comprising: a determination module for determining whether a position of the first stage attack is greater than or equal to a number of analysis segments before the last subframe of the current frame, and for determining a position of the detected attack as a position of the first stage attack in the last subframe of the current frame if the position of the first stage attack is greater than or equal to the number of analysis segments before the last subframe.

8. 8. An attack coding device as claimed in any one of claims 3 to 7, further comprising a decision module for determining whether the current frame is classified as VOICED, and wherein the second stage attack detector is used when the current frame is not classified as VOICED.

9. An attack coding device as described in claim 1 or 2, comprising a judgment module for determining whether the current frame is classified as VOICED, and the second stage attack detector is used when the current frame is not classified as VOICED.

10. 9. An attack coding device according to claim 3, wherein the second stage attack detector comprises a calculator of an average energy of the audio signal over the analysis segment preceding the analysis segment having the maximum energy, which represents the location of a candidate attack.

11. 11. The attack coding device of claim 10, wherein the analysis segment prior to the analysis segment having maximum energy representing a location of a candidate attack comprises an analysis segment from a previous frame.

12. The second stage attack detector comprises: - the first threshold, or a second threshold when the classification of the previous frame is UNVOICED; 12. An attack coding device according to claim 11, comprising a first comparator of the ratio between the energy of the analysis segment representing the position of a candidate attack and the calculated average energy.

13. when a comparison by the first comparator of the second stage attack detector indicates that a second stage attack is detected, 13. An attack coding device according to claim 12, comprising a second comparator of the ratio between the energy of the analysis segment representative of a location of a candidate attack and a long-term energy of the analysis segment with a third threshold.

14. 14. The attack coding device of claim 13, wherein the second comparator of the second stage attack detector does not detect an attack when an attack was detected in the previous frame.

15. when the comparison by the first comparator and the second comparator of the second stage attack detector indicates that the location of the second stage attack is the analysis segment having the maximum energy that represents the location of a candidate attack; 14. The attack coding device of claim 13, further comprising a determining module for determining a location of a detected attack as a location of an attack of the second stage.

16. A method for coding attacks in an audio signal, comprising the steps of: Detecting the attack in the audio signal, wherein the audio signal is processed in successive frames, each frame including a number of subframes, and the detecting step comprises: a first stage attack detection for detecting the attack in a last subframe of a current frame; a second stage attack detection used when no attack is detected by the first stage attack detection for detecting the attack in one of the subframes of the current frame including the subframe before the last subframe; encoding the subframe containing the detected attack using a coding mode with a non-predictive codebook, the coding mode being a transitional coding mode and the non-predictive codebook being a glottal shape codebook populated with a glottal impulse shape; A method for coding an attack, comprising:

17. 17. The attack coding method of claim 16, further comprising the steps of: determining that the current frame is an active frame already classified as being coded using a generic coding mode; and indicating that no attack is detected when the current frame is not determined as an active frame already classified as being coded using a generic coding mode.

18. calculating the energy of the speech signal within a number of analysis segments of the current frame; and finding one of the analysis segments having a maximum energy that represents a location of a candidate attack verified by the first stage attack detection and the second stage attack detection.

19. The first stage of attack detection is calculating a first average energy over the analysis segment prior to the last subframe in the current frame; and calculating a second average energy over the analysis segments of the current frame starting from the analysis segment with the maximum energy up to the last analysis segment of the current frame.

20. The first stage of attack detection is Using a first comparator, determining a ratio between the first average energy and the second average energy. - the first threshold, or - The second threshold when the previous frame is classified as VOICED.

20. The attack coding method of claim 19, further comprising comparing:

21. The first stage attack detection includes detecting a first stage attack when a comparison by the first comparator indicates that a first stage attack is detected; 21. The attack coding method according to claim 20, comprising comparing, using a second comparator, the ratio between the energy of the analysis segment with the maximum energy and the energies of the other analysis segments of the current frame with a third threshold.

22. when the comparison by the first comparator and the second comparator indicates that the first stage attack location is the analysis segment having the maximum energy representing the candidate attack location; 22. The attack coding method of claim 21, further comprising: determining whether a position of the first stage attack is equal to or greater than a number of analysis segments before the last subframe of the current frame; and if the position of the first stage attack is equal to or greater than the number of analysis segments before the last subframe, determining a position of the detected attack as the position of the first stage attack in the last subframe of the current frame.

23. 23. The attack coding method of claim 18, further comprising a step of determining whether the current frame is classified as VOICED, and wherein the second stage of attack detection is used when the current frame is not classified as VOICED.

24. An attack coding method as described in claim 16 or 17, comprising a step of determining whether the current frame is classified as VOICED, and the second stage attack detection is used when the current frame is not classified as VOICED.

25. 24. The method of attack coding according to claim 18, wherein the second stage attack detection comprises calculating an average energy of the audio signal over the analysis segment preceding the analysis segment having the maximum energy, which represents the location of a candidate attack.

26. 26. The method of attack coding of claim 25, wherein the analysis segment prior to the analysis segment having maximum energy representing a location of a candidate attack comprises an analysis segment from a previous frame.

27. The second stage of attack detection is A first comparator is used to calculate a ratio between the energy of the analysis segment, which represents the position of the candidate attack, and the calculated average energy. - the first threshold, or a second threshold when the classification of the previous frame is UNVOICED; 27. The attack coding method of claim 26, further comprising comparing:

28. when a comparison of the second stage attack detection by the first comparator indicates that a second stage attack is detected, 28. The method of attack coding of claim 27, comprising comparing, using a second comparator, a ratio between the energy of the analysis segment representative of a location of a candidate attack and a long-term energy of the analysis segment to a third threshold.

29. 29. The attack coding method of claim 28, wherein the comparison by the second comparator in the second stage attack detection does not detect an attack when an attack is detected in the previous frame.

30. when the comparison by the first comparator and the second comparator of the second stage attack detection indicates that the location of the second stage attack is the analysis segment having the maximum energy representing the location of a candidate attack; 29. The attack coding method according to claim 28, further comprising the step of determining the position of the detected attack as the position of the attack of the second stage.

Citation Information

Patent Citations

  • Voice coding device

    JP1998097294A

  • Method and Apparatus for Robust Audio Classification

    JP2004515809A

  • Method and device for encoding transition frames in audio signals

    JP2010507818A

  • Method and apparatus for encoding and decoding audio / speech signal

    US8630863B2