Speech processing method and apparatus, and electronic device
Through the two-stage training of the speech recognition model, combined with multi-language and target language data, the problem of low speech recognition accuracy under low resource conditions is solved, and the speech feature learning and transcribed text accuracy of the speech recognition model are improved, especially in Minor language recognition.
Patent Information
- Application Number
- PCT/CN2024/078937
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-03
- Filing Date
- 2024-02-28
- Publication Date
- 2024-09-12
AI Technical Summary
It is difficult for existing speech recognition models to accurately recognize multiple languages under low-resource speech data conditions. In particular, the speech feature learning accuracy of small languages is low, resulting in low accuracy of transcribed texts.
A two-stage training speech recognition model is adopted. In the first stage, common linguistic features are learned through multi-lingual training speech and phonetic symbol sequences. In the second stage, more accurate speech feature learning is performed based on sample speech and transcribed text of the target language to improve speech quality. Recognition model accuracy.
It improves the speech feature learning and transcribed text accuracy of the speech recognition model under low resource conditions, and enhances the recognition ability of multiple languages, especially the recognition accuracy of small languages.
Smart Images

Figure CN2024078937_12092024_PF_FP
Abstract
Description
Voice processing method, device and electronic equipment
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese application with application number 202310233791.1 and application date March 3, 2023, and claims its priority. The disclosed content of the Chinese application is hereby introduced as a whole into this application. Technical Field
[0003] The present disclosure relates to the field of speech recognition technology, and in particular to a speech processing method, device, and electronic device. Background Art
[0004] With the development of information technology, speech recognition technology has been used more and more widely, and the requirements for the types of recognized languages have become higher and higher.
[0005] Currently, speech recognition processing can be performed on speech based on a pre-trained speech recognition model to obtain a transcribed text corresponding to the speech, wherein the speech recognition model is trained based on a large amount of training speech and the transcribed text corresponding to the training speech.
[0006] Summary of the Invention
[0007] In a first aspect, the present disclosure provides a speech processing method, which includes: acquiring speech to be transcribed in response to a touch operation on a speech acquisition control in a speech transcription page; performing text transcription processing on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed; and displaying the transcribed text; wherein the text transcription processing is implemented based on a speech recognition model, and the speech recognition model is trained based on a first training stage and a second training stage. In the first training stage, the encoder of the speech recognition model is trained based on training speech in multiple languages and training phonetic symbol sequences corresponding to the training speech. In the second training stage, the speech recognition model after training in the first training stage is trained based on sample speech in a target language and a target transcribed text corresponding to the sample speech.
[0008] In a second aspect, the present disclosure provides a speech processing device, which includes: a response module for acquiring speech to be transcribed in response to a touch operation on a speech acquisition control in a speech transcription page; a processing module for performing text transcription processing on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed; and a display module for displaying the transcribed text; wherein the text transcription processing is implemented based on a speech recognition model, and the speech recognition model is trained based on a first training stage and a second training stage. In the first training stage, the encoder of the speech recognition model is trained based on training speech in multiple languages and training phonetic symbol sequences corresponding to the training speech. In the second training stage, the speech recognition model after training in the first training stage is trained based on sample speech in a target language and a target transcribed text corresponding to the sample speech.
[0009] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a memory for storing computer-executable instructions; a processor for executing the computer-executable instructions stored in the memory, so that the at least one processor executes the speech processing method as described in the first aspect and various possible aspects of the first aspect.
[0010] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the speech processing method as described in the first aspect and various possible aspects of the first aspect are implemented.
[0011] In a fifth aspect, an embodiment of the present disclosure provides a computer program, comprising: instructions, which, when executed by a processor, cause the processor to execute the speech processing method as described in the first aspect and various possible aspects of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0013] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0014] FIG2 is a flow chart of a speech processing method provided by an embodiment of the present disclosure;
[0015] FIG3 is a schematic diagram of a process for acquiring speech according to an embodiment of the present disclosure;
[0016] FIG4 is a schematic diagram of another process for acquiring speech according to an embodiment of the present disclosure;
[0017] FIG5 is a process diagram of a speech processing method provided by an embodiment of the present disclosure;
[0018] FIG6 is a schematic diagram of a training method for the second training phase provided by an embodiment of the present disclosure;
[0019] FIG7 is a schematic diagram of the structure of a speech recognition model provided by an embodiment of the present disclosure;
[0020] FIG8 is a schematic diagram of a process for determining a predicted transcript provided by an embodiment of the present disclosure;
[0021] FIG9 is a schematic diagram of a training process of a speech recognition model provided by an embodiment of the present disclosure;
[0022] FIG10 is a schematic diagram of a training method for a first training phase provided by an embodiment of the present disclosure;
[0023] FIG11 is a schematic diagram of a training process of an encoder provided in an embodiment of the present disclosure;
[0024] FIG12 is a schematic structural diagram of a speech processing device provided by an embodiment of the present disclosure;
[0025] FIG13 is a schematic diagram of the structure of another speech processing device provided by an embodiment of the present disclosure; and
[0026] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0028] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.
[0029] Electronic device: is a device with wireless transceiver function. The electronic device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; it can also be deployed on the water surface (such as ships, etc.). The electronic device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, an on-board electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical care, a wireless electronic device in a smart grid, a wireless electronic device in transportation safety, a wireless electronic device in a smart city, a wireless electronic device in a smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be called a terminal, user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE agent or a UE device, etc. Electronic devices may also be stationary or mobile.
[0030] In the related art, speech recognition technology is being used more and more widely, and the requirements for the types of languages to be recognized are also getting higher and higher. For example, speech recognition technology needs to recognize more speech in minority languages. At present, speech recognition processing can be performed on speech based on a pre-trained speech recognition model to obtain the corresponding transcribed text of the speech, wherein the speech recognition model is trained based on a large amount of training speech and the transcribed text corresponding to the training speech. However, the speech recognition model requires a large amount of speech data, and speech data of some languages is difficult to obtain (such as speech in minority languages). When the speech recognition model is trained based on low-resource speech data, the accuracy of the learned speech features is low, which in turn leads to the low accuracy of the transcribed text output by the speech recognition model.
[0031] In view of this, an embodiment of the present disclosure provides a voice processing method, which responds to a touch operation on a voice acquisition control, displays a voice page, responds to a touch operation on a target voice of multiple voices in the voice page, determines the target voice as the voice to be transcribed, performs text transcription processing on the voice to be transcribed, obtains a transcribed text associated with the voice to be transcribed, and displays the transcribed text. Wherein, the text transcription processing is implemented based on a speech recognition model, and the speech recognition model is trained based on the first training stage and the second training stage. Since the encoder of the speech recognition model can learn general linguistic features (such as phonetic features) in the first training stage, the speech recognition model can quickly learn more accurate speech features in the second training stage, thereby improving the accuracy of the speech recognition model. When the speech recognition model processes the voice to be transcribed, the speech recognition model can output accurate transcribed text, thereby improving the accuracy of the output transcribed text.
[0032] The application scenario of the embodiment of the present disclosure is described below with reference to FIG1 .
[0033] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Please refer to FIG1 , which includes a speech recognition model. The speech recognition model is used to perform text conversion processing on speech. A speech segment is input into the speech recognition model, and the speech recognition model can output the text corresponding to the speech segment. In the embodiment of the present disclosure, since the encoder of the speech recognition model can learn relatively accurate linguistic features (such as phonetic features), the speech recognition model can quickly and accurately learn the speech features of the speech data when it is trained based on low-resource speech data. Therefore, the text transcription processing of the speech based on the speech recognition model can obtain a higher accuracy of the transcribed text.
[0034] It should be noted that FIG1 is only an example illustrating an application scenario of the embodiment of the present disclosure, and is not intended to limit the application scenario of the embodiment of the present disclosure.
[0035] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.
[0036] FIG2 is a flow chart of a speech processing method provided by an embodiment of the present disclosure. Referring to FIG2 , the method may include steps S201 to S203.
[0037] In step S201, in response to a touch operation on a speech acquisition control in a speech transcription page, speech to be transcribed is acquired.
[0038] The execution subject of the embodiments of the present disclosure may be an electronic device or a voice processing device provided in the electronic device. The voice processing device may be implemented based on software or a combination of software and hardware, which is not limited in the embodiments of the present disclosure.
[0039] Specifically, the voice transcription page may include a voice acquisition control. In some embodiments, the voice acquisition control can acquire voice. For example, the voice acquisition control can be a recording control. When the user clicks the recording control, the electronic device can acquire real-time voice.
[0040] In some embodiments, in response to a touch operation on a speech transcription application, the electronic device may display a speech transcription page. For example, when a user clicks on a speech transcription application on a display page of the electronic device, the electronic device may display a speech transcription page, which may include a speech acquisition control.
[0041] The speech to be transcribed may be speech to be transcribed into text. In response to a touch operation on the speech acquisition control in the speech transcription page, the speech to be transcribed is acquired in the following two feasible implementations:
[0042] A possible implementation:
[0043] In response to a touch operation on the voice acquisition control, a voice page is displayed. The voice page may include multiple voices. For example, when a user clicks the voice acquisition control in the voice transcription page, the electronic device may jump from the voice transcription page to the voice page.
[0044] In response to a touch operation on any one of the multiple voices, the touched voice is determined as the voice to be transcribed. For example, if a voice page includes Voice 1 and Voice 2, if the user clicks Voice 1, the electronic device determines that the voice to be transcribed is Voice 1. If the user clicks Voice 2, the electronic device determines that the voice to be transcribed is Voice 2.
[0045] The following describes the process of acquiring voice by the electronic device with reference to FIG3 .
[0046] Figure 3 is a schematic diagram of a voice acquisition process provided by an embodiment of the present disclosure. Referring to Figure 3 , an electronic device is shown. The electronic device displays page 301, which includes a voice acquisition control and a confirmation control. When a user clicks the voice acquisition control, the electronic device's display jumps from page 301 to page 302.
[0047] 3 , page 302 includes voice A, voice B, voice C, and a confirmation control. When the user clicks voice A, the control corresponding to voice A is highlighted. After the user clicks the confirmation control, the electronic device determines voice A as the voice to be transcribed obtained by the electronic device.
[0048] In this feasible implementation, the electronic device can pre-store multiple voices. In response to the user's operation, the electronic device can determine any segment of voice as the acquired voice to be transcribed, thereby improving the flexibility of voice acquisition.
[0049] Another possible implementation:
[0050] In response to a touch operation on the voice acquisition control, voice recording is performed to obtain the voice to be transcribed. For example, when the user clicks the voice acquisition control in the voice recognition page, the electronic device can start recording, and the electronic device can determine the recorded voice as the voice to be transcribed obtained by the electronic device.
[0051] The following describes the process of an electronic device acquiring a speech to be recognized with reference to FIG4 .
[0052] FIG4 is a schematic diagram of another process for acquiring speech provided by an embodiment of the present disclosure. Referring to FIG4 , an electronic device is included. A display page of the electronic device includes a speech acquisition control. When a user clicks the speech acquisition control, the electronic device begins recording the user's speech. When the user clicks the stop recording control, the electronic device stops recording the user's speech and determines the recorded user's speech as the speech to be transcribed, which is acquired by the electronic device.
[0053] In this feasible implementation, the electronic device can acquire the user's voice in real time, and determine the user's voice as the voice to be transcribed acquired by the electronic device, thereby improving the flexibility of voice acquisition.
[0054] In step S202, text transcription is performed on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed.
[0055] Among them, text transcription processing is implemented based on the speech recognition model.
[0056] In some embodiments, text transcription is performed on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed, including: after obtaining the speech to be transcribed, obtaining the language of the speech to be transcribed; determining a speech recognition model according to the language of the speech to be transcribed; and performing text transcription on the speech to be transcribed based on the speech recognition model corresponding to the language of the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed.
[0057] Different speech recognition models can transcribe speech in different languages. Therefore, after the electronic device obtains the speech to be transcribed, it can obtain the language of the speech to be transcribed, and determine the speech recognition model based on the language of the speech to be transcribed. Based on the speech recognition model corresponding to the language of the speech to be transcribed, the speech to be transcribed is transcribed into text to obtain a transcribed text associated with the speech to be transcribed.
[0058] For example, if the speech to be transcribed is in Chinese, the electronic device can obtain the corresponding speech recognition model for Chinese, and process the speech to be transcribed based on the corresponding speech recognition model for Chinese to obtain a transcribed text in Chinese; if the speech to be transcribed is in English, the electronic device can obtain the corresponding speech recognition model for English, and process the speech to be transcribed based on the corresponding speech recognition model for English to obtain a transcribed text in English.
[0059] It should be noted that multiple types of speech recognition models can be set in electronic devices, and the sample speech trained for each type of speech recognition model is in a different language. In this way, electronic devices can perform text recognition processing on speech to be recognized in multiple languages based on multiple types of speech recognition models, thereby improving the accuracy and applicability of speech recognition of electronic devices.
[0060] The process of the speech processing method is described below with reference to FIG5 .
[0061] FIG5 is a process diagram of a speech processing method provided by an embodiment of the present disclosure. FIG5 shows an electronic device. The electronic device includes a Chinese speech recognition model and an English speech recognition model. If a speech A to be recognized in Chinese is input into the electronic device, the electronic device can input the speech A to be recognized into the Chinese speech recognition model, and then output the Chinese text of the speech A to be recognized based on the Chinese speech recognition model. If a speech B to be recognized in English is input into the electronic device, the electronic device can input the speech B to be recognized into the English speech recognition model, and then output the English text of the speech B to be recognized based on the English speech recognition model.
[0062] It should be noted that the various types of speech recognition models in the embodiments of the present disclosure may also be integrated into the same model. For example, the Chinese speech recognition model and the English speech recognition model in FIG5 may be in one model, and the embodiments of the present disclosure do not limit this.
[0063] Specifically, the speech recognition model includes an encoder and a decoder. The speech recognition model is obtained through training in the first training phase and the second training phase. In the first training phase, the encoder of the speech recognition model is trained based on training speech in multiple languages and training phonetic symbol sequences corresponding to the training speech. In this way, after the first training phase is completed, the encoder of the speech recognition model can convert the speech into a phonetic symbol sequence.
[0064] In the second training phase, the speech recognition model, trained in the first training phase, is trained based on sample speech in the target language and the target transcribed text corresponding to the sample speech. This allows the speech recognition model's decoder to convert phonetic symbol sequences into text. Because phonetic symbol sequences are fundamental linguistic features, the speech recognition model can quickly and accurately learn the phonetic features of the sample speech, thereby reducing the difficulty of training the speech recognition model and improving its training accuracy. Consequently, the transcribed text output by the speech recognition model is highly accurate.
[0065] In step S203, the transcribed text is displayed.
[0066] In some embodiments, after the electronic device performs text transcription on the speech to be transcribed and obtains the transcribed text, the electronic device can display the transcribed text.
[0067] The disclosed embodiments provide a speech processing method that displays a speech transcription page, obtains speech to be transcribed in response to a touch operation on a speech acquisition control in the speech transcription page, performs text transcription on the speech to be transcribed, obtains transcribed text corresponding to the speech to be transcribed, and displays the transcribed text. In this way, because the speech recognition model can learn more basic linguistic features, when the speech recognition model is trained on low-resource speech data, it can quickly and accurately obtain speech features, thereby improving the accuracy of the transcribed text output by the speech recognition model.
[0068] In the above method, the text transcription processing is implemented based on the speech recognition model, and the speech recognition model is obtained through training in the first training stage and the second training stage. Since the encoder of the speech recognition model in the first training stage can learn the ability to convert speech into phonetic symbol sequences, the speech recognition model can learn the more basic phonetic symbol features in the language in the first training stage. In this way, when the speech recognition model is trained based on low-resource sample speech in the second training stage, the speech recognition model can quickly learn accurate speech features, thereby improving the training efficiency and training accuracy of the speech recognition model. When the speech recognition model processes the speech to be transcribed, the speech recognition model can output accurate transcribed text, thereby improving the accuracy of the output transcribed text.
[0069] Based on the embodiment shown in FIG. 2 , the training method of the second training stage of the speech recognition model will be described below in conjunction with FIG. 6 .
[0070] FIG6 is a schematic diagram of a training method for the second training phase provided by an embodiment of the present disclosure. Referring to FIG6 , the training method includes steps S601 to S604.
[0071] In step S601, a sample speech of a target language and a target transcription text corresponding to the sample speech are obtained.
[0072] The target language can be the language of the speech to be transcribed. For example, if the speech recognition model needs to recognize Chinese speech, the target language can be Chinese; if the speech recognition model needs to recognize English speech, the target language can be English; if the speech recognition model needs to recognize French speech, the target language can be French.
[0073] In some embodiments, the speech processing method further includes: determining the target language according to a model training request before obtaining the sample speech of the target language. For example, the electronic device can determine the target language according to the model training request.
[0074] In some embodiments, determining the target language based on a model training request includes: receiving a model training request, wherein the model training request includes an identifier of the target language; and determining the target language based on the identifier of the target language. For example, an electronic device may receive a model training request sent by a server or other electronic device, wherein the model training request includes an identifier of the target language, and the electronic device may determine the target language based on the identifier of the target language. For example, if the training request for a speech recognition model sent by the server to the electronic device includes an identifier of Chinese, it means that the training goal of the speech recognition model is to recognize Chinese speech. Therefore, the electronic device may determine that the target language is Chinese.
[0075] The sample speech may be in the target language. For example, if the target language is Chinese, the sample speech may be in Chinese; if the target language is English, the sample speech may be in English; if the target language is French, the sample speech may be in French. In some embodiments, the electronic device may obtain the sample speech in the target language from a network. For example, if the target language is Chinese, the electronic device may obtain Chinese speech from the network; if the target language is English, the electronic device may obtain English speech from the network.
[0076] It should be noted that the electronic device can obtain the sample voice according to any other feasible implementation method, and the embodiments of the present disclosure are not limited to this.
[0077] It should be noted that the electronic device may also determine the target language based on the language of the sample speech. For example, if the sample speech obtained by the electronic device is English, the electronic device may determine that the training goal is to recognize English speech, and therefore the target language is English; if the sample speech obtained by the electronic device is Chinese, the electronic device may determine that the training goal is to recognize English speech, and therefore the target language is Chinese.
[0078] The target transcription text may be the transcription text corresponding to the sample speech. For example, the target transcription text may be the transcription text corresponding to the sample speech. For example, if the sample speech is in English, the target transcription text may be the English corresponding to the sample speech; if the sample speech is in Chinese, the target transcription text may be the Chinese corresponding to the sample speech. For example, if the sample speech is the Chinese speech "Today's weather is really good", the target transcription text corresponding to the sample speech may be the Chinese text "Today's weather is really good".
[0079] In some embodiments, an electronic device can receive target transcripts corresponding to sample speech sent by other devices. For example, in actual applications, the electronic device can construct a dictionary of sample speech and target transcripts, where the dictionary keys can be sample speech and the dictionary values can be the target transcripts corresponding to the sample speech. In this way, when the electronic device receives sample speech, it can generate a key-value pair of sample speech-target transcript through the dictionary, and can obtain the target transcript corresponding to the sample speech. It should be noted that the target transcript can be a manually recognized transcript, which can improve the training accuracy of the speech recognition model.
[0080] It should be noted that the electronic device may also obtain the sample transcription text corresponding to the sample speech according to any other feasible implementation method, and the embodiments of the present disclosure are not limited to this.
[0081] In step S602, an encoder based on a speech recognition model processes the sample speech to obtain a sample phonetic symbol sequence associated with the sample speech.
[0082] In some embodiments, the speech recognition model may include an encoder and a decoder.
[0083] The structure of the speech recognition model is described below with reference to FIG7 .
[0084] FIG7 is a schematic diagram of the structure of a speech recognition model provided in an embodiment of the present disclosure. FIG7 shows a speech recognition model. The speech recognition model can convert speech into text corresponding to the speech. The speech recognition model includes an encoder and a decoder. Specifically, during the training process of the speech recognition model, sample speech is input to the encoder of the speech recognition model, and the decoder of the speech recognition model can output the transcribed text corresponding to the sample speech.
[0085] In some embodiments, the encoder of the speech recognition model can be used to convert speech into a speech-related phonetic symbol sequence. For example, a speech segment is input to the encoder of the speech recognition model, and the encoder of the speech recognition model can output the phonetic symbol sequence of the speech segment. The phonetic symbol sequence can be a set of phonetic symbols corresponding to the sample speech. For example, the phonetic symbols can be symbols that record the phonemes of the speech. The pinyin letters of Chinese, the international phonetic symbols of English, etc. can all be the phonetic symbols shown in the embodiments of the present disclosure. If the sample speech is Chinese, the encoder of the speech recognition model can output the pinyin sequence of the sample speech. If the sample speech is English, the encoder of the speech recognition model can output the international phonetic symbol sequence of the sample speech.
[0086] In some embodiments, the electronic device may input sample speech to an encoder of a speech recognition model. The encoder of the speech recognition model processes the sample speech and may output a sample phonetic symbol sequence associated with the sample speech.
[0087] In step S603, the decoder based on the speech recognition model processes the sample phonetic symbol sequence to obtain a predicted transcription text.
[0088] The predicted transcript can be the transcript of the sample speech processed by the speech recognition model. For example, during the training of the speech recognition model, the speech recognition model can process any sample speech to obtain the corresponding predicted transcript. For example, the encoder of the speech recognition model can process the sample speech to obtain a sample phonetic symbol sequence related to the sample speech, and the decoder of the speech recognition model can decode the sample phonetic symbol sequence to obtain the predicted transcript corresponding to the sample speech.
[0089] The process of determining the predicted transcription text is described below with reference to FIG8 .
[0090] FIG8 is a schematic diagram of a process for determining a predicted transcript provided by an embodiment of the present disclosure. FIG8 shows a speech recognition model and a sample speech. The speech recognition model includes an encoder and a decoder. The sample speech is input into the encoder of the speech recognition model. The encoder of the speech recognition model can output a sample phonetic symbol sequence related to the sample speech. The sample phonetic symbol sequence is input into the decoder of the speech recognition model. The decoder of the speech recognition model decodes the sample phonetic symbol sequence to obtain the predicted transcript corresponding to the sample speech.
[0091] In step S604, a speech recognition model is trained based on the target transcription text and the predicted transcription text.
[0092] In some embodiments, the electronic device may train the speech recognition model based on the following feasible implementation: determining the loss between the target transcript and the predicted transcript, and training the speech recognition model based on the loss between the target transcript and the predicted transcript. For example, for any sample speech, the electronic device may process the sample speech based on the speech recognition model to obtain a predicted transcript of the sample speech, then determine a loss function based on the predicted transcript of the sample speech and the target transcript of the sample speech, and then train the speech recognition model using the loss function.
[0093] It should be noted that the loss function in the embodiment of the present disclosure can be any loss function, and the embodiment of the present disclosure is not limited to this.
[0094] The following describes the training process of the speech recognition model in the embodiment of the present disclosure in conjunction with FIG9 .
[0095] Figure 9 is a schematic diagram of the training process of a speech recognition model provided by an embodiment of the present disclosure. Figure 9 shows a speech recognition model, a sample speech, and a target transcription text corresponding to the sample speech. The sample speech is input to the encoder of the speech recognition model, and the encoder of the speech recognition model can output a sample phonetic symbol sequence corresponding to the sample speech, and the sample phonetic symbol sequence is input to the decoder of the speech recognition model. The decoder of the speech recognition model decodes the sample phonetic symbol sequence to obtain a predicted transcription text corresponding to the sample speech. The speech recognition model can update the model parameters in the speech recognition model based on the loss between the target transcription text corresponding to the sample speech and the predicted transcription text corresponding to the sample speech.
[0096] The disclosed embodiments provide a training method for a second training phase, which includes obtaining sample speech of a target language and a target transcript corresponding to the sample speech, processing the sample speech with an encoder based on a speech recognition model to obtain a sample phonetic symbol sequence associated with the sample speech, processing the sample phonetic symbol sequence with a decoder based on the speech recognition model to obtain a predicted transcript, obtaining a loss between the target transcript and the predicted transcript, and training the speech recognition model based on the loss between the target transcript and the predicted transcript. In this way, the speech recognition encoder can extract the phonetic symbol sequence of the speech. Since the phonetic symbol sequence is a more fundamental speech representation, the speech recognition model can learn more accurate speech features based on a small amount of speech data. Therefore, the speech recognition model can be trained based on speech of a minority language, thereby improving the training efficiency of the speech recognition model. Furthermore, since the speech features learned by the speech recognition model are more accurate, the speech recognition model can accurately perform text recognition on speech of the minority language, thereby improving the accuracy of the transcript output by the speech recognition.
[0097] On the basis of any of the above embodiments, the training method of the first training stage of the speech recognition model is described below with reference to FIG10 .
[0098] FIG10 is a schematic diagram of a training method for the first training phase provided by an embodiment of the present disclosure. Referring to FIG10 , the method flow includes steps S1001 to S1003.
[0099] In step S1001, training speech in multiple languages is obtained.
[0100] Specifically, the training speech is used to train the encoder of the speech recognition model, and the training language includes multiple languages. In some embodiments, the electronic device can obtain the training speech from the network. For example, the electronic device can obtain speech in multiple languages from the network as the training speech for the encoder of the speech recognition model. In some embodiments, the electronic device can receive the training speech sent by other devices. For example, the electronic device can receive training speech in multiple languages sent by the server, and the electronic device can also obtain training speech in multiple languages from the database, which is not limited in the embodiments of the present disclosure.
[0101] Specifically, since the encoder of the speech recognition model is used to obtain the phonetic symbol sequence of the speech, the speech recognition model needs to be trained based on speech in a large number of languages so that the speech recognition model can learn more phonetic symbol information. For example, in actual application, the number of training speech for the encoder of the speech recognition model can be small, but the languages of the training speech can be large. In this way, the accuracy of the encoder of the speech recognition model can be improved. For example, the training speech of the encoder of the speech recognition model can include 100 languages, and each language can include 10-20 speech. In this way, even if the language is a small language with a small number of users, the electronic device can obtain enough training speech to train the encoder of the speech recognition model.
[0102] In step S1002, a training phonetic symbol sequence corresponding to each training speech is obtained.
[0103] In some embodiments, the electronic device may obtain the training phonetic symbol sequence corresponding to each training speech according to the following feasible implementation method: determining the training text corresponding to each training speech. The training text may be the transcribed text corresponding to the training speech. For example, if the training speech is the Chinese speech "Have you eaten?", the training text corresponding to the training speech may be the Chinese text "Have you eaten?".
[0104] In some embodiments, the electronic device may obtain the training text corresponding to the training speech according to any feasible implementation method, and the embodiments of the present disclosure are not limited to this.
[0105] The electronic device may determine a training phonetic symbol sequence associated with the training speech based on the training text.
[0106] In some embodiments, the training text includes words; and determining the training phonetic symbol sequence associated with the training speech based on the training text includes: identifying the phonetic symbols corresponding to the words to obtain the training phonetic symbol sequence corresponding to the training speech.
[0107] For example, the electronic device can obtain multiple words included in each training speech and determine a training phonetic symbol sequence based on the multiple words. For example, the electronic device can obtain the words included in each training speech and identify the phonetic symbols corresponding to the words, thereby obtaining a training phonetic symbol sequence corresponding to the training speech. In this way, the electronic device can accurately obtain the training phonetic symbol sequence based on the training text (with high training label accuracy), thereby improving the accuracy of the encoder of the speech recognition model.
[0108] It should be noted that the electronic device in the embodiment of the present disclosure can determine the training phonetic symbol sequence corresponding to the training speech based on any feasible implementation method, and the embodiment of the present disclosure is not limited to this.
[0109] In step S1003, the encoder of the speech recognition model is trained based on the training speech in multiple languages and the training phonetic symbol sequence corresponding to each training speech.
[0110] In some embodiments, the electronic device trains the encoder of the speech recognition model based on the following feasible implementation method: for any training speech, the encoder of the speech recognition model processes the training speech to obtain a predicted phonetic symbol sequence, and the encoder of the speech recognition model is trained based on the predicted phonetic symbol sequence and the training phonetic symbol sequence corresponding to the training speech. For example, the electronic device can determine the loss between the predicted phonetic symbol sequence and the actual training phonetic symbol sequence of the training speech, and update the parameters in the encoder of the speech recognition model. In this way, due to the high accuracy of the training phonetic symbol sequence, the encoder can more accurately learn the ability to convert speech into phonetic symbol sequences, thereby improving the accuracy of encoder training and improving the accuracy of speech recognition model training.
[0111] The following describes the training process of the encoder of the speech recognition model with reference to FIG11 .
[0112] Figure 11 is a schematic diagram of the training process of an encoder provided by an embodiment of the present disclosure. Figure 11 shows the encoder of the training speech and the speech recognition model. The training speech is input into the encoder of the speech recognition model, and the encoder of the speech recognition model can output a predicted phonetic symbol sequence. The electronic device (not shown in Figure 11) can determine the training text corresponding to the training speech based on the training speech, and obtain the training phonetic symbol sequence corresponding to the training speech based on the training text. The encoder of the speech recognition model can update the parameters in the encoder of the speech recognition model based on the loss between the predicted phonetic symbol sequence and the training phonetic symbol sequence.
[0113] In some embodiments, after the encoder training of the speech recognition model is completed, the training method of the speech recognition model further includes: obtaining a training speech in a target language and a target phonetic symbol sequence corresponding to the training speech in the target language. For example, if the target language is Chinese, the electronic device can obtain a training speech in Chinese from the training speech in multiple languages, and determine the phonetic symbol sequence corresponding to the training speech in Chinese as the target phonetic symbol sequence; if the target language is English, the electronic device can obtain a training speech in English from the training speech in multiple languages, and determine the phonetic symbol sequence corresponding to the training speech in English as the target phonetic symbol sequence.
[0114] Based on the training speech of the target speech and the target phonetic symbol sequence, the parameters of the encoder of the speech recognition model are updated. For example, after the training of the encoder of the speech recognition model is completed, the electronic device can also adjust the parameters of the encoder of the speech recognition model based on the training speech of the target speech and the target phonetic symbol sequence, so that the encoder of the speech recognition model can accurately determine the phonetic symbol sequence corresponding to the speech of the target language, thereby improving the accuracy of the encoder of the speech recognition model and improving the accuracy of speech recognition. For example, if the target language is Chinese, then after the training of the encoder of the speech recognition model is completed, the electronic device can adjust the parameters of the encoder of the speech recognition model based on the training speech of Chinese and the target phonetic symbol sequence (label). In this way, compared with the encoder of the speech recognition model after the training is completed, the accuracy of the phonetic symbol sequence of the target language output by the encoder of the speech recognition model after the parameters are adjusted is higher, thereby improving the training accuracy of the speech recognition model.
[0115] The disclosed embodiment provides a training method for the first training phase, which obtains training speech in multiple languages, determines the training text corresponding to each training speech, determines the training phonetic symbol sequence associated with the training speech based on the training text, and trains the encoder of the speech recognition model based on the training speech in multiple languages and the training phonetic symbol sequence corresponding to each training speech. In this way, the encoder of the speech recognition model can accurately learn the phonetic symbol features of the speech, and the electronic device can also adjust the parameters of the encoder of the speech recognition model after training based on the training speech and phonetic symbol sequence in the target language, thereby improving the accuracy of the phonetic symbol sequence in the target language output by the encoder of the speech recognition model, thereby reducing the training difficulty of the speech recognition model and improving the training accuracy and training efficiency of the speech recognition model.
[0116] FIG12 is a schematic diagram of the structure of a speech processing device provided by an embodiment of the present disclosure. Referring to FIG12 , the speech processing device 120 includes a response module 121 , a processing module 122 , and a display module 123 .
[0117] The response module 121 is configured to obtain the speech to be transcribed in response to a touch operation on a speech acquisition control in the speech transcription page.
[0118] The processing module 122 is configured to perform text transcription on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed.
[0119] The display module 123 is configured to display the transcribed text.
[0120] In which, the text transcription processing is implemented based on a speech recognition model, and the speech recognition model is obtained through training in a first training stage and a second training stage. In the first training stage, the encoder of the speech recognition model is trained based on training speech in multiple languages and training phonetic symbol sequences corresponding to the training speech. In the second training stage, the speech recognition model after training in the first training stage is trained based on sample speech in the target language and target transcribed text corresponding to the sample speech.
[0121] According to one or more embodiments of the present disclosure, the response module 121 is used to: display a voice page in response to a touch operation on the voice acquisition control, wherein the voice page includes multiple voices; and determine the touched voice as the voice to be transcribed in response to a touch operation on any one of the multiple voices.
[0122] According to one or more embodiments of the present disclosure, the response module 121 is configured to perform voice recording in response to a touch operation on the voice acquisition control to obtain the voice to be transcribed.
[0123] According to one or more embodiments of the present disclosure, the processing module 122 is used to: obtain the language of the speech to be transcribed after the response module 121 obtains the speech to be transcribed; determine the speech recognition model according to the language of the speech to be transcribed; and perform text transcription processing on the speech to be transcribed based on the speech recognition model corresponding to the language of the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed.
[0124] According to one or more embodiments of the present disclosure, different speech recognition models transcribe speech in different languages.
[0125] The speech processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0126] FIG13 is a schematic diagram of the structure of another speech processing device provided by an embodiment of the present disclosure. Referring to FIG13 , based on the embodiment shown in FIG12 , the speech processing device 120 further includes a training module 124, which is configured to: obtain a sample speech of a target language and a target transcription corresponding to the sample speech; process the sample speech using an encoder based on a speech recognition model to obtain a sample phonetic symbol sequence associated with the sample speech, wherein the encoder of the speech recognition model is configured to convert the speech into a speech-related phonetic symbol sequence; process the sample phonetic symbol sequence using a decoder based on the speech recognition model to obtain a predicted transcription; and train the speech recognition model based on the target transcription and the predicted transcription.
[0127] According to one or more embodiments of the present disclosure, the training module 124 is configured to: determine the loss between the target transcription text and the predicted transcription text; and train the speech recognition model based on the loss between the target transcription text and the predicted transcription text.
[0128] According to one or more embodiments of the present disclosure, the training module 124 is further configured to determine a target language based on a model training request.
[0129] According to one or more embodiments of the present disclosure, the training module 124 is configured to: receive a model training request, wherein the model training request includes an identifier of a target language; and determine the target language based on the identifier of the target language.
[0130] According to one or more embodiments of the present disclosure, the training module 124 is used to: obtain training speech in multiple languages; obtain a training phonetic symbol sequence corresponding to each training speech; and train the encoder of the speech recognition model based on the training speech in multiple languages and the training phonetic symbol sequence corresponding to each training speech.
[0131] According to one or more embodiments of the present disclosure, the training module 124 is used to: for any training speech, process the training speech based on the encoder of the speech recognition model to obtain a predicted phonetic symbol sequence; and train the encoder of the speech recognition model based on the predicted phonetic symbol sequence and the training phonetic symbol sequence corresponding to the training speech.
[0132] According to one or more embodiments of the present disclosure, the training module 124 is configured to: determine a training text corresponding to each training speech; and determine a training phonetic symbol sequence associated with the training speech based on the training text.
[0133] According to one or more embodiments of the present disclosure, the training text includes words; the training module 124 is configured to identify phonetic symbols corresponding to the words to obtain a training phonetic symbol sequence corresponding to the training speech.
[0134] According to one or more embodiments of the present disclosure, the training module 124 is further used to: obtain the training speech of the target language and the target phonetic symbol sequence corresponding to the training speech of the target language; and update the parameters of the encoder of the speech recognition model based on the training speech of the target speech and the target phonetic symbol sequence.
[0135] The speech processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.
[0136] FIG14 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Please refer to FIG14 , which shows a schematic diagram of the structure of an electronic device 1400 suitable for implementing an embodiment of the present disclosure. The electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG14 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0137] As shown in FIG14 , the electronic device 1400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage device 1408 into a random access memory (RAM) 1403. Various programs and data required for the operation of the electronic device 1400 are also stored in the RAM 1403. The processing device 1401, the ROM 1402, and the RAM 1403 are connected to each other via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.
[0138] Typically, the following devices may be connected to the I / O interface 1405: an input device 1406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1409. The communication device 1409 may allow the electronic device 1400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 14 shows an electronic device 1400 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0139] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication device 1409, or installed from the storage device 1408, or installed from the ROM 1402. When the computer program is executed by the processing device 1401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0140] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0141] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0142] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0143] An embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the speech processing method that may be involved in various embodiments above is implemented.
[0144] An embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the various speech processing methods that may be involved in the above embodiments.
[0145] An embodiment of the present disclosure provides a computer program, comprising: instructions, which, when executed by a processor, enable the processor to execute the speech processing methods that may be involved in various embodiments as described above.
[0146] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).
[0147] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0148] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0149] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0150] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0151] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0152] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0153] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0154] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thereby, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server or storage medium that performs the operation of the technical solution of the present disclosure based on the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0155] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0156] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws and regulations. Data may include information, parameters and messages, such as flow switching indication information.
[0157] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0158] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0159] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A speech processing method, comprising: In response to a touch operation on a speech acquisition control in a speech transcription page, acquiring speech to be transcribed; Performing text transcription processing on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed; and displaying the transcribed text; Among them, the text transcription processing is implemented based on a speech recognition model, and the speech recognition model is obtained through training in a first training stage and a second training stage. In the first training stage, the encoder of the speech recognition model is trained based on training speech in multiple languages and training phonetic symbol sequences corresponding to the training speech. In the second training stage, the speech recognition model trained in the first training stage is trained based on sample speech in a target language and target transcribed text corresponding to the sample speech.
2. The speech processing method according to claim 1, wherein: The step of acquiring the speech to be transcribed in response to the touch operation on the speech acquisition control in the speech transcription page includes: In response to a touch operation on the voice acquisition control, displaying a voice page, wherein the voice page includes a plurality of voices; and In response to a touch operation on any one of the multiple voices, the touched voice is determined as the voice to be transcribed.
3. The speech processing method according to claim 1, wherein: The step of acquiring the speech to be transcribed in response to the touch operation on the speech acquisition control in the speech transcription page includes: In response to a touch operation on the voice acquisition control, voice recording is performed to obtain the voice to be transcribed.
4. The speech processing method according to any one of claims 1 to 3, wherein: The second training phase of the speech recognition model is based on the following training: Obtaining a sample speech in a target language and a target transcription text corresponding to the sample speech; The encoder based on the speech recognition model processes the sample speech to obtain a sample phonetic symbol sequence associated with the sample speech, wherein the encoder of the speech recognition model is used to convert the speech into a speech-related phonetic symbol sequence; The decoder based on the speech recognition model processes the sample phonetic symbol sequence to obtain a predicted transcription text. this; and The speech recognition model is trained based on the target transcription text and the predicted transcription text.
5. The speech processing method according to claim 4, wherein: The training of the speech recognition model based on the target transcription text and the predicted transcription text includes: determining a loss between the target transcript and the predicted transcript; and The speech recognition model is trained based on the loss between the target transcript and the predicted transcript.
6. The speech processing method according to claim 4 or 5, further comprising: Before obtaining sample speech of the target language, the target language is determined according to the model training request.
7. The speech processing method according to claim 6, wherein: According to the model training request, the target languages include: receiving a model training request, wherein the model training request includes an identifier of a target language; and The target language is determined according to the identifier of the target language.
8. The speech processing method according to any one of claims 1 to 7, wherein: The first training phase of the speech recognition model is based on the following training: Get training speech in multiple languages; Obtaining a training phonetic symbol sequence corresponding to each training speech; and The encoder of the speech recognition model is trained based on the training speech in the multiple languages and the training phonetic symbol sequence corresponding to each training speech.
9. The speech processing method according to claim 8, wherein: The step of training the encoder of the speech recognition model based on the training speech of the multiple languages and the training phonetic symbol sequence corresponding to each training speech comprises: For any training speech, the encoder based on the speech recognition model processes the training speech to obtain a predicted phonetic symbol sequence; and Based on the predicted phonetic symbol sequence and the training phonetic symbol sequence corresponding to the training speech, the speech recognition module The encoder of this type is trained.
10. The speech processing method according to claim 8 or 9, wherein: The step of obtaining a training phonetic symbol sequence corresponding to each training speech comprises: Determine the training text corresponding to each training speech; and Based on the training text, a training phonetic symbol sequence associated with the training speech is determined.
11. The speech processing method according to claim 10, wherein: The training text includes words; Determining a training phonetic symbol sequence associated with the training speech based on the training text includes: The phonetic symbols corresponding to the words are identified to obtain a training phonetic symbol sequence corresponding to the training speech.
12. The speech processing method according to any one of claims 8 to 11, further comprising: After the encoder training of the speech recognition model is completed, obtaining the training speech of the target language and the target phonetic symbol sequence corresponding to the training speech of the target language; and Based on the training speech of the target speech and the target phonetic symbol sequence, the parameters of the encoder of the speech recognition model are updated.
13. The speech processing method according to any one of claims 1 to 12, wherein: Performing text transcription processing on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed includes: After obtaining the speech to be transcribed, obtaining the language of the speech to be transcribed; Determining a speech recognition model according to the language of the speech to be transcribed; and Based on the speech recognition model corresponding to the language of the speech to be transcribed, the speech to be transcribed is subjected to text transcription processing to obtain a transcribed text associated with the speech to be transcribed.
14. The speech processing method according to any one of claims 1 to 13, wherein: Different speech recognition models transcribe speech in different languages.
15. A speech processing device, comprising: The response module is used to respond to the touch operation of the voice acquisition control in the voice transcription page to obtain the voice to be transcribed. Record voice; A processing module, used for performing text transcription processing on the speech to be transcribed to obtain a transcribed text associated with the speech to be transcribed; and A display module, used for displaying the transcribed text; Among them, the text transcription processing is implemented based on a speech recognition model, and the speech recognition model is obtained through training in a first training stage and a second training stage. In the first training stage, the encoder of the speech recognition model is trained based on training speech in multiple languages and training phonetic symbol sequences corresponding to the training speech. In the second training stage, the speech recognition model trained in the first training stage is trained based on sample speech in a target language and target transcribed text corresponding to the sample speech.
16. An electronic device, comprising: Memory for storing computer-executable instructions; and A processor, configured to execute the computer-executable instructions stored in the memory, so that the processor executes the speech processing method according to any one of claims 1 to 14.
17. A computer-readable storage medium, wherein: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the speech processing method according to any one of claims 1 to 14 is implemented.
18. A computer program comprising: Instructions, when executed by a processor, cause the processor to perform the speech processing method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Speech recognition method, device, terminal and storage medium
CN111261144A
Chinese user-defined wakeup and internet-of-things interaction method based on intelligent voice chip
CN113178193A
Voice recognition method and device, equipment and storage medium
CN113299282A
Voice wake-up method supporting multiple languages and voice self-definition
CN114944157A
Speech recognition method, related device, electronic equipment and storage medium
CN115019773A
