Speech-to-text methods and apparatus, computer equipment and storage media
By automating the processing of voice data, extracting and tagging keywords and phrases, the problem of time-consuming manual annotation is solved, and text with annotation effects is generated efficiently.
Patent Information
- Application Number
- CN202310834751.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-07
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-07-07
AI Technical Summary
In existing technologies, after voice data is converted into text, key sentences need to be manually annotated, which consumes a lot of human time and effort.
After acquiring voice data and performing content recognition, the system uses preset keyword features to extract words to be tagged and tagged effect information, automatically filters and tags key sentences, and generates text with tagged effects.
Automated processing of voice data generates text labeled with key sentences, saving manual editing time, improving efficiency, and accelerating the generation of differentiated content.
Smart Images

Figure CN116631400B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a speech-to-text method and apparatus, computer equipment and storage medium. Background Technology
[0002] With the development of fintech, to improve service quality in the financial industry, voice data is obtained from customer service and sales call recordings. This voice data is then converted into text to extract key information for customers to review. For example, in the insurance industry, insurance agents verbally explain service plans to customers. To facilitate subsequent review by customers, service plans are provided based on the voice data of the insurance agents, converted into text.
[0003] Speech-to-text technology directly recognizes the content of speech data to generate text. If it's necessary to add annotations to key sentences in the generated text to highlight them—for example, in the insurance industry, after converting speech data into service plans, insurance agents need to add annotations to key content within the plans for customers to review—this process currently requires manual annotation of key sentences in the generated text, consuming significant human editing time. Therefore, how to automatically generate annotated text from speech data has become a pressing technical problem. Summary of the Invention
[0004] The main objective of this application is to provide a speech-to-text method, apparatus, computer device, and storage medium, which aims to automatically generate text with key sentences marked from speech data, thus saving manpower.
[0005] To achieve the above objectives, a first aspect of this application proposes a speech-to-text method, the method comprising:
[0006] Acquire voice data;
[0007] The speech data is subjected to content recognition to obtain the original text;
[0008] Based on preset keyword features, key information is extracted from the original text to obtain selected key information; wherein, the selected key information includes: information on words to be marked and information on marking effect;
[0009] Words to be labeled are selected from the original text based on the information of the words to be labeled;
[0010] The target marking operation is selected from the preset candidate marking operations based on the marking effect information;
[0011] The target text is obtained by marking the words to be marked in the original text according to the target marking operation.
[0012] In some embodiments, the step of extracting key information from the original text based on preset keyword features to obtain selected key information includes:
[0013] The original text is segmented into word features to obtain the original word features;
[0014] Target word features are selected from the original word features based on the keyword features;
[0015] Based on the target word features, the text content of the original text is extracted to obtain the selected key information.
[0016] In some embodiments, the step of extracting text content from the original text based on the target word features to obtain the selected key information includes:
[0017] Sentences from which the target word features are extracted from the original text are used to obtain candidate key sentences; wherein, the candidate key sentences include: keywords and marked words;
[0018] The selected key information is constructed based on the keywords and the marked effect words.
[0019] In some embodiments, the step of marking the words to be marked in the original text according to the target marking operation to obtain the target text includes:
[0020] Extract the sentences containing the words to be marked from the original text to obtain the sentences to be marked;
[0021] The target sentence is obtained by marking the words to be marked in the sentence to be marked according to the target marking operation.
[0022] The target text is obtained by replacing the statement to be marked in the original text with the target statement.
[0023] In some embodiments, extracting sentences containing the words to be tagged from the original text to obtain the sentences to be tagged includes:
[0024] Based on the words to be marked, a sentence range is selected in the original text to obtain the sentence selection range; wherein, the sentence selection range is the range of the sentence preceding the candidate key sentence in the original text;
[0025] The statement to be marked is selected from the original text according to the statement selection range.
[0026] In some embodiments, after marking the words to be marked in the original text according to the target marking operation to obtain the target text, the method further includes:
[0027] Obtain the position information of the punctuation marks before the candidate key sentences in the target text to obtain the symbol position information;
[0028] Punctuation marks in the target text are removed based on the symbol position information, and candidate key sentences in the target text are removed to update the target text.
[0029] In some embodiments, before extracting key information from the original text based on preset keyword features to obtain selected key information, the method further includes:
[0030] Constructing the keyword features specifically includes:
[0031] Obtain preset tagging rules; wherein, the tagging rules include: pronoun features, tagging word features, and effect word features;
[0032] The keyword features are obtained by combining the pronoun features, the marker features, and the effect word features.
[0033] To achieve the above objectives, a second aspect of this application provides a speech-to-text device, the device comprising:
[0034] The data acquisition module is used to acquire voice data;
[0035] The content recognition module is used to perform content recognition on the voice data to obtain the original text;
[0036] The information extraction module is used to extract key information from the original text based on preset keyword features to obtain selected key information; wherein, the selected key information includes: information on words to be marked and information on marking effect;
[0037] The word filtering module is used to filter out words to be labeled from the original text based on the word information to be labeled;
[0038] The operation filtering module is used to filter out target marking operations from preset candidate marking operations based on the marking effect information;
[0039] The word processing module is used to perform marking processing on the words to be marked in the original text according to the target marking operation to obtain the target text.
[0040] To achieve the above objectives, a third aspect of the present application provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method described in the first aspect.
[0041] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0042] The speech-to-text method, apparatus, computer device, and storage medium proposed in this application convert speech data into raw text, then extract the word information to be tagged and the tagging effect information from the raw text. This allows for the selection of words to be tagged from the raw text, the selection of target tagging operations from candidate tagging operations, and the automatic tagging of the words to be tagged in the raw text based on the target tagging operations. This generates text annotated with key sentences, saving manpower from manual text annotation. Therefore, in the insurance industry, service plans with annotation effects can be directly generated, facilitating customers' access to key content and reducing the workload of insurance agents in generating service plans. Attached Figure Description
[0043] Figure 1 This is a flowchart of the speech-to-text method provided in the embodiments of this application;
[0044] Figure 2 This is a flowchart of a speech-to-text method provided in another embodiment of this application;
[0045] Figure 3 yes Figure 1 The flowchart of step S103 in the process;
[0046] Figure 4 yes Figure 3 The flowchart of step S303 in the process;
[0047] Figure 5 This is a schematic diagram of the code mapping relationship in the speech-to-text method provided in the embodiments of this application;
[0048] Figure 6 yes Figure 1 The flowchart of step S106 in the process;
[0049] Figure 7 yes Figure 6 The flowchart of step S601 in the process;
[0050] Figure 8 This is a flowchart of a speech-to-text method provided in another embodiment of this application;
[0051] Figure 9 This is a schematic diagram of the structure of the speech-to-text device provided in the embodiments of this application;
[0052] Figure 10 This is a schematic diagram of the hardware structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0054] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0056] First, let's analyze some of the terms used in this application:
[0057] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0058] Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). It is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. NLP involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.
[0059] Automatic Speech Recognition (ASR) is a technology that converts human speech into text. It focuses on speech, using speech signal processing and pattern recognition to enable machines to automatically recognize and understand spoken human speech. Speech recognition is a high-tech field that allows machines to convert speech signals into corresponding text or commands through recognition and understanding. Speech recognition is a broad interdisciplinary subject, closely related to acoustics, phonetics, linguistics, information theory, pattern recognition theory, and neurobiology.
[0060] Rendering: Rendering refers to the process of using software to generate images from models. It is used to describe the effects in video editing software and to generate the final video output. Rendering applications include computer and video games, movie special effects, and visualization design; each application requires a comprehensive consideration of features and technologies.
[0061] Speech-to-text technology involves recording the speech of an interpreter, transmitting the audio data to a server, and then converting it into text. For example, in the insurance industry, service communications and sales calls between insurance agents and customers are recorded, and then converted into text so that agents can extract key information to create service plans. In other financial sectors, financial service plans can also be generated via voice input, eliminating the need for manual creation. To facilitate customer access to key information, the text needs to be annotated with highlighting key content to emphasize the interpreter's intent. In related technologies, after converting the audio data into text, humans manually annotate keywords based on the interpreter's intent to highlight crucial information. However, manual annotation is time-consuming and labor-intensive.
[0062] Based on this, embodiments of this application provide a speech-to-text method and apparatus, computer equipment, and storage medium. By converting speech data into text, and then extracting the words to be tagged and the tagging effect information from the text, the methods select the words to be tagged and the target tagging operation from the original text. Based on the target tagging operation, the words to be tagged in the original text are automatically tagged, generating text annotated with key sentences, saving the manpower of manually annotating text. Therefore, for insurance agents in the insurance industry, service plans with annotation effects can be generated directly through interpretation, which not only facilitates customer viewing of service plans but also reduces the workload of insurance agents.
[0063] The speech-to-text method, apparatus, computer device, and storage medium provided in this application are specifically described through the following embodiments. First, the speech-to-text method in this application is described.
[0064] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0065] Foundational technologies in artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0066] The speech-to-text method provided in this application relates to the fields of artificial intelligence and fintech. The speech-to-text method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the speech-to-text method, but is not limited to the above forms.
[0067] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0068] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.
[0069] Figure 1 This is an optional flowchart of the speech-to-text method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S106.
[0070] Step S101: Acquire voice data;
[0071] Step S102: Perform content recognition on the speech data to obtain the original text;
[0072] Step S103: Extract key information from the original text based on preset keyword features to obtain selected key information; wherein, the selected key information includes: information on words to be tagged and information on tagging effect;
[0073] Step S104: Select words to be labeled from the original text based on the information of the words to be labeled;
[0074] Step S105: Select the target marking operation from the preset candidate marking operations based on the marking effect information;
[0075] Step S106: Mark the words to be marked in the original text according to the target marking operation to obtain the target text.
[0076] Steps S101 to S106 of this embodiment involve obtaining the original text through content recognition of the acquired speech data, extracting the word information to be labeled and the labeling effect information from the original text based on keyword features, filtering the words to be labeled from the original text based on the word information to be labeled, and then filtering the target labeling operation from the candidate labeling operation based on the labeling effect information. The target labeling operation is then used to label the words to be labeled in the original text to obtain the target text. Therefore, by automatically converting speech data into text and automatically labeling key sentences in the text to generate target text with labeled key sentences, not only is the effort and time of manual text editing saved, but the generation of differentiated content in the target text is also accelerated.
[0077] In step S101 of some embodiments, voice data can be extracted from a preset voice database. Voice data can also be acquired in real time through other means, and is not limited to these. If voice data is acquired in real time, the speaker's speech needs to be recorded using a recording device to collect voice data. The recording device can be pre-configured on the terminal, or the voice data can be directly transmitted to the terminal or server after being collected by the recording device. The recording device includes any of the following: a mobile phone, a laptop computer, or a voice recorder. By displaying a recording icon on the recording device's interface, and the recording icon having a volume indicator, the speaker's real-time speaking volume is indicated by the volume indicator, so that the speaker knows whether to record voice data based on the volume indicator.
[0078] It should be noted that the voice data collected by the recording device can be further processed on the terminal, or it can be sent to the server for further processing. The communication method for the recording device to send voice data to the terminal or server can be wireless or wired; the wireless method can be any of Bluetooth, GPRS, or Wi-Fi.
[0079] For example, in the insurance industry, when insurance agents explain insurance service plans to customers in person, the audio data can be obtained by recording the agent's speech. If the agent explains via telephone, the recording of the telephone conversation can be used as the audio data. If the agent uses a remote conference, the audio data from the conference video can be extracted.
[0080] In step S102 of some embodiments, after acquiring the voice data, it is necessary to convert the voice data into text. Automatic speech recognition technology is used to convert the voice data into raw text in order to identify the text content within the voice data.
[0081] It should be noted that the speech data is converted into raw text, and the raw text is obtained by recognizing the content in the speech data through a speech recognition program.
[0082] In some embodiments, prior to step S103, the speech-to-text method further includes: constructing keyword features.
[0083] It should be noted that before extracting selected key information from the original text, it is necessary to first construct keyword features, that is, predefine which words in the original text need to be extracted as selected key information, so as to improve the flexibility of custom keyword features.
[0084] Please see Figure 2 In some embodiments, constructing keyword features may include, but is not limited to, steps S201 to S202:
[0085] Step S201: Obtain preset tagging rules; wherein, the tagging rules include: pronoun features, tagging word features, and effect word features;
[0086] Step S202: Combine the features of pronouns, markers, and effects to obtain keyword features.
[0087] In step S201 of some embodiments, a preset marking rule is obtained, and the marking rule includes: pronoun features, marker word features and effect word features. The pronoun features are features of the pronouns, the marker word features are features of the words to be marked, and the effect word features can be used to determine what marking effect to be applied to the words to be marked.
[0088] For example, if the pronoun feature is "above", the marker feature is "keyword", and the effect word feature is "marking effect words", then the part of the original text used as the selected key information can be determined by using the pronoun feature, keyword, and effect word feature. The pronoun feature can be customized according to needs, and can include words such as "previously" or "previous text". Furthermore, the selection range of words to be marked can be determined based on the pronoun feature.
[0089] In step S202 of some embodiments, the pronoun features, marker features and effect word features are combined to obtain keyword features, so as to find words that meet the keyword features from the original text as selected key information.
[0090] For example, by combining pronoun features, marker features, and effect features, we can obtain "above + keywords + marker effect words" as keyword features, or "previous text + keywords + marker effect words" as keyword features.
[0091] In steps S201 to S202 of the embodiments of this application, pronoun features, marker features, and effect word features are obtained, and the pronoun features, marker features, and effect word features are combined into keyword features, so as to extract words that meet the keyword features from the original text as selected key information.
[0092] Please see Figure 3 In some embodiments, step S103 may include, but is not limited to, steps S301 to S303:
[0093] Step S301: Perform word feature segmentation on the original text to obtain the original word features;
[0094] Step S302: Select target word features from the original word features based on keyword features;
[0095] Step S303: Extract text content from the original text based on the characteristics of the target words to obtain selected key information.
[0096] In step S301 of some embodiments, the words in the original text are segmented by word features to obtain the original word features of each word in the original text, so as to determine whether the words in the original text match the keyword features based on the original word features.
[0097] It should be noted that before performing word feature segmentation, a word feature database is pre-constructed to determine the word features corresponding to each word. After generating the original text, each word in the original text is first segmented, and then the matching word features are extracted from the word feature database for each word as the original word features, making it easy to determine the original word features of each word in the original text.
[0098] For example, if the original text contains the sentence "A good way of speaking must involve clear articulation, with 'clear articulation' highlighted in red," then word feature segmentation of the original text identifies "speaking style" and "clear articulation" as marker words, "must be" and "above" as pronouns, and "highlighted in red" as an effect word. If the application scenario is the insurance industry, and the original text contains the sentence "Insurance product A serves an age range of 50-60 years old, with '50-60 years old' highlighted in red," then "50-60 years old" is identified as a marker word, and "above" as a pronoun.
[0099] In steps S302 and S303 of some embodiments, the original word features are matched based on the keyword features to obtain the keyword features that match the keyword features as target word features. Then, the corresponding text content is extracted from the original text based on the target word features as selected key information, making the selection of key information easier.
[0100] For example, the keyword features are "above + keyword + marked effect words". The target word features selected from the original word features based on the keyword features are "pronoun features + marked word features + effect word features". The corresponding words extracted from the original text based on the target word features are "above stuttering, clear, highlighted in red" as the selected key information. If the application scenario is the insurance industry, the corresponding words extracted from the original text are "above 50-60 years old highlighted in red" as the selected key information.
[0101] In steps S301 to S303 of this embodiment, original word features are obtained by segmenting each word in the original text using word features. Then, original word features that match the keyword features are selected as target word features. Corresponding content is selected from the original text based on the target word features as selected key information, simplifying the selection process and allowing the identification of the words to be labeled and the labeling effect based on the selected key information.
[0102] Please see Figure 4 In some embodiments, step S303 may include, but is not limited to, steps S401 to S402:
[0103] Step S401: Extract the sentences with target word features from the original text to obtain candidate key sentences; wherein, the candidate key sentences include: keywords and marked words;
[0104] Step S402: Construct selected key information based on keywords and tagging effect words.
[0105] In step S401 of some embodiments, candidate key sentences are first extracted from the original text to obtain sentences corresponding to the target word features. Since the target word features are "pronoun features + marker word features + effect word features", sentences with the same feature order as the target word features are first found in the original text as candidate key sentences. Then, keywords matching the marker word features are selected from the candidate key sentences, and marker effect words matching the effect word features are selected from the candidate key sentences.
[0106] For example, if the original text contains the sentence "Today, I want to emphasize a key point: a good way of speaking is to speak clearly and articulately (highlighted in red above)", based on the target word features ("pronoun features + marker word features + effect word features"), the candidate key phrase matching the target word features is selected from the original text as "clearly and articulately (highlighted in red)". In an insurance industry application scenario, the selected candidate key phrase would be "50-60 years old (highlighted in red)". Therefore, by first selecting candidate key phrases matching the target word features from the original text, the selection of candidate key phrases is simplified.
[0107] It should be noted that after selecting candidate key sentences, the candidate key sentences are structured in the original text, that is, the candidate key sentences are marked in the original text. For example, the sentence after the candidate key sentences are marked in the original text is "A good way of speaking must be clear and articulate, [clear and articulate are highlighted in red]".
[0108] In step S402 of some embodiments, since the candidate key phrases include keywords and marked words, the keywords are used as the word information to be marked, and the marked words are used as the marked effect information. For example, the keyword in the candidate key phrase is "clear pronunciation," and the marked word is "highlighted in red." The marked word can be any one of "highlighted in red," "bold," "underlined," and "italic." Therefore, using keywords and marked words as the selected key information simplifies the determination of the selected key information.
[0109] In steps S401 to S402 as illustrated in the embodiments of this application, sentences matching the features of the target words are first selected from the original text as candidate key sentences. Keywords and tags in the candidate key sentences are then used as selected key information, making the selection of key information easy to obtain. Based on the selected key information, the words to be tagged and the tagging effect are further determined.
[0110] In step S104 of some embodiments, after determining the word information to be tagged, a word search is performed in the original text based on the word information to be tagged. To save word search time, the search range is determined in the original text based on candidate key sentences, that is, the sentence preceding the candidate key sentence is used as the word search range. Matching words are then searched within the sentences corresponding to the word search range based on the word information to be tagged, making the word search faster.
[0111] For example, if the word to be tagged is "clear articulation," first determine the sentence preceding the candidate key statement as the word search range, and the word search range is "a good way of speaking must involve clear articulation." Then, within the sentence search range, determine "clear articulation" in that sentence as the word to be tagged. The word search range is also determined based on the referent. If the referent is "the preceding text," then the range of all content preceding the candidate key statement is determined as the word search range. If the referent is "the first two sentences," then the range of the content of the first two sentences of the candidate key statement is determined as the word search range.
[0112] In step S105 of some embodiments, after finding the word to be tagged, in order to perform tagging processing on the word to be tagged, a target tagging operation is selected from a preset candidate tagging operation based on the tagging effect information. Specifically, the target tagging code is first selected from the candidate tagging codes based on the tagging effect information, the target tagging code is combined with the word to be tagged, and then the combined target tagging code and the word to be tagged are displayed on a preset display to achieve the tagging effect corresponding to the tagging effect information on the word to be tagged.
[0113] For example, if the marking effect information is "highlighted in red", the corresponding candidate markup code is found from the preset code mapping relationship based on the marking effect information. The candidate markup code corresponding to "highlighted in red" is "". <span style="color:rgb(255,0,0);"> words to be marked If the marker effect information is "bold", the corresponding candidate marker code is "". <strong> words to be marked< / strong> If the tag effect information is "underlined", the corresponding candidate tag code is "". <span style="text-decoration:underline;"> words to be marked If the tag effect information is "italic", the corresponding candidate tag code is "". <em> words to be marked< / em> The marking effect information can be any one of "highlighted in red", "bold", "underlined", and "italic". The preset code mapping relationship is as follows: Figure 5 As shown, the corresponding candidate tag code can be found from the code mapping relationship based on the tagging effect information and used as the target tag code for tagging the words to be tagged. Therefore, by determining the corresponding candidate tag code from the code mapping relationship based on the tagging effect information, the tagging processing of the words to be tagged can be facilitated.
[0114] Please see Figure 6 In some embodiments, step S106 may include, but is not limited to, steps S601 to S603:
[0115] Step S601: Extract sentences containing words to be marked from the original text to obtain sentences to be marked;
[0116] Step S602: Mark the words to be marked in the statement to be marked according to the target marking operation to obtain the target statement;
[0117] Step S603: Replace the statement to be marked in the original text with the target statement to obtain the target text.
[0118] In step S601 of some embodiments, after determining the word to be marked, the sentence carrying the word to be marked is first extracted from the original text as the sentence to be marked, so that the word to be marked can be marked directly in the sentence to be marked, without having to mark each word in the entire text of the original text one by one. Here, the sentence to be marked is the sentence located before the candidate key sentence.
[0119] For example, if the word to be tagged is "clear articulation", sentences containing "clear articulation" are selected from the original text, namely the fourth sentence of paragraph 2, the second sentence of paragraph 3, and the fifth sentence of paragraph 4. The sentence preceding the candidate key sentence is identified as the fourth sentence of paragraph 2, which is then selected as the sentence to be tagged.
[0120] In step S602 of some embodiments, after determining the statement to be marked, that is, after defining the range of words to be marked in the original text, it is not necessary to mark all the words to be marked in the entire original text. Instead, the statement to be marked is selected first, and then the words to be marked in the statement to be marked are marked according to the target marking operation.
[0121] For example, if the original text contains the sentence "A good way of speaking must involve clear articulation, with clear articulation highlighted in red," the sentence to be marked is "A good way of speaking must involve clear articulation." Therefore, marking the phrase "clear articulation" in "A good way of speaking must involve clear articulation" yields the marked target sentence. If the target marking operation is adding an underline, then the target sentence is "A good way of speaking must involve..." Clear speech of If the application scenario is in the insurance industry, and a statement in the original text is "The age range served by Insurance Type A is 50-60 years old, with 50-60 years old highlighted in red," then the generated text will be "The age range served by Insurance Type A is 50-60 years old," with "50-60 years old" in red. Therefore, for insurance agents, it's beneficial to highlight key information when generating insurance service plans for easy customer review, thereby improving the quality of insurance services.
[0122] In step S603 of some embodiments, after the marking process of the words to be marked is completed, the target sentence is obtained. The sentence to be marked in the original text is replaced with the target sentence to obtain the target text with marked keywords, thereby realizing the automatic effect marking of keywords in the text after speech-to-text conversion.
[0123] For example, if the original text contains the sentence "Today, I want to emphasize a key point: a good way of speaking is to speak clearly," replacing the original text with the target sentence will result in the target text, where the same sentence will be "Today, I want to emphasize a key point: a good way of speaking is to speak clearly." Clear speech of.".
[0124] In steps S601 to S603 of the embodiments of this application, by first determining the statement to be marked, and then marking the words to be marked in the statement to be marked according to the target marking operation, the statement to be marked is limited, and it is not necessary to mark every word to be marked in the entire original text, so that the keyword marking in the original text is more accurate.
[0125] Please see Figure 7 In some embodiments, step S601 includes, but is not limited to, steps S701 to S702:
[0126] Step S701: Select the sentence range in the original text based on the words to be marked to obtain the sentence selection range; wherein, the sentence selection range is the range of the sentence preceding the candidate key sentence in the original text;
[0127] Step S702: Select the statements to be marked from the original text according to the statement selection range.
[0128] In step S701 of some embodiments, to make the tagging process of the words to be tagged more accurate, the sentence selection range is determined based on the words to be tagged in the original text, and the sentence selection range is the range of the sentence preceding the candidate key sentence in the original text. This simplifies the determination of the sentence selection range, eliminating the need for a full-text search to find sentences containing the words to be tagged.
[0129] It should be noted that the scope of sentence selection is also determined by the referent. If the referent is "all of the foregoing," then all content preceding the candidate key sentence is included in the scope of sentence selection. If the referent is "the preceding sentence," then the sentence preceding the candidate key sentence is included in the scope of sentence selection. If the referent is "the preceding paragraph," then the content of the paragraph preceding the candidate key sentence is included in the scope of sentence selection.
[0130] In step S702 of some embodiments, after determining the scope of sentence selection, sentences to be marked are selected from the original text according to the scope of sentence selection, and the sentences to be marked contain words to be marked. Therefore, when the scope to be limited is the content of the previous sentence, the previous sentence is directly selected as the sentence to be marked, instead of marking the words to be marked in the entire original text, making the marking of the words to be marked more accurate and more efficient.
[0131] In steps S701 to S702 of the embodiments of this application, the range of the preceding statement in the original text is determined as the statement selection range, and then the statement to be marked is selected from the original text according to the statement selection range, making the selection of the statement to be marked easier. At the same time, after determining the statement to be marked, the scope of the marking process is limited, making the marking more accurate and more efficient.
[0132] Please see Figure 8 In some embodiments, after step S106, the speech-to-text method may also include, but is not limited to, steps S801 to S802:
[0133] Step S801: Obtain the position information of punctuation marks before candidate key sentences in the target text to obtain symbol position information;
[0134] Step S802: Remove punctuation marks from the target text based on symbol position information, and remove candidate key sentences from the target text to update the target text.
[0135] In step S801 of some embodiments, after obtaining the target text by replacing the statement to be marked in the original text with the target statement, since the target text also contains candidate key statements and additional punctuation marks, it is necessary to first obtain the position information of the punctuation marks before the candidate key statements in the target text to obtain symbol position information, so as to determine the position of the additional punctuation marks based on the symbol position information.
[0136] For example, if the candidate key sentence is located in the fourth sentence of the second paragraph, then the position before the fourth sentence of the second paragraph is used as the symbol position information, and the punctuation mark before the fourth sentence of the second paragraph is selected as ",".
[0137] In step S802 of some embodiments, punctuation marks in the target text are selected according to the symbol position information, and then the punctuation marks corresponding to the symbol position information are removed, and the candidate key sentence bodies in the target text are removed, so as to update the target text and obtain the final text.
[0138] For example, if the target text is "Today, I want to say a key point, and a good way of speaking must be..." Clear speech The above is clearly enunciated and underlined. The punctuation marks "," and the candidate key phrase "the above is clearly enunciated and underlined" are removed from the target text, resulting in the updated text: "Today, I want to say something important: a good way of speaking must be..." Clear speech of.".
[0139] In steps S801 to S802 of the embodiments of this application, after constructing the target text, punctuation marks corresponding to the symbol position information are removed from the target text, and candidate key sentences are removed from the target text to update the target text and obtain the final text. Therefore, by removing redundant sentences and punctuation marks, a final text that conforms to the speaker's intention is constructed, so that the reader can more intuitively understand the speaker's intention after reading the final text.
[0140] It should be noted that the final displayed text is generated by combining the target tag code and the words to be tagged to form a target code, which is then loaded through a preset display or browser to display the final target text. The preset browser refers to the app or web application. For example, if the target code is "A good way of speaking must be..." <span style="color:rgb(255,0,0);"> Clear speech Therefore, the browser is pre-set to display "Good speaking style always involves clear articulation," and "clear articulation" is in red. For example, if the target code is "The age range of the people served by insurance type A is highlighted in red..." <span style="color:rgb(255,0,0);"> 50-60 years old Therefore, the browser defaults to displaying "The age range served by Insurance Type A is 50-60 years old", with "50-60 years old" in red font.
[0141] Specifically, the default browser has a built-in text editor that parses the target code into corresponding style content, marks the words to be marked according to the style content to obtain the final text, and displays the final text through rendering.
[0142] This embodiment first records the speaker's speech using a recording device to obtain voice data, which is then wirelessly transmitted to a server. The server then uses automatic speech content recognition technology to perform content recognition on the voice data to obtain the original text. After converting the voice data into original text, each word in the original text is segmented, and the word features of each word are determined from a word feature database to obtain the original word features. Target word features are then selected from the original word features based on pronoun features, marker word features, and effect word features. Keywords and marker effect words matching the target word features are extracted from the original text. Keywords are used as the words to be marked, and marker effect words are used as the marker effect information. The preceding sentence of the original text is then used as the word search range based on the marker word information. Matching words are searched within the corresponding sentences of the word search range based on the words to be marked. The sentence selection range in the original text is further determined based on the words to be marked, i.e., the sentence range for marking processing is determined. Sentences to be marked are selected from the original text based on the sentence selection range, i.e., the sentences for marking processing. Then, based on the marking effect information, the corresponding candidate marking codes are determined from the representative mapping relationship as target marking codes. The target marking codes and the words to be marked in the sentence to be marked are combined to form the target code. The combined target code is then displayed through a preset browser to mark the words to be marked in the sentence to be marked, thus obtaining the target sentence. The sentences to be marked in the original text are replaced with the target sentences to obtain the target text. The positions of punctuation marks before the candidate key sentences in the target text are obtained to obtain symbol position information. Based on the symbol position information, the corresponding punctuation marks in the target text are removed, and the candidate key sentences are also removed to update the target text and obtain the final text. Therefore, by automatically converting speech data into text and then removing selected key information from the original text based on preset keyword features, the words to be marked in the original text are automatically marked based on the selected key information to generate target text with marked keywords, saving manual text editing. Therefore, by constructing a method that can convert speech data into text with annotation effects, it can be applied to the general field of speech-to-text conversion. Specifically designed for the insurance service industry, because insurance service plans contain many key contents that customers need to review, insurance agents can generate marked insurance service plans simply by verbally describing them. This reduces the workload of insurance agents in creating insurance service plans and makes it easier for customers to review the key information, thus improving the customer service experience.
[0143] Please see Figure 9 This application also provides a speech-to-text device that can implement the above-described speech-to-text method. The device includes:
[0144] Data acquisition module 901 is used to acquire voice data;
[0145] Content recognition module 902 is used to perform content recognition on voice data to obtain the original text;
[0146] The information extraction module 903 is used to extract key information from the original text based on preset keyword features to obtain selected key information; wherein, the selected key information includes: information on words to be marked and information on marking effect;
[0147] The word filtering module 904 is used to filter out words to be labeled from the original text based on the information of the words to be labeled;
[0148] The operation filtering module 905 is used to filter out the target marking operation from the preset candidate marking operations based on the marking effect information;
[0149] The word processing module 906 is used to mark words to be marked in the original text according to the target marking operation to obtain the target text.
[0150] The specific implementation of this speech-to-text device is basically the same as the specific implementation of the speech-to-text method described above, and will not be repeated here.
[0151] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described speech-to-text method. This computer device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0152] Please see Figure 10 , Figure 10 The hardware structure of a computer device according to another embodiment is illustrated. The computer device includes:
[0153] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0154] The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the speech-to-text method of the embodiments of this application.
[0155] Input / output interface 1003 is used to implement information input and output;
[0156] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0157] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0158] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0159] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described speech-to-text method.
[0160] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0161] The speech-to-text method, apparatus, computer device, and storage medium provided in this application first convert speech data into raw text, and then select key information based on the content in the raw text that conforms to keyword features. The words in the raw text are automatically marked based on the selected key information to generate text annotated with key sentences, eliminating the need for manual text editing and saving manpower for manually annotating key content. Therefore, generating annotated text based on speech data is particularly beneficial for the insurance service industry, as it allows customers to easily access key information through oral presentations, while also reducing the workload of insurance sales personnel.
[0162] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0163] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0165] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0166] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0167] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0168] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0169] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0170] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0171] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0172] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A speech-to-text method, characterized in that, The method includes: Acquire voice data; The speech data is subjected to content recognition to obtain the original text; Based on preset keyword features, key information is extracted from the original text to obtain selected key information; wherein, the selected key information includes: information on words to be marked and information on marking effect; Words to be labeled are selected from the original text based on the information of the words to be labeled; The target marking operation is selected from the preset candidate marking operations based on the marking effect information; The target text is obtained by marking the words to be marked in the original text according to the target marking operation.
2. The method according to claim 1, characterized in that, The step of extracting key information from the original text based on preset keyword features to obtain selected key information includes: The original text is segmented into word features to obtain the original word features; Target word features are selected from the original word features based on the keyword features; Based on the target word features, the text content of the original text is extracted to obtain the selected key information.
3. The method according to claim 2, characterized in that, The step of extracting text content from the original text based on the target word features to obtain the selected key information includes: The sentences from which the target word features are extracted in the original text are used to obtain candidate key sentences; wherein, the candidate key sentences include: keywords and marked words; The selected key information is constructed based on the keywords and the marked effect words.
4. The method according to any one of claims 1 to 3, characterized in that, The step of marking the words to be marked in the original text according to the target marking operation to obtain the target text includes: Extract the sentences containing the words to be marked from the original text to obtain the sentences to be marked; The target sentence is obtained by marking the words to be marked in the sentence to be marked according to the target marking operation. The target text is obtained by replacing the statement to be marked in the original text with the target statement.
5. The method according to claim 3, characterized in that, The step of extracting sentences containing the words to be marked from the original text to obtain the sentences to be marked includes: Based on the words to be marked, a sentence range is selected in the original text to obtain the sentence selection range; wherein, the sentence selection range is the range of the sentence preceding the candidate key sentence in the original text; The statement to be marked is selected from the original text according to the statement selection range.
6. The method according to claim 3, characterized in that, After marking the words to be marked in the original text according to the target marking operation to obtain the target text, the method further includes: Obtain the position information of the punctuation marks before the candidate key sentences in the target text to obtain the symbol position information; Punctuation marks in the target text are removed based on the symbol position information, and candidate key sentences in the target text are removed to update the target text.
7. The method according to claim 5, characterized in that, Before extracting key information from the original text based on preset keyword features to obtain selected key information, the method further includes: Constructing the keyword features specifically includes: Obtain preset tagging rules; wherein, the tagging rules include: pronoun features, tagging word features, and effect word features; The keyword features are obtained by combining the pronoun features, the marker features, and the effect word features.
8. A speech-to-text device, characterized in that, The device includes: The data acquisition module is used to acquire voice data; The content recognition module is used to perform content recognition on the voice data to obtain the original text; The information extraction module is used to extract key information from the original text based on preset keyword features to obtain selected key information; wherein, the selected key information includes: information on words to be marked and information on marking effect; The word filtering module is used to filter out words to be labeled from the original text based on the word information to be labeled; The operation filtering module is used to filter out target marking operations from preset candidate marking operations based on the marking effect information; The word processing module is used to perform marking processing on the words to be marked in the original text according to the target marking operation to obtain the target text.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the speech-to-text method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the speech-to-text method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Call log marking method and device and electronic equipment
CN104184870A
Text generation method and system, mobile terminal and storage medium
CN111027308A