Voice text conversion processing method, device and system and medium

By calculating the similarity between speech and text vectors and using the longest common subsequence recognition technique, the problem of repeated words caused by the delay in speech-to-text conversion in telephone sales was solved, thus improving the readability of the text.

CN118918898APending Publication Date: 2024-11-08CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411202477.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In telephone sales scenarios, the delay in voice-to-text conversion can lead to repeated words in the text, affecting readability.

Method used

By acquiring speech data, converting it into speech text, and calculating text vector similarity, the longest common subsequence recognition technique is used to output the longest text to reduce repetition.

Benefits of technology

It improves the readability of speech-to-text conversion, reduces the occurrence of repeated words in the text, and enhances the clarity of information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918898A_ABST
    Figure CN118918898A_ABST
Patent Text Reader

Abstract

The invention discloses a voice text conversion processing method, device and system and a medium. The method comprises the following steps: acquiring first voice data and second voice data; converting the first voice data and the second voice data into a first voice text and a second voice text; converting the first voice text and the second voice text into a first text vector and a second text vector; calculating the similarity between the first text vector and the second text vector; and when the similarity between the first text vector and the second text vector is greater than a similarity threshold value, recognizing the first voice text and the second voice text according to the longest common subsequence, and outputting the longest text. According to the method, the similarity of the voice texts obtained after voice data conversion is calculated, and when the voice texts are similar, longest common subsequence recognition is performed to output the longest text, so that the readability of the voice texts is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech recognition, and in particular to a speech-to-text conversion processing method, device, system and medium. Background Art

[0002] In telephone sales scenarios, a large amount of conversation data is accessed every day, and the communication between the agent and the customer is saved in the database through voice-to-text dialogue. However, in actual scenarios, due to the delay problem of voice-to-text conversion, repeated words will appear in the text of a conversation, affecting the readability of the text information. Summary of the invention

[0003] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a method, device, system and medium for speech-to-text conversion processing that can be applied to speech recognition or other related fields, aiming to realize text processing when converting speech into text and increase the readability of text information.

[0004] The technical solution of the present invention is as follows:

[0005] A method for speech-to-text conversion processing, the method comprising:

[0006] Acquire first voice data and second voice data;

[0007] Converting the first voice data and the second voice data into a first voice text and a second voice text;

[0008] Converting the first speech text and the second speech text into a first text vector and a second text vector;

[0009] Calculating the similarity between the first text vector and the second text vector;

[0010] When the similarity between the first text vector and the second text vector is greater than a similarity threshold, the first speech text and the second speech text are identified according to the longest common subsequence, and the longest text is output.

[0011] In one embodiment, after acquiring the first voice data and the second voice data, the method includes:

[0012] The first voice data and the second voice data are preprocessed to obtain processed first voice data and second voice data.

[0013] In one embodiment, after converting the first voice data and the second voice data into a first voice text and a second voice text, the method includes:

[0014] The first speech text and the second speech text are preprocessed to obtain a first semantic text and a second semantic text.

[0015] In one embodiment, converting the first spoken text and the second spoken text into the first text vector and the second text vector comprises:

[0016] Segmenting the first semantic text and the second semantic text respectively to obtain a first segmented text and a second segmented text;

[0017] An algorithm is used to convert the first segmented text and the second segmented text into a first text vector and a second text vector.

[0018] In one embodiment, calculating the similarity between the first text vector and the second text vector includes:

[0019] Calculate the vector dot product of the first text vector and the second text vector according to the first text vector and the second text vector;

[0020] Calculate a first text norm and a second text norm according to the first text vector and the second text vector;

[0021] The similarity is calculated based on the vector dot product, the first text norm and the second text norm.

[0022] In one embodiment, the calculating the similarity between the first text vector and the second text vector further includes:

[0023] When the similarity between the first text vector and the second text vector is less than a similarity threshold, the first voice text and the second voice text are output.

[0024] In one embodiment, the step of identifying the first voice text and the second voice text according to the longest common subsequence and outputting the longest text comprises:

[0025] Decomposing the first semantic text and the second semantic text into a first semantic list and a second semantic list;

[0026] Constructing a longest semantic text according to the first semantic list and the second semantic list;

[0027] Perform error correction processing on the constructed longest semantic text and output the longest text.

[0028] A speech-to-text conversion processing device, comprising:

[0029] A voice acquisition module, used to acquire first voice data and second voice data;

[0030] A text conversion module, used for converting the first voice data and the second voice data into a first voice text and a second voice text;

[0031] A vector conversion module, used for converting the first voice text and the second voice text into a first text vector and a second text vector;

[0032] A similarity calculation module, used for calculating the similarity between the first text vector and the second text vector;

[0033] The text output module is used to identify the first speech text and the second speech text according to the longest common subsequence and output the longest text when the similarity between the first text vector and the second text vector is greater than a similarity threshold.

[0034] A speech-to-text conversion processing system, the system comprising at least one processor; and

[0035] a memory communicatively connected to the at least one processor; wherein,

[0036] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned method for speech-to-text conversion processing.

[0037] A non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned method for speech-to-text conversion processing.

[0038] Beneficial effect: The present invention discloses a method, device, system and medium for speech-to-text conversion processing. Compared with the prior art, the present application calculates the similarity of speech-to-text converted from speech data, and when the speech-to-text is similar, the longest common subsequence is identified and the longest text is output, thereby improving the readability of the speech-to-text. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0040] Figure 1 A flow chart of a method for voice-to-text conversion processing provided by an embodiment of the present invention;

[0041] Figure 2 A flow chart of step 106 of the method for voice-to-text conversion processing provided by an embodiment of the present invention;

[0042] Figure 3 Another flow chart of the method for speech-to-text conversion processing provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of the functional modules of the speech-to-text conversion processing device provided by an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of the hardware structure of a speech-to-text conversion processing system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below in conjunction with the accompanying drawings.

[0046] 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.

[0047] 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.

[0048] 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.

[0049] 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.

[0050] See also Figure 1 , Figure 1A flowchart of an embodiment of the method for speech-to-text conversion processing provided by the present invention. The method for speech-to-text conversion processing provided in this embodiment is applied to a system consisting of a terminal device, a network and a server, wherein the network is a medium for directly providing a communication link between the terminal device and the server, which may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.; the operating system on the terminal device may include a handheld device operating system (iPhone operating system, iOS system), Android system or other operating system, and the terminal device is connected to the server through the network to achieve interaction, thereby performing operations such as receiving or sending data, etc., and specifically may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, portable computers and desktop servers, etc.

[0051] like Figure 1 As shown, Figure 1 A method for speech-to-text conversion processing provided by an embodiment of the present invention specifically comprises the following steps:

[0052] S101, obtaining first voice data and second voice data;

[0053] S102 converts the first voice data and the second voice data into a first voice text and a second voice text;

[0054] S103, converting the first voice text and the second voice text into a first text vector and a second text vector;

[0055] S104: Calculate the similarity between the first text vector and the second text vector.

[0056] In this embodiment, the first voice data and the second voice data for which similarity needs to be calculated are obtained, and the voice data can be an audio file or a real-time microphone input. The first voice data and the second voice data are converted into the first voice text and the second voice text using an automatic speech recognition engine (ASR). ASR can be an open source tool or a commercial service. For example, Google Speech-to-Text, IBM Watson Speech to Text, Mozilla DeepSpeech, etc. Parameters such as language model, sound model, sampling rate, encoding format, etc. are configured according to the requirements of the selected ASR engine. According to the requirements of the selected ASR service, the audio data is preprocessed, such as adjusting the sampling rate, bit depth, removing background noise, etc. The preprocessed first voice data and the second voice data are input into the ASR engine, and an API call can be programmed or a voice data file can be uploaded. The ASR engine will process the first voice data and the second voice data and return the recognized first voice text and the second voice text. The first voice text and the second voice text returned by the ASR engine are post-processed to improve accuracy. It can include grammar correction, addition of punctuation marks, synonym standardization, etc.

[0057] The first voice text and the second voice text after the above processing are obtained, and the first voice text and the second voice text are converted into the first text vector and the second text vector through the algorithm. The vector is normalized so that its length is 1. It is ensured that the cosine similarity only reflects the direction of the vector but not the size. The similarity between the first text vector and the second text vector is calculated through the algorithm.

[0058] Specifically, the language model is a statistical model used to identify the language. Choosing the right language model is crucial to improving recognition accuracy. For example, if the application is for English users, you need to choose a language model optimized for English. The sound model (acoustic model) is a model used in the ASR system to convert sound signals into acoustic features. It is usually based on machine learning algorithms, such as hidden Markov models (HMM) or deep learning models. The sampling rate is the number of times the sound signal is sampled per second, in Hertz (Hz). Common sampling rates include 8kHz, 16kHz, 44.1kHz, etc. The higher the sampling rate, the better the sound quality, but the larger the data volume and the longer the processing time. The encoding format is the storage format of the sound data, and common ones include WAV, MP3, AAC, etc. Different encoding formats have different effects on sound quality, file size, and processing efficiency. When configuring these parameters, you usually need to make choices based on specific application requirements and hardware capabilities. For example, if the application requires real-time processing, you need to choose a configuration with a smaller frame shift; if the application has high requirements for sound quality, you need to choose a higher sampling rate. In addition, some ASR systems may also provide a user interface or API to allow users to adjust these parameters according to their needs.

[0059] S105 . When the similarity between the first text vector and the second text vector is greater than a similarity threshold, identifying the first speech text and the second speech text according to the longest common subsequence, and outputting the longest text.

[0060] S106: When the similarity between the first text vector and the second text vector is less than a similarity threshold, outputting the first voice text and the second voice text.

[0061] In this embodiment, the similarity between the first text vector and the second text vector is calculated by pre-similarity to determine whether the two vectors are similar. When the similarity between the first text vector and the second text vector is greater than a similarity threshold, the first voice text and the second voice text are identified according to the longest common subsequence, and the longest text is output. When the similarity between the first text vector and the second text vector is less than the similarity threshold, the first voice text and the second voice text are output.

[0062] Specifically, the similarity threshold of the cosine similarity ranges from -1 to 1. When the similarity value between the first semantic text and the second semantic text is close to 1, it indicates that the first text vector and the second text vector are very similar (the angle is small); when the similarity value between the first semantic text and the second semantic text is close to -1, it indicates that the first text vector and the second text vector are very dissimilar (the angle is large); and a value close to 0 indicates that there is no or little correlation between the first text vector and the second text vector.

[0063] In one embodiment, after step S101, the following steps are included:

[0064] The first voice data and the second voice data are preprocessed to obtain processed first voice data and second voice data.

[0065] In this embodiment, in order to obtain a more accurate text-to-text result, it is necessary to ensure the sound quality and clarity of the voice data file. Noisy background sounds, being too far from the microphone or speaking too fast may all lead to a decrease in the accuracy of the text-to-text. Therefore, it is necessary to pre-process the voice data, and the voice pre-processing includes adjusting the sampling rate, bit depth, removing background noise, echo cancellation, gain control, removing non-speech segments, feature extraction and normalization processing. When the sampling rate of the voice data does not meet the specific application requirements, it is necessary to use resampling to adjust the sampling rate of the voice data. For example, the voice recognition system requires a frequency of 16kHz. The deep bit of the voice data is converted into a unified style, such as 16 bits or 24 bits, to ensure the consistency of the voice data. The background noise of the voice data can be removed by noise reduction technology, and a filter or noise reduction algorithm can be used. If there is an echo in the voice data, it is necessary to use echo cancellation technology to reduce or eliminate the echo and improve the quality of the voice data. Adjust the audio volume of the voice data to ensure that the audio signal is within a suitable level range. Identify and remove the silent part of the voice data, and retain the audio segment containing the voice. Extract the audio features of the voice data, such as Mel frequency cepstral coefficients (MFCCs). The voice data is normalized to eliminate the volume differences in the voice data under different recording environments. Finally, the processed first voice data and second voice data are obtained, which improves the quality and clarity of the voice data.

[0066] In one embodiment, after step S102, the following steps are included:

[0067] The first speech text and the second speech text are preprocessed to obtain a first semantic text and a second semantic text.

[0068] In this embodiment, in order to improve the accuracy of recognizing text similarity, the first speech text and the second speech text need to be preprocessed, and the text preprocessing includes text cleaning and text standardization. Among them, text cleaning includes removing noise, correcting recognition errors, removing stop words, deleting or replacing punctuation marks, and deduplication of text. Text standardization includes case conversion, removing or replacing abbreviations, and text normalization. The first semantic text and the second semantic text are obtained to improve the accuracy of recognizing the similarity of the speech text.

[0069] Further, removing noise requires using regular expressions to identify and delete irrelevant characters in the text, including special characters and HTML tags, etc. To check for spelling mistakes in the speech text, a spell checker or a custom dictionary can be used for correction. Stop words in the speech text, such as "de", "he", "shi", etc., can be removed. If stop words appear frequently in the text but carry little information, they can be removed from the speech text. Punctuation marks can be deleted or replaced, and it can be decided whether to delete them or handle them in other ways according to needs. Also, duplicate removal is performed on the speech text to remove duplicate text lines or duplicate words.

[0070] Specifically, case conversion is to uniformly convert the English letters in the speech text into uppercase or lowercase English letters to eliminate the differences caused by case. Removing or replacing abbreviations is to identify abbreviations in the speech text data and replace them with full names, or identify full names in the speech text data and replace them with abbreviations, which can be set according to specific situations. Text normalization is to normalize the expressions of dates, numbers, currencies, etc. in the speech text. Regular expressions are used to identify the expressions of dates, numbers, currencies, etc. in the text, and all date formats are converted into a unified format, such as "YYYY-MM-DD". For example, converting "10th of October, 2023" to "2023-10-10".

[0071] In one embodiment, the step S103 includes:

[0072] Respectively segment the first semantic text and the second semantic text to obtain a first segmented text and a second segmented text;

[0073] Use an algorithm to convert the first segmented text and the second segmented text into a first text vector and a second text vector.

[0074] In this embodiment, the first semantic text and the second semantic text after the above preprocessing are segmented to form a first segmented text and a second segmented text. The first segmented text and the second segmented text are converted into a first text vector and a second text vector by a model. The model can be a traditional bag of words model (Bag of Words), TF-IDF (TermFrequency-Inverse Document Frequency), Word2Vec, GloVe (Global Vectors for WordRepresentation), or a more advanced context-related embedding model, such as BERT (BidirectionalEncoder Representations from Transformers), GPT (Generative Pre-trainedTransformer), etc. For traditional models, each word or some form of its representation is converted into a vector. For context-related embedding models, the entire text sequence is used as input to obtain the vector representation of each word in a specific context. This application takes the Sentence-BERT model as an example. Sentence-BERT is a twin network based on a pre-trained BERT, loads the Sentence-BERT model and the corresponding word segmenter, and uses the word segmenter to encode the text. The generation of the first segmented text and the second segmented text includes adding special tags, such as CLS, SEP, etc. The encoded first segmented text and the second segmented text are input into the model to obtain vector representation, generate the first text vector and the second text vector, and thus increase the accuracy of semantic similarity judgment.

[0075] Specifically, the bag-of-words model converts text into word frequency vectors. TF-IDF considers word frequency and inverse document frequency to reduce the weight of common words. Word2Vec converts words into fixed-length vectors using a deep learning model. GloVe learns word vectors by leveraging global statistical information. BERT obtains context-dependent vectors of words by using a bidirectional encoder with a Transformer architecture. GPT learns language patterns and structures to generate vectors by pre-training on a large amount of text data.

[0076] In one embodiment, the step S104 includes:

[0077] Calculate the vector dot product of the first text vector and the second text vector according to the first text vector and the second text vector;

[0078] Calculate a first text norm and a second text norm according to the first text vector and the second text vector;

[0079] The similarity is calculated based on the vector dot product, the first text norm and the second text norm.

[0080] In this embodiment, the cosine similarity measures the cosine value of the angle between two vectors, which can reflect their directional difference rather than the size difference. The cosine similarity is used to calculate the similarity of the first semantic text and the second semantic text, the vector dot product of the first text vector and the second text vector is calculated based on the first text vector and the second text vector, the first text norm and the second text norm are calculated based on the first text vector and the second text vector, and the similarity is calculated based on the vector dot product, the first text norm and the second text norm. The specific cosine similarity calculation formula is:

[0081]

[0082] Wherein, A and B are the first text vector and the second text vector, A·B is the vector dot product of the first text vector and the second text vector, ∥A∥ is the first text norm, ∥B∥ is the second text norm, and the norm is the length of the vector.

[0083] In one embodiment, the step S105 includes:

[0084] Decomposing the first semantic text and the second semantic text into a first semantic list and a second semantic list;

[0085] Constructing a longest semantic text according to the first semantic list and the second semantic list;

[0086] Perform error correction processing on the constructed longest semantic text and output the longest text.

[0087] In this embodiment, a first semantic text and a second semantic text are obtained, and the first semantic text and the second semantic text are decomposed into a first semantic list and a second semantic list, wherein the semantic list is divided into a word list or a vocabulary unit list. Dynamic programming is used to construct an LSC (longest common subsequence) matrix, wherein the rows of the matrix correspond to the words or words of the first semantic list, and the columns of the matrix correspond to the words or words of the second semantic list. Starting from the upper left corner, the words of the first semantic list and the second semantic list are compared one by one to fill the matrix. If the words are the same, the value of the current position is the value of the upper left corner plus 1; if they are different, the larger value of the top or left is taken. Backtracking from the lower right corner of the matrix, LCS is constructed according to the matrix value. If the value of the current position is greater than the value on the left and above, the word is added to the LCS and moved to the upper left corner. According to the vocabulary list of LCS, the longest semantic text is constructed, the constructed longest semantic text is error-corrected, and the longest text is output. Ensure the coherence of the generated text. For example, in an actual scenario, the semantic text converted from the first voice data is "Hello sir, sorry to bother you, I am a customer of Ping An Auto Insurance", and the semantic text converted from the second voice data is "Hello sir, sorry to bother you, I am the account manager of Ping An Auto Insurance, I am the one who called you a few days ago from BYD Auto Insurance". The longest common subsequence recognition finally yields: "Hello sir, sorry to bother you, I am the account manager of Ping An Auto Insurance, I am the one who called you a few days ago from BYD Auto Insurance".

[0088] Furthermore, the error correction process includes: Fine-tuning based on BERT's Masked Language Model (MLM): As shown in the FASPell (Fast, Adaptable, Simple, Powerful Chinese Spell Checker) model (spelling check), first, the BERT model is used to generate possible candidate results for each character in the sentence. Considering the characteristics of Chinese, the BERT is fine-tuned to better adapt to the error correction scenario when performing the Masked Language Model task. This model is based on a new paradigm, including a Denoising Autoencoder (DAE) and a Decoder, following the Encoder-Decoder architecture. Masked Language Model (MLM): As the DAE module, it is used to generate candidate words. MLM is a task in BERT, which can be understood from another perspective as having two functions: spelling detection and correction. Confidence-Similarity Decoder: It is used to filter the candidate words generated by MLM, optimize the correction performance, and manually find the filtering curve. For example, for the sentence "我在图书馆shu书 (I'm in the library shu book)", after fine-tuning, the model can recognize that "shu" is a wrong character and predict that it should be corrected to "看 (read)", generating the correct sentence "我在图书馆看书 (I'm in the library reading books)".

[0089] The Confusionset-guided Pointer Network (a deep learning model for sequence labeling) is a model that combines deep learning and traditional sequence labeling tasks, especially in scenarios such as spelling correction and grammar correction. This model utilizes the concept of the Confusion Set and the structure of the Pointer Network to achieve error detection and correction. It not only learns to copy correct characters from the original text but also selects candidate characters for replacement from a pre-defined Confusion Set (the Confusion Set refers to the set of characters or words that are easily confused with each other). For example, for the sentence "他带上了他的帽子和笔代 (He brought his hat and pen dai)", the model may recognize that "笔代 (pen dai)" is wrong and select "袋子 (bag)" from the Confusion Set for replacement, resulting in the correct sentence "他带上了他的帽子和袋子 (He brought his hat and bag)".

[0090] Soft-Masked BERT (Text Error Correction Model): Soft-Masked BERT is based on the limitations of the native mask mechanism of the BERT model in error correction tasks and adopts a special masking strategy to improve the model's performance in text error correction tasks. Soft-Masked BERT proposes an improved method using a soft masking strategy, which means that the model will learn a probability distribution to determine the likelihood of each token being masked. It aims to improve the model's ability to identify error positions. Through the soft masking strategy, the model can more flexibly judge and correct errors. For example, it can identify and correct the character "厂" in "我去了XXX广厂" to "场", forming the correct sentence "我去了XXX广场". A key advantage of this model is its ability to handle the uncertainty in text more meticulously, improving the flexibility and accuracy of error correction through the soft masking strategy.

[0091] Transformer-based Generation Model: Inspired by models such as T5 (Text-to-Text Transfer Transformer), a Transformer model for Chinese can be constructed, and a Transformer model architecture suitable for text error correction tasks can be designed or selected. This may involve modifying the standard Transformer model to adapt to sequence-to-sequence tasks. Implement a masking strategy to identify potential errors. For example, random masking or fixed rules can be used to mask certain words or characters in the input text. Define a loss function to measure the difference between the model's prediction and the actual correct text. Usually, the loss function for sequence generation tasks, such as cross-entropy loss, is used. Train the Transformer model using the prepared dataset and the defined loss function. This includes optimizing the model parameters to minimize the loss function. Implement a decoding strategy to generate the output of text error correction. This may involve beam search or other sequence generation techniques. The model takes a text sequence as input and directly generates the corrected text sequence. For example, when the input is "昨天我吃了一个苹菓", the model outputs "昨天我吃了一个苹果", where "菓" is correctly corrected to "果".

[0092] Methods combining language models and edit distance: Some methods combine traditional language models (such as using kenLM) and edit distance algorithms to identify and correct errors. They can effectively identify and correct spelling errors, grammatical errors, and other types of text errors. Use language models (such as n-gram models, RNN, LSTM, Transformer, etc.) to evaluate the probability of each word or phrase in the text and identify those suspected errors with low probabilities. For each suspected error, calculate its edit distance (Levenshtein distance) with each candidate word in the candidate correction list. Generate a candidate correction list based on the edit distance and language model probability. Words with smaller edit distances and higher language model probabilities are more likely to be correct corrections. Consider contextual information and evaluate the semantic and grammatical compatibility of candidate words with surrounding words. Assign a confidence score to each candidate correction, which is based on the language model probability, edit distance, and possibly other factors (such as word frequency, partial morphological information). Select the candidate word with the highest confidence score as the best correction option. It may be necessary to correct the text iteratively because some errors may not be identified in the first iteration, or a wrong correction may affect other errors. The corrected text is post-processed, such as ensuring the consistency and grammatical correctness of the text. For example, by calculating the perplexity of each word in the sentence and comparing it with the average of the entire sentence.

[0093] like Figure 3 As shown, Figure 3 FIG. 4 is another flow chart of a method for speech-to-text conversion processing provided by an embodiment of the present invention, the method specifically comprising the following steps:

[0094] S1: two voice data;

[0095] S2: Convert two voice data into voice text;

[0096] S3: Determine the similarity of the voice texts. If the two voice texts are similar, proceed to S5; if the two voice texts are not similar, proceed to S4;

[0097] S4: next voice data;

[0098] S5: Based on the longest common subsequence identification;

[0099] S6: Output the longest text.

[0100] In this embodiment, the first voice data and the second voice data are first obtained, and the two voice data are converted into the first voice text and the second voice text through an algorithm. The similarity between the first voice text and the second voice text is calculated through the algorithm, and it is determined whether the first voice text is similar to the second voice text. When the similarity between the first voice text and the second voice text is greater than the similarity threshold, they are considered similar, and the two voice texts are identified through the longest common subsequence; when the similarity between the two voice texts is less than the similarity threshold, they are considered dissimilar, and the third voice data is obtained and converted into the third voice text. The similarity between the third voice text and the first voice text and the second voice text is calculated, and the similarity between the voice texts is determined until the similarity judgment of all voice data is completed.

[0101] Another embodiment of the present invention provides a speech-to-text conversion processing device, which is used to execute any embodiment of the above-mentioned speech-to-text conversion processing method. Specifically, refer to Figure 4 , Figure 4 This is a functional module diagram of a speech-to-text conversion processing device provided by an embodiment of the present invention. The speech-to-text conversion processing device can be configured in a management server.

[0102] like Figure 4 As shown, the device comprises:

[0103] A voice acquisition module 11, used to acquire first voice data and second voice data;

[0104] A text conversion module 12, used for converting the first voice data and the second voice data into a first voice text and a second voice text;

[0105] A vector conversion module 13, used for converting the first voice text and the second voice text into a first text vector and a second text vector;

[0106] A similarity calculation module 14, used to calculate the similarity between the first text vector and the second text vector;

[0107] The text output module 15 is used to identify the first speech text and the second speech text according to the longest common subsequence when the similarity between the first text vector and the second text vector is greater than a similarity threshold, and output the longest text

[0108] like Figure 4As shown, the speech acquisition module 11, the text conversion module 12, the vector conversion module 13, the similarity calculation module 14 and the text output module 15 are connected in sequence. The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, which is more suitable for describing the execution process of speech-to-text conversion processing than a program. For the specific implementation method of each module, please refer to the corresponding method embodiment above, which will not be repeated here.

[0109] In one embodiment, the device comprises a voice data processing module 16:

[0110] The first voice data and the second voice data are preprocessed to obtain processed first voice data and second voice data.

[0111] In one embodiment, the device comprises a speech text processing module 17:

[0112] The first speech text and the second speech text are preprocessed to obtain a first semantic text and a second semantic text.

[0113] In one embodiment, the vector conversion module 13 includes:

[0114] A segmentation unit, used for segmenting the first semantic text and the second semantic text respectively to obtain a first segmented text and a second segmented text;

[0115] The conversion unit is used to convert the first segmented text and the second segmented text into a first text vector and a second text vector by adopting an algorithm.

[0116] In one embodiment, the similarity calculation module 14 includes:

[0117] a dot product calculation unit, configured to calculate a vector dot product of a first text vector and a second text vector according to the first text vector and the second text vector;

[0118] A norm calculation unit, used for calculating a first text norm and a second text norm according to the first text vector and the second text vector;

[0119] The similarity calculation unit is used to calculate the similarity according to the vector dot product, the first text norm and the second text norm.

[0120] In one embodiment, the apparatus further comprises:

[0121] When the similarity between the first text vector and the second text vector is less than a similarity threshold, the first voice text and the second voice text are output.

[0122] In one embodiment, the text output module 15 includes:

[0123] A decomposition unit, configured to decompose the first semantic text and the second semantic text into a first semantic list and a second semantic list;

[0124] A construction unit, configured to construct a longest semantic text according to the first semantic list and the second semantic list;

[0125] An error correction processing unit is used to perform error correction processing on the constructed longest semantic text and output the longest text

[0126] Another embodiment of the present invention provides a speech-to-text conversion processing system. Figure 5 As shown, the system 10 includes:

[0127] One or more processors 110 and memory 120, Figure 5 A processor 110 is used as an example for description. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.

[0128] The processor 110 is used to complete various control logics of the system 10, and it can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0129] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions corresponding to the method for voice-to-text conversion processing in the embodiment of the present invention. The processor 110 executes various functional applications and data processing of the system 10 by running the non-volatile software programs, instructions and units stored in the memory 120, that is, implementing the method for voice-to-text conversion processing in the above method embodiment.

[0130] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the system 10, etc. In addition, the memory 120 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 non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the system 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0131] One or more units are stored in the memory 120, and when executed by one or more processors 110, the following steps are implemented:

[0132] Acquire first voice data and second voice data;

[0133] Converting the first voice data and the second voice data into a first voice text and a second voice text;

[0134] Converting the first speech text and the second speech text into a first text vector and a second text vector;

[0135] Calculating the similarity between the first text vector and the second text vector;

[0136] When the similarity between the first text vector and the second text vector is greater than a similarity threshold, the first speech text and the second speech text are identified according to the longest common subsequence, and the longest text is output.

[0137] In one embodiment, after acquiring the first voice data and the second voice data, the method includes:

[0138] The first voice data and the second voice data are preprocessed to obtain processed first voice data and second voice data.

[0139] In one embodiment, after converting the first voice data and the second voice data into a first voice text and a second voice text, the method includes:

[0140] The first speech text and the second speech text are preprocessed to obtain a first semantic text and a second semantic text.

[0141] In one embodiment, converting the first spoken text and the second spoken text into the first text vector and the second text vector comprises:

[0142] Segmenting the first semantic text and the second semantic text respectively to obtain a first segmented text and a second segmented text;

[0143] An algorithm is used to convert the first segmented text and the second segmented text into a first text vector and a second text vector.

[0144] In one embodiment, calculating the similarity between the first text vector and the second text vector includes:

[0145] Calculate the vector dot product of the first text vector and the second text vector according to the first text vector and the second text vector;

[0146] Calculate a first text norm and a second text norm according to the first text vector and the second text vector;

[0147] The similarity is calculated based on the vector dot product, the first text norm and the second text norm.

[0148] In one embodiment, the calculating the similarity between the first text vector and the second text vector further includes:

[0149] When the similarity between the first text vector and the second text vector is less than a similarity threshold, the first voice text and the second voice text are output.

[0150] In one embodiment, the step of identifying the first voice text and the second voice text according to the longest common subsequence and outputting the longest text comprises:

[0151] Decomposing the first semantic text and the second semantic text into a first semantic list and a second semantic list;

[0152] Constructing a longest semantic text according to the first semantic list and the second semantic list;

[0153] Perform error correction processing on the constructed longest semantic text and output the longest text.

[0154] An embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by one or more processors, wherein the computer program implements the following steps when executed by the processor: acquiring first voice data and second voice data; converting the first voice data and the second voice data into a first voice text and a second voice text; converting the first voice text and the second voice text into a first text vector and a second text vector; calculating the similarity between the first text vector and the second text vector; when the similarity between the first text vector and the second text vector is greater than a similarity threshold, identifying the first voice text and the second voice text according to the longest common subsequence, and outputting the longest text.

[0155] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.

[0156] In summary, in the method, device, system and medium for speech-to-text conversion processing disclosed in the present invention, the method includes: obtaining first speech data and second speech data; converting the first speech data and the second speech data into a first speech text and a second speech text; converting the first speech text and the second speech text into a first text vector and a second text vector; calculating the similarity of the first text vector and the second text vector; when the similarity of the first text vector and the second text vector is greater than a similarity threshold, identifying the first speech text and the second speech text according to the longest common subsequence, and outputting the longest text. This application improves the readability of the speech text by calculating the similarity of the speech text after the speech data is converted, and when the speech texts are similar, performing the longest common subsequence identification and outputting the longest text.

[0157] 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.

[0158] 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.

[0159] 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.

[0160] 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-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0161] 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 computer-readable 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, and the computer software product is stored in a computer-readable storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the specification described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a magnetic disk or an optical disk.

[0162] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the above-mentioned method embodiments when executed. The storage medium can be a memory, a disk, a floppy disk, a flash memory, an optical storage device, etc.

[0163] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.

Claims

1. A method for speech-to-text conversion processing, It is characterized in that include: Acquire first voice data and second voice data; Converting the first voice data and the second voice data into a first voice text and a second voice text; Converting the first speech text and the second speech text into a first text vector and a second text vector; Calculating the similarity between the first text vector and the second text vector; When the similarity between the first text vector and the second text vector is greater than a similarity threshold, the first speech text and the second speech text are identified according to the longest common subsequence, and the longest text is output.

2. The method for speech-to-text conversion according to claim 1, It is characterized in that After the first voice data and the second voice data are acquired, the method includes: The first voice data and the second voice data are preprocessed to obtain processed first voice data and second voice data.

3. The method for speech-to-text conversion processing according to claim 1, It is characterized in that After converting the first voice data and the second voice data into a first voice text and a second voice text, the method further comprises: The first speech text and the second speech text are preprocessed to obtain a first semantic text and a second semantic text.

4. The method for speech-to-text conversion processing according to claim 3, It is characterized in that The converting the first speech text and the second speech text into the first text vector and the second text vector comprises: Segmenting the first semantic text and the second semantic text respectively to obtain a first segmented text and a second segmented text; An algorithm is used to convert the first segmented text and the second segmented text into a first text vector and a second text vector.

5. The method for speech-to-text conversion processing according to claim 1, It is characterized in that The calculating the similarity between the first text vector and the second text vector includes: Calculate the vector dot product of the first text vector and the second text vector according to the first text vector and the second text vector; Calculate a first text norm and a second text norm according to the first text vector and the second text vector; The similarity is calculated based on the vector dot product, the first text norm and the second text norm.

6. The method for speech-to-text conversion processing according to claim 1, It is characterized in that The calculating the similarity between the first text vector and the second text vector also includes: When the similarity between the first text vector and the second text vector is less than a similarity threshold, the first voice text and the second voice text are output.

7. The method for speech-to-text conversion according to claim 3, It is characterized in that The step of identifying the first voice text and the second voice text according to the longest common subsequence and outputting the longest text comprises: Decomposing the first semantic text and the second semantic text into a first semantic list and a second semantic list; Constructing a longest semantic text according to the first semantic list and the second semantic list; Perform error correction processing on the constructed longest semantic text and output the longest text.

8. A speech-to-text conversion processing device, It is characterized in that include: A voice acquisition module, used to acquire first voice data and second voice data; A text conversion module, used for converting the first voice data and the second voice data into a first voice text and a second voice text; A vector conversion module, used for converting the first voice text and the second voice text into a first text vector and a second text vector; A similarity calculation module, used for calculating the similarity between the first text vector and the second text vector; The text output module is used to identify the first speech text and the second speech text according to the longest common subsequence and output the longest text when the similarity between the first text vector and the second text vector is greater than a similarity threshold.

9. A speech-to-text conversion processing system, It is characterized in that The system includes at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for speech-to-text conversion processing described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, It is characterized in that The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the method for speech-to-text conversion processing as described in any one of claims 1-7.

Citation Information

Cited By

  • Claim settlement intention identification method and device, computer equipment and storage medium

    CN119514556A