Confusion matrix generation method and apparatus, device, and storage medium
By generating a confusion matrix and using acoustic models and normalization techniques to quantify the similarity between pronunciation units, the problem of insufficient quantification of pronunciation similarity in existing technologies is solved, thereby improving the accuracy and efficiency of speech recognition.
Patent Information
- Application Number
- CN202210136362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-02-15
AI Technical Summary
Existing technologies struggle to effectively quantify the similarity between pronunciations, leading to frequent errors in recognizing easily confused sounds in speech recognition, especially in specific scenarios where recognition performance is insufficient.
By inputting audio data into an acoustic model, a confusion matrix is generated. The confusion matrix is then updated and normalized using an acoustic score list to quantify the confusion between speech units. This method is applicable to different languages.
It improves the accuracy of pronunciation similarity quantification and the efficiency of confusion matrix generation, reduces recognition errors, and is applicable to multiple languages such as English and Cantonese.
Smart Images

Figure CN114664287B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speech recognition, and in particular to a method, apparatus, device and storage medium for generating a confusion matrix. Background Art
[0002] Nowadays, with the development of artificial intelligence, although the performance of speech recognition has been greatly improved, some recognition errors will also be encountered in actual applications, especially some easily confused sounds, such as l and n, s and sh. For example, "grade" is recognized as "online", and "ninety" is recognized as "old time". In certain specific scenarios, such as searching for music, calling a person in the address book or searching for a place name, user personalized information can be uploaded, such as the user's address book. The address book is converted into a set of pronunciation units, such as a pinyin set, and then the recognition result is also converted into pinyin. Then, in the target pinyin set, matching is performed according to the similarity of pronunciation, and finally the result of confusion matching is obtained, so as to improve the recognition performance.
[0003] The key to performing confusion matching is to have a method for measuring the similarity of different pronunciations. The existing methods for measuring pronunciation similarity generally enumerate by experience. Taking Chinese as an example, for example, the pronunciation of b and p is more easily confused than the pronunciation of b and y, and ān and āng are more easily confused than ān and ōu. Therefore, generally, some easily confused pronunciations can be defined by enumeration. Defining by experience in this way is likely to miss some confused sounds and cannot well quantify the similarity between pronunciations. Summary of the Invention
[0004] The present invention aims to at least solve one of the technical problems existing in the prior art. For this reason, embodiments of the present invention propose a method, apparatus, device and storage medium for generating a confusion matrix to better quantify the similarity between pronunciations.
[0005] On the one hand, an embodiment of the present invention provides a method for generating a confusion matrix, including: inputting audio data into an acoustic model to obtain a list of acoustic scores for each frame, where the list of acoustic scores includes at least one acoustic score, and the acoustic score represents the acoustic posterior probability of a pronunciation unit; obtaining the central element of each frame of the audio data, and updating the row corresponding to the central element in the confusion matrix according to the list of acoustic scores; each row in the confusion matrix represents the confusion degree between the central element and all the pronunciation units; normalizing the confusion matrix row by row to obtain the confusion matrix as the output result.
[0006] According to some embodiments of the present invention, the obtaining the central element of each frame of the audio data includes: receiving the alignment file corresponding to the audio data; extracting the central element of each frame of the audio data from the alignment file.
[0007] According to some embodiments of the present invention, updating the row of the center element in the confusion matrix according to the acoustic score list includes: obtaining the row of the center element in the confusion matrix as a first row; determining the articulatory unit corresponding to each acoustic score in the acoustic score list, obtaining the column corresponding to the articulatory unit in the first row of the confusion matrix as a first column; and updating the elements of the first column of the first row of the confusion matrix according to the acoustic score.
[0008] According to some embodiments of the present invention, updating the elements of the first column of the first row of the confusion matrix based on the acoustic score includes: summing the acoustic score to the elements of the first column of the first row of the confusion matrix.
[0009] According to some embodiments of the present invention, the step of normalizing the confusion matrix row by row to obtain the confusion matrix as the output result includes: summing each row of the confusion matrix to obtain a first sum; dividing each element in each row of the confusion matrix by the first sum to obtain the normalized confusion matrix as the output result.
[0010] According to some embodiments of the present invention, the method includes: if any element in the normalized confusion matrix is less than a first threshold, then setting the arbitrary element to 0.
[0011] On the other hand, embodiments of the present invention provide a method for generating a confusion matrix, comprising: inputting audio data into an acoustic model to obtain an acoustic score list for each frame, wherein the acoustic score list includes at least one acoustic score, and the acoustic score characterizes the acoustic posterior probability of a vocal unit; obtaining the center element of each frame of the audio data, and updating the column of the center element in the confusion matrix according to the acoustic score list; each column in the confusion matrix characterizes the confusion degree between the center element and all the vocal units; and normalizing the confusion matrix column by column to obtain the confusion matrix as the output result.
[0012] The method for generating a confusion matrix according to embodiments of the present invention has at least the following beneficial effects: by inputting acoustic corpus into a trained acoustic model, the acoustic posterior probability of the degree of confusion between each pronunciation unit and the central element is obtained, and the confusion matrix is updated and normalized to statistically analyze the similarity between pronunciations. This not only allows for the statistical analysis of the confusion between all pronunciation units, but also better quantifies the similarity between pronunciations, effectively improving the generation efficiency and accuracy of the confusion matrix, preventing errors and omissions, and is applicable to different languages, such as English and Cantonese.
[0013] On the other hand, embodiments of the present invention provide an apparatus for generating a confusion matrix, comprising: a posterior module, configured to input audio data into an acoustic model to obtain an acoustic score list for each frame, wherein the acoustic score list includes at least one acoustic score, and the acoustic score represents the acoustic posterior probability of a vocal unit; a first update module, configured to obtain the center element of each frame of the audio data and update the row of the center element in the confusion matrix according to the acoustic score list; each row in the confusion matrix represents the confusion degree between the center element and all the vocal units; and a first normalization module, configured to normalize the confusion matrix row by row to obtain the confusion matrix as the output result.
[0014] On the other hand, embodiments of the present invention provide an apparatus for generating a confusion matrix, comprising: a posterior module, configured to input audio data into an acoustic model to obtain an acoustic score list for each frame, wherein the acoustic score list includes at least one acoustic score, and the acoustic score represents the acoustic posterior probability of a vocal unit; a second update module, configured to obtain the center element of each frame of the audio data and update the column of the center element in the confusion matrix according to the acoustic score list; each column in the confusion matrix represents the confusion degree between the center element and all the vocal units; and a second normalization module, configured to normalize the confusion matrix column by column to obtain the confusion matrix as the output result.
[0015] The confusion matrix generation apparatus according to embodiments of the present invention has at least the following beneficial effects: by inputting acoustic corpus into a trained acoustic model, obtaining the acoustic posterior probability of the confusion degree between each pronunciation unit and the central element, and updating and normalizing the confusion matrix to statistically analyze the similarity between pronunciations, it can not only statistically analyze the confusion degree between all pronunciation units, but also better quantify the similarity between pronunciations, effectively improve the generation efficiency and accuracy of the confusion matrix, prevent errors and omissions, and is applicable to different languages, such as English and Cantonese.
[0016] On the other hand, embodiments of the present invention provide a computer device, including: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the confusion matrix generation method as described above.
[0017] On the other hand, there is a computer-readable storage medium storing program instructions that, when executed by a processor, implement the above-described method for generating a confusion matrix.
[0018] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0019] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0020] Figure 1 This is a method for generating a confusion matrix provided in an embodiment of the present invention.
[0021] Figure 2 This is another method for generating a confusion matrix provided in the embodiments of the present invention.
[0022] Figure 3 This is a schematic diagram illustrating the process of generating the confusion matrix according to an embodiment of the present invention.
[0023] Figure 4 This is an example image of an updated confusion matrix according to an embodiment of the present invention.
[0024] Figure 5 This is a confusion matrix generation device provided in an embodiment of the present invention.
[0025] Figure 6 This is another confusion matrix generation device provided in the embodiments of the present invention. Detailed Implementation
[0026] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings. Throughout the description, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions. In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "part," or "unit" can be used interchangeably. Terms such as "first," "second," etc., are used only to distinguish technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the sequential relationship of the indicated technical features. In the following description, the consecutive reference numerals for method steps are for ease of review and understanding. Adjusting the implementation order of steps, in conjunction with the overall technical solution of the present invention and the logical relationship between the various steps, will not affect the technical effect achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0027] Reference Figure 1 This embodiment discloses a method for generating a confusion matrix, including but not limited to the following steps S100 to S300.
[0028] Step S100: Input the audio data into the acoustic model to obtain a list of acoustic scores for each frame.
[0029] The list of acoustic scores includes at least one acoustic score. Each acoustic score corresponds to a vocal unit and represents the acoustic posterior probability of that vocal unit.
[0030] Step S200: Obtain the center element of each frame of the audio data, and update the row of the center element in the confusion matrix according to the acoustic score list.
[0031] In this embodiment, each row of the confusion matrix corresponds to a central element, which represents the degree of confusion between the central element and all the phonetic units; that is, each column of each row represents the degree of confusion between the central element and a certain phonetic unit.
[0032] Specifically, first, the alignment file corresponding to the audio data is received, and the center element of each frame of the audio data is extracted from the alignment file.
[0033] Then, the row corresponding to the central element in the confusion matrix is taken as the first row. The acoustic score list of the frame is traversed, the sound unit corresponding to each acoustic score in the acoustic score list is determined, and the column corresponding to the sound unit in the first row of the confusion matrix is taken as the first column.
[0034] Finally, the elements in the first column of the first row of the confusion matrix are updated based on the acoustic score. The values corresponding to the elements in the first column of the first row of the confusion matrix are then summed to the acoustic score.
[0035] Step S300: Normalize the confusion matrix row by row to obtain the confusion matrix as the output result.
[0036] Specifically, the first sum is obtained by summing each row of the confusion matrix; then, each element in each row of the confusion matrix is divided by the first sum to obtain the normalized confusion matrix as the output.
[0037] In some embodiments of the present invention, the method further includes: traversing the elements in the normalized confusion matrix, and if any element in the normalized confusion matrix is less than a first threshold, then setting that arbitrary element to 0.
[0038] In the above embodiments, the confusion matrix stores the degree of confusion between a central element and each phonetic unit by row. However, the confusion matrix can also store the degree of confusion between a central element and each phonetic unit by column, as specifically... Figure 2 As shown.
[0039] Reference Figure 2 This embodiment also discloses a method for generating a confusion matrix, including but not limited to the following steps S100, S200a to S300a.
[0040] Step S100: Input the audio data into the acoustic model to obtain a list of acoustic scores for each frame.
[0041] The list of acoustic scores includes at least one acoustic score. Each acoustic score corresponds to a vocal unit and characterizes the acoustic posterior probability of that vocal unit. This step is related to... Figure 1 The steps of the method shown are the same.
[0042] Step S200a: Obtain the center element of each frame of the audio data, and update the column corresponding to the center element in the confusion matrix according to the acoustic score list.
[0043] In this embodiment, each column of the confusion matrix corresponds to a central element, which represents the degree of confusion between the central element and all the phonetic units; that is, each row of each column represents the degree of confusion between the central element and a certain phonetic unit.
[0044] Specifically, first, the alignment file corresponding to the audio data is received, and the center element of each frame of the audio data is extracted from the alignment file.
[0045] Then, the column corresponding to the central element in the confusion matrix is obtained as the second column. The acoustic score list of the frame is traversed, the sound unit corresponding to each acoustic score in the acoustic score list is determined, and the column corresponding to the sound unit in the second column of the confusion matrix is obtained as the second row.
[0046] Finally, the elements in the first row of the second column of the confusion matrix are updated based on the acoustic score. The values corresponding to the elements in the first row of the second column of the confusion matrix are then summed to the acoustic score.
[0047] Step S300a: Normalize the confusion matrix column by column to obtain the confusion matrix as the output result.
[0048] Specifically, the second sum is obtained by summing each column of the confusion matrix; each element in each column of the confusion matrix is divided by the second sum to obtain the normalized confusion matrix as the output.
[0049] The following will use Chinese as an example, with each row of the confusion matrix corresponding to a central element, to explain in detail the method provided by the embodiments of the present invention.
[0050] Figure 3A schematic flowchart showing the generation of the confusion matrix is presented. The generation of the confusion matrix requires the use of a trained acoustic model, a large batch of audio data, and the alignment files corresponding to the audio data. Each piece of audio data corresponds to an alignment file, which refers to which central element each frame of the audio is aligned with. This alignment file can be generated by existing forced alignment techniques and acoustic models. For each input audio data, feature extraction is first performed, and the features used are the features required by the acoustic model. Then, the acoustic posterior probability is obtained through the acoustic model, and the confusion matrix can be updated using the acoustic posterior probability and the alignment file. The final confusion matrix is generated through the iteration of a large amount of audio.
[0051] Figure 4 It is an example diagram of the confusion matrix update. Here, the pronunciation units of the exemplified acoustic model are Bi - phones. The pronunciation of a word not only depends on the pronunciation unit itself but also on the context in which the pronunciation unit is located. A Bi - phone only considers the influence of the previous sound. However, the method of the embodiments of the present invention is not limited to this, and other acoustic models can also be used. Figure 4 The content of the input audio in is "Today", with a total of 10 frames, and each frame has an alignment result. This audio will involve the calculation of the confusion degrees related to four pronunciation units (Jīn tīan). Figure 4 The numbers after the vowels in represent tones. For example, in1 represents īn. These four pronunciation units in the alignment file are called central elements, which include two initials and two finals. Since in Chinese, each Chinese character generally has the form of initial - final, and there is no form of initial - initial or final - final, generally, initials are confused with initials, and finals are confused with finals. For example, "Today" and "fresh" (xīn xīan) are easily confused, that is, the initial j and the initial x are easily confused and have a relatively high similarity; "Today" and "Jing Tian" (Jīng tīan) are easily confused, that is, the finals īn and īng are easily confused.
[0052] The calculation of the confusion degree between each central element and other pronunciation units is as follows:
[0053] Feature extraction is performed on the input audio, and it is input into the acoustic model to obtain the list of acoustic scores am_scores[N] for each frame, where N is the total number of pronunciation units. Each acoustic score represents the acoustic posterior probability of a certain pronunciation unit in that frame.
[0054] In Figure 4 , the audio "Today" has 10 posterior probabilities, and each frame has a corresponding forced alignment result, that is, which phoneme this frame should be aligned with. Figure 4 Each aligned phoneme in is called a Bi - phone. The element after the dash in the "alignment" row is the central element, and the element before the dash is the context phoneme of the central element. Figure 4 The "posterior" row in corresponds to the acoustic scores.
[0055] The confusion matrix [N] is updated based on the list of acoustic scores for each frame. The update method for the confusion matrix is as follows:
[0056] confusion_matrix[c][i]+=am_score[i]
[0057] Here, c represents the central element, and i represents a certain articulation unit, ranging from 0 to N-1.
[0058] That is, for each frame, only the row of elements corresponding to the center element in the confusion matrix is considered.
[0059] After analyzing all the audio samples, an NxN confusion matrix was obtained. Each row of the matrix represents the confusion level between the central element and all other pronunciation units. In each row, pronunciation units with similar and easily confused sounds have similar scores in the matrix. The score values can be referenced... Figure 4 The posterior of the first frame: the difference between the score of sil-j and sil-x is relatively small, indicating that j and x are relatively easy to confuse.
[0060] Then, each row of the generated confusion matrix is normalized according to the following formula:
[0061] confuse[c][i] / =sum(confuse[c])
[0062] Here, sum(confuse[c]) represents the sum of all elements in the row containing the central element c.
[0063] The confusion matrix generation method of this invention can obtain the acoustic posterior probability of the confusion degree between each pronunciation unit and the central element by inputting acoustic corpus into a trained acoustic model, and update and normalize the confusion matrix. It can not only statistically analyze the confusion degree between all pronunciation units, but also better quantify the similarity between pronunciations, effectively improve the generation efficiency and accuracy of the confusion matrix, prevent errors and omissions, and is applicable to different languages, such as English and Cantonese.
[0064] Reference Figure 5 This embodiment discloses a confusion matrix generation device, including but not limited to: a posteriori module 500, a first update module 610 and a first normalization module 710.
[0065] The posterior module 500 is used to input audio data into the acoustic model to obtain a list of acoustic scores for each frame. This list of acoustic scores includes at least one acoustic score, which represents the acoustic posterior probability of the phonative unit.
[0066] The first update module 610 is used to obtain the center element of each frame of the audio data and update the row of the center element in the confusion matrix according to the acoustic score list corresponding to the frame. Each row in the confusion matrix represents the degree of confusion between the center element and all the speech units.
[0067] The first normalization module 710 is used to normalize the confusion matrix row by row to obtain the confusion matrix as the output result.
[0068] Reference Figure 6 This embodiment discloses a confusion matrix generation device, including but not limited to: a posteriori module 500, a second update module 620 and a first normalization module 720.
[0069] The posterior module 500 is used to input audio data into the acoustic model to obtain a list of acoustic scores for each frame. This list of acoustic scores includes at least one acoustic score, which represents the acoustic posterior probability of the phonative unit.
[0070] The first update module 620 is used to obtain the center element of each frame of the audio data and update the column of the center element in the confusion matrix according to the acoustic score list corresponding to the frame. The confusion matrix represents the degree of confusion between the center element and all the speech units in each column.
[0071] The first normalization module 720 is used to normalize the confusion matrix column by column to obtain the confusion matrix as the output result.
[0072] Obviously, Figure 5 The generating device shown is Figure 6 The only difference in the generation device shown is the storage method of the confusion matrix. Figure 1 The method for generating the confusion matrix shown is based on the same inventive concept. Therefore, under the synergistic effect of the above modules, the confusion matrix generation device can obtain the acoustic posterior probability of the degree of confusion between each pronunciation unit and the central element by inputting acoustic corpus into the trained acoustic model, and update and normalize the confusion matrix. It can not only statistically analyze the degree of confusion between all pronunciation units, but also better quantify the similarity between pronunciations, effectively improve the generation efficiency and accuracy of the confusion matrix, prevent errors and omissions, and is applicable to different languages, such as English and Cantonese.
[0073] This embodiment provides a computer device, including: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the above-described method for generating a confusion matrix. The processor may also be referred to as a CPU (Central Processing Unit). The processor may be an integrated circuit chip with signal processing capabilities. The processor may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor, or it may be any conventional processor. The memory may include various components (e.g., machine-readable media), including but not limited to random access memory components, read-only components, and any combination thereof. The memory may also include (e.g., instructions (e.g., software) stored in one or more machine-readable media); these instructions implement the above-described method for generating a confusion matrix. It is intended to be understood that, to avoid redundancy, content not covered in this embodiment can be referred to the above-described method for generating a confusion matrix.
[0074] This embodiment provides a computer-readable storage medium storing program instructions. When executed by a processor, these instructions implement the aforementioned method for generating a confusion matrix. It is understood that, to avoid redundancy, details not covered in this embodiment can be found in the aforementioned method for generating a confusion matrix.
[0075] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the device, can be implemented as software, firmware, hardware, and suitable combinations thereof.
[0076] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium (hereinafter referred to as storage medium), which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer-readable medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0077] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but this does not limit the scope of the invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and spirit of the present invention should be considered within the scope of the present invention.
Claims
1. A method for generating a confusion matrix, characterized in that, include: Audio data is input into an acoustic model to obtain an acoustic score list for each frame. The acoustic score list includes at least one acoustic score, which represents the acoustic posterior probability of the sound-producing unit. Obtain the center element of each frame of the audio data, and update the row of the center element in the confusion matrix according to the acoustic score list; each row in the confusion matrix represents the degree of confusion between the center element and all the speech units. The confusion matrix is normalized row by row to obtain the confusion matrix as the output result; The step of updating the row of the center element in the confusion matrix according to the acoustic score list includes: Obtain the row corresponding to the central element in the confusion matrix, and use it as the first row; Determine the pronunciation unit corresponding to each acoustic score in the acoustic score list, and obtain the column corresponding to the pronunciation unit in the first row of the confusion matrix as the first column; The elements of the first column of the first row of the confusion matrix are updated based on the acoustic score; The step of updating the elements of the first column of the first row of the confusion matrix based on the acoustic score includes: The acoustic score is summed from the elements of the first column of the first row of the confusion matrix.
2. The method for generating a confusion matrix according to claim 1, characterized in that, The process of acquiring the center element of each frame of the audio data includes: Receive the alignment file corresponding to the audio data; Extract the center element of each frame of the audio data from the alignment file.
3. The method for generating a confusion matrix according to claim 1, characterized in that, The process of normalizing the confusion matrix row-wise to obtain the confusion matrix as the output includes: Summing each row of the confusion matrix yields the first sum; Divide each element in each row of the confusion matrix by the first sum to obtain the normalized confusion matrix as the output result.
4. A method for generating a confusion matrix, characterized in that, include: Audio data is input into an acoustic model to obtain an acoustic score list for each frame. The acoustic score list includes at least one acoustic score, which represents the acoustic posterior probability of the sound-producing unit. Obtain the center element of each frame of the audio data, and update the column of the center element in the confusion matrix according to the acoustic score list; each column in the confusion matrix represents the confusion degree between the center element and all the speech units; The confusion matrix is normalized column-wise to obtain the confusion matrix as the output result; Specifically, updating the column corresponding to the central element in the confusion matrix based on the acoustic score list includes: Receive the alignment file corresponding to the audio data, and extract the center element of each frame of the audio data from the alignment file; The column corresponding to each of the central elements in the confusion matrix is obtained as the second column; Traverse the acoustic score list of each frame, determine the speech unit corresponding to each acoustic score in the acoustic score list, and obtain the column corresponding to the speech unit in the second column of the confusion matrix as the second row; The elements in the first row of the second column of the confusion matrix are updated based on the acoustic score; The step of updating the elements of the first row of the second column of the confusion matrix based on the acoustic score includes: The acoustic score is calculated by summing the values corresponding to the elements in the first row of the second column of the confusion matrix.
5. A device for generating a confusion matrix, characterized in that, include: The posterior module is used to input audio data into the acoustic model to obtain an acoustic score list for each frame. The acoustic score list includes at least one acoustic score, which represents the acoustic posterior probability of the sound unit. The first update module is used to obtain the center element of each frame of the audio data and update the row of the center element in the confusion matrix according to the acoustic score list; each row in the confusion matrix represents the degree of confusion between the center element and all the speech units. The first normalization module is used to normalize the confusion matrix row by row to obtain the confusion matrix as the output result. The step of updating the row of the center element in the confusion matrix according to the acoustic score list includes: Obtain the row corresponding to the central element in the confusion matrix, and use it as the first row; Determine the pronunciation unit corresponding to each acoustic score in the acoustic score list, and obtain the column corresponding to the pronunciation unit in the first row of the confusion matrix as the first column; The elements of the first column of the first row of the confusion matrix are updated based on the acoustic score; The step of updating the elements of the first column of the first row of the confusion matrix based on the acoustic score includes: The acoustic score is summed from the elements of the first column of the first row of the confusion matrix.
6. A device for generating a confusion matrix, characterized in that, include: The posterior module is used to input audio data into the acoustic model to obtain an acoustic score list for each frame. The acoustic score list includes at least one acoustic score, which represents the acoustic posterior probability of the sound unit. The second update module is used to obtain the center element of each frame of the audio data and update the column of the center element in the confusion matrix according to the acoustic score list; each column in the confusion matrix represents the confusion degree between the center element and all the speech units. The second normalization module is used to normalize the confusion matrix column by column to obtain the confusion matrix as the output result. Specifically, updating the column corresponding to the central element in the confusion matrix based on the acoustic score list includes: Receive the alignment file corresponding to the audio data, and extract the center element of each frame of the audio data from the alignment file; The column corresponding to each of the central elements in the confusion matrix is obtained as the second column; Traverse the acoustic score list of each frame, determine the speech unit corresponding to each acoustic score in the acoustic score list, and obtain the column corresponding to the speech unit in the second column of the confusion matrix as the second row; The elements in the first row of the second column of the confusion matrix are updated based on the acoustic score; The step of updating the elements of the first row of the second column of the confusion matrix based on the acoustic score includes: The acoustic score is calculated by summing the values corresponding to the elements in the first row of the second column of the confusion matrix.
7. A computer device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method for generating the confusion matrix as described in any one of claims 1 to 4.
8. A computer-readable storage medium storing program instructions that, when executed by a processor, implement the method for generating a confusion matrix as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Voice text output method and device, storage medium and electronic device
CN113744718A