Audio quality determination method, anomaly detection method, system, device, and medium
By acquiring the sampling parameters of audio data, determining the audio quality, and identifying silence and distortion, the problem of inaccurate audio anomaly location in existing technologies is solved, and intelligent detection of audio anomalies is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING CHANGAN TECH CO LTD
- Filing Date
- 2022-11-28
- Publication Date
- 2026-06-02
Smart Images

Figure CN115862671B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent control technology, specifically to audio quality determination methods, anomaly detection methods, systems, devices, and media. Background Technology
[0002] In recent years, with the development of internet software technology, voice-based software development has emerged and rapidly grown to meet people's needs for convenient software use. These voice-based software programs offer users a variety of functions such as voice settings, voice dialing, and voice-based social networking, providing a personalized user experience.
[0003] In actual R&D processes, many problems arise in voice development environments. When encountering devices that cannot be woken up or recognized during voice development, it is usually necessary to rely on various detection tools to analyze the audio. With the trend of device intelligence, it is necessary to reduce the dependence on detection equipment. Therefore, there is an urgent need for a method to detect audio anomalies in order to achieve intelligent detection of audio anomalies.
[0004] In related technologies, frequency domain information is obtained by performing a Fourier transform on audio data, and then the presence of abnormalities in the audio playback or receiving device is determined by detecting the sound frequencies in two time periods. However, there are differences between the audio received from the audio receiving device and the audio data after speech enhancement, making it impossible to determine the location of the abnormality. Summary of the Invention
[0005] In view of the shortcomings of the prior art described above, the present invention provides an audio quality determination method, anomaly detection method, system, device and medium to solve the technical problem in the above-mentioned related technologies that, by obtaining frequency domain information from audio data through Fourier transform, and then determining whether there is an anomaly in the audio playback device or audio receiving device by detecting the sound frequency in two time periods, the audio from the audio receiving device differs from the audio data after speech enhancement, and the location of the anomaly point cannot be determined.
[0006] To achieve the above objectives, firstly, this application provides an audio quality determination method, the audio quality determination method comprising:
[0007] The enhanced audio data and the first system parameters are obtained. The first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth.
[0008] The amount of audio data played per unit time in the enhanced audio data is determined based on the first number of audio channels, the first number of samples, and the first number of sampling bits.
[0009] Based on the first sampling frequency, the playback duration of each frame of audio data in the enhanced audio data is determined;
[0010] The enhanced audio data is read according to the amount of audio data played per unit time in the enhanced audio data;
[0011] Within the playback duration of each frame of audio data in the enhanced audio data, the quality of each frame of audio data is determined based on the amount of audio data played per unit time in the enhanced audio data. The quality of each frame of audio data includes silence and distortion.
[0012] In one exemplary embodiment of this application, determining the quality of each frame of audio in the enhanced audio data includes:
[0013] Within the playback duration of each frame of audio data, the amount of audio data played per unit time in each frame of audio data in the enhanced audio data is compared with 0;
[0014] If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the enhanced audio data is 0, the quality of the corresponding frame of audio data in the enhanced audio data is determined to be silent.
[0015] Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, the first number of times the amount of audio data played in consecutive unit time of each frame of audio data within the playback duration of each frame of audio data is greater than a preset data amount threshold is obtained.
[0016] If the first count is greater than the preset first count threshold, the quality of the corresponding frame audio in the enhanced audio data will be determined as distorted.
[0017] In one exemplary embodiment of this application, the audio quality determination method further includes:
[0018] Acquire raw audio data and second system parameters. The second system parameters are the parameters of the sampling system that samples the raw audio data. The second system parameters include the second sampling frequency, the second number of audio channels, the second number of samples, and the second sampling bit depth.
[0019] The amount of audio data played per unit time in the original audio data is determined based on the second number of audio channels, the second number of samples, and the second number of sampling bits.
[0020] Based on the second sampling frequency, the playback duration of each frame of audio data in the original audio data is determined;
[0021] The original audio data is read according to the amount of audio data played per unit time in the original audio data;
[0022] Within the playback duration of each frame of audio data in the original audio data, the quality of each frame of audio data is determined based on the amount of audio data played per unit time in the original audio data. The quality of each frame of audio data includes silence and distortion.
[0023] In one exemplary embodiment of this application, determining the quality of each frame of audio in the original audio data includes:
[0024] Within the playback duration of each frame of audio data, the amount of audio data played in each unit time of each frame of audio data in the original audio data is compared with 0.
[0025] If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the original audio data is 0, the quality of the corresponding frame of audio data in the original audio data is determined to be silent.
[0026] Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the original audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, obtain the second number of times that the amount of audio data played in consecutive unit time of each frame of audio data within the playback duration of each frame of audio data is greater than a preset data amount threshold.
[0027] If the second count is greater than the preset second count threshold, the quality of the corresponding frame audio in the original audio data is determined to be distorted.
[0028] Secondly, this application provides an audio anomaly detection method, the audio anomaly detection method comprising:
[0029] The enhanced audio data and the first system parameters are obtained. The first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth.
[0030] The amount of audio data played per unit time in the enhanced audio data is determined based on the first number of audio channels, the first number of samples, and the first number of sampling bits.
[0031] Based on the first sampling frequency, the playback duration of each frame of audio data in the enhanced audio data is determined;
[0032] The enhanced audio data is read according to the amount of audio data played per unit time in the enhanced audio data;
[0033] Within the playback duration of each frame of audio data in the enhanced audio data, the quality of each frame of audio data is determined based on the amount of audio data played per unit time in the enhanced audio data. The quality of each frame of audio data includes silence and distortion.
[0034] If the audio quality in the enhanced audio data is mute or distorted, the corresponding frame of audio data that is mute or distorted is identified as an audio anomaly location.
[0035] Thirdly, this application provides an audio quality determination system, the audio quality determination system comprising:
[0036] The acquisition module is used to acquire enhanced audio data and first system parameters. The first system parameters are the parameters of the sampling system for sampling the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include a first sampling frequency, a first number of audio channels, a first number of samples, and a first number of sampling bits.
[0037] The first determining module is used to determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits.
[0038] The second determining module is used to determine the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency;
[0039] The reading module is used to read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data;
[0040] The third determining module is used to determine the quality of each frame of audio in the enhanced audio data based on the amount of audio data played per unit time within the playback duration of each frame of audio data in the enhanced audio data. The quality of each frame of audio includes silence and distortion.
[0041] In an exemplary embodiment of this application, the third determining module includes a comparison unit, a first determining unit, a collection unit, and a second determining unit. The comparison unit is used to compare the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data with 0 within the playback duration of each frame of audio data. If the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data is 0 within the playback duration of each frame of audio data, the first determining unit is used to determine the quality of the corresponding frame of audio data in the enhanced audio data as silent. If the amount of audio data played in some unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0 within the playback duration of each frame of audio data, the collection unit is used to obtain a first number of times that the amount of audio data played in consecutive unit time of each frame of audio data is greater than a preset data amount threshold within the playback duration of each frame of audio data. If the first number is greater than a preset second number threshold, the second determining unit is used to determine the quality of the corresponding frame of audio data in the enhanced audio data as distorted.
[0042] Fourthly, this application provides an audio anomaly detection system, the audio anomaly detection system comprising:
[0043] The acquisition module is used to acquire enhanced audio data and first system parameters. The first system parameters are the parameters of the sampling system for sampling the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include a first sampling frequency, a first number of audio channels, a first number of samples, and a first number of sampling bits.
[0044] The first determining module is used to determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits.
[0045] The second determining module is used to determine the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency;
[0046] The reading module is used to read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data;
[0047] The third determining module is used to determine the quality of each frame of audio in the enhanced audio data based on the amount of audio data played per unit time within the playback duration of each frame of audio data in the enhanced audio data. The quality of each frame of audio includes silence and distortion.
[0048] The fourth determining module, if the audio quality in the enhanced audio data is mute or distorted, is used to determine the corresponding frame audio data of the mute or distorted audio as an audio anomaly location.
[0049] Fifthly, this application provides an electronic device, the electronic device comprising:
[0050] One or more processors;
[0051] A storage device for storing one or more programs that, when executed by one or more processors, cause the electronic device to perform the method described above.
[0052] In a sixth aspect, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the method described above.
[0053] The beneficial effects of this invention are:
[0054] This application obtains enhanced audio data and first system parameters, determines the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits, determines the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency, reads the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data, and determines the quality of each frame of audio data in the enhanced audio data based on the amount of audio data played per unit time within the playback duration of each frame of audio data in the enhanced audio data. If there is an abnormality in the audio quality, the location of the audio abnormality can be determined based on the corresponding frame of audio data.
[0055] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0056] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:
[0057] Figure 1 A flowchart illustrating an audio quality determination method as an exemplary embodiment of this application;
[0058] Figure 2 for Figure 1 The flowchart in an exemplary embodiment shows the process of determining the quality of each frame of audio in the enhanced audio data in step S150.
[0059] Figure 3A flowchart illustrating an audio quality determination method as another exemplary embodiment of this application;
[0060] Figure 4 for Figure 3 The flowchart in an exemplary embodiment shows the process of determining the quality of each frame of audio in the original audio data in step S350.
[0061] Figure 5 A flowchart illustrating an audio anomaly detection method as another exemplary embodiment of this application;
[0062] Figure 6 A block diagram illustrating an audio anomaly detection system as an exemplary embodiment of this application;
[0063] Figure 7 A block diagram illustrating an audio anomaly detection system as an exemplary embodiment of this application;
[0064] Figure 8 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0065] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0066] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0067] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0068] Please see Figure 1 , Figure 1The flowchart illustrates an exemplary embodiment of the present application of an audio quality determination method. This audio quality determination method is used to determine audio quality. If there is an audio quality abnormality, the location of the audio abnormality can be determined based on the audio data of the corresponding frame of the abnormality.
[0069] like Figure 1 As shown in an exemplary embodiment of this application, the audio quality determination method includes at least steps S110 to S150, which are described in detail below:
[0070] Step S110. Obtain enhanced audio data and first system parameters;
[0071] It should be noted that the first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth.
[0072] Step S120. Determine the amount of audio data played per unit time in the enhanced audio data based on the number of first audio channels, the number of first samples, and the number of first sample bits;
[0073] Specifically, the product of the first audio channel number, the first sample number, and the first sample bit depth is the amount of audio data played per unit time in the enhanced audio data.
[0074] Step S130. Based on the first sampling frequency, determine the playback duration of each frame of audio data in the enhanced audio data;
[0075] Specifically, the reciprocal of the first sampling frequency is the playback duration of each frame of audio data in the enhanced audio data.
[0076] Step S140. Read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data;
[0077] Step S150. Within the playback duration of each frame of audio data in the enhanced audio data, determine the quality of each frame of audio in the enhanced audio data based on the amount of audio data played per unit time in the enhanced audio data.
[0078] It should be noted that the quality of each audio frame includes silence and distortion.
[0079] Please see Figure 2 , Figure 2 for Figure 1 The flowchart in an exemplary embodiment shows the process of determining the quality of each frame of audio in the enhanced audio data in step S150.
[0080] like Figure 2 As shown in an exemplary embodiment of this application, Figure 1 In the illustrated embodiment, the process of determining the quality of each frame of audio in the enhanced audio data in step S150 includes steps S210 to S240, which are described in detail below:
[0081] Step S210. Within the playback duration of each frame of audio data, compare the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data with 0;
[0082] Step S220. If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the enhanced audio data is 0, the quality of the corresponding frame of audio data in the enhanced audio data is determined to be silent.
[0083] Step S230. Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, obtain the first number of times that the amount of audio data played in consecutive unit time of each frame of audio data is greater than the preset data amount threshold within the playback duration of each frame of audio data.
[0084] It should be noted that the first number of times the amount of audio data played in each frame of audio data within a unit of time exceeds the preset data amount threshold refers to the number of consecutive times the amount of audio data played in each frame of audio data within a unit of time exceeds the preset data amount threshold.
[0085] Step S240. If the first count is greater than the preset first count threshold, the quality of the corresponding frame audio in the enhanced audio data is determined to be distorted.
[0086] The preset threshold for the first count can be set by the user, and will not be elaborated on here.
[0087] like Figure 3 As shown, in another exemplary embodiment of this application, the audio quality determination method further includes steps S310 to S350, which are described in detail below:
[0088] Step S310. Obtain raw audio data and second system parameters;
[0089] It should be noted that the second system parameters are the parameters of the sampling system that samples the original audio data. The second system parameters include the second sampling frequency, the second number of audio channels, the second number of samples, and the second sampling bit depth.
[0090] Step S320. Determine the amount of audio data played per unit time in the original audio data based on the second number of audio channels, the second number of samples, and the second number of sampling bits;
[0091] Specifically, the product of the number of second audio channels, the number of second samples, and the number of second sample bits is the amount of audio data played per unit time in the original audio data;
[0092] Step S330. Based on the second sampling frequency, determine the playback duration of each frame of audio data in the original audio data;
[0093] Specifically, the reciprocal of the second sampling frequency is the playback duration of each frame of audio data in the original audio data.
[0094] Step S340. Read the original audio data according to the amount of audio data played per unit time in the original audio data;
[0095] Step S350. Within the playback duration of each frame of audio data in the original audio data, determine the quality of each frame of audio in the original audio data based on the amount of audio data played per unit time in the original audio data.
[0096] It should be noted that the quality of each audio frame includes silence and distortion.
[0097] Please see Figure 4 , Figure 4 for Figure 3 The flowchart in an exemplary embodiment shows the process of determining the quality of each frame of audio in the original audio data in step S350.
[0098] like Figure 4 As shown in an exemplary embodiment of this application, Figure 3 In the illustrated embodiment, the process of determining the quality of each frame of audio in the original audio data in step S350 includes steps S410 to S440, which are described in detail below:
[0099] Step S410. Within the playback duration of each frame of audio data, compare the amount of audio data played in each unit time of each frame of audio data in the original audio data with 0;
[0100] Step S420. If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the original audio data is 0, the quality of the corresponding frame of audio data in the original audio data is determined to be silent.
[0101] Step S430. Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the original audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, obtain the second number of times that the amount of audio data played in consecutive unit time of each frame of audio data is greater than the preset data amount threshold within the playback duration of each frame of audio data.
[0102] It should be noted that the second number of times the amount of audio data played in each frame of audio data within a unit time period exceeds the preset data amount threshold refers to the number of consecutive times the amount of audio data played in each frame of audio data within a unit time period exceeds the preset data amount threshold.
[0103] Step S450. If the second count is greater than the preset second count threshold, the quality of the corresponding frame audio in the original audio data is determined to be distorted.
[0104] The preset threshold for the second count can be set by the user, and will not be elaborated on here.
[0105] Please see Figure 5 , Figure 5 The flowchart illustrates an audio anomaly detection method as an exemplary embodiment of this application.
[0106] like Figure 5 As shown in an exemplary embodiment of this application, the audio anomaly detection method includes at least steps S510 to S560, which are described in detail below:
[0107] Step S510. Obtain enhanced audio data and first system parameters;
[0108] It should be noted that the first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth.
[0109] Step S520. Determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sample bits;
[0110] Specifically, the product of the first audio channel number, the first sample number, and the first sample bit depth is the amount of audio data played per unit time in the enhanced audio data.
[0111] Step S530. Based on the first sampling frequency, determine the playback duration of each frame of audio data in the enhanced audio data;
[0112] Specifically, the reciprocal of the first sampling frequency is the playback duration of each frame of audio data in the enhanced audio data.
[0113] Step S540. Read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data;
[0114] Step S550. Within the playback duration of each frame of audio data in the enhanced audio data, determine the quality of each frame of audio in the enhanced audio data based on the amount of audio data played per unit time in the enhanced audio data.
[0115] It should be noted that the quality of each audio frame includes silence and distortion.
[0116] Step S560. If the audio quality in the enhanced audio data is mute or distorted, determine the corresponding frame audio data as the audio anomaly location.
[0117] In one specific embodiment, the audio anomaly detection method comprises the following steps:
[0118] The audio receiving device receives enhanced audio data and first system parameters. The first system parameters are the parameters of the sampling system for sampling the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include a first sampling frequency, a first number of audio channels, a first number of samples, and a first number of sampling bits.
[0119] Multiplying the number of first audio channels, the number of first samples, and the number of first sample bits yields the amount of audio data played per unit time in the enhanced audio data.
[0120] Based on the first sampling frequency, the reciprocal of the first sampling frequency is determined to obtain the playback duration of each frame of audio data in the enhanced audio data;
[0121] The enhanced audio data is read according to the amount of audio data played per unit time in the enhanced audio data;
[0122] Within the playback duration of each frame of audio data, the amount of audio data played in each unit of time in each frame of enhanced audio data is compared with 0.
[0123] If the amount of audio data played in each unit of time in each frame of audio data within the playback duration of each frame of audio data in the enhanced audio data is 0, the quality of the corresponding frame of audio data in the enhanced audio data will be determined as silent.
[0124] Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, obtain the first number of times that the amount of audio data played in consecutive unit time of each frame of audio data is greater than the preset data amount threshold of 20K within the playback duration of each frame of audio data.
[0125] If the number of first attempts exceeds the preset threshold of 5, the quality of the corresponding frame audio in the enhanced audio data will be determined as distorted.
[0126] If the audio quality in the enhanced audio data is mute or distorted, the corresponding frame of audio data with mute or distorted sound will be identified as the audio anomaly location.
[0127] The audio receiving device receives raw audio data and second system parameters. The second system parameters are the parameters of the sampling system that samples the raw audio data. The second system parameters include the second sampling frequency, the second number of audio channels, the second number of samples, and the second sampling bit depth.
[0128] Multiply the number of second audio channels, the number of second samples, and the number of second sample bits together to obtain the amount of audio data played per unit time in the original audio data;
[0129] Based on the second sampling frequency, the reciprocal of the second sampling frequency is determined to obtain the playback duration of each frame of audio data in the original audio data;
[0130] Read the original audio data according to the amount of audio data played per unit time in the original audio data;
[0131] Within the playback duration of each frame of audio data, the amount of audio data played in each unit of time in each frame of the original audio data is compared with 0.
[0132] If the amount of audio data played in each unit of time in each frame of audio data within the playback duration of each frame of audio data in the original audio data is 0, the quality of the corresponding frame of audio data in the original audio data is determined to be silent.
[0133] Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the original audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, obtain the second number of times that the amount of audio data played in consecutive unit time of each frame of audio data within the playback duration of each frame of audio data is greater than the preset data amount threshold of 20K.
[0134] If the second count exceeds the preset second count threshold of 5 times, the quality of the corresponding frame audio in the original audio data will be determined as distorted.
[0135] If the audio quality in the original audio data is silent or distorted, the corresponding frame of audio data is identified as the audio anomaly location.
[0136] Please see Figure 6 This application also provides an audio quality determination system M600, which includes:
[0137] The M610 acquisition module is used to acquire enhanced audio data and first system parameters;
[0138] It should be noted that the first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth.
[0139] The first determining module M620 is used to determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits.
[0140] The second determining module M630 is used to determine the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency;
[0141] The reading module M640 is used to read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data;
[0142] The third determining module M650 is used to determine the quality of each frame of audio in the enhanced audio data based on the amount of audio data played per unit time within the playback duration of each frame of audio data in the enhanced audio data. The quality of each frame of audio includes silence and distortion.
[0143] In an exemplary embodiment of this application, the third determining module includes a comparison unit, a first determining unit, an acquisition unit, and a second determining unit. The comparison unit is used to compare the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data with 0 within the playback duration of each frame of audio data. If the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data is 0 within the playback duration of each frame of audio data, the first determining unit is used to determine the quality of the corresponding frame of audio data in the enhanced audio data as silent. If the amount of audio data played in some unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0 within the playback duration of each frame of audio data, the acquisition unit is used to obtain the first number of times that the amount of audio data played in consecutive unit time of each frame of audio data is greater than a preset data amount threshold within the playback duration of each frame of audio data. If the first number is greater than the preset first number threshold, the second determining unit is used to determine the quality of the corresponding frame of audio data in the enhanced audio data as distorted.
[0144] Please see Figure 7 This application also provides an audio anomaly detection system M700, which includes:
[0145] The M710 acquisition module is used to acquire enhanced audio data and first system parameters;
[0146] It should be noted that the first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth.
[0147] The first determining module M720 is used to determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits.
[0148] The second determining module M730 is used to determine the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency;
[0149] The M740 reading module is used to read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data;
[0150] The third determining module M750 is used to determine the quality of each frame of audio in the enhanced audio data based on the amount of audio data played per unit time within the playback duration of each frame of audio data in the enhanced audio data.
[0151] It should be noted that the quality of each audio frame includes silence and distortion.
[0152] The fourth determining module M960, if the audio quality in the enhanced audio data is mute or distorted, is used to determine the corresponding frame audio data of mute or distorted as the audio abnormality location.
[0153] It should be noted that the audio quality determination system and the audio quality determination method provided in the above embodiments belong to the same concept, as do the audio anomaly detection system and the audio anomaly detection method provided in the above embodiments. The specific methods by which each module and unit performs its operations have been described in detail in the method embodiments and will not be repeated here. In practical applications of the audio quality determination system and the audio anomaly detection system provided in the above embodiments, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0154] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the audio quality determination method or audio anomaly detection method provided in the above embodiments.
[0155] Figure 8A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 8 The computer system 800 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0156] like Figure 8 As shown, the computer system 800 includes a Central Processing Unit (CPU) 801, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 802 or programs loaded from storage portion 808 into Random Access Memory (RAM) 803, such as performing the methods described in the above embodiments. The RAM 803 also stores various programs and data required for system operation. The CPU 801, ROM 802, and RAM 803 are interconnected via a bus 804. An Input / Output (I / O) interface 1005 is also connected to the bus 804.
[0157] The following components are connected to I / O interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to I / O interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 810 as needed so that computer programs read from it can be installed into storage section 808 as needed.
[0158] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 809, and / or installed from removable medium 811. When the computer program is executed by central processing unit (CPU) 801, it performs various functions defined in the system of this application.
[0159] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may be sampled in various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0160] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0161] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0162] Another aspect of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer's processor, causes the computer to perform the audio quality determination method or audio anomaly detection method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.
[0163] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the audio quality determination method or audio anomaly detection method provided in the various embodiments described above.
[0164] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A method for determining audio quality, characterized in that, The audio quality determination method includes: The enhanced audio data and the first system parameters are obtained. The first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth. The amount of audio data played per unit time in the enhanced audio data is determined based on the first number of audio channels, the first number of samples, and the first number of sampling bits. Based on the first sampling frequency, the playback duration of each frame of audio data in the enhanced audio data is determined; The enhanced audio data is read according to the amount of audio data played per unit time in the enhanced audio data; Within the playback duration of each frame of audio data in the enhanced audio data, the amount of audio data played in each unit of time in each frame of audio data in the enhanced audio data is compared with 0. If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the enhanced audio data is 0, the quality of the corresponding frame of audio data in the enhanced audio data is determined to be silent. Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, the first number of times the amount of audio data played in consecutive unit time of each frame of audio data within the playback duration of each frame of audio data is greater than a preset data amount threshold is obtained. If the first count is greater than the preset first count threshold, the quality of the corresponding frame audio in the enhanced audio data will be determined as distorted.
2. The audio quality determination method according to claim 1, characterized in that, The audio quality determination method further includes: Acquire raw audio data and second system parameters. The second system parameters are the parameters of the sampling system that samples the raw audio data. The second system parameters include the second sampling frequency, the second number of audio channels, the second number of samples, and the second sampling bit depth. The amount of audio data played per unit time in the original audio data is determined based on the second number of audio channels, the second number of samples, and the second number of sampling bits. Based on the second sampling frequency, the playback duration of each frame of audio data in the original audio data is determined; The original audio data is read according to the amount of audio data played per unit time in the original audio data; Within the playback duration of each frame of audio data in the original audio data, the quality of each frame of audio data is determined based on the amount of audio data played per unit time in the original audio data. The quality of each frame of audio data includes silence and distortion.
3. The audio quality determination method according to claim 2, characterized in that, Determining the quality of each frame of audio in the raw audio data includes: Within the playback duration of each frame of audio data, the amount of audio data played in each unit time of each frame of audio data in the original audio data is compared with 0. If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the original audio data is 0, the quality of the corresponding frame of audio data in the original audio data is determined to be silent. Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the original audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, obtain the second number of times that the amount of audio data played in consecutive unit time of each frame of audio data within the playback duration of each frame of audio data is greater than a preset data amount threshold. If the second count is greater than the preset second count threshold, the quality of the corresponding frame audio in the original audio data is determined to be distorted.
4. An audio anomaly detection method, characterized in that, The audio anomaly detection method includes: The enhanced audio data and the first system parameters are obtained. The first system parameters are the parameters of the sampling system that samples the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include the first sampling frequency, the first number of audio channels, the first number of samples, and the first sampling bit depth. The amount of audio data played per unit time in the enhanced audio data is determined based on the first number of audio channels, the first number of samples, and the first number of sampling bits. Based on the first sampling frequency, the playback duration of each frame of audio data in the enhanced audio data is determined; The enhanced audio data is read according to the amount of audio data played per unit time in the enhanced audio data; Within the playback duration of each frame of audio data in the enhanced audio data, the amount of audio data played in each unit of time in each frame of audio data in the enhanced audio data is compared with 0. If the amount of audio data played in each unit time of each frame of audio data within the playback duration of each frame of audio data in the enhanced audio data is 0, the quality of the corresponding frame of audio data in the enhanced audio data is determined to be silent. Within the playback duration of each frame of audio data, if the amount of audio data played in part of the unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0, the first number of times the amount of audio data played in consecutive unit time of each frame of audio data within the playback duration of each frame of audio data is greater than a preset data amount threshold is obtained. If the first number of times is greater than the preset threshold for the first number of times, the quality of the corresponding frame audio in the enhanced audio data will be determined as distorted. If the audio quality in the enhanced audio data is mute or distorted, the corresponding frame of audio data that is mute or distorted is identified as an audio anomaly location.
5. An audio quality determination system, characterized in that, The audio quality determination system includes: The acquisition module is used to acquire enhanced audio data and first system parameters. The first system parameters are the parameters of the sampling system for sampling the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include a first sampling frequency, a first number of audio channels, a first number of samples, and a first number of sampling bits. The first determining module is used to determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits. The second determining module is used to determine the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency; The reading module is used to read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data; The third determining module is used to compare the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data with 0 within the playback duration of each frame of audio data; if the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data is 0 within the playback duration of each frame of audio data, the quality of the corresponding frame of audio data in the enhanced audio data is determined to be silent; if the amount of audio data played in some unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0 within the playback duration of each frame of audio data, the first number of times the amount of audio data played in consecutive unit time of each frame of audio data in the playback duration of each frame of audio data is greater than a preset data amount threshold; if the first number is greater than a preset first number threshold, the quality of the corresponding frame of audio in the enhanced audio data is determined to be distorted.
6. An audio anomaly detection system, characterized in that, The audio anomaly detection system includes: The acquisition module is used to acquire enhanced audio data and first system parameters. The first system parameters are the parameters of the sampling system for sampling the enhanced audio data obtained after speech enhancement of the original audio data. The first system parameters include a first sampling frequency, a first number of audio channels, a first number of samples, and a first number of sampling bits. The first determining module is used to determine the amount of audio data played per unit time in the enhanced audio data based on the first number of audio channels, the first number of samples, and the first number of sampling bits. The second determining module is used to determine the playback duration of each frame of audio data in the enhanced audio data based on the first sampling frequency; The reading module is used to read the enhanced audio data according to the amount of audio data played per unit time in the enhanced audio data; The third determining module is used to compare the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data with 0 within the playback duration of each frame of audio data; if the amount of audio data played in each unit time of each frame of audio data in the enhanced audio data is 0 within the playback duration of each frame of audio data, the quality of the corresponding frame of audio data in the enhanced audio data is determined to be silent; if the amount of audio data played in some unit time of each frame of audio data in the enhanced audio data is greater than 0 or the amount of audio data played in all unit time of each frame of audio data is greater than 0 within the playback duration of each frame of audio data, the first number of times the amount of audio data played in consecutive unit time of each frame of audio data in the playback duration of each frame of audio data is greater than a preset data amount threshold; if the first number is greater than a preset first number threshold, the quality of the corresponding frame of audio in the enhanced audio data is determined to be distorted. The fourth determining module, if the audio quality in the enhanced audio data is mute or distorted, is used to determine the corresponding frame audio data of the mute or distorted audio as an audio anomaly location.
7. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1-4.
8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the method as described in any one of claims 1-4.