Front-end noise filtering method, system, device and medium based on artificial intelligence
By separating audio and video and identifying noise on the customer service robot side, only valid audio data is sent to the backend server, the resource waste caused by noise when unmanned is solved, and the voice recognition efficiency and transmission efficiency are improved.
Patent Information
- Application Number
- CN202111106155.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-22
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-09-22
AI Technical Summary
The noise collected by the customer service robot without being on duty leads to wasting backend server resources and consumes a large amount of GPU resources for voice recognition.
Audio and video separation, noise recognition and filtering are performed on the customer service robot side, and only valid audio data is sent to the background server for voice-to-text processing to reduce invalid noise data transmission.
Reduces the resource consumption and traffic pressure of the backend server, improves the voice recognition efficiency and transmission efficiency, and reduces the bandwidth usage.
Smart Images

Figure CN113851121B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence speech recognition, and in particular to an artificial intelligence-based front-end noise filtering method, system, computer equipment and storage medium. Background Art
[0002] In recent years, speech recognition technology has made significant progress. It is foreseeable that speech recognition technology will enter various fields such as industry, home appliances, communications, automotive electronics, medical care, home services, consumer electronics, etc. The fields involved in speech recognition technology include: signal processing, pattern recognition, probability theory and information theory, vocalization mechanism and hearing mechanism, artificial intelligence, etc.
[0003] One of the specific application scenarios of speech recognition technology is customer service robots, which are intelligent robots deployed in business halls, service halls and other places. Existing customer service robots perform speech recognition on the collected voices, but when unattended, the microphone of the customer service robot is always on standby. Once the sound is collected, it performs speech recognition. In most scenarios, what is collected is noise. If this part of the noise is transmitted to the background for speech recognition, it will cause a huge waste of background resources and consume a lot of GPU resources for speech recognition. Summary of the invention
[0004] The embodiments of the present invention provide a front-end noise filtering method, system, computer device and storage medium based on artificial intelligence, aiming to solve the problem in the prior art that when a customer service robot is unattended, in most scenarios, the microphone of the customer service robot collects only noise. If this part of the noise is transmitted to a background server for voice recognition, it will cause a huge waste of resources of the background server and consume a large amount of GPU resources.
[0005] In a first aspect, an embodiment of the present invention provides a front-end noise filtering method based on artificial intelligence, which is applied to a customer service robot, and includes:
[0006] Acquire the collected audio and video data, and perform audio and video separation on the audio and video data to obtain audio data;
[0007] Acquire time domain graph data of the audio data, and acquire noise data in the time domain graph data according to a preset noise recognition condition;
[0008] Deleting the noise data from the audio data to obtain filtered audio data;
[0009] Obtaining the audio duration of the filtered audio data and the original audio duration of the audio data, and obtaining a value of the effective audio duration ratio according to the quotient of the audio duration and the original audio duration;
[0010] If it is determined that the effective audio duration ratio exceeds a preset ratio threshold, the audio data is sent to a backend server as data to be identified;
[0011] If it is determined that the effective audio duration ratio does not exceed the ratio threshold, the filtered audio data is sent to the backend server as data to be identified;
[0012] If it is determined that a text recognition result corresponding to the data to be recognized is received from the backend server, obtaining text keywords of the text recognition result; and
[0013] Reply data corresponding to the text keyword is obtained in a local knowledge base, and the reply data is converted into reply voice data and played.
[0014] In a second aspect, an embodiment of the present invention provides a front-end noise filtering method based on artificial intelligence, which is applied to a back-end server and includes:
[0015] The speech recognition model to be trained is trained according to the training set to obtain a speech recognition model;
[0016] If it is determined that the data to be recognized is received, performing speech recognition on the data to be recognized by using the speech recognition model to obtain a text recognition result; and
[0017] The text recognition result is sent to the customer service robot.
[0018] In a third aspect, an embodiment of the present invention provides an artificial intelligence-based front-end noise filtering system, which includes a customer service robot and a back-end server, wherein the customer service robot is used to execute the artificial intelligence-based front-end noise filtering method described in the first aspect, and the back-end server is used to execute the artificial intelligence-based front-end noise filtering method described in the second aspect.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the front-end noise filtering method based on artificial intelligence described in the first aspect is implemented, or the front-end noise filtering method based on artificial intelligence described in the second aspect is implemented.
[0020] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the artificial intelligence-based front-end noise filtering method described in the first aspect, or when executed, the processor executes the artificial intelligence-based front-end noise filtering method described in the second aspect.
[0021] The embodiments of the present invention provide a front-end noise filtering method, system, computer device and storage medium based on artificial intelligence. The customer service robot can collect the user's current voice and perform pre-processing such as noise recognition on it, and send the voice data after effective denoising to the background server for voice-to-text processing. Since the pre-processing work such as voice is placed on the front-end of the customer service robot, the background server only needs to focus on the processing work of voice-to-text. The customer service robot intercepts some invalid requests at the front end, which also reduces the traffic and the pressure on the background server. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0023] Figure 1 A schematic diagram of an application scenario of the front-end noise filtering method based on artificial intelligence provided by an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of a flow chart of a front-end noise filtering method based on artificial intelligence provided by an embodiment of the present invention;
[0025] Figure 3 Another schematic diagram of a flow chart of a front-end noise filtering method based on artificial intelligence provided by an embodiment of the present invention;
[0026] Figure 4 A schematic block diagram of an artificial intelligence-based front-end noise filtering system provided by an embodiment of the present invention;
[0027] Figure 5 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0030] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0031] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0032] In order to more clearly understand the technical solution of this application, the following is a detailed introduction to the execution entities involved. This application describes the technical solution with the customer service robot and the backend server as the execution entities.
[0033] Customer service robots are intelligent robots deployed in business halls and service halls. They can communicate with users who come to consult or handle affairs through voice communication to act as intelligent customer service. The customer service robot can collect the user's current voice and perform pre-processing such as noise recognition on it, and send the voice data after effective denoising to the backend server for voice-to-text processing. Since the pre-processing work such as voice is placed on the front end of the customer service robot, the backend server only needs to focus on the processing work of voice-to-text. The customer service robot intercepts some invalid requests at the front end, which also reduces traffic and pressure on the backend server.
[0034] The backend server can receive the pre-processed voice data uploaded by the customer service robot and perform voice-to-text processing, and then send the recognized text results to the customer service robot.
[0035] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the front-end noise filtering method based on artificial intelligence provided by an embodiment of the present invention; Figure 2 A flow chart of an artificial intelligence-based front-end noise filtering method provided in an embodiment of the present invention is provided. The artificial intelligence-based front-end noise filtering method is applied to a customer service robot, and the method is executed by application software installed in the customer service robot.
[0036] like Figure 2 As shown, the method includes steps S101 to S108.
[0037] S101, acquiring collected audio and video data, and performing audio and video separation on the audio and video data to obtain audio data.
[0038] In this embodiment, since the customer service robot is provided with a camera and a microphone, during the communication between the user and the customer service robot, the camera and microphone of the customer service robot can be simultaneously activated to collect audio and video data during the communication with the user, so that the audio and video data can be used as the basic data for subsequent intelligent conversations. At this time, the audio stream and video stream in the audio and video can be extracted through some common audio and video separation tools (such as a video format converter), and the audio stream can be used as the audio data.
[0039] During specific implementation, an audio and video collection trigger condition and an audio and video collection end condition can be set on the customer service robot. A more specific audio and video collection trigger condition is that if the customer service robot continuously collects external sounds in a preset first time period value (for example, the first time period value is set to any time value within 1-2s, such as 1.5s), it triggers the generation of an audio and video collection instruction, and controls the camera and microphone to start at the same time to collect audio and video data during communication with the user. A more specific audio and video collection end condition is that if the customer service robot continuously fails to collect external sounds in a preset second time period value (for example, the second time period value is set to any time value within 1-2s, such as 1.5s), it triggers the generation of an audio and video stop collection instruction, and controls the camera and microphone to stop collecting audio and video data at the same time.
[0040] In step S101, the audio and video data collection is started when the audio and video collection trigger condition is met, and the audio and video data collected during the period of time when the audio and video collection end condition is met and the collection is stopped is used as the collected audio and video data.
[0041] S102: Acquire time domain graph data of the audio data, and acquire noise data in the time domain graph data according to a preset noise recognition condition.
[0042] In this embodiment, after the audio and video data collected by the customer service robot are separated from the audio and video to obtain the audio data, the time domain graph data corresponding to the audio data can be obtained (that is, the sound signal waveform graph corresponding to the audio data, in which the voice signal is directly represented by its time waveform in the time domain graph, and some important characteristics of the voice signal can be seen by observing the sound waveform of the voice signal, such as the amplitude of the waveform represents the loudness of the sound, the larger the amplitude, the louder the sound, and the smaller the amplitude, the smaller the sound). Since the loudness of noise is generally small, in the time domain graph data of the audio data, the part corresponding to the loudness less than the preset loudness threshold in the waveform graph can be extracted, and the audio data corresponding to the part of the waveform can be regarded as noise data. That is, the noise identification condition is set to the sound data corresponding to the waveform range in the time domain graph data where the sound loudness is less than the preset loudness threshold.
[0043] S103: Delete the noise data from the audio data to obtain filtered audio data.
[0044] In this embodiment, after the noise data is obtained according to the time domain graph data of the audio data, the noise data is deleted from the audio data to obtain filtered audio data that does not include the noise data. Through this noise removal, valid audio data can be extracted, and the background server avoids processing invalid noise when processing the speech-to-text, thereby improving the efficiency of speech recognition.
[0045] S104. Obtain an audio duration of the filtered audio data and an original audio duration of the audio data, and obtain a value of a ratio of effective audio duration according to a quotient of the audio duration and the original audio duration.
[0046] In this embodiment, since the original audio duration and the original audio time range corresponding to the original audio data can be obtained from the audio data, the time range of the filtered audio data can be obtained after removing the time range corresponding to the noise data in the original audio time range, and the audio duration of the filtered audio data can be obtained by counting the time length corresponding to the time range of the filtered audio data. After the audio duration of the filtered audio data and the original audio duration of the audio data are known, for example, the audio duration of the filtered audio data is recorded as T1 and the original audio duration of the audio data is recorded as T, and the effective audio duration ratio is obtained by the quotient of the audio duration and the original audio duration (the effective audio duration ratio is calculated by the following formula: effective audio duration ratio = audio duration T1 of the filtered audio data / original audio duration T of the audio data).
[0047] S105: If it is determined that the effective audio duration ratio exceeds a preset ratio threshold, the audio data is sent to a background server as data to be identified.
[0048] In this embodiment, after obtaining the effective audio duration ratio, it can be determined whether the effective audio duration ratio exceeds the preset ratio threshold. If it is determined that the effective audio duration ratio exceeds the preset ratio threshold (for example, the ratio threshold is set to 90%), it means that the effective audio duration in the audio data is longer and the invalid noise audio duration is shorter. At this time, the original audio data can be directly sent to the background server for speech recognition.
[0049] More specifically, the audio data may be preprocessed to update the audio data, and the updated audio data may be sent to the data to be recognized. When the audio data is preprocessed, sampling, pre-emphasis, windowing, and framing are mainly performed to obtain preprocessed data corresponding to the audio data to be sent to the backend server as the data to be recognized. In this way, there is no need to perform speech preprocessing in the backend server, but the focus is on the extraction process of speech-to-text.
[0050] In one embodiment, sending the audio data as data to be recognized to a background server includes:
[0051] Calling a pre-stored sampling period to sample the audio data to obtain a current discrete speech signal;
[0052] Calling a pre-stored first-order FIR high-pass digital filter to pre-emphasize the current discrete voice signal to obtain a current pre-emphasized voice signal;
[0053] Calling a pre-stored Hamming window to perform windowing on the current pre-emphasized voice information to obtain windowed voice data;
[0054] The pre-stored frame shift and frame length are called to frame the windowed voice data to obtain pre-processed voice data, and the pre-processed voice data is sent to the background server as data to be recognized.
[0055] In this embodiment, before the audio data is digitally processed, the audio data (the audio data is denoted as s(t)) is first sampled at a sampling period T and discretized into s(n).
[0056] Then, when the pre-stored first-order FIR high-pass digital filter is called, the first-order FIR high-pass digital filter is a first-order non-recursive high-pass digital filter, and its transfer function is as follows (1):
[0057] H(z)=1-az -1 (1)
[0058] In specific implementation, the value of a is 0.98. For example, assuming that the sampling value of the current discrete speech signal at time n is x(n), the sampling value corresponding to x(n) in the current pre-emphasized speech signal after pre-emphasis processing is y(n)=x(n)-ax(n-1).
[0059] Afterwards, the function of the called Hamming window is as follows (2):
[0060]
[0061] The current pre-emphasized voice information is windowed by a Hamming window, and the obtained windowed voice data can be expressed as: Q(n)=y(n)*ω(n).
[0062] Finally, when the pre-stored frame shift and frame length are called to frame the windowed speech data, for example, the time domain signal corresponding to the windowed speech data is x(l), and the nth frame of speech data in the pre-processed speech data after the windowing and framing process is xn(m), and xn(m) satisfies formula (3):
[0063] xn(m)=ω(n)*x(n+m),0≤m≤N-1 (3)
[0064] Wherein, n=0, 1T, 2T, ..., N is the frame length, T is the frame shift, and ω(n) is the function of the Hamming window.
[0065] By preprocessing the audio data at the front-end customer service robot, it can be effectively used for subsequent sound parameter extraction and speech recognition and other processing.
[0066] S106: If it is determined that the effective audio duration ratio does not exceed the ratio threshold, the filtered audio data is sent to a background server as data to be identified.
[0067] In this embodiment, if it is determined that the effective audio duration ratio does not exceed the ratio threshold, it means that the effective audio duration in the audio data is short and the invalid noise audio duration is long. At this time, in order to improve the speech recognition efficiency in the background server, the filtered audio data can be sent to the background server as the data to be recognized for speech recognition. Compared with the complete audio data, the noise data is effectively deleted, which not only reduces the size of the data transmitted to the background server and reduces the bandwidth occupation, but also improves the transmission efficiency, so that the speech recognition can be started faster to obtain the corresponding recognition results.
[0068] S107: If it is determined that a text recognition result corresponding to the data to be recognized is received from the backend server, obtain text keywords of the text recognition result.
[0069] In this embodiment, after the customer service robot has sent the data to be recognized to the backend server, the backend server performs speech recognition (i.e., speech-to-text conversion) on the data to be recognized, and after the speech recognition is completed, the corresponding text recognition result can be obtained. At this time, the customer service robot can obtain text keywords related to the text recognition result by performing word segmentation and keyword extraction locally.
[0070] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0071] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0072] S108. Acquire reply data corresponding to the text keyword in a local knowledge base, convert the reply data into reply voice data, and play the reply voice data.
[0073] In this embodiment, since the customer service robot has a knowledge base stored locally, the corresponding reply data can be retrieved from the local knowledge base according to the text keywords corresponding to the voice data, and the reply data can be converted into reply voice data and played in time, thereby achieving timely dialogue with the user.
[0074] In one embodiment, step S108 includes:
[0075] A target semantic vector having the greatest similarity with the word vector of the text keyword in the knowledge base is obtained, and reply data corresponding to the target semantic vector is obtained.
[0076] Among them, when obtaining the reply data corresponding to the text keyword in the local knowledge base, the vector similarity between the semantic vector of each answer data in the knowledge base and the word vector corresponding to the text keyword is calculated, and the target semantic vector with the most similarity value between the vector similarity between the word vector corresponding to the text keyword and the reply data corresponding to the target semantic vector is obtained, so that the reply data is used as the local best reply data of the voice data and played for the user to listen. It can be seen that this method realizes efficient front-end preprocessing of voice data and fast back-end recognition.
[0077] In one embodiment, after step S108, the method further includes:
[0078] Obtaining a context text recognition result set corresponding to the text recognition result, and if it is determined that the context text recognition result set contains a target context text recognition result that is the same text as the text recognition result, and if it is determined that the total number of the target context text recognition results exceeds a preset text cumulative number threshold, sending the text recognition result, the text keywords and the reply data to a backend server;
[0079] Receive update reply data corresponding to the text recognition result sent by the background server, convert the update reply data into update reply voice data and play it.
[0080] In this embodiment, after the customer service robot completes the on-site voice response to the audio data, the user may not be satisfied with the current response data. In this case, the user generally asks the same question again. If the customer service robot still uses the local knowledge base to retrieve the answer, the same answer that the user does not agree with may be retrieved multiple times, which reduces the efficiency of the user in obtaining a more accurate answer.
[0081] At this time, it can be determined whether the text recognition result corresponding to the audio data appears multiple times in the context text recognition result set corresponding to the text recognition result. It can be understood that there is a target context text recognition result with the same text as the text recognition result in the context text recognition result set (generally, the last 2-4 sentences in the context text recognition result set are the same as the text recognition result), and it is determined that the total number of target context text recognition results exceeds the preset text cumulative number threshold. At this time, the text recognition result and the reply data can be sent to the background server. In this way, the background server can immediately match more accurate reply data in an extended library with more data than the local knowledge base of the customer service robot according to the text recognition result. In this way, once the vector similarity between the semantic vector of one or more answer data retrieved and the word vector of the text keyword exceeds the vector similarity between the previous target semantic vector and the word vector of the text keyword, the semantic vector with the maximum vector similarity between the word vector of the text keyword is selected from the semantic vectors of the currently retrieved one or more answer data as the current target semantic vector, and the updated reply data corresponding to the current target semantic vector is obtained and sent to the customer service robot in a timely manner.
[0082] When the customer service robot receives the updated reply data corresponding to the text recognition result sent by the background server, it converts the updated reply data into updated reply voice data and plays it, thereby obtaining more accurate reply data in time. This application can also be applied to smart city scenarios, thereby promoting the construction of smart cities.
[0083] Then the technical solution is described from the perspective of the backend server.
[0084] See also Figure 1 and Figure 3 , Figure 3 Another flow chart of the artificial intelligence-based front-end noise filtering method provided in an embodiment of the present invention is provided. The artificial intelligence-based front-end noise filtering method is applied in a background server, and the method is executed by application software installed in the background server.
[0085] like Figure 3 As shown, the method includes steps S201 to S203.
[0086] S201. Train the speech recognition model to be trained according to the training set to obtain a speech recognition model.
[0087] In this embodiment, the background server can first perform model training on the speech recognition model to be trained (such as the speech recognition model to be trained is a hidden Markov model to be trained) according to the training set to obtain a hidden Markov model (i.e., a speech recognition model) that can perform speech recognition based on the preprocessed speech data. The hidden Markov model can accurately convert speech into text.
[0088] S202: If it is determined that the data to be recognized is received, speech recognition is performed on the data to be recognized by using the speech recognition model to obtain a text recognition result.
[0089] In this embodiment, once the backend server receives the data to be recognized sent by the customer service robot, it immediately performs voice recognition, and performs voice recognition on the data to be recognized through the voice recognition model to obtain a text recognition result. Since the backend server is more focused on the voice-to-text process, no other preprocessing is required, so voice recognition can be performed more efficiently.
[0090] S203: Send the text recognition result to the customer service robot.
[0091] In this embodiment, after the text recognition result corresponding to the data to be recognized is obtained in the background server, it is promptly sent to the customer service robot that previously sent the data to be recognized, so that the voice recognition process can be completed quickly.
[0092] In one embodiment, after step S203, the method further includes:
[0093] If it is determined that the text recognition result, text keywords and reply data are received, the word vector of the text keyword is obtained;
[0094] Obtaining a current target semantic vector having a maximum vector similarity with a word vector of the text keyword in the extended library;
[0095] Obtain updated reply data corresponding to the current target semantic vector, and send the updated reply data to the customer service robot.
[0096] In this embodiment, in the background server, more accurate response data can be matched immediately in an extended library having more data than the local knowledge base of the customer service robot according to the text recognition result. Once the vector similarity between the semantic vector of one or more answer data retrieved and the word vector of the text keyword exceeds the vector similarity between the previous target semantic vector and the word vector of the text keyword, the semantic vector with the maximum vector similarity with the word vector of the text keyword is selected from the semantic vectors of the one or more answer data currently retrieved as the current target semantic vector, and the updated reply data corresponding to the current target semantic vector is obtained and sent to the customer service robot in a timely manner.
[0097] In one embodiment, after step S203, the method further includes:
[0098] If it is determined that a model update instruction is detected, the updated speech recognition model is stored to replace the stored speech recognition model.
[0099] In this embodiment, when the model is updated in the background server, there is no need to notify the customer service robot. The updated speech recognition model is directly stored locally in the background server to replace the stored speech recognition model, thereby achieving a faster model update process and making the update and upgrade of the model in the background server more convenient.
[0100] This method enables the customer service robot to collect the user's current voice and perform pre-processing such as noise recognition on it, and then send the voice data after effective denoising to the background server for voice-to-text processing. The background server only needs to focus on the voice-to-text processing work. The customer service robot intercepts some invalid requests at the front end, which also reduces traffic and the pressure on the background server.
[0101] The embodiment of the present invention also provides a front-end noise filtering system based on artificial intelligence, which includes a customer service robot and a back-end server. The customer service robot is used to execute the embodiment recorded in steps S101 to S108 of the front-end noise filtering method based on artificial intelligence and execute related extended embodiments. The back-end server is used to execute the embodiment recorded in steps S201 to S203 of the front-end noise filtering method based on artificial intelligence and execute related extended embodiments. Specifically, please refer to Figure 4 , Figure 4 It is a schematic block diagram of an artificial intelligence-based front-end noise filtering system provided by an embodiment of the present invention.
[0102] like Figure 4 As shown, the artificial intelligence-based front-end noise filtering system 10 includes: a customer service robot 100 and a backend server 200 .
[0103] Among them, Figure 4 As shown, the customer service robot 100 includes an audio and video separation unit 101, a noise data acquisition unit 102, a filtered audio data acquisition unit 103, an effective proportion acquisition unit 104, a first sending unit 105, a second sending unit 106, a text recognition unit 107, and a reply data acquisition unit 108.
[0104] The audio and video separation unit 101 is used to obtain the collected audio and video data, and perform audio and video separation on the audio and video data to obtain audio data.
[0105] In this embodiment, since the customer service robot is provided with a camera and a microphone, during the communication between the user and the customer service robot, the camera and microphone of the customer service robot can be simultaneously activated to collect audio and video data during the communication with the user, so that the audio and video data can be used as the basic data for subsequent intelligent conversations. At this time, the audio stream and video stream in the audio and video can be extracted through some common audio and video separation tools (such as a video format converter), and the audio stream can be used as the audio data.
[0106] During specific implementation, an audio and video collection trigger condition and an audio and video collection end condition can be set on the customer service robot. A more specific audio and video collection trigger condition is that if the customer service robot continuously collects external sounds in a preset first time period value (for example, the first time period value is set to any time value within 1-2s, such as 1.5s), it triggers the generation of an audio and video collection instruction, and controls the camera and microphone to start at the same time to collect audio and video data during communication with the user. A more specific audio and video collection end condition is that if the customer service robot continuously fails to collect external sounds in a preset second time period value (for example, the second time period value is set to any time value within 1-2s, such as 1.5s), it triggers the generation of an audio and video stop collection instruction, and controls the camera and microphone to stop collecting audio and video data at the same time.
[0107] In the audio and video separation unit 101, the audio and video data collection can be started when the audio and video collection trigger condition is met, and the audio and video data collected during the time period when the audio and video collection end condition is met and the collection is stopped is used as the collected audio and video data.
[0108] The noise data acquisition unit 102 is used to acquire the time domain image data of the audio data, and acquire the noise data in the time domain image data according to a preset noise recognition condition.
[0109] In this embodiment, after the audio and video data collected by the customer service robot are separated from the audio and video to obtain the audio data, the time domain graph data corresponding to the audio data can be obtained (that is, the sound signal waveform graph corresponding to the audio data, in which the voice signal is directly represented by its time waveform in the time domain graph, and some important characteristics of the voice signal can be seen by observing the sound waveform of the voice signal, such as the amplitude of the waveform represents the loudness of the sound, the larger the amplitude, the louder the sound, and the smaller the amplitude, the smaller the sound). Since the loudness of noise is generally small, in the time domain graph data of the audio data, the part corresponding to the loudness less than the preset loudness threshold in the waveform graph can be extracted, and the audio data corresponding to the part of the waveform can be regarded as noise data. That is, the noise identification condition is set to the sound data corresponding to the waveform range in the time domain graph data where the sound loudness is less than the preset loudness threshold.
[0110] The filtered audio data acquisition unit 103 is used to delete the noise data from the audio data to obtain filtered audio data.
[0111] In this embodiment, after the noise data is obtained according to the time domain graph data of the audio data, the noise data is deleted from the audio data to obtain filtered audio data that does not include the noise data. Through this noise removal, valid audio data can be extracted, and the background server avoids processing invalid noise when processing the speech-to-text, thereby improving the efficiency of speech recognition.
[0112] The effective proportion acquisition unit 104 is used to acquire the audio duration of the filtered audio data and the original audio duration of the audio data, and acquire the effective audio duration proportion value according to the quotient of the audio duration and the original audio duration.
[0113] In this embodiment, since the original audio duration and the original audio time range corresponding to the original audio data can be obtained from the audio data, the time range of the filtered audio data can be obtained after removing the time range corresponding to the noise data in the original audio time range, and the audio duration of the filtered audio data can be obtained by counting the time length corresponding to the time range of the filtered audio data. After the audio duration of the filtered audio data and the original audio duration of the audio data are known, for example, the audio duration of the filtered audio data is recorded as T1 and the original audio duration of the audio data is recorded as T, and the effective audio duration ratio is obtained by the quotient of the audio duration and the original audio duration (the effective audio duration ratio is calculated by the following formula: effective audio duration ratio = audio duration T1 of the filtered audio data / original audio duration T of the audio data).
[0114] The first sending unit 105 is configured to send the audio data as data to be identified to a background server if it is determined that the effective audio duration ratio exceeds a preset ratio threshold.
[0115] In this embodiment, after obtaining the effective audio duration ratio, it can be determined whether the effective audio duration ratio exceeds the preset ratio threshold. If it is determined that the effective audio duration ratio exceeds the preset ratio threshold (for example, the ratio threshold is set to 90%), it means that the effective audio duration in the audio data is longer and the invalid noise audio duration is shorter. At this time, the original audio data can be directly sent to the background server for speech recognition.
[0116] More specifically, the audio data may be preprocessed to update the audio data, and the updated audio data may be sent to the data to be recognized. When the audio data is preprocessed, sampling, pre-emphasis, windowing, and framing are mainly performed to obtain preprocessed data corresponding to the audio data to be sent to the backend server as the data to be recognized. In this way, there is no need to perform speech preprocessing in the backend server, but the focus is on the extraction process of speech-to-text.
[0117] In one embodiment, the first sending unit 105 includes:
[0118] A sampling unit, used to call a pre-stored sampling period to sample the audio data to obtain a current discrete speech signal;
[0119] A pre-emphasis unit, used for calling a pre-stored first-order FIR high-pass digital filter to pre-emphasize the current discrete voice signal to obtain a current pre-emphasized voice signal;
[0120] A windowing unit, used for calling a pre-stored Hamming window to perform windowing on the current pre-emphasized voice information to obtain windowed voice data;
[0121] The framing unit is used to call the pre-stored frame shift and frame length to frame the windowed voice data to obtain pre-processed voice data, and send the pre-processed voice data as data to be recognized to the background server.
[0122] In this embodiment, before the audio data is digitally processed, the audio data (the audio data is denoted as s(t)) is first sampled at a sampling period T and discretized into s(n).
[0123] Then, when the pre-stored first-order FIR high-pass digital filter is called, the first-order FIR high-pass digital filter is a first-order non-recursive high-pass digital filter, and its transfer function is as shown in the above formula (1). In specific implementation, the value of a is 0.98. For example, let the sampling value of the current discrete speech signal at time n be x(n), and the sampling value corresponding to x(n) in the current pre-emphasized speech signal after pre-emphasis processing is y(n)=x(n)-ax(n-1).
[0124] Afterwards, the function of the called Hamming window is as shown in the above formula (2). The current pre-emphasized speech information is windowed by the Hamming window, and the obtained windowed speech data can be expressed as: Q(n)=y(n)*ω(n).
[0125] Finally, when the pre-stored frame shift and frame length are called to frame the windowed speech data, for example, the time domain signal corresponding to the windowed speech data is x(l), the nth frame of speech data in the pre-processed speech data after windowing and framing is xn(m), and xn(m) satisfies the above formula (3).
[0126] By preprocessing the audio data at the front-end customer service robot, it can be effectively used for subsequent sound parameter extraction and speech recognition and other processing.
[0127] The second sending unit 106 is configured to send the filtered audio data as data to be identified to a background server if it is determined that the effective audio duration ratio does not exceed the ratio threshold.
[0128] In this embodiment, if it is determined that the effective audio duration ratio does not exceed the ratio threshold, it means that the effective audio duration in the audio data is short and the invalid noise audio duration is long. At this time, in order to improve the speech recognition efficiency in the background server, the filtered audio data can be sent to the background server as the data to be recognized for speech recognition. Compared with the complete audio data, the noise data is effectively deleted, which not only reduces the size of the data transmitted to the background server and reduces the bandwidth occupation, but also improves the transmission efficiency, so that the speech recognition can be started faster to obtain the corresponding recognition results.
[0129] The text recognition unit 107 is configured to obtain text keywords of the text recognition result if it is determined that a text recognition result corresponding to the data to be recognized is received from the background server.
[0130] In this embodiment, after the customer service robot has sent the data to be recognized to the backend server, the backend server performs speech recognition (i.e., speech-to-text conversion) on the data to be recognized, and after the speech recognition is completed, the corresponding text recognition result can be obtained. At this time, the customer service robot can obtain text keywords related to the text recognition result by performing word segmentation and keyword extraction locally.
[0131] The reply data acquisition unit 108 is used to acquire reply data corresponding to the text keyword in a local knowledge base, convert the reply data into reply voice data, and play the reply voice data.
[0132] In this embodiment, since the customer service robot has a knowledge base stored locally, the corresponding reply data can be retrieved from the local knowledge base according to the text keywords corresponding to the voice data, and the reply data can be converted into reply voice data and played in time, thereby achieving timely dialogue with the user.
[0133] In one embodiment, the reply data acquisition unit 108 is further configured to:
[0134] A target semantic vector having the greatest similarity with the word vector of the text keyword in the knowledge base is obtained, and reply data corresponding to the target semantic vector is obtained.
[0135] Among them, when obtaining the reply data corresponding to the text keyword in the local knowledge base, the vector similarity between the semantic vector of each answer data in the knowledge base and the word vector corresponding to the text keyword is calculated, and the target semantic vector with the most similarity value between the vector similarity between the word vector corresponding to the text keyword and the reply data corresponding to the target semantic vector is obtained, so that the reply data is used as the local best reply data of the voice data and played for the user to listen. It can be seen that this method realizes efficient front-end preprocessing of voice data and fast back-end recognition.
[0136] In one embodiment, the customer service robot 100 further includes:
[0137] A context acquisition unit is used to acquire a context text recognition result set corresponding to the text recognition result, and if it is determined that there is a target context text recognition result with the same text as the text recognition result in the context text recognition result set, and it is determined that the total number of the target context text recognition results exceeds a preset text cumulative number threshold, the text recognition result, the text keywords and the reply data are sent to a backend server;
[0138] The reply data updating unit is used to receive the updated reply data corresponding to the text recognition result sent by the background server, convert the updated reply data into updated reply voice data and play it.
[0139] In this embodiment, after the customer service robot completes the on-site voice response to the audio data, the user may not be satisfied with the current response data. In this case, the user generally asks the same question again. If the customer service robot still uses the local knowledge base to retrieve the answer, the same answer that the user does not agree with may be retrieved multiple times, which reduces the efficiency of the user in obtaining a more accurate answer.
[0140] At this time, it can be determined whether the text recognition result corresponding to the audio data appears multiple times in the context text recognition result set corresponding to the text recognition result. It can be understood that there is a target context text recognition result with the same text as the text recognition result in the context text recognition result set (generally, the last 2-4 sentences in the context text recognition result set are the same as the text recognition result), and it is determined that the total number of target context text recognition results exceeds the preset text cumulative number threshold. At this time, the text recognition result and the reply data can be sent to the background server. In this way, the background server can immediately match more accurate reply data in an extended library with more data than the local knowledge base of the customer service robot according to the text recognition result. In this way, once the vector similarity between the semantic vector of one or more answer data retrieved and the word vector of the text keyword exceeds the vector similarity between the previous target semantic vector and the word vector of the text keyword, the semantic vector with the maximum vector similarity between the word vector of the text keyword is selected from the semantic vectors of the currently retrieved one or more answer data as the current target semantic vector, and the updated reply data corresponding to the current target semantic vector is obtained and sent to the customer service robot in a timely manner.
[0141] When the customer service robot receives the updated reply data corresponding to the text recognition result sent by the background server, it converts the updated reply data into updated reply voice data and plays it, thereby obtaining more accurate reply data in time. This application can also be applied to smart city scenarios, thereby promoting the construction of smart cities.
[0142] Among them, Figure 4 As shown, the backend server 200 includes a speech recognition model acquisition unit 201, a speech recognition unit 202, and a recognition result sending unit 203. The backend server can be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0143] The speech recognition model acquisition unit 201 is used to train the speech recognition model to be trained according to the training set to obtain the speech recognition model.
[0144] In this embodiment, the background server can first perform model training on the speech recognition model to be trained (such as the speech recognition model to be trained is a hidden Markov model to be trained) according to the training set to obtain a hidden Markov model (i.e., a speech recognition model) that can perform speech recognition based on the preprocessed speech data. The hidden Markov model can accurately convert speech into text.
[0145] The speech recognition unit 202 is used to perform speech recognition on the data to be recognized through the speech recognition model to obtain a text recognition result if it is determined that the data to be recognized is received.
[0146] In this embodiment, once the backend server receives the data to be recognized sent by the customer service robot, it immediately performs voice recognition, and performs voice recognition on the data to be recognized through the voice recognition model to obtain a text recognition result. Since the backend server is more focused on the voice-to-text process, no other preprocessing is required, so voice recognition can be performed more efficiently.
[0147] The recognition result sending unit 203 is used to send the text recognition result to the customer service robot.
[0148] In this embodiment, after the text recognition result corresponding to the data to be recognized is obtained in the background server, it is promptly sent to the customer service robot that previously sent the data to be recognized, so that the voice recognition process can be completed quickly.
[0149] In one embodiment, the backend server 200 further includes:
[0150] A word vector acquisition unit, configured to acquire a word vector of the text keyword if it is determined that the text recognition result, the text keyword and the reply data are received;
[0151] A current target semantic vector acquisition unit, used to acquire, from the extended library, a current target semantic vector having a maximum vector similarity with a word vector of the text keyword;
[0152] The update reply data acquisition unit is used to acquire the update reply data corresponding to the current target semantic vector and send the update reply data to the customer service robot.
[0153] In this embodiment, in the background server, more accurate response data can be matched immediately in an extended library having more data than the local knowledge base of the customer service robot according to the text recognition result. Once the vector similarity between the semantic vector of one or more answer data retrieved and the word vector of the text keyword exceeds the vector similarity between the previous target semantic vector and the word vector of the text keyword, the semantic vector with the maximum vector similarity with the word vector of the text keyword is selected from the semantic vectors of the one or more answer data currently retrieved as the current target semantic vector, and the updated reply data corresponding to the current target semantic vector is obtained and sent to the customer service robot in a timely manner.
[0154] In one embodiment, the backend server 200 further includes:
[0155] The model updating unit is used to store the updated speech recognition model to replace the stored speech recognition model if it is determined that the model updating instruction is detected.
[0156] In this embodiment, when the model is updated in the background server, there is no need to notify the customer service robot. The updated speech recognition model is directly stored locally in the background server to replace the stored speech recognition model, thereby achieving a faster model update process and making the update and upgrade of the model in the background server more convenient.
[0157] The system implements the collection of the user's current voice by the customer service robot and pre-processing such as noise recognition, and then sends the voice data after effective denoising to the background server for speech-to-text processing. The background server only needs to focus on the speech-to-text processing. The customer service robot intercepts some invalid requests at the front end, which also reduces traffic and pressure on the background server.
[0158] The above-mentioned front-end noise filtering system based on artificial intelligence can be implemented in the form of a computer program, which can be used in Figure 5 Runs on the computer device shown.
[0159] See also Figure 5 , Figure 5 5 is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 500 is a backend server, or a customer service robot. The backend server can be an independent backend server, or a backend server cluster composed of multiple backend servers. The customer service robot can be an intelligent robot with an intelligent operating system installed and having a communication function.
[0160] See also Figure 5 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .
[0161] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute a front-end noise filtering method based on artificial intelligence.
[0162] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .
[0163] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the front-end noise filtering method based on artificial intelligence.
[0164] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0165] The processor 502 is used to run a computer program 5032 stored in the memory to implement the artificial intelligence-based front-end noise filtering method disclosed in the embodiment of the present invention.
[0166] Those skilled in the art will understand that Figure 5 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 5 The embodiments shown are consistent and will not be described again here.
[0167] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0168] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the front-end noise filtering method based on artificial intelligence disclosed in the embodiment of the present invention is implemented.
[0169] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0170] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.
[0171] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0172] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0173] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a background server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), disk or CD-ROM and other media that can store program codes.
[0174] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A front-end noise filtering method based on artificial intelligence, applied to a customer service robot, characterized in that: include: Acquire the collected audio and video data, and perform audio and video separation on the audio and video data to obtain audio data; Acquire time domain graph data of the audio data, and acquire noise data in the time domain graph data according to a preset noise recognition condition; Deleting the noise data from the audio data to obtain filtered audio data; Obtaining the audio duration of the filtered audio data and the original audio duration of the audio data, and obtaining a value of the effective audio duration ratio according to the quotient of the audio duration and the original audio duration; If it is determined that the effective audio duration ratio exceeds a preset ratio threshold, the audio data is sent to a backend server as data to be identified; If it is determined that the effective audio duration ratio does not exceed the ratio threshold, the filtered audio data is sent to the backend server as data to be identified; If it is determined that a text recognition result corresponding to the data to be recognized is received from the backend server, obtaining text keywords of the text recognition result; and Reply data corresponding to the text keyword is obtained in a local knowledge base, and the reply data is converted into reply voice data and played.
2. The front-end noise filtering method based on artificial intelligence according to claim 1 is characterized in that: The step of sending the audio data as data to be identified to a backend server includes: Calling a pre-stored sampling period to sample the audio data to obtain a current discrete speech signal; Calling a pre-stored first-order FIR high-pass digital filter to pre-emphasize the current discrete voice signal to obtain a current pre-emphasized voice signal; Calling a pre-stored Hamming window to perform windowing on the current pre-emphasized voice information to obtain windowed voice data; The pre-stored frame shift and frame length are called to frame the windowed voice data to obtain pre-processed voice data, and the pre-processed voice data is sent to the background server as data to be recognized.
3. The front-end noise filtering method based on artificial intelligence according to claim 1 is characterized in that: After acquiring the reply data corresponding to the text keyword in the local knowledge base, converting the reply data into reply voice data and playing the reply voice data, the method further includes: Obtaining a context text recognition result set corresponding to the text recognition result, and if it is determined that the context text recognition result set contains a target context text recognition result that is the same text as the text recognition result, and if it is determined that the total number of the target context text recognition results exceeds a preset text cumulative number threshold, sending the text recognition result, the text keywords and the reply data to a backend server; Receive update reply data corresponding to the text recognition result sent by the background server, convert the update reply data into update reply voice data and play it.
4. The front-end noise filtering method based on artificial intelligence according to claim 1 is characterized in that: The step of acquiring the reply data corresponding to the text keyword in the local knowledge base includes: A target semantic vector having the greatest similarity with the word vector of the text keyword in the knowledge base is obtained, and reply data corresponding to the target semantic vector is obtained.
5. A front-end noise filtering method based on artificial intelligence as claimed in claim 1, applied to a back-end server, characterized in that: include: The speech recognition model to be trained is trained according to the training set to obtain a speech recognition model; If it is determined that the data to be recognized is received, performing speech recognition on the data to be recognized by using the speech recognition model to obtain a text recognition result; and The text recognition result is sent to the customer service robot.
6. The front-end noise filtering method based on artificial intelligence according to claim 5 is characterized in that: After sending the text recognition result to the customer service robot, the method further includes: If it is determined that the text recognition result, text keywords and reply data are received, the word vector of the text keyword is obtained; Obtaining a current target semantic vector having a maximum vector similarity with a word vector of the text keyword in the extended library; Obtain updated reply data corresponding to the current target semantic vector, and send the updated reply data to the customer service robot.
7. The front-end noise filtering method based on artificial intelligence according to claim 5 is characterized in that: After sending the text recognition result to the customer service robot, the method further includes: If it is determined that a model update instruction is detected, the updated speech recognition model is stored to replace the stored speech recognition model.
8. A front-end noise filtering system based on artificial intelligence, characterized in that: Comprising a customer service robot and a backend server, the artificial intelligence-based front-end noise filtering system is used to execute the artificial intelligence-based front-end noise filtering method as described in any one of claims 1 to 7.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the artificial intelligence-based front-end noise filtering method as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to perform the artificial intelligence-based front-end noise filtering method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Detection method and device of abnormal sound
CN107742517A
Speech recognition method and device, terminal and storage medium
CN111627431A
AI-based composite voice interaction method and device, computer equipment
CN112365894A
Voice control method of air conditioner and air conditioner
CN113266933A
Voice control method, central control device, and storage medium
WO2020014899A1
