Silence detection method of audio, related device, storage medium and program product
By detecting microphone access loss events during audio acquisition and combining audio duration and energy detection, silent segments can be accurately identified, solving the problem of misjudgment of audio silence rate in existing technologies and improving detection accuracy and user experience.
Patent Information
- Application Number
- CN202510115355.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies have many misjudgments when statistically analyzing silent segments in audio signals, resulting in low accuracy of audio silence rate.
By detecting microphone access loss events during audio acquisition, the acquisition period in which no loss event was detected is identified as the target period. Silent segments are detected based on the audio duration of the audio segment and the period duration of the acquisition period. By combining audio energy detection and duration detection, silent segments are accurately identified.
It improves the accuracy of detecting silent segments, reduces the false positive rate, enhances the statistical accuracy of audio silence rate, focuses on the quality optimization of the device or application itself, and improves the user experience.
Smart Images

Figure CN122455013A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing technology, and in particular to a method, related equipment, storage medium and program product for detecting silent audio. Background Technology
[0002] With the development of mobile internet technology, real-time audio and video communication (such as video calls and live streaming) has become one of the most common communication methods in people's lives. The audio quality during communication is related to the message transmission efficiency and communication experience of both parties. Evaluating the audio quality before the release of communication products can minimize the influx of inferior communication products into the market and help maintain a harmonious communication environment.
[0003] Currently, audio quality assessment typically refers to the silence rate of audio signals. However, current techniques suffer from numerous misjudgments when identifying silent segments in audio signals, resulting in low accuracy in determining the audio silence rate. Therefore, this application proposes a novel technique for detecting silent segments in audio, enabling accurate statistical analysis of these segments. Summary of the Invention
[0004] This application provides a method, related equipment, storage medium, and program product for detecting silent segments in audio data, which can accurately count silent segments in audio data.
[0005] On one hand, embodiments of this application provide a method for detecting silence in audio, including:
[0006] The microphone audio is collected according to a preset collection period, and events of loss of microphone access rights are detected during the collection process.
[0007] The acquisition period during which the loss event was not detected is taken as the target period, and the audio segments acquired within the target period are obtained;
[0008] Based on the audio duration of the audio segment and the duration of the acquisition period, audio detection is performed on the audio segment to obtain a detection result indicating whether the audio segment is a silent segment.
[0009] Furthermore, embodiments of this application provide an audio silence detection device, comprising:
[0010] The audio acquisition unit is used to acquire microphone audio according to a preset acquisition cycle and detect events of loss of microphone access during the acquisition process.
[0011] The audio acquisition unit is also used to take the acquisition period in which the loss event is not detected as the target period, and to acquire the audio segments acquired within the target period.
[0012] An audio detection unit is used to perform audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the acquisition cycle, and obtain a detection result indicating whether the audio segment is a silent segment.
[0013] In one implementation, when the audio detection unit performs audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the target period, and obtains the detection result of the audio segment, it is specifically used to perform:
[0014] Obtain the duration difference between the audio duration and the period duration;
[0015] If the duration difference is greater than or equal to a preset duration difference, the target period is marked as an abnormal period.
[0016] When adjacent periods of the target period are both abnormal periods, a detection result is generated to indicate that the audio segment is a silent segment.
[0017] In yet another embodiment, the audio detection unit is further configured to perform:
[0018] If the duration difference is less than the preset duration difference, or if the adjacent period of the target period is not the abnormal period, the digital audio data corresponding to the audio segment is obtained, and the digital audio data contains the quantization value of at least one audio sampling point.
[0019] Based on the quantization values contained in the digital audio data, the signal stability of the audio segment is determined;
[0020] Based on the signal stability and the preset stability, the detection result of the audio segment is generated.
[0021] In another embodiment, when the audio detection unit acquires the digital audio data corresponding to the audio segment, it specifically performs the following:
[0022] The audio segment is subjected to audio optimization processing to obtain the audio segment to be encoded.
[0023] The digital audio data of the audio segment to be encoded is used as the digital audio data corresponding to the audio segment.
[0024] In another embodiment, when the audio detection unit generates the detection result of the audio segment based on the signal stability and a preset stability, it is specifically used to perform:
[0025] If the signal stability is greater than the preset stability, a detection result is generated to indicate that the audio segment is a silent segment;
[0026] If the signal stability is less than the preset stability, the maximum quantization value in the digital audio data is obtained, and the detection result of the audio segment is generated based on the maximum quantization value.
[0027] In another embodiment, when the audio segment is a silent segment, the detection result is further used to indicate the silent factors causing the audio segment to be a silent segment. The audio silent detection device further includes a data acquisition and optimization unit, which is used to perform:
[0028] From the various detection results, the target detection results used to indicate that the corresponding audio segment is a silent segment are determined;
[0029] Based on the total audio acquisition time and the silent segments corresponding to the target detection results, the audio silence rate is determined;
[0030] Obtain the silent factors indicated by the target detection results, and optimize the audio acquisition logic based on the silent factors and the audio silence rate.
[0031] In another embodiment, the audio detection includes at least one audio detection task; when the audio detection unit performs audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the acquisition cycle, and obtains a detection result indicating whether the audio segment is a silent segment, it specifically performs the following:
[0032] Based on the audio duration of the audio segment and the duration of the acquisition cycle, the various audio detection tasks included in the audio detection are executed;
[0033] If an object detection task detects that the audio segment is a silent segment, then the silent factors associated with the object detection task are obtained;
[0034] The acquired silent factors are used as factors that cause the audio segment to be a silent segment, and a detection result containing the silent factors and used to indicate that the audio segment is a silent segment is generated.
[0035] In another embodiment, the audio detection task includes an audio duration detection task and an audio energy detection task;
[0036] The audio duration detection task is used to detect whether there is an abnormality in the audio duration of the audio segment, and the silent factors associated with the audio duration detection task include at least one factor that causes the acquisition abnormality.
[0037] The audio energy detection task is used to detect whether there are fluctuations in the signal strength of the audio segment, and the silent factors associated with the audio energy detection task include factors that cause the environment to be silent.
[0038] In another embodiment, the audio acquisition unit is further configured to perform:
[0039] The acquisition period during which the loss event is detected is taken as the silence period, and audio segments acquired within the silence period are subjected to audio detection.
[0040] If the audio segment collected during the silence period is detected to be a silent segment, then the silent factor corresponding to the audio segment collected during the silence period is determined to be that microphone access has not been obtained.
[0041] Generate detection results that include the silence factor and indicate that the audio segments acquired within the silence period are silent segments, so as to optimize the audio acquisition logic based on the silence factor and the audio silence rate.
[0042] In another embodiment, when the acquisition optimization unit optimizes the audio acquisition logic based on the silence factor indicated by the detection result and the audio silence rate, it is specifically used to perform:
[0043] Based on the audio silence rate, the audio acquisition quality corresponding to the current audio acquisition logic is evaluated to obtain the quality evaluation result;
[0044] If the quality assessment result indicates that the audio acquisition quality does not meet the expected quality, then the detection results corresponding to each acquired audio segment are obtained;
[0045] The optimization strategy for the audio acquisition logic is determined based on the silent factors contained in each detection result, and the audio acquisition logic is optimized according to the optimization strategy.
[0046] In another implementation, when the audio acquisition unit detects a loss of microphone access during the acquisition process, it may specifically perform the following:
[0047] During the data collection process, access requests are sent to the microphone access interface according to the preset detection cycle;
[0048] Receive request response information from the microphone access interface, the request response information being used to indicate whether the access connection was successfully established;
[0049] If the request response information indicates that the access connection failed to be established, it is determined that a loss of access to the microphone was detected.
[0050] In another aspect, embodiments of this application provide a computer device, including:
[0051] A memory, wherein a computer program is stored;
[0052] A processor for loading the computer program to implement the method as described in the first aspect.
[0053] In another aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted to be loaded by a processor and executed as described in the first aspect.
[0054] In another aspect, embodiments of this application also provide a computer program product, the computer program product including computer instructions, wherein a processor of a computer device reads the computer instructions and executes the method as described in the first aspect.
[0055] In this embodiment of the application, when performing silent audio detection, microphone audio is periodically collected according to a preset collection cycle. During the collection process, it checks whether access to the microphone has been lost in the current collection cycle. Then, silent detection is performed on the audio segments collected in each collection cycle where access has not been lost. This allows this embodiment to focus on the quality of the current device or application itself for silent detection, improving the reference value of the detection results in program optimization or device optimization scenarios. In addition, by comparing the audio duration of the audio segment with the cycle duration to determine silent segments, audio segments with silent phenomena during collection can be accurately identified (i.e., audio segments that are not completely silent, such as audio segments with excessively short durations), thereby further reducing the false positive rate of silent segments. Attached Figure Description
[0056] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a schematic diagram illustrating an application scenario provided in an embodiment of this application;
[0058] Figure 2 This is a schematic flowchart of an audio silence detection method provided in an embodiment of this application;
[0059] Figure 3 This is a schematic flowchart of another method for detecting silence in audio provided in an embodiment of this application;
[0060] Figure 4 This is a schematic diagram of an audio silence rate evaluation process provided in an embodiment of this application;
[0061] Figure 5 This is a schematic diagram of a process for determining silent factors provided in an embodiment of this application;
[0062] Figure 6 This is a schematic diagram of the structure of an audio silent detection device provided in an embodiment of this application;
[0063] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0064] It should be noted in advance that, in order to enable those skilled in the art to better understand the technical solutions proposed in the embodiments of this application, the embodiments of this application will be described clearly and completely in conjunction with one or more accompanying drawings. Furthermore, the accompanying drawings shown in the embodiments of this application are merely illustrative examples; for instance, the execution order of each step in the drawings can be adaptively adjusted according to the actual application scenario.
[0065] Furthermore, in the embodiments of this application, the block diagrams, modules, and units shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. Each module or unit can be part of a larger module or unit that includes the functionality of that module or unit. That is, the terms "module" or "unit" mentioned in the embodiments of this application refer to a computer program or part of a computer program with a predetermined function, which can work together with other related parts to achieve a predetermined goal. It can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof, or implemented in different network and / or processor devices and / or microcontroller devices. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units.
[0066] Specifically, this application provides a technical solution for accurately detecting silent segments caused by audio acquisition logic problems in audio processing scenarios. The audio data in this solution is acquired by controlling a microphone to acquire audio according to a preset acquisition cycle. Specifically, the solution states that when silent audio detection is required, events indicating a loss of microphone access rights (or a preemption of microphone access) can be detected during the periodic acquisition of microphone audio. If a loss event is detected within a certain acquisition cycle, it indicates that there is no permission to acquire microphone audio within that acquisition cycle. Acquisition cycles in which no loss event is detected are considered target cycles, and it is determined whether the audio segments acquired within the target cycle are silent segments. Here, a silent segment refers to an audio segment containing silent data. For example, if a 10-second audio segment contains 5 seconds of silence (or is completely silent), then that audio segment can be considered a silent segment.
[0067] By periodically collecting audio data and detecting microphone access loss events within each collection cycle, and then performing silent detection based on audio segments collected in collection cycles where no loss events were detected, audio segments generated during periods of access loss can be excluded from silent statistics. This allows for a focus on silent detection based on the quality of the current device or application itself, thereby improving the reference value of the detection results. Furthermore, by comparing the audio duration of audio segments with the cycle duration, audio segments with abnormal collection can be identified. This prevents audio segments containing partially silent data (i.e., non-fully silent audio segments, such as audio segments with excessively short durations) from being incorrectly identified as audio segments due to collection anomalies, further improving the accuracy of silent detection.
[0068] In one specific implementation, the above technical solution can be applied when it is necessary to evaluate the audio transmission quality of a communication application. As an example, it can be applied to applications such as... Figure 1 The real-time communication scenario is shown. Figure 1 The first object and the second object are two objects that need to communicate in real time. The first object holds a computer device marked as 101 (hereinafter referred to as device 101), and the second object holds a computer device marked as 102 (hereinafter referred to as device 102). Device 101 and device 102 run the same communication application, and the real-time communication service of this communication application can be provided by the communication server marked as 103.
[0069] Specifically, during real-time communication between the first and second objects, both devices 101 and 102 can periodically collect communication audio through their respective microphones. During audio collection, they enable the detection of microphone access loss events, thereby including audio segments collected during collection periods in which no loss events are detected into the silent statistics range. This helps determine the silent segments collected within a certain time period (typically including multiple consecutive collection periods or all collection periods). Then, the audio transmission quality of the communication application can be determined based on the duration ratio between the total silent duration of each collected silent segment and the total audio collection duration. For example, the duration ratio is negatively correlated with audio transmission quality.
[0070] In this scenario, the loss of microphone access can include events such as other applications on the device (e.g., device 101 or device 102) occupying the microphone, or events where the communication application's keep-alive mechanism is triggered. The keep-alive mechanism is a technical measure used in network communication to maintain the connection between the client and server in an active state, preventing connection interruption due to prolonged lack of data interaction. For example, the keep-alive mechanism can be triggered when the microphone is occupied or the communication connection is abnormally disconnected (e.g., a phone call is not manually ended).
[0071] It should be further noted that the above technical solutions can be integrated into applications or clients with audio transmission capabilities, and implemented by running the application or client on a computer device containing a microphone module (such as a smartphone, smartwatch, laptop, or other terminal device). The audio transmission capability can specifically include network communication functions implemented via the Internet (such as live streaming and audio sharing functions), or traditional communication functions implemented using dedicated physical lines or wireless frequency bands (such as system calls made by dialing a telephone number); there are no limitations on this.
[0072] Based on the above technical solutions, this application proposes a method for detecting silence in audio. This method can still be executed by the aforementioned computer device, and the schematic flowchart of this method can be as follows: Figure 2 .based on Figure 2 As can be seen, this method may include steps S201-S203:
[0073] S201. Acquire microphone audio according to the preset acquisition cycle, and detect the loss of microphone access rights during the acquisition process.
[0074] In a specific embodiment, audio acquisition may be performed during real-time communication, and the loss of microphone access rights refers to an event in which the target application currently used for real-time communication is prohibited from accessing the microphone.
[0075] In one implementation, the computer device can initiate an access request to the microphone access interface according to a preset detection period during the data acquisition process, and receive request response information from the microphone access interface. This request response information can be used to indicate whether an access connection has been successfully established. Optionally, if the request response information indicates that the access connection has failed to be established, or if no request response information is received within a timeout period, it is determined that a loss of microphone access permission event has been detected.
[0076] In other implementations, the computer device can also subscribe to the loss event, allowing it to receive timely notifications when the event is triggered. Optionally, the microphone access loss event can be triggered when another application uses the microphone, when the current application's network connection is unstable, or when the device malfunctions; there are no restrictions here. It is understood that during the data collection period when the loss event is detected, the data collected by the computer device can be silent data or empty data.
[0077] S202. Take the acquisition period in which no missing events are detected as the target period, and acquire the audio segments acquired within the target period.
[0078] In a specific embodiment, the audio data acquired in each acquisition cycle can be considered as an audio segment. Each audio segment contains at least one audio frame, which can be analog audio data or digital audio data. Analog audio data refers to data representing sound waveforms in the form of continuous analog signals. Analog audio data is typically obtained by controlling a microphone to convert sound into voltage changes, directly corresponding to pressure changes in sound waves. Digital audio data refers to discrete numerical representations obtained by sampling and quantizing analog signals. Simply put, it involves taking values from a temporally continuous sound waveform at specific time intervals (sampling rate) and quantizing these values into numerical values (usually represented as binary numbers).
[0079] For example, each time point where a value is taken can be called an audio sampling point, and the quantized value can be called a quantized value. In practical applications, the quantized value of an audio sampling point can be understood as the intensity or amplitude of the analog signal recorded by the sampler at a specific time point during the digitization process of the audio signal.
[0080] S203. Based on the audio duration of the audio segment and the period duration of the acquisition cycle, perform audio detection on the audio segment to obtain a detection result indicating whether the audio segment is a silent segment.
[0081] In a specific embodiment, audio detection may include one or more detection tasks. Different detection tasks are used to detect whether the audio segments collected within each target period are silent segments using different detection methods. Since the silent problem is not limited to the entire audio segment being silent, a sudden silence after a certain point in time, or partial silence due to insufficient or no collected data, also constitutes a silent problem. To detect such silent problems, this application proposes that the audio detection task may include an audio duration detection task. The audio duration detection task mainly achieves detection by comparing the audio duration with the period duration. When the audio duration is shorter than the period duration, it indicates that the amount of audio data collected within that collection period is insufficient, and the lost (i.e., uncollected) audio data is silent data. Therefore, the audio segments collected within that collection period can be classified as silent segments.
[0082] Optionally, the audio detection task may also include an audio energy detection task. The audio energy detection task primarily determines whether an audio segment is silent by analyzing the fluctuation (or signal stability) of the quantization values in the digital signal corresponding to the audio segment acquired within the target period. The smaller the fluctuation of the quantization values, the more stable the change in quantization values within the audio segment, indicating that the audio signal at different times within the audio segment may be the same. This is typically achieved in a quiet environment or an environment with extremely low background noise; therefore, audio segments acquired within this acquisition period can also be classified as silent segments.
[0083] In one exemplary implementation, to eliminate detection errors caused by accidental acquisition anomalies, in the audio duration detection task, the computer device can, after detecting at least two consecutive target periods with acquisition anomalies, determine the audio segments acquired within each of these target periods with acquisition anomalies as silent segments. Specifically, when audio detection of an audio segment is required, the computer device can first obtain the duration difference between the audio duration of the audio segment and the period duration, then compare the duration difference with a preset duration difference. If the duration difference is greater than or equal to the preset duration difference, the target period is marked as an abnormal period, where an abnormal period refers to a target period with acquisition anomalies. Then, when adjacent periods of the target period are also abnormal periods, a detection result indicating that the audio segment is a silent segment is generated.
[0084] By comparing the actual acquisition time (i.e. the audio duration of the audio segment) with the acquisition period duration, it is possible to determine whether an audio segment is silent. This can accurately identify situations where audio is silent due to acquisition anomalies. Including audio segments acquired under these circumstances in the silent statistics can improve the accuracy of the audio silence rate.
[0085] In the above implementation, when the duration difference is less than a preset duration difference, or when the adjacent periods of the target period are not abnormal periods, the computer device can detect whether the audio segment is a silent segment through audio energy detection. Specifically, the computer device can acquire the digital audio data corresponding to the audio segment. This digital audio data contains a quantization value corresponding to at least one audio sampling point. This quantization value is typically used to represent a non-negative binary number. After acquiring the digital audio data, the signal stability of the audio segment can be determined based on the various quantization values contained in the digital audio data. Then, the detection result of the audio segment is generated by comparing the signal stability with a preset stability.
[0086] To further improve the accuracy of the detection results, this application proposes combining a preset stability value and a maximum quantization value to jointly determine whether an audio segment is silent. Specifically, when the signal stability is greater than the preset stability value, a detection result indicating that the audio segment is silent is generated; when the signal stability is less than the preset stability value, the maximum quantization value in the digital audio data is obtained, and a detection result for the audio segment is generated based on the maximum quantization value. Wherein, a maximum quantization value less than or equal to 0 generally indicates that the data collected for the audio segment is silent data, therefore the detection result should be used to indicate that the audio segment is silent. A maximum quantization value greater than 0 generally indicates that there is sound in the audio segment, therefore the detection result should be used to indicate that the audio segment has sound.
[0087] The preset stability can be the signal stability exhibited by silent digital audio data. For example, in this embodiment, the signal stability can be represented by the mean square error of each quantization value of the corresponding digital signal. Optionally, the digital audio data used to determine the signal stability can be the digital audio data corresponding to the audio segment to be encoded. As an example, when acquiring the digital audio data of an audio segment, the computer device can first perform audio optimization or other processing on the audio segment until the audio segment to be encoded is obtained, and then acquire the digital audio data of the audio segment to be encoded, using this digital audio data as the digital audio data for determining the signal stability.
[0088] Since the encoded audio segment is the audio received by the audio receiver, determining whether an audio segment is silent based on the signal stability of the audio segment to be encoded allows the computer device to count silent segments from the perspective of audio reception. If the silent segments identified in this way are used to optimize audio transmission or audio acquisition, the user experience can be significantly improved.
[0089] In one feasible implementation, the computer device can also apply steps S201-S203 to the detection of audio silence rate. In this case, after obtaining the detection results corresponding to each target period, the computer device can determine the collected silent segments based on each detection result, and determine the audio silence rate based on the collected silent segments and the total audio acquisition duration. As an example, when determining the audio silence rate, the computer device can first determine the silent segments from the collected audio segments, then calculate the total duration of each silent segment, and then use the ratio between the total duration and the total audio acquisition duration as the audio silence rate. In real-time communication scenarios, the audio silence rate can be the silence rate of audio data collected during a communication period or the entire communication period; no specific limitation is made here.
[0090] By calculating the audio silence rate based on silent segments acquired during each acquisition cycle in which no loss events were detected, silent segments caused by lost access permissions can be excluded from the silence statistics, thus avoiding statistical errors in the silence rate caused by microphone permission issues. In other words, the embodiments of this application can accurately calculate the audio silence rate related to audio acquisition quality.
[0091] In this embodiment, when performing silent audio detection, microphone audio is periodically collected according to a preset collection cycle. During the collection process, it is checked whether microphone access is lost in the current collection cycle. Then, silent detection is performed on the audio segments collected in each collection cycle where access is not lost, and the detection result is obtained. Since the loss of microphone access during audio collection is usually caused by user behavior or device behavior (such as the user manually turning off the microphone, or the device automatically switching to applications with higher microphone access priority), and the absence of lost access usually indicates that the current collection cycle is in a state where microphone audio can be collected normally, performing silent detection based on the audio segments collected in each collection cycle where access is not lost can exclude silent audio caused by user behavior or device behavior from the statistical range, thereby improving the reference value of the detection results in program optimization or device optimization scenarios. In addition, by comparing the audio duration with the period duration of audio segments, audio segments with acquisition anomalies can be identified, thereby preventing audio segments with silent phenomena during acquisition (i.e., audio segments that are not completely silent, such as audio segments with excessively short audio duration) from being incorrectly identified as audio segments, thus further reducing the misjudgment rate of silent segments.
[0092] based on Figure 2 In addition to the method shown, this application also proposes another method for detecting silence in audio. This method can still be executed by the aforementioned computer device, and the schematic flowchart of this method can be as follows: Figure 3 .based on Figure 3As can be seen, this method may include steps S301-S306:
[0093] S301. Acquire microphone audio according to the preset acquisition cycle, and detect the loss of microphone access rights during the acquisition process.
[0094] In a specific embodiment, the implementation of step S301 can be found in the relevant description of step S201 above, and will not be repeated here.
[0095] S302. Take the acquisition period in which no missing events are detected as the target period, and acquire the audio segments acquired within the target period.
[0096] In a specific embodiment, the implementation of step S302 can be found in the relevant description of step S202 above, and will not be repeated here.
[0097] It should be noted that, to facilitate the evaluation of the accuracy of the detection results and the optimization analysis of the audio acquisition logic, the computer device can also perform audio detection on each audio segment acquired in each acquisition cycle and identify the causes of each silent segment. Optionally, optimization analysis is used to determine whether there is a need to optimize the audio acquisition logic, specifically based on the silent factors of each silent segment. The silent factors indicate the possible causes of silence (i.e., the reasons for the silence) of the silent segments detected in the audio detection task. For example, when the silent factors of a large number of silent segments indicate that the audio acquisition logic is flawed, the computer device may deem it necessary to optimize the audio acquisition logic, thereby triggering the execution of optimization of the audio acquisition logic.
[0098] In one feasible implementation, the computer device can, based on the aforementioned steps S301-S302 (or steps S201-S202), take the acquisition period of the detected loss event as the silence period, and then determine the silent factor corresponding to the audio segment acquired within the silence period as not having microphone permission, and finally generate a detection result containing the silent factor and used to indicate that the audio segment acquired within the silence period is a silent segment.
[0099] S303. Based on the audio duration of the audio segment and the period duration of the acquisition cycle, perform audio detection on the audio segment to obtain a detection result indicating whether the audio segment is a silent segment. When the audio segment is a silent segment, the detection result is also used to indicate the silent factors that cause the audio segment to be a silent segment.
[0100] In a specific embodiment, audio detection includes at least one audio detection task, and each audio detection task can be associated with at least one silent factor. In this case, the computer device can determine the silent factor of a silent segment during the audio detection process, so that the detection result obtained from the audio detection can not only indicate whether an audio segment is a silent segment, but also further indicate the silent factor that causes the audio segment to be a silent segment.
[0101] As an example, when performing audio detection, a computer device can first execute various audio detection tasks based on the audio duration of the audio segment and the duration of the acquisition cycle. These different audio detection tasks can be executed in a specific order and can employ different detection methods to determine whether an audio segment is silent. If a detection task (which, for ease of explanation, may also be called a target detection task) detects that the audio segment is silent, then the silent factor associated with that detection task is obtained, and this silent factor is used as the reason why the audio segment is silent. This results in a detection result that includes the silent factor and indicates that the audio segment is silent.
[0102] In one exemplary implementation, the audio detection task may specifically include an audio duration detection task and an audio energy detection task. The audio duration detection task is used to detect whether there are abnormalities in the audio duration of an audio segment. The silent factors associated with the audio duration detection task may include at least one factor that causes acquisition anomalies (such as poor network quality, insufficient device resources, etc.). The audio energy detection task is used to detect whether there are fluctuations in the signal strength of an audio segment. The silent factors associated with the audio energy detection task include factors that cause environmental silence (such as a quiet acquisition environment, low background noise, etc.).
[0103] S304. From the various detection results, determine the target detection result used to indicate that the corresponding audio segment is a silent segment.
[0104] In a specific embodiment, each detection result can refer to the detection result obtained by performing audio detection on audio segments collected within each target period, or it can refer to the detection result obtained by performing audio detection on audio segments collected within all collection periods; there is no limitation here. However, it generally refers to the detection result corresponding to the target period.
[0105] S305. Determine the audio silence rate based on the total audio acquisition duration and the silent segments corresponding to the target detection results.
[0106] In specific embodiments, the specific implementation of step S304 can be found in the relevant embodiments of step S203 described above, and will not be repeated here.
[0107] S306. Obtain the silent factors indicated by the target detection results, and optimize the audio acquisition logic based on the silent factors and the audio silence rate.
[0108] In a specific embodiment, audio acquisition logic refers to the code logic used to achieve audio acquisition. Optionally, the audio acquisition logic mentioned in step S306 may refer to the audio acquisition logic used by the audio acquisition module of the computer device, or it may be the audio acquisition logic used by the application (or client) currently running in the computer device for acquiring microphone audio (such as the audio acquisition logic of a real-time communication application), without limitation here.
[0109] In one feasible implementation, when optimizing the audio acquisition logic, the computer device can first evaluate the audio acquisition quality achieved by the currently used audio acquisition logic based on the audio silence rate, obtaining a quality evaluation result. The audio silence rate and audio acquisition quality are typically negatively correlated. When the quality evaluation result indicates that the audio acquisition quality does not meet the expected quality, it signifies that the current audio acquisition logic needs to be updated. Specifically, the detection results corresponding to each acquired audio segment can be obtained, and an optimization strategy for the audio acquisition logic can be determined based on the silence factors in each detection result. The audio acquisition logic can then be optimized according to this optimization strategy. Based on this, an audio acquisition logic with better audio acquisition quality can be obtained.
[0110] In this embodiment, during the audio detection process of audio segments acquired in each acquisition cycle, it is possible not only to determine whether the audio segment is silent, but also to further determine the reasons (i.e., silent factors) that cause the audio segment to be silent. Furthermore, the audio silence rate is determined based on each silent segment and the total acquisition time. Combined with the silent factors included in the detection results corresponding to each silent segment, the currently used audio acquisition logic is optimized, thereby improving the audio acquisition quality.
[0111] Based on the above Figure 2 and Figure 3 The method illustrated in this application embodiment also provides an audio silence rate evaluation process and a silence factor determination process in conjunction with a real-time communication scenario. In this scenario, it is assumed that the audio silence rate is used to indicate the frequency and duration of audio silence perceived by objects participating in real-time network communication. That is, the audio silence rate in this scenario can refer to the communication silence rate displayed by the network communication application providing real-time network communication services to the communication objects during the communication process. Specifically, the application process of the method in the real-time communication scenario can be found in [reference needed]. Figure 4 The process for determining silent factors can be found in [reference needed]. Figure 5 .
[0112] First, please see Figure 4 .like Figure 4 As shown, the audio silence rate assessment in a real-time communication scenario can, for example, include the following steps S401-S405:
[0113] S401, Periodic acquisition and interruption detection.
[0114] Specifically, during real-time communication, microphone audio is collected according to a preset collection period, and interruption detection of the microphone is enabled during the collection process (i.e., periodic collection and interruption detection). Interruption detection is used to detect whether the current network communication application has lost access to the microphone, which mainly includes the detection of events such as "microphone preemption event", "system phone call event", and "keep-alive mechanism enabled event". Among them, the microphone preemption event refers to the event where other applications on the computer device occupy the microphone; the system phone call event refers to the event where the communication object answers or makes a system phone call (usually based on the phone number), and microphone collection of non-system phone calls is usually blocked from the perspective of privacy protection; the keep-alive mechanism enabled event refers to the event where the current network communication application is enabled by the keep-alive mechanism (such as background suspension of the application). The keep-alive mechanism can be implemented by limiting microphone collection, limiting application thread scheduling, etc., to reduce power consumption and increase battery life.
[0115] As an example, event detection for keep-alive mechanism activation events can be performed using foreground / background detection and thread scheduling detection. Foreground / background detection is used to detect whether the current network communication application is in the background, as it is more easily managed by the keep-alive mechanism when it is in the background. Thread scheduling detection is used to determine whether the current network communication application has enabled the keep-alive mechanism by periodically executing a task of a fixed duration (such as a task with a fixed sleep time T) and detecting the difference between the actual execution time of the task and T. If the difference is greater than a certain threshold, it can be considered that the keep-alive mechanism has been enabled.
[0116] Understandably, when microphone access is lost, the collected audio data is usually silent or abnormal (such as very short or empty data). In practical applications, computer devices can also be configured with a silence factor for each event to indicate the reason for silent data collection when the event is detected. The silence factor can be the same for different events (e.g., "lost microphone access"); of course, the silence factor can also be different for different events. For example, the silence factor for a keep-alive mechanism enabled event could be "restricted by the keep-alive mechanism," and the silence factor for a system phone call event could be "microphone acquisition blocked due to system call." The specific reason depends on the specific application scenario and is not limited here.
[0117] S402, Silent Detection (including acquisition detection, pre-3A audio detection and post-3A audio detection).
[0118] Specifically, silence detection can encompass multiple dimensions of detection, each of which can be associated with one or more silence factors to indicate the reason for detecting a silent segment under that dimension. However, no specific restrictions are placed on the detection dimensions and silence factors here. In this example, silence detection includes acquisition detection, pre-3A audio detection, and post-3A audio detection for illustrative purposes:
[0119] The audio acquisition detection in the silent detection process is performed after the computer device has acquired the audio segment within the current acquisition period. It is primarily used to check whether the audio acquisition function is functioning correctly. When the audio acquisition function is normal, the network communication application will acquire audio segments of fixed duration from the computer device's microphone at a fixed acquisition period. However, if the audio acquisition function malfunctions (such as improper audio acquisition parameter configuration or an inadequate handling of acquisition anomalies), the audio segments acquired by the network communication application within the acquisition period will typically be of insufficient duration (including cases where no data is acquired, i.e., the audio segment duration is 0).
[0120] Therefore, in real-time communication scenarios, data acquisition and detection can be achieved by comparing the audio duration of an audio segment with the duration of the current acquisition cycle. Specifically, if the difference between the audio duration acquired in the current acquisition cycle and the duration of the current acquisition cycle is greater than a threshold, and this occurs consecutively in at least two such acquisition cycles, the audio segment acquired in each of these at least two acquisition cycles is determined to be a silent segment.
[0121] In silent detection, pre-3A audio detection is performed after the audio segment is acquired. It can be performed simultaneously with or before the acquisition detection, without restriction. Post-3A audio detection is performed after the acquired audio segment has undergone 3A processing. It should be noted that the 3A mentioned here refers to Acoustic Echo Cancellation (AEC), Automatic Noise Suppression (ANS), and Automatic Gain Control (AGC) in the field of audio processing. In practical applications, audio segments can be expressed in the form of digital audio data or analog audio signals. When expressed as digital audio data, an audio segment is essentially a sequence of binary numbers with a fixed number of bits, such as multiple 16-bit (i.e., 16-bit) binary sequences.
[0122] Based on this, 3A pre-audio detection can determine whether an audio segment is silent by performing a series of analyses on the digital sequence corresponding to the acquired audio segment. Specifically, 3A pre-audio detection can include data value detection and energy detection of digital audio data. The data value refers to a decimal value expressed by a 16-bit binary number.
[0123] Data value detection can be achieved by calculating the mean squared error (MSE) of the data values in the audio segment. Specifically, when performing data value detection, the average value (denoted as avg) of all data values in the audio segment is first calculated, then the variance (denoted as var) of each data value in the audio segment is calculated, and then the mean of the variances under each data value is taken as the MSE (i.e., MSE = var ÷ n, where n is the number of data values). Finally, if the MSE is lower than a preset threshold, the audio segment is considered to be a silent segment.
[0124] Energy detection can be achieved by comparing the maximum data value of the audio segment with a preset data value (such as 0). Specifically, when performing energy detection, all data values of the audio segment can be traversed first to find the maximum data value. Then, the maximum data value is taken as the energy of the audio segment. If the energy is greater than 0, it is considered to be a sound segment captured under extremely quiet conditions. If the energy is equal to 0, it is considered to be a silent segment.
[0125] Post-3A audio detection can include only the above data values. The purpose is that when the post-3A audio detection result indicates that an audio segment is silent, the result can be compared with the pre-3A data detection result to determine the cause of the silence. If the pre-3A audio detection result does not indicate that the audio segment is silent, then the silence can be considered to be caused by 3A processing. More granular factors contributing to silence could include a low signal-to-noise ratio in the original data or abnormal 3A configuration.
[0126] It should be noted that the embodiments of this application can also perform silent detection by using audio frames as detection units, that is, detect whether each audio frame contained in the audio segment is silent data. When a preset number of consecutive audio frames are silent data, it is determined that the audio segment is silent, thereby achieving more accurate silent detection. The relevant detection principle is the same as the detection principle of audio segments, and will not be described in detail here.
[0127] S403, 3A processing.
[0128] As mentioned above, 3A processing refers to acoustic echo cancellation, background noise suppression, and automatic gain control. After 3A processing, post-3A audio detection in step S402 is triggered.
[0129] S404, audio encoding.
[0130] Specifically, the audio segments processed by 3A will be used for audio encoding to obtain the encoded data to be transmitted.
[0131] S405, Uplink transmission.
[0132] Specifically, the encoded data is transmitted upstream to the communication server, and then transmitted downstream to the corresponding listener for decoding and playback.
[0133] pass Figure 4 The illustrated process can exclude silent segments caused by user behavior or device behavior from the silent rate statistics, thereby accurately detecting silent segments caused by audio acquisition quality problems of network communication applications during voice calls. This allows the evaluated audio silent rate to accurately represent the audio acquisition quality, thus facilitating efficient quality optimization of network communication applications.
[0134] Next, please see Figure 5 .like Figure 5 As shown above, in the above Figure 4 Under the application scenarios and application processes shown, it can be followed Figure 5 The decision tree in the algorithm is used to determine the factors contributing to each silent segment. Specifically, if a silent audio segment is detected, the corresponding silent factor can be determined according to the following process:
[0135] First, check if the audio segment's acquisition process was interrupted (i.e., a loss of microphone access was detected during the acquisition period). If interrupted, the silence factor is considered to include "user behavior." If not interrupted, check if the acquisition detection detected an acquisition anomaly. If an acquisition anomaly was detected, the silence factor is considered to include "acquisition anomaly." If no acquisition anomaly was detected, check if the audio segment was detected as silent in the 3A pre-audio detection. If the 3A pre-audio detection did not detect silence, the silence factor is considered to include "low acquisition signal-to-noise ratio or 3A configuration anomaly." If the 3A pre-audio detection detected silence, further check if the energy value obtained from the energy detection in the 3A pre-audio detection is 0. If it is 0, the silence factor is considered to include "acquiring silence data." If it is not 0, the silence factor is considered to include "quiet environment or low acquisition energy gain (i.e., low audio input signal)."
[0136] It should be noted that, Figure 5 The decision tree shown and the judgment process described above are merely illustrative examples and can be combined with other methods in practical applications. Figure 4The process involves simultaneously evaluating the audio silence rate and determining the cause of silence, following other applicable logic. For example, during audio acquisition, it can be determined whether the acquisition process of the audio segment is interrupted within the current acquisition cycle, and the audio segment can be marked accordingly. Next, the acquisition detection in step S402 above is performed on the audio segment. If the audio segment is detected as silent, the mark of the audio segment is queried to determine whether the audio segment was interrupted during acquisition. If it was interrupted, the silence factor is considered to include "user behavior"; if it was not interrupted, the silence factor is considered to include "acquisition anomaly". Correspondingly, if the audio segment is not detected as silent, the cause of silence is queried in the audio detection before 3A. Specifically, if the audio segment is detected as silent in the pre-3A audio detection, the cause of the silence is determined based on the energy value obtained from the energy detection in the pre-3A audio detection. For example, when the energy value is 0, the cause of silence is considered to include "collecting silent data"; when the energy value is not 0, the cause of silence is considered to include "a quiet environment or low acquisition energy gain (i.e., low audio input signal)". If the audio segment is not detected as silent in the pre-3A audio detection, but is detected as silent in the post-3A audio detection, the cause of silence is considered to include "low acquisition signal-to-noise ratio or abnormal 3A configuration".
[0137] Combining the above methods for determining silent factors with methods for detecting silent audio can not only improve the accuracy of silent rate statistics, but also analyze various reasons that cause audio to be silent, providing effective reference information for improving the quality of applications.
[0138] Based on the aforementioned method embodiments, this application also provides an audio silence detection device. Specifically, please refer to... Figure 6 , Figure 6 The structure of the device is shown; this device can be mounted on a computer device and used to achieve the above. Figure 2 or Figure 3 Some or all of the functions described in the method embodiments. For example... Figure 6 The device may include an audio acquisition unit 601 and an audio detection unit 602, wherein:
[0139] The audio acquisition unit 601 is used to acquire microphone audio according to a preset acquisition cycle and detect events of loss of microphone access rights during the acquisition process.
[0140] The audio acquisition unit 601 is also used to take the acquisition period in which the loss event is not detected as the target period, and to acquire the audio segments acquired within the target period.
[0141] The audio detection unit 602 is used to perform audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the acquisition period, and obtain a detection result indicating whether the audio segment is a silent segment.
[0142] In one embodiment, when the audio detection unit 602 performs audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the target period, and obtains the detection result of the audio segment, it is specifically used to perform:
[0143] Obtain the duration difference between the audio duration and the period duration;
[0144] If the duration difference is greater than or equal to a preset duration difference, the target period is marked as an abnormal period.
[0145] When adjacent periods of the target period are both abnormal periods, a detection result is generated to indicate that the audio segment is a silent segment.
[0146] In yet another embodiment, the audio detection unit 602 is further configured to perform:
[0147] If the duration difference is less than the preset duration difference, or if the adjacent period of the target period is not the abnormal period, the digital audio data corresponding to the audio segment is obtained, and the digital audio data contains the quantization value of at least one audio sampling point.
[0148] Based on the quantization values contained in the digital audio data, the signal stability of the audio segment is determined;
[0149] Based on the signal stability and the preset stability, the detection result of the audio segment is generated.
[0150] In another embodiment, when the audio detection unit 602 acquires the digital audio data corresponding to the audio segment, it specifically performs the following:
[0151] The audio segment is subjected to audio optimization processing to obtain the audio segment to be encoded.
[0152] The digital audio data of the audio segment to be encoded is used as the digital audio data corresponding to the audio segment.
[0153] In another embodiment, when the audio detection unit 602 generates the detection result of the audio segment based on the signal stability and the preset stability, it is specifically used to perform:
[0154] If the signal stability is greater than the preset stability, a detection result is generated to indicate that the audio segment is a silent segment;
[0155] If the signal stability is less than the preset stability, the maximum quantization value in the digital audio data is obtained, and the detection result of the audio segment is generated based on the maximum quantization value.
[0156] In another embodiment, when the audio segment is a silent segment, the detection result is further used to indicate the silent factors causing the audio segment to be a silent segment. The audio silent detection device further includes a data acquisition and optimization unit 603, which is used to perform:
[0157] From the various detection results, the target detection results used to indicate that the corresponding audio segment is a silent segment are determined;
[0158] Based on the total audio acquisition time and the silent segments corresponding to the target detection results, the audio silence rate is determined;
[0159] Obtain the silent factors indicated by the target detection results, and optimize the audio acquisition logic based on the silent factors and the audio silence rate.
[0160] In another embodiment, the audio detection includes at least one audio detection task; when the audio detection unit 602 performs audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the acquisition period, and obtains a detection result indicating whether the audio segment is a silent segment, it specifically performs the following:
[0161] Based on the audio duration of the audio segment and the duration of the acquisition cycle, the various audio detection tasks included in the audio detection are executed;
[0162] If an object detection task detects that the audio segment is a silent segment, then the silent factors associated with the object detection task are obtained;
[0163] The acquired silent factors are used as factors that cause the audio segment to be a silent segment, and a detection result containing the silent factors and used to indicate that the audio segment is a silent segment is generated.
[0164] In another embodiment, the audio detection task includes an audio duration detection task and an audio energy detection task;
[0165] The audio duration detection task is used to detect whether there is an abnormality in the audio duration of the audio segment, and the silent factors associated with the audio duration detection task include at least one factor that causes the acquisition abnormality.
[0166] The audio energy detection task is used to detect whether there are fluctuations in the signal strength of the audio segment, and the silent factors associated with the audio energy detection task include factors that cause the environment to be silent.
[0167] In yet another embodiment, the audio acquisition unit 601 is further configured to perform:
[0168] The acquisition period during which the loss event is detected is taken as the silence period, and audio segments acquired within the silence period are subjected to audio detection.
[0169] If the audio segment collected during the silence period is detected to be a silent segment, then the silent factor corresponding to the audio segment collected during the silence period is determined to be that microphone access has not been obtained.
[0170] Generate detection results that include the silence factor and indicate that the audio segments acquired within the silence period are silent segments, so as to optimize the audio acquisition logic based on the silence factor and the audio silence rate.
[0171] In another embodiment, when the acquisition optimization unit 603 optimizes the audio acquisition logic based on the silence factor indicated by the detection result and the audio silence rate, it is specifically used to perform:
[0172] Based on the audio silence rate, the audio acquisition quality corresponding to the current audio acquisition logic is evaluated to obtain the quality evaluation result;
[0173] If the quality assessment result indicates that the audio acquisition quality does not meet the expected quality, then the detection results corresponding to each acquired audio segment are obtained;
[0174] The optimization strategy for the audio acquisition logic is determined based on the silent factors contained in each detection result, and the audio acquisition logic is optimized according to the optimization strategy.
[0175] In another embodiment, when the audio acquisition unit 601 detects a loss of microphone access during the acquisition process, it may specifically perform the following:
[0176] During the data collection process, access requests are sent to the microphone access interface according to the preset detection cycle;
[0177] Receive request response information from the microphone access interface, the request response information being used to indicate whether the access connection was successfully established;
[0178] If the request response information indicates that the access connection failed to be established, it is determined that a loss of access to the microphone was detected.
[0179] In one embodiment, Figure 6Each unit in the illustrated device can be individually or entirely combined into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. In other words, the above units are based on logical functional division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, Figure 6 The device shown may also include other units, and in practical applications, these functions may also be implemented with the assistance of other units, and may be implemented by multiple units working together.
[0180] According to another embodiment of this application, the following can be executed by running on a computing device including processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM). Figure 2 or Figure 3 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 6 The apparatus shown. A computer program may be recorded on, for example, a computer-readable storage medium, loaded onto the apparatus via the computer-readable storage medium, and executed therein.
[0181] Based on the descriptions of the above method and apparatus embodiments, this application also provides a computer device. Specifically, please refer to... Figure 7 , Figure 7 This application provides a schematic diagram of the structure of a computer device, as shown in the embodiment of the present application. Figure 7 As shown, the computer device may include a processor 701, a memory 702, and a communication interface 703, and the processor 701, the memory 702, and the communication interface 703 may be connected by a bus or other means.
[0182] The processor 701 (or Central Processing Unit, CPU) is the computing and control core of a computer device. It can parse various instructions within the computer device and process various data. For example, the CPU can be used to parse audio acquisition requests and control the computer device to execute the corresponding audio acquisition tasks; the CPU can also transmit program instructions and other information between internal structures of the computer device, and so on.
[0183] Memory 702 is a storage device in a computer device used to store programs and data. It is understood that memory 702 here can include both the computer device's built-in memory and any extended memory supported by the computer device.
[0184] The communication interface 703 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), and can be used to send and receive data under the control of the processor 701; the communication interface 703 can also be used for the transmission and interaction of data within the computer device.
[0185] In a specific embodiment, the processor 701 may load and execute one or more computer programs stored in the memory 702 to implement the steps in the method described in the above embodiments.
[0186] This application embodiment also provides a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the processing system of the computer device. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by the processor 701, which may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here may be high-speed RAM memory or non-volatile memory, such as at least one disk storage device; optionally, it may also be at least one readable storage medium located remotely from the aforementioned processor.
[0187] This application also provides a computer program product, which includes computer instructions, and the processor of a computer device can execute the above-described method embodiments by loading the computer instructions.
[0188] Based on the same inventive concept, the principles and beneficial effects of the devices, computer equipment, computer-readable storage media and computer program products provided in the embodiments of this application are similar to those described in the foregoing corresponding method embodiments. Therefore, the corresponding method implementation principles and beneficial effects can be referred to, which will not be repeated here for the sake of brevity.
[0189] It should be further noted that the steps in the methods of this application embodiment can be adjusted, merged, and deleted according to actual needs, and the modules in the device of this application embodiment can be merged, divided, and deleted according to actual needs. Furthermore, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. It should also be particularly emphasized that when the above embodiments of this application are applied to specific products or technologies, the data acquisition involved in each specific implementation of this application requires the permission or consent of the relevant parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0190] It should be understood that the above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art can understand that all or part of the processes of the above embodiments can be implemented, and equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A method for detecting silence in audio, characterized in that, include: The microphone audio is collected according to a preset collection period, and events of loss of microphone access rights are detected during the collection process. The acquisition period during which the loss event was not detected is taken as the target period, and the audio segments acquired within the target period are obtained; Based on the audio duration of the audio segment and the duration of the acquisition period, audio detection is performed on the audio segment to obtain a detection result indicating whether the audio segment is a silent segment.
2. The method according to claim 1, characterized in that, The method of performing audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the target period, to obtain the detection result of the audio segment, includes: Obtain the duration difference between the audio duration and the period duration; If the duration difference is greater than or equal to a preset duration difference, the target period is marked as an abnormal period. When adjacent periods of the target period are both abnormal periods, a detection result is generated to indicate that the audio segment is a silent segment.
3. The method according to claim 2, characterized in that, The method further includes: If the duration difference is less than the preset duration difference, or if the adjacent period of the target period is not the abnormal period, the digital audio data corresponding to the audio segment is obtained, and the digital audio data contains the quantization value of at least one audio sampling point. Based on the quantization values contained in the digital audio data, the signal stability of the audio segment is determined; Based on the signal stability and the preset stability, the detection result of the audio segment is generated.
4. The method according to claim 3, characterized in that, The step of obtaining the digital audio data corresponding to the audio segment includes: The audio segment is subjected to audio optimization processing to obtain the audio segment to be encoded. The digital audio data of the audio segment to be encoded is used as the digital audio data corresponding to the audio segment.
5. The method according to claim 3, characterized in that, The step of generating the detection result of the audio segment based on the signal stability and the preset stability includes: If the signal stability is greater than the preset stability, a detection result is generated to indicate that the audio segment is a silent segment; If the signal stability is less than the preset stability, the maximum quantization value in the digital audio data is obtained, and the detection result of the audio segment is generated based on the maximum quantization value.
6. The method according to claim 1, characterized in that, When the audio segment is a silent segment, the detection result is further used to indicate the silent factors that cause the audio segment to be a silent segment, and the method further includes: From the various detection results, the target detection results used to indicate that the corresponding audio segment is a silent segment are determined; Based on the total audio acquisition time and the silent segments corresponding to the target detection results, the audio silence rate is determined; Obtain the silent factors indicated by the target detection results, and optimize the audio acquisition logic based on the silent factors and the audio silence rate.
7. The method according to claim 6, characterized in that, The audio detection includes at least one audio detection task; the audio detection of the audio segment based on the audio duration of the audio segment and the period duration of the acquisition cycle, to obtain a detection result indicating whether the audio segment is a silent segment, includes: Based on the audio duration of the audio segment and the duration of the acquisition cycle, the various audio detection tasks included in the audio detection are executed; If an object detection task detects that the audio segment is a silent segment, then the silent factors associated with the object detection task are obtained; The acquired silent factors are used as factors that cause the audio segment to be a silent segment, and a detection result containing the silent factors and used to indicate that the audio segment is a silent segment is generated.
8. The method according to claim 7, characterized in that, The audio detection task includes an audio duration detection task and an audio energy detection task; The audio duration detection task is used to detect whether there is an abnormality in the audio duration of the audio segment, and the silent factors associated with the audio duration detection task include at least one factor that causes the acquisition abnormality. The audio energy detection task is used to detect whether there are fluctuations in the signal strength of the audio segment, and the silent factors associated with the audio energy detection task include factors that cause the environment to be silent.
9. The method according to claim 1, characterized in that, The method further includes: The acquisition period during which the loss event is detected is taken as the silence period, and audio segments acquired within the silence period are subjected to audio detection. If the audio segment collected during the silence period is detected to be a silent segment, then the silent factor corresponding to the audio segment collected during the silence period is determined to be that microphone access has not been obtained. Generate detection results that include the silence factor and indicate that the audio segments acquired within the silence period are silent segments, so as to optimize the audio acquisition logic based on the silence factor and the audio silence rate.
10. The method according to any one of claims 6-9, characterized in that, The optimization of the audio acquisition logic based on the silence factors indicated by the detection results and the audio silence rate includes: Based on the audio silence rate, the audio acquisition quality corresponding to the current audio acquisition logic is evaluated to obtain the quality evaluation result; If the quality assessment result indicates that the audio acquisition quality does not meet the expected quality, then the detection results corresponding to each acquired audio segment are obtained; The optimization strategy for the audio acquisition logic is determined based on the silent factors contained in each detection result, and the audio acquisition logic is optimized according to the optimization strategy.
11. The method according to claim 1, characterized in that, The detection of microphone access loss events during the data acquisition process includes: During the data collection process, access requests are sent to the microphone access interface according to the preset detection cycle; Receive request response information from the microphone access interface, the request response information being used to indicate whether the access connection was successfully established; If the request response information indicates that the access connection failed to be established, it is determined that a loss of access to the microphone was detected.
12. An audio silent detection device, characterized in that, include: The audio acquisition unit is used to acquire microphone audio according to a preset acquisition cycle and detect events of loss of microphone access during the acquisition process. The audio acquisition unit is also used to take the acquisition period in which the loss event is not detected as the target period, and to acquire the audio segments acquired within the target period. An audio detection unit is used to perform audio detection on the audio segment based on the audio duration of the audio segment and the period duration of the acquisition cycle, and obtain a detection result indicating whether the audio segment is a silent segment.
13. A computer device, characterized in that, include: A memory, wherein a computer program is stored; A processor for loading the computer program to implement the method as described in any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, The computer storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-11.
15. A computer program product, characterized in that, The computer program product includes computer instructions, and the processor of the computer device reads the computer instructions and executes the method as described in any one of claims 1-11.