Speech processing text correction method and device, and storage medium

CN122965484APending Publication Date: 2026-10-23ALIBABA CLOUD COMPUTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510507229.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0005]本申请的主要目的在于提供一种语音处理文本的纠正方法、装置及存储介质,以解决相关技术中直接对语音处理文本进行纠正,纠正的准确性较低的问题

Benefits of technology

[0018]在本申请实施例中,通过接收待纠正的语音处理文本和待纠正的语音处理文本对应的源语音;将待纠正的语音处理文本和待纠正的语音处理文本对应的源语音输入目标模型,其中,目标模型是基于训练数据对第一模型进行参数调整后得到的模型,训练数据包括语音训练样本、第一语音训练文本和第二语音训练文本,第一语音训练文本是语音训练样本对应的语音处理文本,第二语音训练文本是采用第二模型对语音训练样本处理后的语音处理文本;通过目标模型输出纠正后的目标语音处理文本,解决了直接对语音处理文本进行纠正,纠正的准确性较低的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122965484A_ABST
    Figure CN122965484A_ABST
Patent Text Reader

Abstract

The application discloses a speech processing text correction method and device and a storage medium. It relates to the field of artificial intelligence. The method comprises the following steps: receiving a speech processing text to be corrected and source speech corresponding to the speech processing text to be corrected; inputting the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected into a target model, wherein the target model is obtained by adjusting parameters of a first model based on training data, and the training data comprises a speech training sample, a first speech training text and a second speech training text; and outputting a corrected target speech processing text through the target model. Through the application, the problem that the accuracy of correction is low when directly correcting a speech processing text in the related art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and more specifically, to a method, apparatus, and storage medium for correcting speech-processed text. Background Technology

[0002] With increasingly frequent global exchanges, voice translation technology plays an increasingly important role in cross-language communication. Whether it's real-time interpretation at international conferences or language assistants in travel scenarios, voice translation has become a bridge connecting different languages ​​and cultures. However, despite the significant progress made in speech recognition and translation technologies over the past decade, many challenges remain in correcting speech-to-text translation in practical applications, resulting in translations that fail to meet high standards of accuracy and fluency.

[0003] In existing technologies, the commonly used correction methods are text-based, which involves post-processing the text results generated from speech recognition and translation. This processing typically relies on text analysis and natural language processing techniques. While it can correct basic problems such as grammatical and spelling errors to some extent, its effectiveness is significantly reduced in complex scenarios, such as speech translation in noisy environments, errors in recognizing polyphonic or polysemous words, and mistranslations of technical terms. Especially when the quality of the original speech processing text is poor, text-based correction methods often struggle to distinguish between correct transcriptions and translations and erroneous parts, resulting in low accuracy and potentially introducing new errors.

[0004] There is currently no effective solution to the problem that the accuracy of correcting speech-to-text directly is low in related technologies. Summary of the Invention

[0005] The main objective of this application is to provide a method, apparatus, and storage medium for correcting speech-processed text, in order to solve the problem that the accuracy of correcting speech-processed text directly in related technologies is relatively low.

[0006] To achieve the above objectives, according to one aspect of this application, a method for correcting speech-processed text is provided. The method includes: receiving speech-processed text to be corrected and corresponding source speech; inputting the speech-processed text to be corrected and the corresponding source speech into a target model, wherein the target model is a model obtained by adjusting the parameters of a first model based on training data, the training data including speech training samples, a first speech training text, and a second speech training text, the first speech training text being the speech-processed text corresponding to the speech training samples, and the second speech training text being the speech-processed text after processing the speech training samples using a second model; and outputting the corrected target speech-processed text through the target model.

[0007] Furthermore, before outputting the corrected target speech processing text through the target model, the method further includes: determining a prompt word template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected, wherein the prompt word template includes at least the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and explanatory information for instructing the speech processing text to be corrected to be corrected, wherein the prompt word template is used as input to the target model.

[0008] Furthermore, determining the prompt word template based on the speech processing text to be corrected and the corresponding source speech includes: determining the text correction type based on the speech processing text to be corrected and the corresponding source speech; determining explanatory information based on the text correction type; and generating the prompt word template based on the speech processing text to be corrected, the corresponding source speech, and the explanatory information.

[0009] To achieve the above objectives, according to one aspect of this application, a method for training a target model is provided, comprising: acquiring speech training samples and a first speech training text, wherein the first speech training text is the speech processing text corresponding to the speech training samples; generating a second speech training text based on the speech training samples using a second model; using the second speech training text as training data when the second speech training text meets the target preset conditions; and training the first model based on the training data to obtain the aforementioned target model.

[0010] Furthermore, when the first speech training text includes a first recognition training text and a first translation training text, the first recognition training text is the speech recognition text corresponding to the speech training sample, and the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. The target model obtained by training the first model based on the training data includes:

[0011] Further, the second recognition training text is corrected using the first model to obtain the corrected second recognition training text; based on the corrected second recognition training text, the second translation training text is corrected using the first model to obtain the corrected second translation training text; a first loss value is calculated based on the loss function for the first recognition training text and the corrected second recognition training text; a second loss value is calculated based on the loss function for the first translation training text and the corrected second translation training text; based on the first and second loss values, the parameters of the first model are updated, and the steps of correcting the second translation training text and the second recognition training text using the updated first model, calculating the loss value between the corrected second recognition training text and the first recognition training text output by the updated first model based on the loss function, and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function are repeated until a first preset condition is met, and the first model corresponding to the first preset condition is determined as the target model.

[0012] Further, when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. Training the first model based on the training data to obtain the target model includes: correcting the second translation training text using the first model based on the second recognition training text to obtain the corrected second translation training text; calculating a third loss value between the first translation training text and the corrected second translation training text based on the loss function; updating the parameters of the first model based on the third loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function, until a second preset condition is met, and the first model corresponding to the second preset condition is determined as the target model.

[0013] Furthermore, when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes a second translation training text, the second translation training text is the speech translation text processed by the second model on the speech training sample. Training the first model based on the training data to obtain the target model includes: correcting the second translation training text using the first model to obtain the corrected second translation training text; calculating a fourth loss value between the first translation training text and the corrected second translation training text based on the loss function; updating the parameters of the first model based on the fourth loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on the loss function, until a third preset condition is met, and the first model corresponding to the third preset condition is determined as the target model.

[0014] To achieve the above objectives, according to another aspect of this application, a speech processing text correction apparatus is provided. The apparatus includes: a receiving unit for receiving speech processing text to be corrected and source speech corresponding to the speech processing text to be corrected; an input unit for inputting the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected into a target model, wherein the target model is a model obtained by adjusting the parameters of a first model based on training data, the training data including speech training samples, a first speech training text, and a second speech training text, the first speech training text being the speech processing text corresponding to the speech training samples, and the second speech training text being the speech processing text after processing the speech training samples using a second model; and an output unit for outputting the corrected target speech processing text through the target model.

[0015] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform any speech-text correction method.

[0016] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a method for performing any kind of speech processing text correction method.

[0017] According to another aspect of this application, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps of the speech processing text correction method described above.

[0018] In this embodiment, the method involves receiving the speech processing text to be corrected and the corresponding source speech; inputting the speech processing text to be corrected and the corresponding source speech into a target model, wherein the target model is a model obtained by adjusting the parameters of a first model based on training data. The training data includes speech training samples, a first speech training text, and a second speech training text. The first speech training text is the speech processing text corresponding to the speech training samples, and the second speech training text is the speech processing text after processing the speech training samples using the second model. The target model outputs the corrected target speech processing text, thus solving the technical problem of low accuracy in directly correcting speech processing text.

[0019] The target model in this application utilizes its rich training data (speech training samples, first speech training text, and second speech training text) to not only understand speech features but also recognize grammatical, semantic, and contextual information in language. By combining speech and text-based dual training, the target model can better understand user intent and correct various problems, including pronunciation errors and semantic confusion. Therefore, the target model can capture subtle differences in speech, improving the accuracy of speech processing correction results. Attached Figure Description

[0020] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0021] Figure 1 A hardware block diagram of a computer terminal for implementing a text correction method for speech processing is shown.

[0022] Figure 2 This is a flowchart of a speech processing text correction method provided according to an embodiment of this application;

[0023] Figure 3 This is a flowchart of a training method for a target model according to an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of a speech processing text correction device provided according to an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of a training apparatus for a target model provided according to an embodiment of this application;

[0026] Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, 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.

[0029] It should be noted that all relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties. For example, if there is an interface between this system and the relevant user or organization, before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.

[0030] Example 1

[0031] According to an embodiment of this application, a method embodiment for correcting speech-processed text is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0032] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a speech-processing text correction method is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0033] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the speech processing text correction method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned speech processing text correction method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0035] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0036] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0037] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for correcting speech-processed text is shown. Figure 2 This is a flowchart of a speech processing text correction method according to Embodiment 1 of this application.

[0038] Step S201: Receive the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected.

[0039] Optionally, the aforementioned speech processing text to be corrected can be text processed using existing speech recognition or speech translation technologies, but such text may contain recognition errors or inaccurate translations. These errors may be caused by environmental noise in the speech input, unclear pronunciation, difficulty in recognizing polyphonic or polysemous words, differences in dialects or accents, mistranslation of technical terms, or excessively fast speaking speed. For example, if a user says "I work at a bank," but the speech recognition system incorrectly recognizes it as "I work at Yinhang," then "I work at Yinhang" is the speech processing text to be corrected.

[0040] Optionally, the source speech can be the user's initial input, serving as the direct "precursor" to the speech processing text to be corrected. In the correction process, the source speech provides the original signal information from the speech recognition and translation processes. Even if errors occur in the processed text, the source speech retains the complete semantics of the user's speech and can serve as an important reference during the correction process. In the example above, the original speech of "I work at a bank" is the source speech.

[0041] Step S202: Input the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected into the target model. The target model is a model obtained by adjusting the parameters of the first model based on the training data. The training data includes speech training samples, first speech training text and second speech training text. The first speech training text is the speech processing text corresponding to the speech training sample, and the second speech training text is the speech processing text after the speech training sample is processed by the second model.

[0042] Optionally, the target model described above is a model that has undergone specific training and adjustment, used to correct the received speech processing text to be corrected. In this embodiment, the target model, through deep learning technology, is able to understand and process semantic information in speech and text. Based on the patterns learned during training, it can identify and correct errors in the speech processing text. In this scheme, the target model is obtained by adjusting the parameters of the first model based on training data containing speech training samples, a first speech training text, and a second speech training text. The first model can be a pre-trained general language model before fine-tuning, which may have the ability to handle multiple languages ​​and tasks. During the pre-training stage, the first model can accept a large amount of text data to learn the rules and patterns of language, but its performance may need further optimization when processing speech translation and recognition of specific tasks to better adapt to the complexity and diversity of speech input. Through the fine-tuning steps of this invention, the first model can be adjusted to a target model with higher speech understanding and translation repair capabilities. The second model described above can be a pre-trained speech recognition model or translation model used to generate the second speech training text.

[0043] Optionally, in the training dataset of this invention, the speech training samples (i.e., the source speech used in training) are real speech signals, which can come from different languages, accents, and environmental backgrounds, etc., and are used to train the target model. The first speech training text mentioned above is the speech processing text corresponding to the speech training sample. The first speech training text can include correct speech recognition text and speech translation text. In the training dataset, the first speech training text serves as the "correct answer" for the model to learn, helping the model understand the true meaning and context of the speech. For example, if the speech training sample is "I'm going to the library tomorrow," then the corresponding first speech training text should be the accurate speech processing text of "I'm going to the library tomorrow." The second speech training text mentioned above is the speech processing text obtained after processing the speech training sample based on a second model (e.g., a speech translation model). The second speech training text may contain incorrect or imperfect transcription and translation results. During the construction of the training dataset, the second speech training text is compared with the first speech training text to guide the learning of the target model, enabling it to learn how to recover correct information from incorrect or inaccurate text. For example, the second speech training text corresponding to "Tomorrow I'm going to the library" might be "Tomorrow I'm going to the bookstore," and the model needs to learn how to correct "bookstore" to "library."

[0044] Step S203: Output the corrected target speech processing text through the target model.

[0045] The target model in this application utilizes its rich training data (speech training samples, first speech training text, and second speech training text) to not only understand speech features but also recognize grammatical, semantic, and contextual information in language. By combining dual training with speech and text, the target model can better understand user intent and correct various problems, including pronunciation errors and semantic confusion. Therefore, the target model can capture subtle differences in speech, process the input speech processing text to be corrected and the corresponding source speech, and output the corrected target speech processing text, thus improving the accuracy of the corrected speech processing results.

[0046] To enhance the target model's ability to process language data, optionally, the method includes the following steps before outputting the corrected target speech-processed text through the target model:

[0047] Based on the speech processing text to be corrected and the corresponding source speech, a prompt word template is determined. The prompt word template includes at least the speech processing text to be corrected, the corresponding source speech, and explanatory information for instructing the speech processing text to be corrected. This prompt word template is used as input to the target model.

[0048] Optionally, the above prompt template refers to a structured input format for guiding the target model to perform effective correction. The prompt template may include the speech processing text to be corrected, and can also integrate the original speech information as well as a clear instruction or description information, which is used to indicate the direction and requirements for the target model to correct the text. The prompt template is designed to maximize the correction effect of the target model, ensure that the target model can accurately understand the details of the correction task, and perform effective error correction based on the speech processing text to be corrected.

[0049] For example, there is a speech processing text to be corrected "我需吃平果" (I need to eat flatfruit), and the corresponding source speech is the clear Chinese sentence "我需要吃苹果" (I need to eat apples). In order to correct the error in this speech processing text, a prompt template is constructed, and the content of the prompt template is as follows:

[0050] Speech waveform data: audio features of the original Chinese sentence;

[0051] Erroneous translated text: 我需吃平果;

[0052] Description information: Please correct the erroneous words in the above translated text based on the speech information to ensure the accuracy of the translation result.

[0053] Optionally, the prompt template is sent to the target model as part of the input. The target model will try to understand and correct the errors in the speech processing text based on the information in the prompt template, especially the source speech and the description information.

[0054] For example, after receiving the prompt template containing the erroneous translation and the source speech, the target model outputs the correct translation result: "我需要吃苹果" (I need to eat apples).

[0055] In conclusion, by constructing the prompt template through the above steps and inputting it into the target model, the target model processes it based on the source speech information and the description information, and outputs the corrected speech processing text, which can significantly improve the accuracy of translation or recognition.

[0056] In order to more accurately guide the target model to correct the speech processing text, optionally, in the method for correcting a speech processing text provided in the embodiments of the present application, determining the prompt template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected includes:

[0057] In the first step, the text correction type is determined according to the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected.

[0058] Optionally, the speech-processed text to be corrected and the corresponding source speech are first analyzed to determine the nature and type of errors in the text. The text correction type may include lexical errors, grammatical errors, semantic errors, or recognition errors caused by unclear pronunciation, etc. This determination is based on in-depth understanding of the speech and the text, and additional natural language processing technology or speech recognition technology may be used for assistance.

[0059] For example, the speech-processed text to be corrected is "I need to eat flat fruit", and the source speech is a clear Chinese sentence: "I need to eat apples". Through analysis, it is identified that the error in the text belongs to the lexical error type.

[0060] In the second step, the description information is determined according to the text correction type.

[0061] Optionally, after the text correction type is clarified, targeted description information is generated to guide the target model to perform the correct correction operation. The description information may describe the specific requirements for correction in detail, such as correcting lexical errors, repairing grammatical structures, or improving semantic expression, and may include the expected form of the corrected text. Providing specific description information for different types of errors can guide the target model to perform correction accurately, avoid unnecessary or incorrect modifications to the text, and improve the accuracy and efficiency of correction.

[0062] For example, when it is determined that the error type is a lexical error, description information stating "Please correct the lexical error in the text, and correct 'flat fruit' to the correct word to reflect the real intention of the source speech" is generated.

[0063] In the third step, a prompt template is generated based on the speech-processed text to be corrected, the source speech corresponding to the speech-processed text to be corrected, and the description information.

[0064] For example, the erroneous translated text "I need to eat flat fruit", the audio waveform or feature of the source speech, and the description information "Please correct the lexical error in the text, and correct 'flat fruit' to the correct word to reflect the real intention of the source speech" are combined into a prompt template.

[0065] In summary, generating the prompt template through the above steps can accurately guide the target model to correct the speech-processed text, and provide technical support for achieving a higher-quality correction effect.

[0066] To provide the target model with more comprehensive and specific information and instructions, optionally, in the speech processing text correction method provided in this application embodiment, determining the prompt word template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected includes: obtaining the context information corresponding to the speech processing text to be corrected; determining the guidance example for guiding the correction of the speech processing text to be corrected according to the text correction type; and generating the prompt word template based on the speech processing text to be corrected, the explanatory information, the guidance example, and the context information.

[0067] Optionally, the aforementioned contextual information refers to other text or speech segments associated with the text to be corrected, which can help the model more comprehensively understand the speaker's intent and the speech environment. The guiding examples above are exemplary correct texts that have similar error patterns to the text to be corrected, but have been correctly translated or recognized. These examples can serve as a reference for the model to correct errors, helping the model learn how to identify and correct errors.

[0068] For example, in a speech recording, the speaker clearly says "I need to eat apples," but the speech processing system recognizes and translates it as "I need to eat flat fruit." To correct this translation error, a prompt word template containing sufficient context, guiding examples, and explicit explanations can be constructed. The contextual information includes the speaker's preceding statement "I'm really hungry now," and the subsequent statement "Apple is one of my favorite fruits." Next, the system determines the type of vocabulary error requiring correction and selects guiding examples with similar vocabulary error patterns to "I need to eat flat fruit," such as: "I don't like oranges, I like grapes" being incorrectly translated as "I don't like oranges, I like raisins," along with its correct translation. Based on this information, the generated prompt word template is as follows:

[0069] Speech waveform data: Audio features of the original speech;

[0070] Incorrect translation: I need to eat apples;

[0071] Contextual information: I am very hungry; apples are one of my favorite fruits;

[0072] Instructions: Please correct the vocabulary errors in the text, replacing incorrect words with correct ones to reflect the true intent of the original speech.

[0073] Example: I don't like oranges, I like grapes; Corrected translation: I don't like oranges, I like grapes.

[0074] In summary, this integrated information-generated prompt word template provides the target model with comprehensive and specific information and instructions, enabling the target model to make full use of all available information, including context, error type, and example guidance, when performing correction tasks, thereby improving the accuracy and fluency of correction.

[0075] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0076] Example 2

[0077] This application also provides a method for training a target model, such as... Figure 3 As shown, the method includes:

[0078] Step S301: Obtain a speech training sample and a first speech training text, wherein the first speech training text is the speech processing text corresponding to the speech training sample.

[0079] Optionally, a large number of speech training samples should be collected first. These samples can cover various languages, accents, speech rates, and environmental noise to ensure the diversity and representativeness of the training data. Simultaneously, the first speech training text corresponding to each training sample needs to be obtained; that is, the correct speech processing text of the training sample. The first speech training text serves as the "standard answer" for model training, helping the model learn the correct language rules and patterns. By obtaining high-quality speech training samples and the first speech training text, a solid learning foundation can be ensured for the target model in subsequent training, thereby improving its ability to correct speech processing text.

[0080] For example, a series of voice training samples were collected, in which users said "I'm going to the supermarket to buy groceries tomorrow" in Chinese in different environments, and the accurate voice-processed text of these voice samples, "I'm going to the supermarket to buy groceries tomorrow", were used as the first voice training text.

[0081] Step S302: Generate second speech training text based on speech training samples using the second model.

[0082] Optionally, the second model can be a pre-trained speech recognition or translation model used to generate second speech training text. The second speech training text may contain recognition or translation errors, but they provide the model with real-world examples of errors to help the model learn how to recognize and correct them.

[0083] For example, when processing the above speech training samples, the second model incorrectly generated "I clearly want to go to the supermarket to buy vegetables" as the second speech training text.

[0084] Step S303: If the second speech training text meets the target preset conditions, the speech training sample, the first speech training text, and the second speech training text are used as training data.

[0085] Optionally, the aforementioned target preset condition can be the error level of the second speech training text, such as the mistranslation rate or grammatical error rate. Only when the error level of the second speech training text reaches a certain standard (e.g., a mistranslation rate between 5% and 10%, or a grammatical error rate between 2% and 5%) can it be ensured that the model can learn effective repair strategies from erroneous examples during training. The training dataset that meets the target preset condition, including speech training samples, the first speech training text, and the second speech training text, will be used to fine-tune the first model.

[0086] For example, if the second model's generated text "I am going to the supermarket to buy vegetables" and the correct text "I am going to the supermarket to buy vegetables tomorrow" are within the preset mistranslation rate range, then both the incorrect speech processing text and the correct speech processing text will be included in the training dataset.

[0087] Step S304: Train the first model based on the training data to obtain the target model described above.

[0088] Optionally, in this step, the first model is trained using a training dataset containing speech training samples, a first speech training text, and a second speech training text. It learns how to correct erroneous speech processing text based on speech information. During training, the first model continuously adjusts its parameters to minimize the difference or loss function value between the first and second speech training texts until the model performance reaches the expected target. At this point, the first model, after training and adjustment, becomes the target model.

[0089] In summary, from acquiring speech training samples and the first speech training text, to generating and filtering the second speech training text, and then training the first model using the training dataset, a target model capable of more accurately correcting speech processing text is obtained. This target model, utilizing its rich training data (speech training samples, the first speech training text, and the second speech training text), not only understands the speech features in speech but also recognizes grammatical, semantic, and contextual information in language. By combining dual training with speech and text, the target model can better understand user intent and correct various problems, including pronunciation errors and semantic confusion. Therefore, the target model can capture subtle differences in speech, improving the accuracy of correcting speech processing results.

[0090] To adapt to different practical application scenarios, such as in application scenarios where the first speech training text includes a first recognition training text and a first translation training text, optionally, in the speech processing text correction method provided in this application embodiment, when the first speech training text includes: a first recognition training text and a first translation training text, the first recognition training text is the speech recognition text corresponding to the speech training sample, and the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes: a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. The target model obtained by training the first model based on the training data includes:

[0091] The first step is to correct the second recognition training text using the first model, resulting in the corrected second recognition training text.

[0092] Optionally, the first model is used initially to correct errors in the second recognition training text. The model will attempt to understand and fix speech recognition errors, outputting a recognition result that is closer to reality.

[0093] For example, the voice training sample is a user saying "I like to eat apples" in Chinese. The second model incorrectly identifies it as "I like to eat flat fruit" and also incorrectly translates it into English as "I like to eat flat fruit". The incorrect identification and translation results constitute the second voice training text. After receiving the voice recognition text "I like to eat flat fruit", the first model corrects the error of "I like to eat flat fruit" based on the audio information of the voice training sample and outputs the correct recognition text "I like to eat apples".

[0094] The second step involves correcting the second recognition training text using the first model, thereby obtaining the corrected second translation training text.

[0095] Optionally, based on the corrected second recognition training text obtained in the first step, the first model further corrects the errors in the second translation training text, which can enhance the accuracy of the corrected second translation training text.

[0096] For example, after the second recognition training text is successfully corrected to "I like to eat apples", the first model continues to process the second translation training text "I like to eat flat fruit" and corrects it to "I like to eat apples".

[0097] The third step is to calculate the first loss value of the first recognition training text and the corrected second recognition training text based on the loss function.

[0098] Optionally, the loss function described above can be used to measure the difference between the corrected text and the correct text, guiding the update of model parameters. The loss function measures the difference between the recognition result (the corrected second recognition training text) and the correctly recognized text (the first recognition training text). This loss function can be based on character-level or word-level error rates, such as edit distance, character error rate (CER), or word error rate (WER), to ensure that the model's accuracy on the recognition task is optimized.

[0099] The fourth step is to calculate the second loss value of the first translated training text and the corrected second translated training text based on the loss function.

[0100] Optionally, the loss function in step four can be the same as or different from the loss function in step three. The loss function used in step four is used to evaluate the difference between the translated result (the corrected second translated training text) and the correct translated text (the first translated training text). The loss function for translation tasks may be more complex because it needs to consider not only word choice but also the syntax and semantics of the translation. The loss function can be the cross-entropy loss function to ensure the model is optimized for the translation task.

[0101] Fifth step: Based on the first loss value and the second loss value, update the parameters of the first model, and repeat the steps of correcting the second translation training text and the second recognition training text with the updated first model, calculating the loss value between the corrected second recognition training text and the first recognition training text output by the updated first model based on the loss function, and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function, until the first preset condition is met, and the first model corresponding to the first preset condition is determined as the target model.

[0102] Optionally, based on the loss values ​​calculated in the first four steps, the parameters of the first model are updated in the fifth step. This process is repeated until the model parameters are adjusted so that the loss value meets a first preset condition (e.g., the loss value drops below 1%). At this point, the updated first model becomes the target model.

[0103] In summary, through the above steps, the model can gradually learn how to recover correct information from erroneous speech processing text. The final target model has higher accuracy and stability in correcting speech processing text.

[0104] To adapt to different practical application scenarios, such as in application scenarios where the first speech training text includes a first translation training text, optionally, in the training method of the target model provided in this application embodiment, when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes both a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample; training the first model based on the training data to obtain the target model includes:

[0105] The first step is to correct the second translation training text based on the second recognition training text using the first model, thereby obtaining the corrected second translation training text.

[0106] Optionally, in the first step, the first model uses the second recognition training text as a reference to attempt to correct errors in the second translation training text. This process requires the model to understand and process speech and text information to fix inaccuracies or errors in the translated text.

[0107] For example, the voice training sample is the English sentence "Hello, how are you today?" spoken by a user. The second model might generate an incorrect second recognition training text, "Hello, how are you today?", and an incorrect second translation training text, "Hello, how to today you are?". Based on the first model receiving the incorrect second recognition training text "Hello, how are you today?", it attempts to correct the incorrect second translation training text "Hello, how are you today?" and outputs the corrected second translation training text "Hello, how are you today?".

[0108] The second step is to calculate the third loss value for the first translated training text and the corrected second translated training text based on the loss function.

[0109] Optionally, the loss function described above can be used to quantify the difference between the model-corrected translation and the correctly translated text (the first translated training text). Calculating the third loss value is to evaluate the model's translation correction effectiveness and provide a basis for subsequent parameter updates.

[0110] For example, the first training text is the correct translation "Hello, how are you today?", and the model's corrected translation is also "Hello, how are you today?". The loss function calculates the difference between the two texts. If the corrected text matches the target, the loss value is close to zero, indicating that the model's correction effect is good.

[0111] The third step involves updating the parameters of the first model based on the third loss value, and repeating the steps of correcting the second translation training text using the updated first model, calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on the loss function, until the second preset condition is met, and the first model corresponding to the second preset condition is determined as the target model.

[0112] Optionally, based on the third loss value calculated in the second step, the first model can update its parameters through the backpropagation algorithm to reduce errors in translation correction. This process will be repeated until the model's translation correction effect reaches the second preset condition (e.g., the loss value drops below 2%), at which point the first model that meets the second preset condition will be determined as the target model.

[0113] In summary, by continuously adjusting the parameters of the first model through the above steps, the target model can be obtained, which can improve the accuracy and fluency of the target model's translation. Especially when facing complex speech input and noisy environments, it can provide users with higher quality speech translation services.

[0114] To adapt to different practical application scenarios, such as in applications where the first speech training text includes a first translation training text, optionally, in the training method of the target model provided in this application embodiment, when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample, and the second speech training text includes: the second translation training text; the second translation training text is the speech translation text after processing the speech training sample using the second model, and the target model is obtained by training the first model based on the training data.

[0115] The first step is to correct the second translation training text using the first model, resulting in the corrected second translation training text.

[0116] For example, the speech training sample is a French sentence: "Bonjour, comment vas-tu?" (Chinese: Hello, how are you?). The second model may incorrectly translate it as "Hello, how to go?" (Hello, how go?). This incorrectly translated text is the second translation training text. When processing the aforementioned erroneous second translation training text "Hello, how to go?", the first model corrects it to "Hello, how are you?" (Hello, how are you?).

[0117] In the second step, a fourth loss value is calculated for the first translation training text and the corrected second translation training text based on a loss function.

[0118] Optionally, the above loss function may be used to measure the difference between the translated text corrected by the model and the correct translation (the first translation training text). Calculating the fourth loss value is intended to evaluate the correction effect of the model and provide a basis for subsequent parameter adjustment.

[0119] For example, the loss function calculates the difference between the corrected translated text "Hello, how are you?" (Hello, how are you?) and the correct translated text "Hello, how are you?" (Hello, how are you?). If the corrected text is consistent with the target, the loss value will be close to zero, indicating a good correction effect.

[0120] In the third step, parameters of the first model are updated based on the fourth loss value, and the steps of correcting the second translation training text with the updated first model, and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on the loss function are repeatedly executed until a third preset condition is satisfied, and the first model corresponding to the satisfaction of the third preset condition is determined as a target model.

[0121] For example, after the fourth loss value is calculated, the parameters of the first model may be adjusted through a backpropagation mechanism to reduce the loss value, that is, to improve the translation correction capability of the model. This process needs to be repeated until the third preset condition is met (for example, the loss value drops below 1.5%), and the first model corresponding to the satisfaction of the third preset condition is determined as the target model.

[0122] In conclusion, a target model capable of recovering correct information from erroneous translations is trained through the above steps. The introduction of the loss function quantifies the correction effect and guides the optimization of parameters. Finally, the model that meets the third preset condition becomes the target model, which can more effectively repair errors in speech translation in practical applications and provide high-quality translation services.

[0123] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0124] Example 3

[0125] This application also provides a speech processing text correction device. It should be noted that the speech processing text correction device of this application can be used to execute the speech processing text correction method provided in Embodiment 1 of this application. The speech processing text correction device provided in this application will be described below.

[0126] According to embodiments of this application, an apparatus for implementing the above-described speech processing text correction method is also provided, such as... Figure 4 As shown, the device includes: a receiving unit 401, an input unit 402, and an output unit 403.

[0127] Specifically, the receiving unit 401 is used to receive the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected.

[0128] The input unit 402 is used to input the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected into the target model. The target model is a model obtained by adjusting the parameters of the first model based on the training data. The training data includes speech training samples, first speech training text and second speech training text. The first speech training text is the speech processing text corresponding to the speech training sample, and the second speech training text is the speech processing text after the speech training sample is processed by the second model.

[0129] Output unit 403 is used to output the corrected target speech processing text through the target model.

[0130] The speech processing text correction device provided in this application embodiment receives the speech processing text to be corrected and the corresponding source speech through a receiving unit 401; an input unit 402 inputs the speech processing text to be corrected and the corresponding source speech into a target model, wherein the target model is a model obtained by adjusting the parameters of a first model based on training data. The training data includes speech training samples, a first speech training text, and a second speech training text. The first speech training text is the speech processing text corresponding to the speech training samples, and the second speech training text is the speech processing text after processing the speech training samples using the second model; an output unit 403 outputs the corrected target speech processing text through the target model, solving the problem of low accuracy in directly correcting speech processing text in related technologies. This achieves the effect of improving the accuracy of corrected speech processing results.

[0131] Optionally, in the speech processing text correction apparatus provided in the embodiments of this application, the apparatus further includes: a determining unit, which is further configured to determine a prompt word template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected before outputting the corrected target speech processing text through the target model, wherein the prompt word template includes at least the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and explanatory information for instructing the speech processing text to be corrected to be corrected, wherein the prompt word template is used to input the target model.

[0132] Optionally, in the speech processing text correction device provided in the embodiments of this application, the determining unit further includes: a first determining module, used to determine the text correction type based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected; a second determining module, used to determine explanatory information based on the text correction type; and a generating module, used to generate a prompt word template based on the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and the explanatory information.

[0133] It should be noted that the receiving unit 401, input unit 402, and output unit 403 mentioned above correspond to steps S201 to S203 in Embodiment 1. The four units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules or units can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0134] Example 4

[0135] This application also provides a training apparatus for a target model. It should be noted that the training apparatus for the target model in this application can be used to execute the training method for the target model provided in Embodiment 2 of this application. The following describes the training apparatus for the target model provided in this application.

[0136] According to embodiments of this application, an apparatus for implementing the training method of the above-described target model is also provided, such as... Figure 5 As shown, the device includes: an acquisition unit 501, a generation unit 502, a determination unit 503, and a training unit 504.

[0137] Specifically, the acquisition unit 501 is used to acquire speech training samples and a first speech training text, wherein the first speech training text is the speech processing text corresponding to the speech training samples.

[0138] The generation unit 502 is used to generate second speech training text based on speech training samples using the second model;

[0139] The determining unit 503 is used to use the speech training sample, the first speech training text, and the second speech training text as training data when the second speech training text meets the target preset conditions.

[0140] Training unit 504 is used to train the first model based on the training data to obtain the target model mentioned above.

[0141] The target model training apparatus provided in this application embodiment acquires speech training samples and a first speech training text through an acquisition unit 501, wherein the first speech training text is the speech processing text corresponding to the speech training samples; a generation unit 502 generates a second speech training text based on the speech training samples using a second model; a determination unit 503, when the second speech training text meets the target preset conditions, uses the speech training samples, the first speech training text, and the second speech training text as training data; and a training unit 504 trains the first model based on the training data to obtain the aforementioned target model. This scheme yields a target model that can more accurately correct speech processing text, thereby solving the problem of low accuracy in directly correcting speech processing text in related technologies. This ultimately improves the accuracy of corrected speech processing results.

[0142] Optionally, in the training apparatus for the target model provided in this application embodiment, when the first speech training text includes: a first recognition training text and a first translation training text, the first recognition training text is the speech recognition text corresponding to the speech training sample, and the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes: a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. The training unit 504 includes: correcting the second recognition training text using the first model to obtain the corrected second recognition training text; and based on the corrected second recognition training text, correcting the second translation training text using the first model. The process involves correcting the first translation training text to obtain a corrected second translation training text; calculating a first loss value for the first recognition training text and the corrected second recognition training text based on a loss function; calculating a second loss value for the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the first and second loss values; and repeating the steps of correcting the second translation training text and the second recognition training text using the updated first model, calculating the loss value between the corrected second recognition training text and the first recognition training text output by the updated first model based on a loss function, and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on a loss function, until a first preset condition is met, and the first model corresponding to the first preset condition is determined as the target model.

[0143] Optionally, in the training apparatus for the target model provided in this application embodiment, when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. The training unit 504 includes: correcting the second translation training text based on the second recognition training text using the first model to obtain the corrected second translation training text; calculating a third loss value between the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the third loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on the loss function, until a second preset condition is met, and determining the first model corresponding to the second preset condition as the target model.

[0144] Optionally, in the training apparatus for the target model provided in this application embodiment, when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes a second translation training text, the second translation training text is the speech translation text processed by the second model on the speech training sample. The training unit 504 includes: correcting the second translation training text using the first model to obtain the corrected second translation training text; calculating a fourth loss value between the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the fourth loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on the loss function, until a third preset condition is met, and determining the first model corresponding to the third preset condition as the target model.

[0145] It should be noted that the acquisition unit 501, generation unit 502, determination unit 503, and training unit 504 mentioned above correspond to steps S301 to S304 in Embodiment 2. The four units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules or units can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.

[0146] Example 5

[0147] Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced with a mobile terminal or an electronic device, etc.

[0148] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.

[0149] In this embodiment, the computer terminal described above can execute the program code for the following steps in the speech processing text correction method: receiving the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected; inputting the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected into the target model, wherein the target model is a model obtained by adjusting the parameters of the first model based on training data, the training data including speech training samples, a first speech training text and a second speech training text, the first speech training text being the speech processing text corresponding to the speech training sample, and the second speech training text being the speech processing text after processing the speech training sample using the second model; and outputting the corrected target speech processing text through the target model.

[0150] Optionally, the computer terminal described above can execute the program code for the following steps in the method for correcting speech-processed text: before outputting the corrected target speech-processed text through the target model, the method further includes: determining a prompt word template based on the speech-processed text to be corrected and the source speech corresponding to the speech-processed text to be corrected, wherein the prompt word template includes at least the speech-processed text to be corrected, the source speech corresponding to the speech-processed text to be corrected, and explanatory information for instructing the speech-processed text to be corrected to be corrected, wherein the prompt word template is used to input the target model.

[0151] Optionally, the computer terminal described above can execute program code for the following steps in the speech processing text correction method: determining a prompt word template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected includes: determining the text correction type based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected; determining explanatory information based on the text correction type; and generating a prompt word template based on the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and the explanatory information.

[0152] Optionally, the computer terminal described above can execute the program code for the following steps in the training method of the target model: obtaining a speech training sample and a first speech training text, wherein the first speech training text is the speech processing text corresponding to the speech training sample; generating a second speech training text based on the speech training sample using a second model; using the speech training sample, the first speech training text, and the second speech training text as training data when the second speech training text meets the target preset conditions; training the first model based on the training data to obtain the target model described above.

[0153] Optionally, the aforementioned computer terminal can execute program code for the following steps in the training method of the target model: When the first speech training text includes a first recognition training text and a first translation training text, the first recognition training text is the speech recognition text corresponding to the speech training sample, and the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample; training the first model based on the training data to obtain the target model includes:

[0154] Optionally, the aforementioned computer terminal can execute the following steps in the training method of the target model: correcting the second recognition training text using the first model to obtain the corrected second recognition training text; based on the corrected second recognition training text, correcting the second translation training text using the first model to obtain the corrected second translation training text; calculating the first loss value of the first recognition training text and the corrected second recognition training text based on the loss function; calculating the second loss value of the first translation training text and the corrected second translation training text based on the loss function; updating the parameters of the first model based on the first and second loss values; repeatedly executing the steps of correcting the second translation training text and the second recognition training text using the updated first model, calculating the loss value between the corrected second recognition training text and the first recognition training text output by the updated first model based on the loss function, and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function, until a first preset condition is met, and determining the first model corresponding to the first preset condition as the target model.

[0155] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the training method of the target model: When the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample; training the first model based on the training data to obtain the target model includes: correcting the second translation training text using the first model based on the second recognition training text to obtain the corrected second translation training text; calculating a third loss value between the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the third loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on a loss function, until a second preset condition is met, and the first model corresponding to the second preset condition is determined as the target model.

[0156] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the training method of the target model: When the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes a second translation training text, the second translation training text is the speech translation text processed by the second model on the speech training sample. Training the first model based on the training data to obtain the target model includes: correcting the second translation training text using the first model to obtain the corrected second translation training text; calculating a fourth loss value between the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the fourth loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function, until a third preset condition is met, and the first model corresponding to the third preset condition is determined as the target model.

[0157] Optionally, Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (Only one is shown) processor 602, memory 604, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0158] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the speech processing text correction method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned speech processing text correction method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0159] The processor can access the information and application programs stored in the memory via the transmission device to execute the steps described above in the speech-text correction method.

[0160] This application provides a method for correcting speech-processed text. The method involves receiving the speech-processed text to be corrected and its corresponding source speech; inputting the speech-processed text to be corrected and its corresponding source speech into a target model, where the target model is a model obtained by adjusting the parameters of a first model based on training data. The training data includes speech training samples, a first speech training text, and a second speech training text. The first speech training text is the speech-processed text corresponding to the speech training samples, and the second speech training text is the speech-processed text after processing the speech training samples using the second model. The target model outputs the corrected target speech-processed text, thus solving the technical problem of low accuracy in directly correcting speech-processed text, thereby improving the accuracy of the corrected speech processing results.

[0161] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 6 The different configurations shown.

[0162] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0163] Example 6

[0164] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the speech processing text correction method provided in Embodiment 1.

[0165] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0166] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: before outputting the corrected target speech processing text through the target model, determining a prompt word template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected, wherein the prompt word template includes at least the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and explanatory information for instructing the speech processing text to be corrected to be corrected, wherein the prompt word template is used to input the target model.

[0167] Optionally, the storage medium is also configured to store program code for performing the following steps: determining a prompt word template based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected, including: determining a text correction type based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected; determining explanatory information based on the text correction type; and generating a prompt word template based on the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and the explanatory information.

[0168] Optionally, the storage medium is also configured to store program code for performing the following steps: obtaining a speech training sample and a first speech training text, wherein the first speech training text is the speech processing text corresponding to the speech training sample; generating a second speech training text based on the speech training sample using a second model; using the speech training sample, the first speech training text, and the second speech training text as training data if the second speech training text meets the target preset conditions; and training the first model based on the training data to obtain the aforementioned target model.

[0169] Optionally, the storage medium is further configured to store program code for performing the following steps: In the case where the first speech training text includes: a first recognition training text and a first translation training text, the first recognition training text is the speech recognition text corresponding to the speech training sample, and the first translation training text is the speech translation text corresponding to the speech training sample; in the case where the second speech training text includes: a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample; training the first model based on the training data to obtain the target model includes:

[0170] Optionally, the storage medium is further configured to store program code for performing the following steps: correcting the second recognition training text using the first model to obtain the corrected second recognition training text; based on the corrected second recognition training text, correcting the second translation training text using the first model to obtain the corrected second translation training text; calculating a first loss value for the first recognition training text and the corrected second recognition training text based on a loss function; calculating a second loss value for the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the first and second loss values; repeatedly performing the steps of correcting the second translation training text and the second recognition training text using the updated first model, calculating the loss value between the corrected second recognition training text and the first recognition training text output by the updated first model based on a loss function, and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on a loss function, until a first preset condition is met, and determining the first model corresponding to the first preset condition as the target model.

[0171] Optionally, the storage medium is further configured to store program code for performing the following steps: In the case where the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; in the case where the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample; training the first model based on the training data to obtain the target model includes: correcting the second translation training text using the first model based on the second recognition training text to obtain the corrected second translation training text; calculating a third loss value between the first translation training text and the corrected second translation training text based on a loss function; updating the parameters of the first model based on the third loss value; repeatedly executing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function, until a second preset condition is met, and the first model corresponding to the second preset condition is determined as the target model.

[0172] Optionally, the storage medium is also configured to store program code for performing the following steps: when the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample; when the second speech training text includes a second translation training text, the second translation training text is the speech translation text processed by the second model on the speech training sample; training the first model based on the training data to obtain the target model includes: correcting the second translation training text using the first model to obtain the corrected second translation training text; calculating a fourth loss value between the first translation training text and the corrected second translation training text based on the loss function; updating the parameters of the first model based on the fourth loss value; repeatedly performing the steps of correcting the second translation training text using the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text based on the loss function, until a third preset condition is met, and the first model corresponding to the third preset condition is determined as the target model.

[0173] This application also provides a computer program product, which, when executed on a data processing device, is adapted to perform steps of a speech processing text correction method.

[0174] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0175] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0176] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units 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 displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0177] The units described 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.

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

[0179] 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 several 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 described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0180] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for correcting speech-processed text, characterized in that, include: Receive the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected; The speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected are input into the target model. The target model is a model obtained by adjusting the parameters of the first model based on the training data. The training data includes speech training samples, a first speech training text and a second speech training text. The first speech training text is the speech processing text corresponding to the speech training sample, and the second speech training text is the speech processing text after the speech training sample is processed by the second model. The corrected target speech processing text is output through the target model.

2. The method according to claim 1, characterized in that, Before outputting the corrected target speech processing text through the target model, the method further includes: Based on the speech processing text to be corrected and the corresponding source speech, a prompt word template is determined. The prompt word template includes at least the speech processing text to be corrected, the corresponding source speech, and explanatory information for instructing the speech processing text to be corrected. The prompt word template is used to input the target model.

3. The method according to claim 2, characterized in that, Based on the speech processing text to be corrected and the corresponding source speech, the prompt word template is determined as follows: The text correction type is determined based on the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected. The explanatory information is determined based on the text correction type; Based on the speech processing text to be corrected, the source speech corresponding to the speech processing text to be corrected, and the explanatory information, the prompt word template is generated.

4. A method for training a target model, characterized in that, include: Obtain a speech training sample and a first speech training text, wherein the first speech training text is the speech processing text corresponding to the speech training sample; The second speech training text is generated based on the speech training samples using the second model; If the second voice training text meets the target preset conditions, the voice training sample, the first voice training text, and the second voice training text will be used as the training data. The first model is trained based on the training data to obtain the target model as described in any one of claims 1 to 3.

5. The method according to claim 4, characterized in that, When the first speech training text includes a first recognition training text and a first translation training text, the first recognition training text is the speech recognition text corresponding to the speech training sample, and the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. Training the first model based on the training data to obtain the target model includes: The second recognition training text is corrected by the first model to obtain the corrected second recognition training text; Based on the corrected second recognition training text, the second translation training text is corrected using the first model to obtain the corrected second translation training text; Calculate the first loss value of the first recognition training text and the corrected second recognition training text based on the loss function; The second loss value of the first translated training text and the corrected second translated training text is calculated based on the loss function; Based on the first loss value and the second loss value, the parameters of the first model are updated, and the steps of correcting the second translation training text and the second recognition training text by using the updated first model are repeated, calculating the loss value between the corrected second recognition training text and the first recognition training text output by the updated first model based on the loss function, and calculating the loss value between the corrected second translation training text and the first translation training text output by the updated first model based on the loss function, are repeated until the first preset condition is met, and the first model corresponding to the first preset condition is determined as the target model.

6. The method according to claim 4, characterized in that, When the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes a second recognition training text and a second translation training text, the second recognition training text is the speech recognition text processed by the second model on the speech training sample, and the second translation training text is the speech translation text processed by the second model on the speech training sample. Training the first model based on the training data to obtain the target model includes: Based on the second recognition training text, the second translation training text is corrected by the first model to obtain the corrected second translation training text; The third loss value is calculated based on the loss function for the first translated training text and the corrected second translated training text; Based on the third loss value, the parameters of the first model are updated, and the steps of correcting the second translation training text with the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text are repeated until the second preset condition is met, and the first model corresponding to the second preset condition is determined as the target model.

7. The method according to claim 4, characterized in that, When the first speech training text includes a first translation training text, the first translation training text is the speech translation text corresponding to the speech training sample. When the second speech training text includes a second translation training text, the second translation training text is the speech translation text processed by the second model on the speech training sample. Training the first model based on the training data to obtain the target model includes: The second translation training text is corrected by the first model to obtain the corrected second translation training text; The fourth loss value is calculated based on the loss function for the first translated training text and the corrected second translated training text; Based on the fourth loss value, the parameters of the first model are updated, and the steps of correcting the second translation training text with the updated first model and calculating the loss value between the corrected second translation training text output by the updated first model and the first translation training text are repeated until the third preset condition is met, and the first model corresponding to the third preset condition is taken as the target model.

8. A speech processing text correction device, characterized in that, include: The receiving unit is used to receive the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected. An input unit is used to input the speech processing text to be corrected and the source speech corresponding to the speech processing text to be corrected into a target model. The target model is a model obtained by adjusting the parameters of a first model based on training data. The training data includes speech training samples, a first speech training text, and a second speech training text. The first speech training text is the speech processing text corresponding to the speech training samples, and the second speech training text is the speech processing text after processing the speech training samples using a second model. The output unit is used to output the corrected target speech processing text through the target model.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the speech processing text correction method according to any one of claims 1 to 3.

10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the speech processing text correction method according to any one of claims 1 to 3.

11. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the speech processing text correction method according to any one of claims 1 to 3.