Intercom voice enhancement and noise suppression method and device

By using time-domain framing and windowing processing of walkie-talkies, combined with short-time energy and zero-crossing rate statistics, voice activity is determined and dynamic gain compensation is performed. This solves the problem of inaccurate voice recognition in dynamic noise environments and achieves clearer voice enhancement.

CN122135730APending Publication Date: 2026-06-02SHENZHEN RUBAN MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN RUBAN MICROELECTRONICS CO LTD
Filing Date
2026-02-11
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing walkie-talkies have difficulty accurately distinguishing between voice segments and non-voice segments in dynamically changing, high-noise environments, leading to misjudgments or omissions in voice activity detection and affecting the quality of voice communication.

Method used

Temporal framing and windowing are employed, combined with short-time energy calculation and zero-crossing rate statistics, to determine speech activity. Dynamic gain compensation is performed on speech segments and non-speech segments, and background noise features are extracted and dynamic gain is adjusted respectively.

Benefits of technology

It improves the accuracy of speech activity range recognition in varying noise environments, achieves more effective background noise tracking and speech enhancement, and improves the clarity and intelligibility of the output speech.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135730A_ABST
    Figure CN122135730A_ABST
Patent Text Reader

Abstract

This invention relates to a method and apparatus for voice enhancement and noise suppression in walkie-talkies, comprising the following steps: performing time-domain framing and windowing processing on the input voice signal of the walkie-talkie to obtain a voice frame signal; performing short-time energy calculation and zero-crossing rate statistics on the voice frame signal to obtain voice feature parameters; performing voice activity determination on the voice frame signal based on the voice feature parameters to obtain voice activity intervals including voice segments and non-voice segments; extracting background noise features from the non-voice segments in the voice activity intervals and performing dynamic gain compensation on the voice segments to obtain an enhanced voice signal. This invention solves the technical problem of how to improve the accurate identification capability of voice activity intervals in variable noise environments, and thereby achieve more effective background noise tracking and voice enhancement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of intercom technology, in particular to a voice enhancement and noise suppression method and device for intercom. BACKGROUND

[0002] In professional fields such as public safety, transportation and construction, intercoms are key instant communication tools, and the quality of voice communication is crucial. To cope with complex and variable environmental noise, existing intercoms generally use voice activity detection (VAD) technology based on energy threshold or simple spectral analysis, combined with fixed digital signal processing algorithms for noise suppression. This method usually first frames and window processes the input voice signal, then calculates the short-time energy and zero-crossing rate of each frame as basic feature parameters to determine whether the current frame is voice or noise, and uses the background noise spectrum estimated in the silent period to perform noise reduction on the subsequent voice period by spectral subtraction or fixed gain function.

[0003] However, the prior art relies on static or slowly adaptive noise models, which are difficult to accurately distinguish between voice and non-voice segments in a dynamic and strong noise environment, such as sudden police sirens or construction site machinery roaring, leading to misjudgment or missed judgment of voice activity decision. This makes the background noise feature extraction inaccurate, and further causes the subsequent noise suppression to be excessive or insufficient: on the one hand, it may apply inappropriate attenuation to the real voice segment, causing voice distortion and intelligibility degradation; on the other hand, the residual noise in the non-voice segment is not completely suppressed, affecting the auditory experience of the receiver. Therefore, how to improve the accuracy of voice activity interval recognition in a variable noise environment and achieve more effective background noise tracking and voice enhancement has become a technical problem to be solved. SUMMARY

[0004] The technical problem solved by the present application is to provide a voice enhancement and noise suppression method and device for intercom, which solves the technical problem of how to improve the accuracy of voice activity interval recognition in a variable noise environment and achieve more effective background noise tracking and voice enhancement.

[0005] To solve the above technical problems, the voice enhancement and noise suppression method for intercom adopted by the present application comprises the following steps: Frame and window process the input voice signal of the intercom in time domain to obtain voice frame signals, and calculate the short-time energy and zero-crossing rate of the voice frame signals to obtain voice feature parameters; Based on the voice feature parameters, perform voice activity decision on the voice frame signals to obtain voice activity intervals including voice segments and non-voice segments; Background noise features are extracted from the non-speech segments within the speech activity interval, and dynamic gain compensation is applied to the speech segments to obtain the enhanced speech signal.

[0006] Furthermore, the input voice signal from the walkie-talkie is subjected to time-domain framing and windowing processing to obtain a voice frame signal, including: The input voice signal collected by the walkie-talkie is sampled at fixed intervals to obtain a sequence of voice sampling points; The speech sampling point sequence is truncated to the same length based on a preset frame length to obtain speech frame segments, and adjacent speech frame segments are overlapped based on a preset frame shift to obtain an overlapping speech frame sequence. The overlapping speech frame sequence is weighted point-by-point by the window function coefficients to obtain windowed speech frame data, and then the windowed speech frame data is normalized to obtain the speech frame signal.

[0007] Furthermore, the step of performing short-time energy calculation and zero-crossing rate statistics on the speech frame signal to obtain speech feature parameters includes: The speech frame signal is squared to obtain a sequence of squared values ​​for each frame signal, and the sequence of squared values ​​is summed frame by frame to obtain the short-time energy value for each frame. The speech frame signal is normalized based on the short-time energy value to obtain the normalized speech frame signal. The normalized speech frame signal is then subjected to sign determination, and the number of opposite adjacent signs is counted to obtain the number of zero crossings for each frame. The short-time energy value and the number of zero crossings are combined to obtain speech feature parameters.

[0008] Furthermore, the step of determining speech activity based on the speech feature parameters to obtain speech activity intervals including speech segments and non-speech segments includes: A threshold comparison is performed on the short-time energy values ​​in the speech feature parameters. Speech frame signals with short-time energy values ​​greater than a preset energy threshold are marked as high-energy frames. The number of consecutive high-energy frames is then counted to obtain the number of consecutive high-energy frames. A series of consecutive high-energy frames are marked as preliminary speech segments, and boundary frame localization is performed on the preliminary speech segments to obtain boundary frame position information including the start frame position and the end frame position. Based on the boundary frame position information, the initial speech segment is extended by extending the starting frame position forward by a preset number of extension frames and extending the ending frame position backward by a preset number of extension frames to obtain a speech segment. Speech framing signals that are not marked as initial speech segments are marked as non-speech segments, and speech segments and non-speech segments are used as speech activity intervals.

[0009] Furthermore, the step of performing boundary frame localization on the preliminary speech segment to obtain boundary frame position information including the start frame position and the end frame position includes: The frame number of each speech frame in the preliminary speech segment is traversed, the speech frame with the smallest frame number in the preliminary speech segment is identified as the start frame position, the speech frame with the largest frame number is identified as the end frame position, and the start frame position and the end frame position are used as boundary frame position information.

[0010] Furthermore, the step of expanding the initial speech segment based on the boundary frame position information, by expanding the starting frame position forward by a preset number of expansion frames and the ending frame position backward by a preset number of expansion frames to obtain the speech segment, includes: Perform a forward offset operation on the starting frame position in the boundary frame position information, and subtract a preset number of extended frames from the starting frame position to obtain the forward extended frame position; Perform a backward offset operation on the end frame position in the boundary frame position information, and add a preset number of extended frames to the end frame position to obtain the backward extended frame position; The forward expansion frame position and the backward expansion frame position are checked for boundary range. The forward expansion frame position that is less than the first frame number is corrected to the first frame number, and the backward expansion frame position that is greater than the last frame number is corrected to the last frame number, so as to obtain the checked expansion boundary. Based on the verified extended boundary, the speech frame signal is truncated into frame intervals to obtain speech segments.

[0011] Furthermore, the step of extracting background noise features from non-speech segments within the speech activity interval and performing dynamic gain compensation on speech segments to obtain the enhanced speech signal includes: The non-speech segments in the speech activity interval are decomposed frame by frame to obtain the noise frame spectrum amplitude, and the noise frame spectrum amplitude is accumulated by multi-frame mean to obtain the background noise spectrum. Based on the background noise spectrum, the speech segments in the speech activity interval are spectrally decomposed to obtain the speech frame spectrum amplitude. The frequency point-by-frequency amplitude ratio of the speech frame spectrum amplitude and the background noise spectrum is calculated to obtain the frame-level signal-to-noise ratio. Based on the frame-level signal-to-noise ratio, the amplitude of the speech frame spectrum is mapped by a gain factor and weighted by amplitude to obtain a gain-compensated spectrum. The gain-compensated spectrum is then inversely synthesized to obtain an enhanced speech signal.

[0012] The present invention also provides a voice enhancement and noise suppression device for a walkie-talkie, comprising: The framing module is used to perform time-domain framing and windowing processing on the input voice signal of the walkie-talkie to obtain the voice frame signal, and to perform short-time energy calculation and zero-crossing rate statistics on the voice frame signal to obtain voice feature parameters. The decision module is used to make a speech activity decision on the speech frame signal based on the speech feature parameters, and to obtain a speech activity interval including speech segments and non-speech segments; The compensation module is used to extract background noise features from the non-speech segments in the speech activity interval and to perform dynamic gain compensation on the speech segments to obtain the enhanced speech signal.

[0013] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above methods.

[0014] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above methods.

[0015] The above scheme performs time-domain framing and windowing processing on the input voice signal of the walkie-talkie to obtain a voice frame signal. Short-time energy calculation and zero-crossing rate statistics are then performed on the voice frame signal to obtain voice feature parameters. Based on these voice feature parameters, voice activity is determined from the voice frame signal to obtain voice activity intervals including voice segments and non-voice segments. Background noise features are extracted from the non-voice segments within the voice activity intervals, and dynamic gain compensation is applied to the voice segments to obtain an enhanced voice signal. This solves the technical problem of how to improve the accurate identification of voice activity intervals in variable noise environments and thereby achieve more effective background noise tracking and voice enhancement. It implements a dynamic gain compensation strategy for voice segments, adaptively adjusting the gain parameters according to the energy characteristics of the current voice frame, avoiding voice distortion or insufficient amplification problems caused by traditional fixed-gain processing, and effectively improving the clarity and intelligibility of the output voice. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of the steps of a voice enhancement and noise suppression method for a walkie-talkie in one embodiment of the present invention; Figure 2This is a structural block diagram of a voice enhancement and noise suppression device for a walkie-talkie according to an embodiment of the present invention; Figure 3 This is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.

[0018] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0020] Specifically, the voice enhancement and noise suppression method for walkie-talkies in this embodiment includes the following steps: like Figure 1 As shown, Figure 1 This invention provides a method for voice enhancement and noise suppression in a walkie-talkie, comprising the following steps: Step S1: Perform time-domain framing and windowing processing on the input voice signal of the walkie-talkie to obtain a voice frame signal, and perform short-time energy calculation and zero-crossing rate statistics on the voice frame signal to obtain voice feature parameters.

[0021] Specifically, the input speech signal is time-domain segmented, typically by cutting the continuous signal into short-segment samples at intervals of 10ms to 30ms. Each frame is then overlaid with a Hamming or Heining window to reduce spectral leakage at frame edges. Next, the short-time energy of the obtained speech frame signal is calculated frame by frame, which is the cumulative average of the squares of the amplitudes of the sampling points within the frame. At the same time, the zero-crossing rate is calculated, which is the number of times the signal crosses the zero level within the frame. These two parameters together constitute the speech feature parameters. For example, in the background of a construction site, the energy is low and the zero-crossing rate is stable when there is only wind noise in the non-speech segment, while both increase significantly when human voices are present. This change is used for subsequent speech activity determination.

[0022] Step S2: Based on the speech feature parameters, perform speech activity determination on the speech frame signal to obtain speech activity intervals including speech segments and non-speech segments.

[0023] Specifically, the system uses the aforementioned speech feature parameters—namely, the short-time energy and zero-crossing rate of each frame—to determine whether the current speech frame belongs to the vocal segment. In practice, a dynamic energy threshold is set, and the frame-by-frame comparison is performed based on the fluctuation range of the zero-crossing rate. If the short-time energy of a frame exceeds the threshold while the zero-crossing rate falls within the common range for human voices, the frame is classified as a speech segment; otherwise, it is classified as a non-speech segment. This process continues, merging consecutive speech frames to form continuous speech activity intervals. For example, in a police intercom scenario, when there is brief background traffic noise, although the energy may be higher, the zero-crossing rate is usually relatively stable, allowing the system to avoid misjudgment. Once someone begins to speak, both parameters change abruptly, effectively capturing and marking the speaker.

[0024] Step S3: Extract background noise features from the non-speech segments in the speech activity interval and perform dynamic gain compensation on the speech segments to obtain the enhanced speech signal.

[0025] Specifically, for non-speech segments within the speech activity range, spectral data of their speech frame signals are collected and used as background noise samples. The noise amplitude characteristics are derived through statistical averaging. This process is updated every time a non-speech segment is detected, ensuring that the noise characteristics keep up with environmental changes. For identified speech segments, the gain coefficient is dynamically adjusted based on the signal-to-noise ratio (SNR) difference between the current frame and adjacent non-speech segments. The lower the SNR, the greater the gain increase, but it is not amplified indefinitely to avoid introducing clipping distortion. For example, when using a walkie-talkie on a construction site, if the previous moment was a non-speech segment with mechanical idling, the system records the noise spectrum at that time. When workers begin to speak and enter the speech segment, the processing module compares the speech energy with the previously recorded noise level, automatically amplifying weak syllables to make the output sound clearer and more indistinguishable. Finally, the processed signals are spliced ​​together to form a complete enhanced speech signal.

[0026] In a specific embodiment, the input voice signal of the walkie-talkie is subjected to time-domain framing and windowing processing to obtain a voice frame signal, including: The input voice signal collected by the walkie-talkie is sampled at fixed intervals to obtain a sequence of voice sampling points; The speech sampling point sequence is truncated to the same length based on a preset frame length to obtain speech frame segments, and adjacent speech frame segments are overlapped based on a preset frame shift to obtain an overlapping speech frame sequence. The overlapping speech frame sequence is weighted point-by-point by the window function coefficients to obtain windowed speech frame data, and then the windowed speech frame data is normalized to obtain the speech frame signal.

[0027] Specifically, the raw input speech signal picked up by the walkie-talkie microphone is a continuous analog signal. First, it is periodically sampled by an analog-to-digital converter at a fixed sampling rate, such as 8kHz, thus obtaining a discrete sequence of speech sampling points. Next, to achieve temporal framing, the system truncates this sequence into independent speech frames of equal length, according to a preset frame length, such as 25ms. Considering the correlation between adjacent speech information and to avoid spectral distortion caused by direct framing, a preset frame shift, such as 10ms, is introduced, causing partial temporal overlap between consecutive speech frames. This sliding processing from beginning to end yields an overlapping speech frame sequence with continuous coverage. After segmentation, a windowing stage is performed. For each frame in the overlapping speech frame sequence, a specific window function, such as a Hamming window, is applied. The coefficients of this window are pre-stored in system memory. By multiplying each sampling point within the frame with the corresponding window function value, the abrupt change at the frame boundaries is reduced. The amplitude of the windowed speech frame data will be attenuated due to the energy of the window function, so further normalization processing is required. This is usually done by dividing the result by the energy factor of the window function to maintain a uniform energy baseline for each frame. The final output of the entire process is the speech frame signal that can be used for subsequent analysis. Taking a traffic control scenario as an example, when police officers use walkie-talkies at intersections, traffic noise and voices alternate. It is through this frame-segmentation and windowing method that the complex and mixed sound is broken down into actionable short-term units, laying the foundation for feature extraction.

[0028] In a specific embodiment, the step of performing short-time energy calculation and zero-crossing rate statistics on the speech frame signal to obtain speech feature parameters includes: The speech frame signal is squared to obtain a sequence of squared values ​​for each frame signal, and the sequence of squared values ​​is summed frame by frame to obtain the short-time energy value for each frame. The speech frame signal is normalized based on the short-time energy value to obtain the normalized speech frame signal. The normalized speech frame signal is then subjected to sign determination, and the number of opposite adjacent signs is counted to obtain the number of zero crossings for each frame. The short-time energy value and the number of zero crossings are combined to obtain speech feature parameters.

[0029] Specifically, after acquiring the speech frame signal, it is necessary to further extract key parameters that can be used to determine the state of speech activity. Specifically, the calculation of short-time energy starts from the data of each frame. First, a square operation is performed on each sampling point in the speech frame signal to form a sequence of squared values ​​corresponding to that frame. Then, all values ​​in this sequence are summed, and the result is the short-time energy value of that frame. This step effectively reflects the energy strength of the current frame. For example, when a police walkie-talkie is in operation, the frame energy at the moment of speaking is significantly higher than that of a silent segment with only wind noise or background noise. Next, to more accurately count zero-crossing cases, the system performs amplitude normalization processing on the original speech frame signal based on the obtained short-time energy values. This means dividing each frame's sampling point by a factor related to the frame's energy, ensuring that amplitude differences between different frames do not affect symbol determination. The normalized speech frame signals are used for subsequent zero-crossing rate analysis. This process involves checking the signs of adjacent sampling points one by one. If the previous point is greater than or equal to zero and the next point is less than zero, or vice versa, it is counted as a zero-crossing. The total number of zero-crossings for the entire frame is accumulated. Broadband noise, such as mechanical operation, typically has frequent zero-crossings, while voiceless consonants like "s" and "f" also have similar characteristics, but these can be distinguished by combining energy values. Finally, the independently calculated short-time energy value and the corresponding number of zero-crossings for each frame are packaged together to form a dataset containing two-dimensional information. This is the final output speech feature parameter, which is used by the speech activity decision module in the next stage.

[0030] In a specific embodiment, the step of determining speech activity based on the speech feature parameters to obtain a speech activity interval including speech segments and non-speech segments includes: A threshold comparison is performed on the short-time energy values ​​in the speech feature parameters. Speech frame signals with short-time energy values ​​greater than a preset energy threshold are marked as high-energy frames. The number of consecutive high-energy frames is then counted to obtain the number of consecutive high-energy frames. A series of consecutive high-energy frames are marked as preliminary speech segments, and boundary frame localization is performed on the preliminary speech segments to obtain boundary frame position information including the start frame position and the end frame position. Based on the boundary frame position information, the initial speech segment is extended by extending the starting frame position forward by a preset number of extension frames and extending the ending frame position backward by a preset number of extension frames to obtain a speech segment. Speech framing signals that are not marked as initial speech segments are marked as non-speech segments, and speech segments and non-speech segments are used as speech activity intervals.

[0031] Specifically, using the extracted speech feature parameters, speech activity determination is performed on the segmented speech signal. The core of this method lies in combining energy criteria with temporal continuity analysis. In practice, the short-term energy value of each frame is first compared frame-by-frame with a preset energy threshold. This threshold is typically dynamically set based on the average energy of the initial few seconds of silence. If the energy of a frame exceeds this threshold, it is marked as a high-energy frame. The system then continuously tracks these high-energy frames, counting the number of consecutively occurring high-energy frames. When this number reaches or exceeds a set minimum consecutive frame count threshold (e.g., 3 frames corresponding to 30ms), it indicates a high probability of continuous speech. This consecutive high-energy frame segment is then classified as a preliminary speech segment. Next, its time range needs to be determined. By identifying the positions of the first and last frames of this segment, boundary frame localization is completed, obtaining the start and end frame positions. Considering that the energy rises or falls slowly at the start and end edges of actual speech, simply relying on energy thresholds can easily cut off the beginning and end of the speech. Therefore, extended processing is needed: a preset number of extended frames (e.g., 2 frames) are added before the start frame position, and the same number of extended frames are added after the end frame position to fill in any potentially missed parts. The resulting complete interval is the speech segment. Other speech frames not included in any speech segment are naturally classified as non-speech segments. Taking a construction site scenario as an example, workers often make inhalation sounds before speaking, which have low energy and are easily missed. Extending the energy before the start effectively includes this pre-emptive information, improving recognition completeness. The final output speech segment and non-speech segments together constitute the speech activity interval for subsequent modules to use.

[0032] In a specific embodiment, the step of performing boundary frame localization on the preliminary speech segment to obtain boundary frame position information including the start frame position and the end frame position includes: The frame number of each speech frame in the preliminary speech segment is traversed, the speech frame with the smallest frame number in the preliminary speech segment is identified as the start frame position, the speech frame with the largest frame number is identified as the end frame position, and the start frame position and the end frame position are used as boundary frame position information.

[0033] Specifically, after determining the initial speech segment, its time boundaries need to be further clarified to ensure accurate implementation of subsequent extended processing. This process involves boundary frame localization of the initial speech segment, aiming to obtain two key pieces of information: the start frame position and the end frame position. In practice, the system first traverses the frame numbers of each speech frame within the initial speech segment according to their order in the original sequence, starting from the smallest number and checking frame by frame. Once the first frame of the segment is found—the speech frame with the smallest frame number—it is recorded as the start frame position. This step ensures accurate localization of the start of the speech activity. Next, to find the end point, the system does not directly retrieve the last accessed frame. Instead, based on the obtained start frame position, it adopts a reverse traversal strategy, tracing back from the end of the initial speech segment to find the speech frame with the largest frame number and marking it as the end frame position. This forward-starting and reverse-ending approach avoids potential deviations caused by data reading order or caching mechanisms, improving localization stability. For example, in a traffic control scenario, a police officer's brief shout of "Stop!" might only last two or three audio frames. Without reverse verification, the program logic could easily mistake the last frame for the endpoint. Reverse traversal, however, can more reliably pinpoint the true endpoint. Finally, the determined start and end frame positions are output together to form complete boundary frame position information, which serves as the input for the next stage of extended processing.

[0034] In a specific embodiment, the step of expanding the initial speech segment based on the boundary frame position information, which involves expanding the starting frame position forward by a preset number of expansion frames and expanding the ending frame position backward by a preset number of expansion frames to obtain the speech segment, includes: Perform a forward offset operation on the starting frame position in the boundary frame position information, and subtract a preset number of extended frames from the starting frame position to obtain the forward extended frame position; Perform a backward offset operation on the end frame position in the boundary frame position information, and add a preset number of extended frames to the end frame position to obtain the backward extended frame position; The forward expansion frame position and the backward expansion frame position are checked for boundary range. The forward expansion frame position that is less than the first frame number is corrected to the first frame number, and the backward expansion frame position that is greater than the last frame number is corrected to the last frame number, so as to obtain the checked expansion boundary. Based on the verified extended boundary, the speech frame signal is truncated into frame intervals to obtain speech segments.

[0035] Specifically, after obtaining the boundary frame position information, it needs to be extended to improve the coverage of the speech segment. In practice, firstly, a forward offset operation is performed on the starting frame position, that is, the frame number at that position is subtracted by a preset number of extended frames, such as 2 frames, to obtain the forward extended frame position. This step is to cover the weak energy transition segment that may exist before the start of speech, such as the slight breath sound before speaking. Similarly, a backward offset operation is performed on the ending frame position, that is, the same preset number of extended frames is added to its frame number to obtain the backward extended frame position, which is used to capture the residual tail sound or attenuation process after the speech ends. Since direct addition and subtraction may lead to out-of-bounds errors, for example, if the starting frame position is early, the forward extended frame position may be less than the system's first frame number (usually 0), or if the last speech segment is near the end of the data, the backward extended frame position may exceed the maximum last frame number of the actual processing range. Therefore, boundary range verification is necessary. For the forward expansion frame position, if the calculated result is less than the first frame number, it is corrected to the first frame number; similarly, if the backward expansion frame position is greater than the last frame number, it is forcibly set to the last frame number, thus obtaining the verified expansion boundary. This restriction avoids array access out-of-bounds errors, which is especially important in embedded environments. Finally, based on the time interval determined by the verified expansion boundary, the corresponding set of continuous frames is extracted from the original speech framing signal, thus completing the generation of the speech segment. For example, at a construction site, when a worker shouts "Attention," the initial consonant is relatively soft, which may easily be missed if not extended forward, but this mechanism can effectively include complete semantic segments.

[0036] In a specific embodiment, the step of extracting background noise features from the non-speech segments within the speech activity interval and performing dynamic gain compensation on the speech segments to obtain the enhanced speech signal includes: The non-speech segments in the speech activity interval are decomposed frame by frame to obtain the noise frame spectrum amplitude, and the noise frame spectrum amplitude is accumulated by multi-frame mean to obtain the background noise spectrum. Based on the background noise spectrum, the speech segments in the speech activity interval are spectrally decomposed to obtain the speech frame spectrum amplitude. The frequency point-by-frequency amplitude ratio of the speech frame spectrum amplitude and the background noise spectrum is calculated to obtain the frame-level signal-to-noise ratio. Based on the frame-level signal-to-noise ratio, the amplitude of the speech frame spectrum is mapped by a gain factor and weighted by amplitude to obtain a gain-compensated spectrum. The gain-compensated spectrum is then inversely synthesized to obtain an enhanced speech signal.

[0037] Specifically, for non-speech segments within the speech activity interval, the system extracts background noise features. This is done by performing frame-by-frame spectral decomposition on each speech frame marked as a non-speech segment. A common method is to use a Fast Fourier Transform (FFT) to convert the signal from the time domain to the frequency domain, obtaining amplitude information at each frequency point, i.e., the noise frame spectral amplitude. These spectral data from different silent periods are continuously fed into an accumulation buffer and subjected to multi-frame averaging, for example, averaging the corresponding frequency points of the most recent five non-speech frames. This reduces the impact of instantaneous fluctuations, ultimately forming a relatively stable background noise spectrum that better reflects the main noise components of the current environment, such as the persistent low-frequency hum of a police walkie-talkie running inside a patrol car. Simultaneously, dynamic gain compensation is performed on the identified speech segments. Based on the established background noise spectrum, the same spectral decomposition is performed on each frame within the speech segment to extract the speech frame spectral amplitude. Then, this amplitude is compared with the background noise spectrum at the same frequency point to obtain the frame-level signal-to-noise ratio for each frequency band. This value reflects the prominence of the current speech relative to background noise at various frequencies. Next, the gain adjustment stage begins. A corresponding gain factor is generated based on a table lookup or function mapping according to the frame-level signal-to-noise ratio (SNR). Generally, a lower SNR results in a higher gain, but an upper limit is set to prevent excessive amplification and distortion. This gain factor is then used to weight the amplitude of the original speech frame's spectrum, and the output is the gain-compensated spectrum. Finally, all processed spectral data is inversely transformed back to the time domain, for example, using IFFT combined with an overlap-addition method to synthesize a continuous waveform, ultimately splicing them together to form a complete and clearer enhanced speech signal.

[0038] Please see Figure 2 , Figure 2 This is a schematic diagram of the framework of an embodiment of the voice enhancement and noise suppression device for a walkie-talkie according to this application. Figure 2 As shown, the voice enhancement and noise suppression device for the walkie-talkie includes a framing module 1, which performs time-domain framing and windowing processing on the input voice signal of the walkie-talkie to obtain a voice frame signal, and performs short-time energy calculation and zero-crossing rate statistics on the voice frame signal to obtain voice feature parameters; a decision module 2, which performs voice activity decision on the voice frame signal based on the voice feature parameters to obtain a voice activity interval including voice segments and non-voice segments; and a compensation module 3, which performs background noise feature extraction on the non-voice segments in the voice activity interval and dynamic gain compensation on the voice segments to obtain an enhanced voice signal.

[0039] Reference Figure 3 This invention also provides a computer device whose internal structure can be as follows: Figure 3As shown, the computer device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores the data corresponding to this embodiment. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.

[0040] Those skilled in the art will understand that Figure 3 The structures shown are merely block diagrams of some structures related to the present invention and do not constitute a limitation on the computer devices on which the present invention is applied.

[0041] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0042] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0043] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0044] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0045] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0046] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0047] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0048] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0049] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

Claims

1. A method for voice enhancement and noise suppression in a walkie-talkie, characterized in that, Includes the following steps: The input voice signal from the walkie-talkie is subjected to time-domain framing and windowing to obtain a voice frame signal. Short-time energy calculation and zero-crossing rate statistics are then performed on the voice frame signal to obtain voice feature parameters. Based on the speech feature parameters, speech activity determination is performed on the speech frame signal to obtain a speech activity interval including speech segments and non-speech segments; Background noise features are extracted from the non-speech segments within the speech activity interval, and dynamic gain compensation is applied to the speech segments to obtain the enhanced speech signal.

2. The method for voice enhancement and noise suppression of a walkie-talkie according to claim 1, characterized in that, The input voice signal from the walkie-talkie is subjected to time-domain framing and windowing processing to obtain a framed voice signal, including: The input voice signal collected by the walkie-talkie is sampled at fixed intervals to obtain a sequence of voice sampling points; The speech sampling point sequence is truncated to the same length based on a preset frame length to obtain speech frame segments, and adjacent speech frame segments are overlapped based on a preset frame shift to obtain an overlapping speech frame sequence. The overlapping speech frame sequence is weighted point-by-point by the window function coefficients to obtain windowed speech frame data, and then the windowed speech frame data is normalized to obtain the speech frame signal.

3. The method for voice enhancement and noise suppression of a walkie-talkie according to claim 1, characterized in that, The process of performing short-time energy calculation and zero-crossing rate statistics on the segmented speech signal to obtain speech feature parameters includes: The speech frame signal is squared to obtain a sequence of squared values ​​for each frame signal, and the sequence of squared values ​​is summed frame by frame to obtain the short-time energy value for each frame. The speech frame signal is normalized based on the short-time energy value to obtain the normalized speech frame signal. The normalized speech frame signal is then subjected to sign determination, and the number of opposite adjacent signs is counted to obtain the number of zero crossings for each frame. The short-time energy value and the number of zero crossings are combined to obtain speech feature parameters.

4. The method for voice enhancement and noise suppression of a walkie-talkie according to claim 1, characterized in that, The process of determining speech activity based on the speech feature parameters to obtain speech activity intervals including speech segments and non-speech segments includes: A threshold comparison is performed on the short-time energy values ​​in the speech feature parameters. Speech frame signals with short-time energy values ​​greater than a preset energy threshold are marked as high-energy frames. The number of consecutive high-energy frames is then counted to obtain the number of consecutive high-energy frames. A series of consecutive high-energy frames are marked as preliminary speech segments, and boundary frame localization is performed on the preliminary speech segments to obtain boundary frame position information including the start frame position and the end frame position. Based on the boundary frame position information, the initial speech segment is extended by extending the starting frame position forward by a preset number of extension frames and extending the ending frame position backward by a preset number of extension frames to obtain a speech segment. Speech framing signals that are not marked as initial speech segments are marked as non-speech segments, and speech segments and non-speech segments are used as speech activity intervals.

5. The method for voice enhancement and noise suppression of a walkie-talkie according to claim 4, characterized in that, The step of performing boundary frame localization on the preliminary speech segment to obtain boundary frame position information including the start frame position and the end frame position includes: The frame number of each speech frame in the preliminary speech segment is traversed, the speech frame with the smallest frame number in the preliminary speech segment is identified as the start frame position, the speech frame with the largest frame number is identified as the end frame position, and the start frame position and the end frame position are used as boundary frame position information.

6. The method for voice enhancement and noise suppression of a walkie-talkie according to claim 4, characterized in that, The step of expanding the initial speech segment based on the boundary frame position information involves expanding the starting frame position forward by a preset number of expansion frames and expanding the ending frame position backward by a preset number of expansion frames to obtain the speech segment, including: Perform a forward offset operation on the starting frame position in the boundary frame position information, and subtract a preset number of extended frames from the starting frame position to obtain the forward extended frame position; Perform a backward offset operation on the end frame position in the boundary frame position information, and add a preset number of extended frames to the end frame position to obtain the backward extended frame position; The forward expansion frame position and the backward expansion frame position are checked for boundary range. The forward expansion frame position that is less than the first frame number is corrected to the first frame number, and the backward expansion frame position that is greater than the last frame number is corrected to the last frame number, so as to obtain the checked expansion boundary. Based on the verified extended boundary, the speech frame signal is truncated into frame intervals to obtain speech segments.

7. The method for voice enhancement and noise suppression of a walkie-talkie according to claim 1, characterized in that, The process of extracting background noise features from non-speech segments within the speech activity interval and performing dynamic gain compensation on speech segments to obtain an enhanced speech signal includes: The non-speech segments in the speech activity interval are decomposed frame by frame to obtain the noise frame spectrum amplitude, and the noise frame spectrum amplitude is accumulated by multi-frame mean to obtain the background noise spectrum. Based on the background noise spectrum, the speech segments in the speech activity interval are spectrally decomposed to obtain the speech frame spectrum amplitude. The frequency point-by-frequency amplitude ratio of the speech frame spectrum amplitude and the background noise spectrum is calculated to obtain the frame-level signal-to-noise ratio. Based on the frame-level signal-to-noise ratio, the amplitude of the speech frame spectrum is mapped by a gain factor and weighted by amplitude to obtain a gain-compensated spectrum. The gain-compensated spectrum is then inversely synthesized to obtain an enhanced speech signal.

8. A voice enhancement and noise suppression device for a walkie-talkie, characterized in that, include: The framing module is used to perform time-domain framing and windowing processing on the input voice signal of the walkie-talkie to obtain a voice frame signal, and to perform short-time energy calculation and zero-crossing rate statistics on the voice frame signal to obtain voice feature parameters. The decision module is used to make a speech activity decision on the speech frame signal based on the speech feature parameters, and to obtain a speech activity interval including speech segments and non-speech segments; The compensation module is used to extract background noise features from the non-speech segments in the speech activity interval and to perform dynamic gain compensation on the speech segments to obtain the enhanced speech signal.

9. A computer device, characterized in that, The device includes a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the voice enhancement and noise suppression method for a walkie-talkie according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device stores program instructions that can be executed by a processor, the program instructions being used to implement the voice enhancement and noise suppression method for a walkie-talkie according to any one of claims 1 to 7.