A method and device for determining time consumption of speech recognition
By automatically comparing the text information and timestamps of video frames, the speech recognition time-consuming calculation solves the problem of low evaluation efficiency and accuracy caused by manual intervention in the existing technology, and achieves efficient and accurate speech recognition time-consuming evaluation.
Patent Information
- Application Number
- CN202110379684.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-08
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-04-08
AI Technical Summary
The existing technology requires a large amount of manual intervention when evaluating speech recognition performance and display speed, resulting in a long evaluation cycle and results that are greatly affected by human factors, resulting in low efficiency.
By obtaining video frames with timestamps, comparing the text information of adjacent video frames, determining the first display time and first utterance time of the target text, calculating the speech recognition response time, reducing reliance on manual labor and improving evaluation efficiency.
It realizes automated evaluation, saves human resources, and improves the efficiency and accuracy of time-consuming evaluation of speech recognition.
Smart Images

Figure CN113225624B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method and device for determining the time consumption of speech recognition. Background Art
[0002] With the continuous advancement of artificial intelligence technology, people can interact with electronic devices through voice commands. When users interact with electronic devices with screens through voice, the electronic devices can display the content of the user's voice in text form on the screen. In this case, the recognition performance and display speed of the electronic device will greatly affect the user experience.
[0003] In order to study the voice recognition performance and display speed of products, it is usually necessary to evaluate electronic devices. The current evaluation scheme is generally through direct manual operation, that is, the human uses video analysis software to repeatedly listen to the audio in the video to determine the start and end time of the voice command, and then checks the video frame by frame to determine the time consumption of voice recognition. It requires a lot of human resources, has a long evaluation cycle, and the evaluation results are greatly affected by human factors. Summary of the invention
[0004] The embodiments of the present invention provide a method and device for determining the time consumption of speech recognition, which can reduce the reliance on manual labor, save human resources, and improve the efficiency of determining the industry to which a customer belongs while ensuring accuracy.
[0005] An embodiment of the present invention provides a method for determining speech recognition time consumption, comprising:
[0006] Acquire a video to be detected, wherein all video frames in the video to be detected have timestamps, the video to be detected includes user interactive voice, and text information is displayed on the video frame, and the text information on the video frame is obtained by performing voice recognition on voice information corresponding to the video frame in the user interactive voice;
[0007] Comparing text information in adjacent video frames to determine text difference information between adjacent video frames;
[0008] Determine a target video frame containing the target text in the video frame according to text difference information of adjacent video frames, and determine the first display time of the target text according to the timestamp of the target video frame, wherein the target video frame is the first video frame containing the target text in the video to be detected;
[0009] Extracting the user interaction voice from the video to be detected, and detecting the first utterance time of the target text in the user interaction voice;
[0010] The time consumption of the speech recognition response corresponding to the video to be detected is determined according to the first display time and the first utterance time corresponding to the same target text.
[0011] Accordingly, an embodiment of the present invention provides a device for determining speech recognition time consumption, including:
[0012] A video acquisition unit is used to acquire a video to be detected, wherein the video frames in the video to be detected are all timestamped, the video to be detected includes user interactive speech, and text information is displayed on the video frame, and the text information on the video frame is obtained by performing speech recognition on the speech information corresponding to the video frame in the user interactive speech;
[0013] A text comparison unit, used to compare text information in adjacent video frames to determine text difference information between adjacent video frames;
[0014] A first display first time determining unit, used to determine a target video frame containing a target text in the video frame according to text difference information of adjacent video frames, and determine a first display time of the target text according to a timestamp of the target video frame, wherein the target video frame is the first video frame containing the target text in the video to be detected;
[0015] A first utterance first time determining unit, used to extract the user interaction voice from the video to be detected, and detect the first utterance time of the target text in the user interaction voice;
[0016] The time consumption calculation unit is used to determine the speech recognition response time corresponding to the video to be detected according to the first display time and the first utterance time corresponding to the same target text.
[0017] In an optional example, the text comparison unit includes a text acquisition unit and a text comparison subunit, and the text acquisition unit can be used to perform text detection on the video frame to acquire text information in each video frame;
[0018] The text comparison subunit may be used to calculate text similarity between text information in adjacent video frames, where the text similarity is text difference information between adjacent video frames.
[0019] In an optional example, the target text of the embodiment of the present invention includes the first word and the last word in the user interaction speech, and the target video frame includes the first target first word frame containing the first word in the video to be detected, and the first target last word frame containing the last word;
[0020] The first display first time determination unit may include a target frame determination unit and a first time determination unit, wherein the target frame determination unit is configured to determine a target first word frame and a target last word frame in the video frame according to text similarity between the adjacent video frames and an association relationship satisfied between a target first word frame and a target last word frame of the user interaction speech and the adjacent video frames;
[0021] The first time determination unit is used to determine the first display time of the first word of the first word in the user interaction speech according to the timestamp of the target first word frame, and determine the first display time of the last word of the last word in the user interaction speech according to the timestamp of the target last word frame;
[0022] The first utterance first time determination unit is used to extract the user interaction voice from the video to be detected, and detect the utterance time of the first word in the user interaction voice and the utterance time of the last word in the user interaction voice.
[0023] In an optional example, the target frame determination unit may be used to determine, based on the text similarity between the adjacent video frames, a video frame whose text similarity with a previous video frame is less than a first similarity threshold and whose text similarity with a subsequent video frame is not less than the first similarity threshold, as a target first-word frame of the video to be detected;
[0024] Based on the text similarity between the adjacent video frames, a video frame whose text similarity with the previous video frame is not less than a first similarity threshold and whose text similarity with the next video frame is not less than a second similarity threshold is determined as the target last word frame of the video to be detected, and the second similarity threshold is not less than the first similarity threshold, wherein, in the video frame between the target first word frame and the target last word frame, the text similarity of adjacent video frames is not less than the first similarity threshold.
[0025] In an optional example, a specific display area is provided in the video frame of the embodiment of the present invention, and the specific display area is used to display the text information obtained by performing voice recognition on the user interaction voice;
[0026] The text acquisition unit may be used to determine a regional display image of the specific display area in the video frame;
[0027] Text detection is performed on the area display image of each video frame to obtain text information displayed in the specific display area of each video frame.
[0028] In an optional example, the target frame determination unit may be used to perform speech recognition on the video to be detected before determining the first display time of the tail word of the tail word in the user interaction speech according to the timestamp of the target tail word frame to obtain the user interaction text of the user interaction speech;
[0029] Acquire the text information displayed in the target last word frame;
[0030] If the text information is the same as the user interaction text, the target tail word frame is determined to be a correct target tail word frame, and the step of determining the first display time of the tail word of the tail word in the user interaction speech according to the timestamp of the target tail word frame is continued;
[0031] If the text information is different from the user interaction text, the step of determining the first display time of the tail word in the user interaction speech according to the timestamp of the target tail word frame is not executed, and the process returns to the step of determining the target first word frame including the first word of the user interaction speech and the target tail word frame including the tail word of the user interaction speech in the video frame according to the result of the text detection and the text similarity between the adjacent video frames.
[0032] In an optional example, the first utterance first time determining unit may be used to extract user interaction voice from the video to be detected, and perform voice endpoint detection on the user interaction voice;
[0033] Determining the effective speech area of the user interaction speech according to the result of the speech endpoint detection;
[0034] Based on the start time and the end time of the effective voice area, the first word utterance time and the last word utterance time of the user interaction voice are determined.
[0035] In an optional example, the first occurrence first time determination unit includes a voice acquisition subunit and a second time determination unit, and the voice acquisition subunit can be used to acquire a reference voice corresponding to the user interaction voice, and the voice content in the reference voice is the same as the voice content in the user interaction voice;
[0036] Extracting user interaction voice from the video to be detected;
[0037] The second time determination unit may be configured to determine the utterance time of the first word and the utterance time of the last word of the user interaction speech according to the reference speech and the user interaction speech.
[0038] In an optional example, the second time determination unit may be used to determine a speech acquisition starting point in the user interaction speech, and select a speech of a preset duration as a candidate speech from the speech acquisition starting point, wherein the duration of the candidate speech is equal to the duration of the reference speech;
[0039] Calculating the speech similarity between the reference speech and the candidate speech;
[0040] After the current speech acquisition starting point in the user interaction speech, selecting a new speech acquisition starting point;
[0041] Return to the step of selecting a voice of a preset duration as a candidate voice from the voice acquisition starting point until the end point of the user interaction voice participates in the calculation of the voice similarity;
[0042] Determine a candidate voice with the highest voice similarity to the reference voice as the target voice;
[0043] The first word utterance time and the last word utterance time of the user interaction speech are determined according to the starting position and the ending position of the target speech in the user interaction speech.
[0044] Correspondingly, an embodiment of the present invention also provides an electronic device, including a memory and a processor; the memory stores an application, and the processor is used to run the application in the memory to execute the steps in any one of the speech recognition time determination methods provided in the embodiments of the present invention.
[0045] In addition, an embodiment of the present invention further provides a storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps in any one of the speech recognition time-consuming determination methods provided in the embodiments of the present invention.
[0046] By adopting the scheme of the embodiment of the present invention, a video to be detected can be obtained, text information in adjacent video frames can be compared, text difference information between adjacent video frames can be determined, and a target video frame containing a target text in the video frame can be determined according to the text difference information of the adjacent video frames, and the first display time of the target text can be determined according to the timestamp of the target video frame, and the user interaction voice can be extracted from the video to be detected, and the first utterance time of the target text in the user interaction voice can be detected. According to the first display time and the first utterance time corresponding to the same target text, the speech recognition response time corresponding to the video to be detected can be determined; because in the embodiment of the present invention, by comparing the difference in text information in adjacent video frames, the target video frame in which the target text is first displayed in the video to be detected can be determined according to the obtained text difference information, and then the first utterance time of the target text can be determined from the video to be detected, and based on the first display time and the first utterance time corresponding to the target text, the speech recognition response time corresponding to the video to be detected can be calculated, therefore, in the process of determining the speech recognition response time, the reliance on manual labor can be reduced, human resources can be saved, and the efficiency of determining the speech recognition response time can be improved on the basis of ensuring accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0048] Figure 1 Schematic diagram of a scenario of a method for determining time consumption for speech recognition provided by an embodiment of the present invention;
[0049] Figure 2 is a flow chart of a method for determining time consumption for speech recognition provided by an embodiment of the present invention;
[0050] Figure 3 is another flow chart of a method for determining time consumption of speech recognition provided by an embodiment of the present invention;
[0051] Figure 4 is a schematic diagram of a page when a voice recognition response is provided in an embodiment of the present invention;
[0052] Figure 5 is another flow chart of the method for determining the time consumption of speech recognition provided by an embodiment of the present invention;
[0053] Figure 6 It is a structural schematic diagram of a device for determining time consumption for speech recognition provided by an embodiment of the present invention;
[0054] Figure 7is another structural schematic diagram of a device for determining time consumption for speech recognition provided by an embodiment of the present invention;
[0055] Figure 8 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0056] 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 only 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0057] The embodiment of the present invention provides a method and device for determining speech recognition time consumption. Specifically, the embodiment of the present invention provides a method for determining speech recognition time consumption applicable to a device for determining speech recognition time consumption, and the device for determining speech recognition time consumption can be integrated in an electronic device.
[0058] The electronic device can be a terminal or other device, including but not limited to a mobile terminal and a fixed terminal. For example, a mobile terminal includes but is not limited to a smart phone, a smart watch, a tablet computer, a laptop computer, a smart car-mounted terminal, etc., wherein a fixed terminal includes but is not limited to a desktop computer, a smart TV, etc.
[0059] The electronic device can also be a server or other device. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, 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, CDN, as well as big data and artificial intelligence platforms, but is not limited to these.
[0060] The method for determining the time consumption of speech recognition according to the embodiment of the present invention may be implemented by a server, or may be implemented by a terminal and a server together.
[0061] The method is described below by taking the method of determining the time consumption of speech recognition implemented by a terminal and a server together as an example.
[0062] like Figure 1 As shown, the speech recognition time-consuming determination system provided by the embodiment of the present invention includes a terminal 10 and a server 20, etc.; the terminal 10 and the server 20 are connected via a network, for example, via a wired or wireless network connection, etc., wherein the terminal 10 can exist as a terminal for a user to send customer data to be analyzed to the server 20.
[0063] The terminal 10 may be a terminal for generating and / or uploading the video to be detected, and is used to send the video to be detected to the server 20 .
[0064] Server 20 can be used to obtain a video to be detected, in which all video frames in the video to be detected are provided with a timestamp, compare text information in adjacent video frames, determine text difference information between adjacent video frames, determine a target video frame containing a target text in the video frame based on the text difference information of the adjacent video frames, determine the first display time of the target text based on the timestamp of the target video frame, extract user interaction speech from the video to be detected, detect the first utterance time of the target text in the user interaction speech, and determine the speech recognition response time corresponding to the video to be detected based on the first display time and the first utterance time corresponding to the same target text.
[0065] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0066] The embodiment of the present invention will be described from the perspective of a device for determining the time consumption for speech recognition, and the device for determining the time consumption for speech recognition can be specifically integrated in a server or a terminal.
[0067] like Figure 2 As shown, the specific process of the method for determining the time consumption of speech recognition in this embodiment can be as follows:
[0068] 201. Obtain a video to be detected, wherein all video frames in the video to be detected have timestamps, the video to be detected includes user interactive voice, and text information is displayed on the video frame. The text information on the video frame is obtained by performing voice recognition on voice information corresponding to the video frame in the user interactive voice.
[0069] The video to be detected may be in any video format that can contain image display and voice audio, and the present invention does not limit this.
[0070] In actual application, the video to be detected may be generated by performing screen recording and voice collection on a device for which the time consumption of voice recognition response needs to be determined. Optionally, before step 201, the embodiment of the present invention may further include:
[0071] Collect user interaction voice and perform voice recognition on the user interaction voice;
[0072] In the display area, the text information obtained by the user's interactive voice through voice recognition is displayed in real time;
[0073] In the process of collecting the user interaction voice, obtaining the display image of the display area as the video frame of the video to be detected;
[0074] The user interaction voice is obtained as the audio information of the video to be detected, and the video to be detected is obtained based on the displayed image and the audio information.
[0075] Among them, the duration of user interaction voice can be greater than the duration of the user's actual sound. For example, when collecting user interaction voice, collection begins when there is no voice in the surrounding environment. After confirming that the collection has started, the user begins voice interaction, and so on.
[0076] It is understandable that the text information displayed on each video frame in the video to be detected is obtained by the electronic device performing voice recognition on the collected user interaction voice in real time and then presenting the recognized text information on the display area of the electronic device. As the content of the user interaction voice changes, the text information displayed on the video frame will also change.
[0077] Among them, the text information on the video frame can be obtained through any speech recognition technology such as Automatic Speech Recognition (ASR). The key technologies of speech technology include automatic speech recognition technology (ASR), speech synthesis technology (TTS) and voiceprint recognition technology. Allowing computers to listen, see, speak and feel is the development direction of human-computer interaction in the future, among which speech has become one of the most promising human-computer interaction methods in the future.
[0078] 202. Compare text information in adjacent video frames to determine text difference information between adjacent video frames.
[0079] In the embodiment of the present invention, since the text information on the video frame is obtained by real-time speech recognition of the user interaction speech, the text information on adjacent video frames may also be different as the speech content in the user interaction speech changes. For example, if the user interaction speech content is "The weather is great today", the third video frame of the video to be detected may show "Today is great", and the fifth video frame may show "Today is great".
[0080] Specifically, text images may be generated by intercepting regions with text in adjacent video frames, and the similarity of the text images may be compared; or text information in each video frame may be first obtained, and then similarity calculation may be performed on the text information to obtain text difference information between adjacent video frames. That is, step 202 may include:
[0081] Perform text detection on video frames to obtain text information in each video frame;
[0082] The text similarity between the text information in adjacent video frames is calculated, and the text similarity is the text difference information between adjacent video frames.
[0083] Among them, text detection on video frames can be achieved through an efficient and accurate scene text (EAST) model, or through optical character recognition (OCR) and other technologies that can achieve text recognition. The embodiment of the present invention does not limit the implementation method of text detection.
[0084] When calculating the text similarity between text information, it can be achieved by calculating the literal distance, semantic matching, calculating the distance between text vectors, or a text matching model based on deep learning.
[0085] In actual application, the product or device can display information associated with the text information of the response in real time while performing voice recognition response based on the collected user interaction voice. For example, Figure 4 As shown, the voice content of the user interaction voice is "The weather is great today", and the display page includes not only the text information recognized based on the user interaction voice, but also similar text information related to the text information. In order to avoid interference of similar text information in the process of calculating text similarity, a specific display area can be optionally set in the product or electronic device for displaying text information, and similar text information can be displayed in other display areas outside the specific display area.
[0086] Specifically, a specific display area is set in the video frame, and the specific display area is used to display text information obtained by performing voice recognition on the user interaction voice. The step of "performing text detection on the video frame to obtain text information in each video frame" includes:
[0087] Determine a regional display image of a specific display area in a video frame;
[0088] Text detection is performed on the regional display image of each video frame to obtain text information displayed in a specific display area in each video frame.
[0089] Among them, when determining the regional display image of a specific display area in a video frame, the regional display image can be obtained by only capturing the specific display area in the video; or after obtaining the video frame, the area other than the specific display area in the video frame can be shielded or blurred, and the processed video frame can be used as the regional display image, and so on.
[0090] 203. Determine a target video frame containing the target text in the video frames according to text difference information of adjacent video frames, determine the first display time of the target text according to the timestamp of the target video frame, and the target video frame is the first video frame containing the target text in the video to be detected.
[0091] The target text may be text preset by a developer. For example, the developer may preset a keyword as the target text. When the keyword is detected in a video frame, the first video frame containing the keyword is used as the target video frame.
[0092] In actual application, since the voices used by users or tests are diverse, if a certain keyword is fixedly set, it may result in no keyword appearing until the user interaction voice is played. Therefore, instead of selecting the target text based on the specific voice content, the content at a certain position in the user interaction voice can be used as the target text, which can enhance the applicability of the embodiments of the present invention.
[0093] Optional, such as Figure 3 As shown, the target text includes the first word and the last word in the user interactive speech, the target video frame includes the first target first word frame containing the first word in the video to be detected, and the first target last word frame containing the last word, and the step of "determining the target video frame containing the target text in the video frame according to the text difference information of adjacent video frames, and determining the first display time of the target text according to the timestamp of the target video frame" may include:
[0094] Determine a target first word frame and / or target last word frame in the video frame according to text similarity between adjacent video frames and an association relationship satisfied between a target first word frame and / or target last word frame of the user interactive speech and adjacent video frames;
[0095] The first display time of the first word of the first word in the user interaction speech is determined according to the timestamp of the target first word frame, and the first display time of the last word of the last word in the user interaction speech is determined according to the timestamp of the target last word frame.
[0096] The association relationship may be set by the developer according to a specific usage scenario. For example, the step of "determining a target first word frame and / or target last word frame in a video frame according to the text similarity between adjacent video frames and the association relationship satisfied between a target first word frame and / or target last word frame of the user interactive speech and adjacent video frames" may include:
[0097] Based on the text similarity between adjacent video frames, a video frame whose text similarity with a previous video frame is less than a first similarity threshold and whose text similarity with a subsequent video frame is not less than the first similarity threshold is determined as a target first-word frame of the video to be detected; and / or,
[0098] Based on the text similarity between adjacent video frames, a video frame whose text similarity with a previous video frame is not less than a first similarity threshold and whose text similarity with a subsequent video frame is not less than a second similarity threshold is determined as a target last word frame of the video to be detected, and the second similarity threshold is not less than the first similarity threshold, wherein, in the video frames between the target first word frame and the target last word frame, the text similarity of adjacent video frames is not less than the first similarity threshold.
[0099] In some cases, after the user interaction voice ends, the text information in the video frame of the video to be detected may disappear immediately, or only similar text information may be presented. At this time, to determine the target first word frame and the target last word frame, the following steps can be performed: if there is text information in the currently detected video frame, there is no text information in the next video frame of the currently detected video frame, and the text similarity between the currently detected video frame and the previous video frame is greater than a preset second threshold, then the currently detected video frame is determined as the target last word frame.
[0100] The first similarity threshold and the second similarity threshold can be set by the technicians according to the text recognition algorithm, text similarity comparison algorithm, etc., which are actually used. For example, after calculating the text similarity between text information in adjacent video frames, the text similarity can be binarized, and the text similarity between adjacent video frames greater than a certain threshold is modified to 1, and the text similarity between adjacent video frames not greater than a certain threshold is modified to 0. When determining the target first word frame and the target last word frame, it can be specifically:
[0101] Based on the text similarity between adjacent video frames, a video frame whose text similarity with the previous video frame is 0 and whose text similarity with the next video frame is 1 is determined as the target first word frame of the video to be detected;
[0102] Based on the text similarity between adjacent video frames, a video frame whose text similarity with the previous video frame is 1 and whose text similarity with the next video frame is 1 is determined as the target last word frame of the video to be detected.
[0103] The association relationship can be set by technicians according to actual conditions, and the embodiments of the present invention do not limit this.
[0104] In one example, in order to ensure the accuracy of the determined target tail word frame, the text content in the target tail word frame can be compared with the content in the user interaction voice. If they are completely consistent, the video frame is taken as the correct target tail word frame. That is, before the step of "determining the first display time of the tail word in the user interaction voice according to the timestamp of the target tail word frame", it also includes:
[0105] Perform speech recognition on the video to be detected to obtain the user interaction text of the user interaction speech;
[0106] Get the text information displayed in the target last word frame;
[0107] If the text information is the same as the user interaction text, determine that the target end word frame is the correct target end word frame, and continue to perform the step of determining the first display time of the end word of the end word in the user interaction speech according to the timestamp of the target end word frame;
[0108] If the text information is different from the user interaction text, the step of determining the first display time of the tail word in the user interaction speech according to the timestamp of the target tail word frame is not executed, and the method returns to execute the step of determining the target first word frame and the target last word frame in the video frame according to the text similarity between adjacent video frames and the association relationship between the target first word frame and the target last word frame of the user interaction speech and the adjacent video frames.
[0109] Among them, the content of the user interaction text is the same as the content in the user interaction voice, or the content of the user interaction text may be different from the content in the user interaction voice, but the voice recognition method for obtaining the user interaction text should be the same as the voice recognition method for obtaining the text information in the video frame, or the voice recognition method for the user interaction text may also be different from the voice recognition method for obtaining the text information in the video frame, as long as the correctness of the voice recognition can be ensured.
[0110] 204. Extract user interaction speech from the video to be detected, and detect the first utterance time of the target text in the user interaction speech.
[0111] In one example, if the target text is a keyword, the time when the keyword first appears in the user interaction speech is detected as the first utterance time.
[0112] In another example, if the target text is the first word and the last word in the user interaction speech, step 204 may include:
[0113] Extract user interaction speech from the video to be detected, and detect the utterance time of the first word in the user interaction speech and the utterance time of the last word in the user interaction speech.
[0114] Among them, in daily application scenarios, or in the case of unsupervised file testing, audio can be extracted from the original video, and the audio can be segmented using voice activity detection technology (VAD) to separate the effective voice area, and the segmentation result can naturally output the start time and end time of the effective voice area as the first word utterance time and the last word utterance time of the user interaction voice. That is, the step of "extracting user interaction voice from the video to be detected, detecting the first word utterance time in the user interaction voice, and the last word utterance time in the user interaction voice" can include:
[0115] Extract user interaction voice from the video to be detected, and perform voice endpoint detection on the user interaction voice;
[0116] Determine the effective speech area of the user's interactive speech based on the result of speech endpoint detection;
[0117] Based on the start time and end time of the effective voice area, the first word utterance time and the last word utterance time of the user interaction voice are determined.
[0118] Among them, VAD, also known as voice activity detection and silence suppression, can identify silent periods from audio signals. Common VAD methods include: distinguishing based on the combination of time domain and frequency domain of sound, distinguishing based on signal-to-noise ratio, using models such as HMM (Hidden Markov Model), MLP (Multi-layer Neural Network), DNN (Deep Neural Networks), etc.
[0119] In another example, most evaluation behaviors are now performed under supervised file conditions. For supervised file conditions, the step of "extracting user interaction speech from the video to be tested, detecting the time of utterance of the first word in the user interaction speech, and the time of utterance of the last word in the user interaction speech" includes:
[0120] Obtaining a reference voice corresponding to the user interaction voice, where the voice content in the reference voice is the same as the voice content in the user interaction voice;
[0121] Extracting user interaction voice from the video to be detected;
[0122] According to the reference voice and the user interaction voice, the utterance time of the first word and the utterance time of the last word of the user interaction voice are determined.
[0123] The supervision file refers to the original audio of the evaluation instructions during the test. Generally, there is no original audio when the evaluation text is read aloud by a person; if the recording of the evaluation text is played back, there is original audio, that is, the supervision file.
[0124] Specifically, the step of “determining the first word utterance time and the last word utterance time of the user interaction speech according to the reference speech and the user interaction speech” may include:
[0125] Determine a speech acquisition starting point in the user interaction speech, and select a speech of a preset duration as a candidate speech from the speech acquisition starting point, wherein the duration of the candidate speech is equal to the duration of the reference speech;
[0126] Calculate the phonetic similarity between the reference speech and the candidate speech;
[0127] After the current speech acquisition starting point in the user interaction speech, a new speech acquisition starting point is selected;
[0128] Return to the step of selecting a voice of a preset duration as a candidate voice from the voice acquisition start point until the end point of the user interaction voice participates in the voice similarity calculation;
[0129] Determine the candidate speech with the highest speech similarity to the reference speech as the target speech;
[0130] According to the starting position and the ending position of the target speech in the user interaction speech, the first word utterance time and the last word utterance time of the user interaction speech are determined.
[0131] The calculation of speech similarity can be performed by calculating the Pearson correlation coefficient. The Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient (PPMCC), is used to measure the correlation (linear correlation) between two variables X and Y, and its value is between -1 and 1.
[0132] Alternatively, the voice similarity may be calculated by extracting feature values from the reference voice and the user interaction voice, and then calculating the similarity based on the feature values. The method for calculating the voice similarity is not limited, and the embodiments of the present invention do not limit this.
[0133] 205. Determine the speech recognition response time corresponding to the video to be detected according to the first display time and the first utterance time corresponding to the same target text.
[0134] If the target text is the first word and the last word in the user interactive speech, in the process of determining the speech recognition response time corresponding to the video to be detected, the time taken to calculate can be calculated based on the first display time of the first word, the first utterance time of the first word, the first display time of the last word, and the utterance time of the last word, that is, step 205 may include:
[0135] Determine the time taken for the first voice recognition response according to the time when the first character is first displayed and the time when the first character is pronounced, and / or determine the time taken for the second voice recognition response according to the time when the last character is first displayed and the time when the last character is pronounced;
[0136] Based on the first voice recognition response time and / or the second voice recognition response time, the voice recognition response time corresponding to the video to be detected is determined.
[0137] It can be seen from the above that the embodiments of the present invention can reduce the reliance on manual work in the process of determining the time consumption of speech recognition response, save human resources, and improve the efficiency of determining the time consumption of speech recognition response while ensuring accuracy.
[0138] The method described in the above embodiments is further described in detail below with examples.
[0139] In this embodiment, the Figure 1 The system and supervisory documentation are described.
[0140] like Figure 5 As shown, the method for determining the time consumption of speech recognition in this embodiment may have the following specific process:
[0141] 301. The terminal detects a voice signal, collects interactive voice, and generates a video to be detected.
[0142] Among them, after the terminal generates the video to be detected, it can directly send the video to be detected to the server, or store the video to be detected in a preset storage area for videos to be detected. When the server needs to perform a time-consuming evaluation task of speech recognition response, it can directly obtain it from the storage area.
[0143] The storage area may be set in a memory of the terminal, or in a server, or in another cloud server independent of the terminal and the server, etc. This is not limited in the embodiment of the present invention.
[0144] Specifically, after detecting the voice signal, the terminal can start collecting user interaction voice, perform voice recognition on the user interaction voice, and display the text information obtained through voice recognition of the user interaction voice in real time in the display area. In the process of collecting the user interaction voice, the display image of the display area is obtained as the video frame of the video to be detected, and the user interaction voice is obtained as the audio information of the video to be detected, and the video to be detected is obtained based on the display image and the audio information.
[0145] In another example, the terminal may also be in the voice collection state all the time, instead of starting to collect voice signals only after detecting the voice signal.
[0146] 302. The server obtains the video to be detected.
[0147] It is understandable that the server may actively obtain the video to be detected from the storage area, or may receive the video to be detected sent by the terminal.
[0148] 303. The server compares text information in adjacent video frames to determine text similarity between adjacent video frames.
[0149] The text similarity between adjacent video frames can be obtained by first acquiring the text information in each video frame and then calculating the similarity of the text information. That is, step 303 may include:
[0150] Perform text detection on video frames to obtain text information in each video frame;
[0151] Compute the text similarity between text information in adjacent video frames.
[0152] When calculating the text similarity between text information, it can be achieved by calculating literal distance, semantic matching, calculating the distance between text vectors, or a text matching model based on deep learning, etc., and the embodiments of the present invention are not limited to this.
[0153] 304. Determine a target first word frame and a target last word frame in the video frame according to text similarity between adjacent video frames and an association relationship between a target first word frame and a target last word frame of the user interaction speech and adjacent video frames.
[0154] After calculating the text similarity between text information in adjacent video frames, the text similarity can be binarized, and the text similarity between adjacent video frames greater than a certain threshold is modified to 1, and the text similarity between adjacent video frames not greater than a certain threshold is modified to 0. When determining the target first word frame and the target last word frame, it can be specifically:
[0155] Based on the text similarity between adjacent video frames, a video frame whose text similarity with the previous video frame is 0 and whose text similarity with the next video frame is 1 is determined as the target first word frame of the video to be detected;
[0156] Based on the text similarity between adjacent video frames, a video frame whose text similarity with the previous video frame is 1 and whose text similarity with the next video frame is 1 is determined as the target last word frame of the video to be detected.
[0157] 305. Determine the first display time of the first word in the user interaction speech according to the timestamp of the target first word frame, and determine the first display time of the last word in the user interaction speech according to the timestamp of the target last word frame.
[0158] When determining the first display time of the first word and the first display time of the last word, if the time information carried by the timestamp is real time information, the time in the timestamp should be converted. For example, if the time information of the timestamp of the target first word frame is n hours and m seconds, and the first word is pronounced at the kth second, the timestamp or the first word pronunciation time should be converted.
[0159] 306. Obtain a reference voice corresponding to the user interaction voice, determine a voice acquisition starting point in the user interaction voice, select a voice of a preset duration as a candidate voice starting from the voice acquisition starting point, and calculate the voice similarity between the reference voice and the candidate voice.
[0160] Among them, the duration of the candidate speech can be pre-set based on the duration of a known supervision file (reference speech), or the reference speech can be subjected to duration detection, and the duration of the candidate speech can be determined each time based on the result of the duration detection, and so on.
[0161] 307. After the current speech acquisition starting point in the user interaction speech, a new speech acquisition starting point is selected, and the process returns to the step of selecting a speech of a preset duration as a candidate speech starting from the speech acquisition starting point.
[0162] In one example, the speech acquisition starting point can be selected in sequence in the user interaction speech until the end point of the user interaction speech participates in the calculation of speech similarity and then step 308 is executed. Alternatively, after the end point of the user interaction speech participates in the calculation of speech similarity, the end point of the candidate speech is kept the same as the end point of the user interaction speech, and the duration of the candidate speech is modified until the end point of the user interaction speech participates in the calculation of speech similarity as the speech acquisition starting point, and then step 308 is executed.
[0163] 308. Determine a candidate voice with the highest voice similarity to the reference voice as the target voice, and determine the first word utterance time and the last word utterance time of the user interaction voice according to the starting position and the ending position of the target voice in the user interaction voice.
[0164] Among them, the starting position of the target speech in the user interaction speech is the position of the speech acquisition starting point of the target speech, and the ending position of the target speech in the user interaction speech can be determined according to the speech acquisition starting point of the target speech and the duration of the target speech.
[0165] 309. Determine the first voice recognition response time according to the first display time and the first utterance time of the first word, determine the second voice recognition response time according to the first display time and the utterance time of the last word, and determine the voice recognition response time corresponding to the video to be detected based on the first voice recognition response time and the second voice recognition response time.
[0166] Among them, if the time standards of the first word first display time and the first word utterance time are the same, the first voice recognition response time can be obtained by subtracting the first word utterance time from the first word first display time; if the time standards of the first word first display time and the first word utterance time are different, the first voice recognition response time can be obtained by first converting the time standard of the first word first display time or the first word utterance time, and then subtracting the first word utterance time from the first word first display time. The method for determining the second voice recognition response time is similar and will not be repeated here.
[0167] It can be seen from the above that the embodiments of the present invention can reduce the reliance on manual work in the process of determining the time consumption of speech recognition response, save human resources, and improve the efficiency of determining the time consumption of speech recognition response while ensuring accuracy.
[0168] In order to better implement the above method, accordingly, an embodiment of the present invention further provides a device for determining the time consumption of speech recognition.
[0169] refer to Figure 6 , the device comprises:
[0170] The video acquisition unit 601 is used to acquire a video to be detected, wherein the video frames in the video to be detected are all timestamped, the video to be detected includes user interactive speech, and text information is displayed on the video frames, and the text information on the video frames is obtained by performing speech recognition on the speech information corresponding to the video frames in the user interactive speech;
[0171] A text comparison unit 602, used to compare text information in adjacent video frames to determine text difference information between adjacent video frames;
[0172] The first time of first display determination unit 603 is used to determine a target video frame containing the target text in the video frame according to the text difference information of the adjacent video frames, and determine the first display time of the target text according to the timestamp of the target video frame, wherein the target video frame is the first video frame containing the target text in the video to be detected;
[0173] A first utterance first time determining unit 604 is used to extract user interaction speech from the video to be detected, and detect the first utterance time of the target text in the user interaction speech;
[0174] The time consumption calculation unit 605 is used to determine the speech recognition response time corresponding to the video to be detected according to the first display time and the first utterance time corresponding to the same target text.
[0175] In an alternative example, Figure 7 As shown, the text comparison unit 602 includes a text acquisition unit 606 and a text comparison subunit 607. The text acquisition unit 606 can be used to perform text detection on the video frame to obtain text information in each video frame;
[0176] The text comparison subunit 607 may be used to calculate text similarity between text information in adjacent video frames, where the text similarity is text difference information between adjacent video frames.
[0177] In an optional example, the target text of the embodiment of the present invention includes the first word and the last word in the user interaction speech, and the target video frame includes the first target first word frame containing the first word in the video to be detected, and the first target last word frame containing the last word;
[0178] The first display first time determination unit 603 may include a target frame determination unit 608 and a first time determination unit 609, wherein the target frame determination unit 608 is configured to determine a target first word frame and a target last word frame in a video frame according to text similarity between adjacent video frames and an association relationship satisfied between a target first word frame and a target last word frame of a user interaction speech and adjacent video frames;
[0179] A first time determination unit 609, configured to determine a first display time of a first word in the user interaction speech according to a timestamp of a target first word frame, and to determine a first display time of a last word in the user interaction speech according to a timestamp of a target last word frame;
[0180] The first utterance first time determining unit 604 is used to extract the user interaction speech from the video to be detected, and detect the utterance time of the first word in the user interaction speech and the utterance time of the last word in the user interaction speech.
[0181] In an optional example, the target frame determination unit 608 may be used to determine, based on the text similarity between adjacent video frames, a video frame whose text similarity with a previous video frame is less than a first similarity threshold and whose text similarity with a subsequent video frame is not less than the first similarity threshold, as a target first-word frame of the video to be detected;
[0182] Based on the text similarity between adjacent video frames, a video frame whose text similarity with a previous video frame is not less than a first similarity threshold and whose text similarity with a subsequent video frame is not less than a second similarity threshold is determined as a target last word frame of the video to be detected, and the second similarity threshold is not less than the first similarity threshold, wherein, in the video frames between the target first word frame and the target last word frame, the text similarity of adjacent video frames is not less than the first similarity threshold.
[0183] In an optional example, a specific display area is set in the video frame of the embodiment of the present invention, and the specific display area is used to display text information obtained by voice recognition of user interaction voice;
[0184] The text acquisition unit 606 may be used to determine a regional display image of a specific display area in a video frame;
[0185] Text detection is performed on the regional display image of each video frame to obtain text information displayed in a specific display area in each video frame.
[0186] In an optional example, the target frame determination unit 608 may be configured to perform speech recognition on the video to be detected before determining the first display time of the tail word of the tail word in the user interaction speech according to the timestamp of the target tail word frame, to obtain the user interaction text of the user interaction speech;
[0187] Get the text information displayed in the target last word frame;
[0188] If the text information is the same as the user interaction text, determine that the target end word frame is the correct target end word frame, and continue to perform the step of determining the first display time of the end word of the end word in the user interaction speech according to the timestamp of the target end word frame;
[0189] If the text information is different from the user interaction text, the step of determining the first display time of the last word in the user interaction speech according to the timestamp of the target last word frame is not executed, and the process returns to executing the step of determining the target first word frame including the first word of the user interaction speech and the target last word frame including the last word of the user interaction speech in the video frame according to the result of text detection and the text similarity between adjacent video frames.
[0190] In an optional example, the first utterance first time determining unit 604 may be used to extract user interaction voice from the video to be detected and perform voice endpoint detection on the user interaction voice;
[0191] Determine the effective speech area of the user's interactive speech based on the result of speech endpoint detection;
[0192] Based on the start time and end time of the effective voice area, the first word utterance time and the last word utterance time of the user interaction voice are determined.
[0193] In an optional example, the first utterance first time determination unit includes a voice acquisition subunit 610 and a second time determination unit 611, and the voice acquisition subunit 610 can be used to acquire a reference voice corresponding to the user interaction voice, and the voice content in the reference voice is the same as the voice content in the user interaction voice;
[0194] Extracting user interaction voice from the video to be detected;
[0195] The second time determination unit may be configured to determine the utterance time of the first word and the utterance time of the last word of the user interaction voice according to the reference voice and the user interaction voice.
[0196] In an optional example, the second time determination unit 611 may be used to determine a speech acquisition starting point in the user interaction speech, and from the speech acquisition starting point, select a speech of a preset duration as a candidate speech, where the duration of the candidate speech is equal to the duration of the reference speech;
[0197] Calculate the phonetic similarity between the reference speech and the candidate speech;
[0198] After the current speech acquisition starting point in the user interaction speech, a new speech acquisition starting point is selected;
[0199] Return to the step of selecting a voice of a preset duration as a candidate voice from the voice acquisition start point until the end point of the user interaction voice participates in the voice similarity calculation;
[0200] Determine the candidate speech with the highest speech similarity to the reference speech as the target speech;
[0201] According to the starting position and the ending position of the target speech in the user interaction speech, the first word utterance time and the last word utterance time of the user interaction speech are determined.
[0202] In an optional example, the speech recognition time-consuming determination device further includes a video recording unit 612 before the video acquisition unit 601, which can be used to collect user interaction speech and perform speech recognition on the user interaction speech;
[0203] In the display area, the text information obtained by the user's interactive voice through voice recognition is displayed in real time;
[0204] In the process of collecting the user interaction voice, obtaining the display image of the display area as the video frame of the video to be detected;
[0205] The user interaction voice is obtained as the audio information of the video to be detected, and the video to be detected is obtained based on the displayed image and the audio information.
[0206] As can be seen from the above, through the speech recognition time determination device, the reliance on manual work can be reduced in the process of determining the speech recognition response time, human resources can be saved, and the efficiency of determining the speech recognition response time can be improved on the basis of ensuring accuracy.
[0207] In addition, an embodiment of the present invention further provides an electronic device, which may be a terminal or a server. Figure 8 As shown, it shows a schematic diagram of the structure of an electronic device involved in an embodiment of the present invention, specifically:
[0208] The electronic device may include a radio frequency (RF) circuit 801, a memory 802 including one or more computer-readable storage media, an input unit 803, a display unit 804, a sensor 805, an audio circuit 806, a wireless fidelity (WiFi) module 807, a processor 808 including one or more processing cores, and a power supply 809. Those skilled in the art will appreciate that Figure 8 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0209] The RF circuit 801 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 808 for processing; in addition, the data related to the uplink is sent to the base station. Usually, the RF circuit 801 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a subscriber identity module (SIM) card, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 801 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile Communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0210] The memory 802 can be used to store software programs and modules. The processor 808 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal (such as audio data, a phone book, etc.), etc. In addition, the memory 802 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 802 may also include a memory controller to provide the processor 808 and the input unit 803 with access to the memory 802.
[0211] The input unit 803 can be used to receive input digital or text information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 803 may include a touch-sensitive surface and other input devices. The touch-sensitive surface, also known as a touch display screen or a touch pad, can collect the user's touch operations on or near it (such as the user's operation on or near the touch-sensitive surface using any suitable object or accessory such as a finger, a stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 808, and can receive and execute the command sent by the processor 808. In addition, the touch-sensitive surface can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 803 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0212] The display unit 804 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the terminal, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 804 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is transmitted to the processor 808 to determine the type of touch event. Subsequently, the processor 808 provides a corresponding visual output on the display panel according to the type of touch event. Although in Figure 8 In the embodiment, the touch-sensitive surface and the display panel are used as two independent components to realize input and output functions, but in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize input and output functions.
[0213] The terminal may also include at least one sensor 805, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and / or backlight when the terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the terminal, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0214] The audio circuit 806, the speaker, and the microphone can provide an audio interface between the user and the terminal. The audio circuit 806 can convert the received audio data into an electrical signal and transmit it to the speaker, which converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 806 and converted into audio data, and then the audio data is processed by the output processor 808 and sent to another terminal through the RF circuit 801, or the audio data is output to the memory 802 for further processing. The audio circuit 806 may also include an earplug jack to provide communication between an external headset and the terminal.
[0215] WiFi is a short-range wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 807. It provides users with wireless broadband Internet access. Figure 8 A WiFi module 807 is shown, but it is understandable that it is not an essential component of the terminal and can be omitted as needed without changing the essence of the invention.
[0216] The processor 808 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the terminal and processes data by running or executing software programs and / or modules stored in the memory 802, and calling data stored in the memory 802, so as to monitor the mobile phone as a whole. Optionally, the processor 808 may include one or more processing cores; preferably, the processor 808 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 808.
[0217] The terminal also includes a power supply 809 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 808 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 809 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0218] Although not shown, the terminal may also include a camera, a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the processor 808 in the terminal will load the executable files corresponding to the processes of one or more applications into the memory 802 according to the following instructions, and the processor 808 will run the application stored in the memory 802 to implement various functions, as follows:
[0219] Obtain a video to be detected, wherein all video frames in the video to be detected have timestamps, the video to be detected includes user interactive voice, and text information is displayed on the video frame, and the text information on the video frame is obtained by performing voice recognition on the voice information corresponding to the video frame in the user interactive voice;
[0220] Comparing text information in adjacent video frames to determine text difference information between adjacent video frames;
[0221] According to the text difference information of adjacent video frames, a target video frame containing the target text is determined, and the first display time of the target text is determined according to the timestamp of the target video frame. The target video frame is the first video frame containing the target text in the video to be detected;
[0222] Extract user interaction speech from the video to be detected, and detect the first utterance time of the target text in the user interaction speech;
[0223] According to the first display time and the first utterance time corresponding to the same target text, the speech recognition response time corresponding to the video to be detected is determined. A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0224] To this end, an embodiment of the present invention provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any method for determining the time consumption of speech recognition provided in an embodiment of the present invention. For example, the instructions can execute the following steps:
[0225] Obtain a video to be detected, wherein all video frames in the video to be detected have timestamps, the video to be detected includes user interactive voice, and text information is displayed on the video frame, and the text information on the video frame is obtained by performing voice recognition on the voice information corresponding to the video frame in the user interactive voice;
[0226] Comparing text information in adjacent video frames to determine text difference information between adjacent video frames;
[0227] According to the text difference information of adjacent video frames, a target video frame containing the target text is determined, and the first display time of the target text is determined according to the timestamp of the target video frame. The target video frame is the first video frame containing the target text in the video to be detected;
[0228] Extract user interaction speech from the video to be detected, and detect the first utterance time of the target text in the user interaction speech;
[0229] According to the first display time and the first utterance time corresponding to the same target text, the speech recognition response time corresponding to the video to be detected is determined.
[0230] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0231] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0232] Since the instructions stored in the storage medium can execute the steps in any method for determining the time consumption of speech recognition provided in the embodiments of the present invention, the beneficial effects that can be achieved by any method for determining the time consumption of speech recognition provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0233] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.
[0234] The above is a detailed introduction to a method and device for determining the time consumption of speech recognition provided by an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for determining the time consumption of speech recognition, characterized in that: include: Acquire a video to be detected, wherein all video frames in the video to be detected have timestamps, the video to be detected includes user interactive voice, and text information is displayed on the video frame, and the text information on the video frame is obtained by performing voice recognition on voice information corresponding to the video frame in the user interactive voice; Performing text detection on the video frames to obtain text information in each video frame; Calculate the text similarity between text information in adjacent video frames; Based on the text similarity between the adjacent video frames, determine a video frame whose text similarity with the previous video frame is less than the first similarity threshold and whose text similarity with the next video frame is not less than the first similarity threshold as the first target first-word frame in the video to be detected that contains the first word in the user interaction speech; based on the text similarity between the adjacent video frames, determine a video frame whose text similarity with the previous video frame is not less than the first similarity threshold and whose text similarity with the next video frame is not less than the second similarity threshold as the first target last-word frame in the video to be detected that contains the last word in the user interaction speech, the second similarity threshold is not less than the first similarity threshold, wherein, in the video frames between the target first-word frame and the target last-word frame, the text similarity of adjacent video frames is not less than the first similarity threshold; Determine the first display time of the first word of the first word in the user interaction speech according to the timestamp of the target first word frame, and determine the first display time of the last word of the last word in the user interaction speech according to the timestamp of the target last word frame; Acquire a reference voice corresponding to the user interaction voice, wherein the voice content in the reference voice is the same as the voice content in the user interaction voice; Extracting user interaction voice from the video to be detected; Determine a speech acquisition starting point in the user interaction speech, and select a speech of a preset duration as a candidate speech from the speech acquisition starting point, wherein the duration of the candidate speech is equal to the duration of the reference speech; Calculating the speech similarity between the reference speech and the candidate speech; After the current speech acquisition starting point in the user interaction speech, selecting a new speech acquisition starting point; Return to the step of selecting a voice of a preset duration as a candidate voice from the voice acquisition starting point until the end point of the user interaction voice participates in the calculation of the voice similarity; Determine a candidate voice with the highest voice similarity to the reference voice as the target voice; Determine the first word utterance time and the last word utterance time of the user interaction speech according to the starting position and the ending position of the target speech in the user interaction speech; The first voice recognition response time is determined according to the first display time and the first utterance time of the first word; the second voice recognition response time is determined according to the first display time and the utterance time of the last word; based on the first voice recognition response time and the second voice recognition response time, the voice recognition response time corresponding to the video to be detected is determined.
2. The method according to claim 1, characterized in that A specific display area is provided in the video frame, and the specific display area is used to display the text information obtained by performing voice recognition on the user interaction voice; The performing text detection on the video frames to obtain text information in each video frame includes: Determine a regional display image of the specific display area in the video frame; Text detection is performed on the area display image of each video frame to obtain text information displayed in the specific display area of each video frame.
3. The method according to claim 1, characterized in that: The determining, according to the timestamp of the target tail word frame, before the first display time of the tail word of the tail word in the user interactive speech, further comprises: Performing speech recognition on the video to be detected to obtain a user interaction text of the user interaction speech; Acquire the text information displayed in the target last word frame; If the text information is the same as the user interaction text, the target tail word frame is determined to be a correct target tail word frame, and the step of determining the first display time of the tail word of the tail word in the user interaction speech according to the timestamp of the target tail word frame is continued; If the text information is different from the user interaction text, the step of determining the first display time of the tail word in the user interaction voice according to the timestamp of the target tail word frame is not executed, and the step of determining the target first word frame and the target tail word frame in the video frame is returned to be executed.
4. A device for determining the time consumption of speech recognition, characterized in that: include: A video acquisition unit is used to acquire a video to be detected, wherein the video frames in the video to be detected are all timestamped, the video to be detected includes user interactive speech, and text information is displayed on the video frame, and the text information on the video frame is obtained by performing speech recognition on the speech information corresponding to the video frame in the user interactive speech; A text comparison unit, used to perform text detection on the video frames, obtain text information in each video frame; and calculate text similarity between text information in adjacent video frames; A first display first time determination unit is used to determine, based on the text similarity between the adjacent video frames, a video frame whose text similarity with the previous video frame is less than the first similarity threshold and whose text similarity with the next video frame is not less than the first similarity threshold as the first target first word frame in the video to be detected that contains the first word in the user interaction speech; and based on the text similarity between the adjacent video frames, determine a video frame whose text similarity with the previous video frame is not less than the first similarity threshold and whose text similarity with the next video frame is not less than the second similarity threshold as the first target last word frame in the video to be detected that contains the last word in the user interaction speech, the second similarity threshold is not less than the first similarity threshold, wherein in the video frames between the target first word frame and the target last word frame, the text similarity of the adjacent video frames is not less than the first similarity threshold; and determine the first display time of the first word of the first word in the user interaction speech according to the timestamp of the target first word frame, and determine the first display time of the last word of the last word in the user interaction speech according to the timestamp of the target last word frame; A first utterance first time determination unit is used to obtain a reference voice corresponding to the user interaction voice, wherein the voice content in the reference voice is the same as the voice content in the user interaction voice; extract the user interaction voice from the video to be detected; determine a voice acquisition starting point in the user interaction voice, and starting from the voice acquisition starting point, select a voice of a preset duration as a candidate voice, wherein the duration of the candidate voice is equal to the duration of the reference voice; calculate the voice similarity between the reference voice and the candidate voice; after the current voice acquisition starting point in the user interaction voice, select a new voice acquisition starting point; return to execute the step of selecting a voice of a preset duration as a candidate voice starting from the voice acquisition starting point until the end point of the user interaction voice participates in the calculation of the voice similarity; determine the candidate voice with the highest voice similarity to the reference voice as the target voice; determine the first word utterance time and the last word utterance time of the user interaction voice according to the starting position and the ending position of the target voice in the user interaction voice; The time calculation unit is used to determine the first voice recognition response time according to the first display time and the first word utterance time of the first word, determine the second voice recognition response time according to the first display time and the last word utterance time of the last word, and determine the voice recognition response time corresponding to the video to be detected based on the first voice recognition response time and the second voice recognition response time.
5. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program in the memory to implement the steps in the method for determining the time consumption of speech recognition as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being executed by a processor to implement the steps in the method for determining the time consumption of speech recognition according to any one of claims 1 to 3.
