A natural language data analysis method and system based on speech recognition
By annotating language features and building models for non-standard Mandarin data, the accuracy problem of non-standard Mandarin and dialect recognition in speech recognition technology is solved, and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202410108884.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-01-26
AI Technical Summary
Existing speech recognition technology has great challenges in identifying non-standard Mandarin and Internet words, and it is difficult to achieve accurate recognition.
By annotating the language characteristics of non-standard Mandarin data, building language type recognition models and language recognition models, performing data preprocessing and language recognition model construction and training, and calculating language recognition probability to improve the accuracy of dialect recognition.
The recognition accuracy of non-standard Mandarin and dialects is improved, and the recognition problems in the existing technology are solved.
Smart Images

Figure CN117995166B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of speech recognition, and in particular to a natural language data analysis method and system based on speech recognition. Background Art
[0002] Speech recognition technology is a technology that converts sound audio into text. Speech recognition technology allows computers to execute commands or complete tasks by recognizing and understanding human speech. With the development of artificial intelligence technology, speech recognition technology has also been rapidly popularized and applied. At present, speech recognition technology has been widely used in many fields, such as smart home, autonomous driving, intelligent customer service, speech to text, etc. Among them, smart home and autonomous driving are the most popular speech recognition application fields in recent years. Speech recognition is trained and developed based on mainstream standard languages, but there are great challenges in recognizing non-standard Mandarin and Internet words. The above problems exist in the existing technologies;
[0003] For example, a Chinese patent with application publication number CN112820282A discloses a power grid dispatching system based on speech recognition and natural language processing, including a language recognition unit, a dispatching system and a playback system. The dispatching system includes a language receiving module, a processing module 1, a data acquisition module, a data analysis module, a big data module, a solution optimization module, an interactive module 1, a risk assessment module and an alarm module. When the data of the power grid is abnormal, the present invention can transmit the information to the interactive module 2 through the interactive module 1, and the processing module 2 broadcasts the information through the broadcasting module, so as to remind the dispatcher. The present invention can collect the language instructions of the dispatcher through the language recognition unit, and send them to the dispatching system after processing, so as to send instructions to the processing module 1, and the processing module 1 processes the abnormal information of the power grid according to the instructions, which effectively reduces the workload of the dispatcher.
[0004] At the same time, for example, a Chinese patent with application publication number CN113537921A discloses an intelligent safety error prevention verification system and its error prevention verification system, including the steps of: calling a natural speech recognition component to perform voice broadcasting, intelligent task reminders, voice interaction, intelligent information recommendation, and identity authentication based on biometrics; performing intelligent search based on natural language understanding to retrieve equipment status data, OMS power outage maintenance order data, operation ticket data, and dispatch log data; based on an intelligent error prevention function library, building an intelligent safety error prevention knowledge base for power grid dispatching and a corresponding knowledge extraction and reasoning engine; the present invention is based on intelligent speech processing, natural language understanding, big data analysis, and intelligent human-computer interaction technology, and realizes intelligent operation ticket formulation function, intelligent safety error prevention function, intelligent agent function, and intelligent interaction function, thereby improving the level of intelligence in the field of power grid dispatching operation and operation.
[0005] The above patents all have the problem raised by this background technology: speech recognition is trained and developed based on mainstream standard language, but there are great challenges in recognizing non-standard Mandarin and Internet words. In order to solve these problems, this application designs a natural language data analysis method and system based on speech recognition. Summary of the invention
[0006] In view of the deficiencies of the prior art, the present invention proposes a natural language data analysis method and system based on speech recognition. The present invention collects non-standard Mandarin data, and annotates the language characteristics of the collected non-standard Mandarin data, annotates the pronunciation variants, speech speed, and accent data of the non-standard Mandarin data, builds a language type recognition model, imports the annotated non-standard Mandarin data into a data preprocessing strategy to perform language clarification processing to obtain preprocessed language data, substitutes the obtained preprocessed language data and the annotated data corresponding to the language characteristics into a language recognition model construction strategy to construct and train the language recognition model, thereby obtaining an initial probability of language recognition, imports the acquired natural language data into the constructed language type recognition model and the language recognition model to calculate the recognition language probability, extracts the recognition language data corresponding to the maximum value of the recognition language probability, and outputs the recognition result of the acquired natural language data. The present invention first calculates the language recognition type output probability corresponding to the output language, and then calculates the recognition language probability in the constructed language type recognition model and the language recognition model, thereby improving the accuracy of dialect recognition.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A natural language data analysis method based on speech recognition comprises the following specific steps:
[0009] S1. Collect non-standard Mandarin data, annotate the language characteristics of the collected non-standard Mandarin data, annotate the pronunciation variants, speaking speed, and accent data of the non-standard Mandarin data, and build a language type recognition model;
[0010] S2, importing the annotated non-standard Mandarin data into the data preprocessing strategy to perform language clarification processing to obtain preprocessed language data;
[0011] S3, substituting the obtained pre-processed language data and the annotated data corresponding to the language characteristics into the language recognition model construction strategy to construct and train the language recognition model, thereby obtaining the initial probability of language recognition;
[0012] S4, importing the acquired natural language data into the constructed language type recognition model and language recognition model to calculate the recognition language probability;
[0013] S5. Extract the recognition language data corresponding to the maximum value of the recognition language probability and output it to obtain the recognition result of the acquired natural language data.
[0014] Specifically, the content of S1 includes the following specific steps:
[0015] S11, extracting the collected non-standard Mandarin data of the specified local dialect type, and obtaining the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data corresponding to the non-standard Mandarin data, constructing a language type recognition model whose input is the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data of the non-standard Mandarin data, and whose output is the dialect type;
[0016] S12, dividing the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data and dialect type data of the non-standard Mandarin data into a 70% parameter training set and a 30% parameter test set; inputting the 70% parameter training set into the language type recognition model for training to obtain an initial language type recognition model; using the 30% parameter test set to test the initial language type recognition model, and outputting an optimal initial language type recognition model that meets the preset dialect type data recognition accuracy as the language type recognition model, wherein the output formula of the language type recognition model is:
[0017] Among them, D y is the output probability of the language recognition type, K[] is the language type probability corresponding to the data in brackets, min() is the minimum value output of the data in brackets, is the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data of the Jth input language to be recognized, C I is the standard value of the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data, and aI is the proportion coefficient of the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data;.
[0018] In this way, the dialect type of the language is first identified through the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data of the speech data, thereby improving the accuracy of language recognition;
[0019] Specifically, the data preprocessing strategy in S2 includes the following specific contents:
[0020] The input speech signal is obtained, and the input speech signal is divided into frames, and the speech signal is divided into frame speech with each frame being 10-30 milliseconds. The frame speech is imported into the speech processing software for speech smoothing, Fourier transform, energy estimation, estimated noise spectrum, signal-to-noise ratio estimation, noise reduction filtering, and inverse Fourier transform for noise reduction processing; the noise-reduced frame speech is synthesized, overlapped and added to obtain the final noise-reduced speech signal, which is set as the preprocessed language data.
[0021] It should be noted that the speech smoothing, Fourier transform, energy estimation, estimated noise spectrum, signal-to-noise ratio estimation, noise reduction filtering, inverse Fourier transform and then noise reduction processing are mature noise reduction methods for processing language data in the prior art, and will not be described in detail here;
[0022] The specific steps here are: a. Preprocessing: The input speech signal is divided into frames, usually each frame is 10-30 milliseconds, and a windowing function (such as a Hamming window) is applied for smoothing, so that the speech signal can be converted into a time-frequency domain representation;
[0023] b. Fourier transform: Apply fast Fourier transform (FFT) to each frame of speech signal to convert the time domain signal into the frequency domain signal;
[0024] c. Energy estimation: Calculate the energy spectral density of each frame based on the frequency domain signal, and obtain the total energy of the frame by summing the frequency axis;
[0025] d. Estimation of noise spectrum: Select several relatively long non-speech segments in the pure speech segment (excluding speech), calculate the average energy spectral density of these segments, and obtain the noise spectrum;
[0026] e. Signal-to-noise ratio estimation: By comparing the energy spectral density of the speech segment and the noise segment, the signal-to-noise ratio of the speech segment is estimated;
[0027] f. Noise reduction filtering: compare the spectrum of the speech frame with the noise spectrum and suppress the noise through gain control;
[0028] g. Inverse Fourier transform: Apply inverse Fourier transform (IFFT) to the processed frequency domain signal to reconstruct the frequency domain signal into a time domain signal;
[0029] h. Final synthesis: synthesize each frame of speech after noise reduction, overlap and add them to obtain the final noise reduction speech signal.
[0030] Specifically, the language recognition model construction strategy in S3 includes the following specific steps:
[0031] S31, dividing all the frame speech sequences in the obtained preprocessed language data into triphone sequences, and obtaining all possible state sequences of the triphone sequences, where all possible state sequences are: for example, the states of the triphones are: a, b, c, and the number of feature frames is 10, then the possible state sequences are aaabbbcccc, aaaabbbccc, etc.;
[0032] S32, extracting data of all possible state sequences and corresponding recognized dialect types, and obtaining pronunciation words corresponding to all possible state sequences in the recognized dialect types, obtaining dialect expression words of all possible state sequences, arranging the dialect expression words in the order of the state sequences, and randomly combining the dialect expression words in the arrangement order to obtain a plurality of arrangement and combination sentences;
[0033] S33, traversing the probability of each dialect representation word of the permutation and combination sentence appearing in the obtained vocabulary set, substituting it into the overall representation word probability calculation formula to calculate the overall representation word probability of the permutation and combination sentence, wherein the overall representation word probability calculation formula is: Among them, m is the number of words that represent the whole in the permutation and combination sentence, n is the number of permutation and combination sentences, c is the number of words that represent the whole in the permutation and combination sentence, and n is the number of words that represent the whole in the permutation and combination sentence. i is the probability of the i-th representation word in the selected permutation and combination sentence appearing in the representation word set, where, is the probability of the i-th representation word in the j-th permutation and combination sentence appearing in the representation word set;
[0034] S34, obtaining the probability K2 of the occurrence of the permutation and combination sentence in all the permutation and combination sentences outputted in the spoken language, and substituting the obtained overall representation vocabulary probability and the probability K2 of the occurrence of the permutation and combination sentence K1 in all the permutation and combination sentences outputted in the spoken language into the initial probability calculation formula to calculate the initial probability of language recognition, the initial probability calculation formula is: Among them, λ1 is the overall coefficient of vocabulary probability, λ2 is the coefficient of the probability of the permutation and combination sentences appearing in all the permutation and combination sentences of spoken output, λ1+λ2=1. It should be noted here that the probability of the permutation and combination sentences appearing in all the permutation and combination sentences of spoken output is obtained based on the statistics of the sentences output by each group of people. The calculation method of λ1 and λ2 here is to count 5,000 dialect output personnel to output the predetermined dialect, and then import the data of these dialects into the company to calculate the initial probability, and then import the initial probability into the fitting software to output the λ1 and λ2 values that meet the judgment accuracy.
[0035] Specifically, the specific content of S4 is as follows:
[0036] The acquired natural language data is imported into the constructed language type recognition model and the language recognition model to obtain the language recognition type output probability and the initial probability of language recognition, and the obtained language recognition type output probability and the initial probability of language recognition are imported into the recognition language probability calculation formula to obtain the probability of recognition language, wherein the recognition language probability calculation formula is:
[0037] A natural language data analysis system based on speech recognition is implemented based on the above-mentioned natural language data analysis method based on speech recognition, and comprises a language type recognition model construction module, a preprocessing module, an initial probability calculation module, a recognition language probability calculation module, a recognition output module and a control module. The language type recognition model construction module is used to collect non-standard Mandarin data, and annotate the collected non-standard Mandarin data with language characteristics, annotate the pronunciation variants, speech speed and accent data of the non-standard Mandarin data, and construct a language type recognition model. The preprocessing module is used to import the annotated non-standard Mandarin data into a data preprocessing strategy to perform language clarification processing to obtain preprocessed language data. The initial probability calculation module is used to substitute the obtained preprocessed language data and the annotated data corresponding to the language characteristics into a language recognition model construction strategy to construct and train the language recognition model, thereby obtaining an initial probability of language recognition.
[0038] Specifically, the recognition language probability calculation module is used to import the acquired natural language data into the constructed language type recognition model and language recognition model to calculate the recognition language probability; the recognition output module is used to extract the recognition language data corresponding to the maximum value of the recognition language probability and output it to obtain the recognition result of the acquired natural language data; the control module is used to control the operation of the language type recognition model construction module, the preprocessing module, the initial probability calculation module, the recognition language probability calculation module, and the recognition output module.
[0039] An electronic device comprises: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;
[0040] The processor executes the above-mentioned natural language data analysis method based on speech recognition by calling the computer program stored in the memory.
[0041] A computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute a natural language data analysis method based on speech recognition as described above.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The present invention collects non-standard Mandarin data, and annotates the language characteristics of the collected non-standard Mandarin data, annotates the pronunciation variants, speech speed, and accent data of the non-standard Mandarin data, constructs a language type recognition model, imports the annotated non-standard Mandarin data into a data preprocessing strategy to perform language clarification processing to obtain preprocessed language data, substitutes the obtained preprocessed language data and the annotated data corresponding to the language characteristics into a language recognition model construction strategy to construct and train the language recognition model, thereby obtaining an initial probability of language recognition, imports the acquired natural language data into the constructed language type recognition model and the language recognition model to calculate the recognition language probability, extracts the recognition language data corresponding to the maximum value of the recognition language probability, and outputs the recognition result of the acquired natural language data. The present invention first calculates the language recognition type output probability corresponding to the output language, and then calculates the recognition language probability in the constructed language type recognition model and the language recognition model, thereby improving the accuracy of dialect recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flow chart of a natural language data analysis method based on speech recognition according to the present invention;
[0045] Figure 2 The figure is a schematic diagram of the overall framework of a natural language data analysis system based on speech recognition according to the present invention. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0047] Example 1
[0048] See also Figure 1 The present invention provides an embodiment: a natural language data analysis method based on speech recognition, which comprises the following specific steps:
[0049] S1. Collect non-standard Mandarin data, annotate the language characteristics of the collected non-standard Mandarin data, annotate the pronunciation variants, speaking speed, and accent data of the non-standard Mandarin data, and build a language type recognition model;
[0050] In order to write C code to collect and annotate non-standard Mandarin data, we need to first determine the data collection and annotation methods, and then write the corresponding C code implementation. The following is a simple example showing how to achieve this goal.
[0051] 1. Data Collection
[0052] We can collect non-standard Mandarin data using the following methods:
[0053] - Obtain non-standard Mandarin speech data from online resources, audio files or interviews.
[0054] Use recording software or API to record non-standard Mandarin voice;
[0055] 2. Data Annotation
[0056] The collected non-standard Mandarin data are labeled, mainly including the following aspects:
[0057] - Pronunciation variants: mark different pronunciation phenomena, such as variations in initials, finals, tones, etc.;
[0058] -Speech speed: It indicates the speaker's speaking speed, which can be obtained by calculating the time between syllables;
[0059] -Accent: mark the speaker's regional accent, dialect and other characteristics;
[0060] The following is a simple C code example for collecting and annotating non-standard Mandarin data:
[0061]
[0062]
[0063]
[0064] argv[0]);
[0065] return 1;
[0066] }
[0067] process_audio_file(argv[1]);
[0068] return 0;
[0069] }
[0070] The above code is just a basic framework. The audio data processing and annotation parts need to be improved according to actual needs and audio processing libraries. At the same time, annotation labels can be added or modified according to actual conditions to meet needs.
[0071] In this embodiment, the content of S1 includes the following specific steps:
[0072] S11, extracting the collected non-standard Mandarin data of the specified local dialect type, and obtaining the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data corresponding to the non-standard Mandarin data, constructing a language type recognition model whose input is the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data of the non-standard Mandarin data, and whose output is the dialect type;
[0073] S12, dividing the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data and dialect type data of the non-standard Mandarin data into a 70% parameter training set and a 30% parameter test set; inputting the 70% parameter training set into the language type recognition model for training to obtain an initial language type recognition model; using the 30% parameter test set to test the initial language type recognition model, and outputting an optimal initial language type recognition model that meets the preset dialect type data recognition accuracy as the language type recognition model, wherein the output formula of the language type recognition model is:
[0074] Among them, D y is the output probability of the language recognition type, K[] is the language type probability corresponding to the data in brackets, min() is the minimum value output of the data in brackets, is the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data of the Jth input language to be recognized, C I is the standard value of the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data, and aI is the proportion coefficient of the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data;
[0075] In this way, the dialect type of the language is first identified through the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data of the speech data, thereby improving the accuracy of language recognition;
[0076] S2, importing the annotated non-standard Mandarin data into the data preprocessing strategy to perform language clarification processing to obtain preprocessed language data;
[0077] In this embodiment, the data preprocessing strategy in S2 includes the following specific contents:
[0078] The input speech signal is obtained, and the input speech signal is divided into frames, and the speech signal is divided into frame speech with each frame being 10-30 milliseconds. The frame speech is imported into the speech processing software for speech smoothing, Fourier transform, energy estimation, estimated noise spectrum, signal-to-noise ratio estimation, noise reduction filtering, and inverse Fourier transform for noise reduction processing; the noise-reduced frame speech is synthesized, overlapped and added to obtain the final noise-reduced speech signal, which is set as the preprocessed language data.
[0079] It should be noted that the speech smoothing, Fourier transform, energy estimation, estimated noise spectrum, signal-to-noise ratio estimation, noise reduction filtering, inverse Fourier transform and then noise reduction processing are mature noise reduction methods for processing language data in the prior art, and will not be described in detail here;
[0080] The specific steps here are: a. Preprocessing: The input speech signal is divided into frames, usually each frame is 10-30 milliseconds, and a windowing function (such as a Hamming window) is applied for smoothing, so that the speech signal can be converted into a time-frequency domain representation;
[0081] b. Fourier transform: Apply fast Fourier transform (FFT) to each frame of speech signal to convert the time domain signal into the frequency domain signal;
[0082] c. Energy estimation: Calculate the energy spectral density of each frame based on the frequency domain signal, and obtain the total energy of the frame by summing the frequency axis;
[0083] d. Estimation of noise spectrum: Select several relatively long non-speech segments in the pure speech segment (excluding speech), calculate the average energy spectral density of these segments, and obtain the noise spectrum;
[0084] e. Signal-to-noise ratio estimation: By comparing the energy spectral density of the speech segment and the noise segment, the signal-to-noise ratio of the speech segment is estimated;
[0085] f. Noise reduction filtering: compare the spectrum of the speech frame with the noise spectrum and suppress the noise through gain control;
[0086] g. Inverse Fourier transform: Apply inverse Fourier transform (IFFT) to the processed frequency domain signal to reconstruct the frequency domain signal into a time domain signal;
[0087] h. Final synthesis: synthesize each frame of speech after noise reduction, overlap and add them to obtain the final noise reduction speech signal;
[0088] S3, substituting the obtained pre-processed language data and the annotated data corresponding to the language characteristics into the language recognition model construction strategy to construct and train the language recognition model, thereby obtaining the initial probability of language recognition;
[0089] In this embodiment, the language recognition model construction strategy in S3 includes the following specific steps:
[0090] S31, dividing all the frame speech sequences in the obtained preprocessed language data into triphone sequences, and obtaining all possible state sequences of the triphone sequences, where all possible state sequences are: for example, the states of the triphones are: a, b, c, and the number of feature frames is 10, then the possible state sequences are aaabbbcccc, aaaabbbccc, etc.;
[0091] S32, extracting data of all possible state sequences and corresponding recognized dialect types, and obtaining pronunciation words corresponding to all possible state sequences in the recognized dialect types, obtaining dialect expression words of all possible state sequences, arranging the dialect expression words in the order of the state sequences, and randomly combining the dialect expression words in the arrangement order to obtain a plurality of arrangement and combination sentences;
[0092] S33, traversing the probability of each dialect representation word of the permutation and combination sentence appearing in the obtained vocabulary set, substituting it into the overall representation word probability calculation formula to calculate the overall representation word probability of the permutation and combination sentence, wherein the overall representation word probability calculation formula is: Among them, m is the number of words that represent the whole in the permutation and combination sentence, n is the number of permutation and combination sentences, c is the number of words that represent the whole in the permutation and combination sentence, and n is the number of words that represent the whole in the permutation and combination sentence. i is the probability of the i-th representation word in the selected permutation and combination sentence appearing in the representation word set, where, is the probability of the i-th representation word in the j-th permutation and combination sentence appearing in the representation word set;
[0093] S34, obtaining the probability K2 of the occurrence of the permutation and combination sentence in all the permutation and combination sentences outputted in the spoken language, and substituting the obtained overall representation vocabulary probability and the probability K2 of the occurrence of the permutation and combination sentence K1 in all the permutation and combination sentences outputted in the spoken language into the initial probability calculation formula to calculate the initial probability of language recognition, the initial probability calculation formula is: Among them, λ1 is the overall representation of the vocabulary probability ratio coefficient, λ2 is the ratio coefficient of the probability of the permutation and combination sentence appearing in all the permutation and combination sentences of the spoken output, λ1+λ2=1. It should be noted here that the probability of the permutation and combination sentence appearing in all the permutation and combination sentences of the spoken output is obtained based on the statistics of the sentences output by each group of people. The calculation method of λ1 and λ2 here is to count 5,000 dialect output personnel to output the predetermined dialect, and then import the data of these dialects into the company to calculate the initial probability, and then import the initial probability into the fitting software to output the λ1 and λ2 values that meet the judgment accuracy;
[0094] S4, importing the acquired natural language data into the constructed language type recognition model and language recognition model to calculate the recognition language probability;
[0095] In this embodiment, the specific content of S4 is as follows:
[0096] The acquired natural language data is imported into the constructed language type recognition model and the language recognition model to obtain the language recognition type output probability and the initial probability of language recognition, and the obtained language recognition type output probability and the initial probability of language recognition are imported into the recognition language probability calculation formula to obtain the probability of recognition language, wherein the recognition language probability calculation formula is:
[0097] S5, extracting the recognition language data corresponding to the maximum value of the recognition language probability and outputting it to obtain the recognition result of the acquired natural language data;
[0098] The present invention collects non-standard Mandarin data, and annotates the language characteristics of the collected non-standard Mandarin data, annotates the pronunciation variants, speech speed, and accent data of the non-standard Mandarin data, constructs a language type recognition model, imports the annotated non-standard Mandarin data into a data preprocessing strategy to perform language clarification processing to obtain preprocessed language data, substitutes the obtained preprocessed language data and the annotated data corresponding to the language characteristics into a language recognition model construction strategy to construct and train the language recognition model, thereby obtaining an initial probability of language recognition, imports the acquired natural language data into the constructed language type recognition model and the language recognition model to calculate the recognition language probability, extracts the recognition language data corresponding to the maximum value of the recognition language probability, and outputs the recognition result of the acquired natural language data. The present invention first calculates the language recognition type output probability corresponding to the output language, and then calculates the recognition language probability in the constructed language type recognition model and the language recognition model, thereby improving the accuracy of dialect recognition.
[0099] Example 2
[0100] like Figure 2As shown, a natural language data analysis system based on speech recognition is implemented based on the above-mentioned natural language data analysis method based on speech recognition, which includes a language type recognition model construction module, a preprocessing module, an initial probability calculation module, a recognition language probability calculation module, a recognition output module and a control module. The language type recognition model construction module is used to collect non-standard Mandarin data, and annotate the language characteristics of the collected non-standard Mandarin data, annotate the pronunciation variants, speech speed, and accent data of the non-standard Mandarin data, and construct a language type recognition model. The preprocessing module is used to import the annotated non-standard Mandarin data into the data preprocessing strategy for language clarification processing to obtain the preprocessed Language data, the initial probability calculation module is used to substitute the obtained pre-processed language data and the annotated data of the corresponding language characteristics into the language recognition model construction strategy to construct and train the language recognition model, so as to obtain the initial probability of language recognition; the recognition language probability calculation module is used to import the obtained natural language data into the constructed language type recognition model and the language recognition model to calculate the recognition language probability, the recognition output module is used to extract the recognition language data corresponding to the maximum value of the recognition language probability and output it to obtain the recognition result of the obtained natural language data, and the control module is used to control the operation of the language type recognition model construction module, the preprocessing module, the initial probability calculation module, the recognition language probability calculation module, and the recognition output module.
[0101] Example 3
[0102] This embodiment provides an electronic device, including: a processor and a memory, wherein the memory stores a computer program that can be called by the processor;
[0103] The processor executes the above-mentioned natural language data analysis method based on speech recognition by calling the computer program stored in the memory.
[0104] The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) and one or more memories, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement a natural language data analysis method based on speech recognition provided by the above method embodiment. The electronic device may also include other components for implementing the functions of the device, for example, the electronic device may also have components such as a wired or wireless network interface and an input and output interface to input and output data. This embodiment will not be described in detail here.
[0105] Example 4
[0106] This embodiment provides a computer-readable storage medium having a rewritable computer program stored thereon;
[0107] When the computer program runs on a computer device, the computer device executes the above-mentioned natural language data analysis method based on speech recognition.
[0108] For example, the computer readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0109] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0110] It should be understood that determining B based on A does not mean determining B only based on A. B can also be determined based on A and / or other information.
[0111] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When a computer instruction or computer program is loaded or executed on a computer, a process or function according to an embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through a wired network or / and a wireless network. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0112] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0113] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0114] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only one way of division, and there may be other ways of division in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0115] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0116] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0117] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0118] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A natural language data analysis method based on speech recognition, characterized in that: It includes the following specific steps: S1. Collect non-standard Mandarin data, annotate the language characteristics of the collected non-standard Mandarin data, annotate the pronunciation variants, speaking speed, and accent data of the non-standard Mandarin data, and build a language type recognition model; S2, importing the annotated non-standard Mandarin data into the data preprocessing strategy to perform language clarification processing to obtain preprocessed language data; S3, substituting the obtained pre-processed language data and the annotated data corresponding to the language characteristics into the language recognition model construction strategy to construct and train the language recognition model, thereby obtaining the initial probability of language recognition; S4, importing the acquired natural language data into the constructed language type recognition model and language recognition model to calculate the recognition language probability; S5, extracting the recognition language data corresponding to the maximum value of the recognition language probability and outputting it to obtain the recognition result of the acquired natural language data; The content of S1 includes the following specific steps: S11, extracting the collected non-standard Mandarin data of the specified local dialect type, and obtaining the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data corresponding to the non-standard Mandarin data, constructing a language type recognition model whose input is the average pronunciation variants, average speaking speed, average accent tone and average accent phoneme data of the non-standard Mandarin data, and whose output is the dialect type; S12, dividing the average pronunciation variants, average speaking speed, average accent tone, average accent phoneme data and dialect type data of the non-standard Mandarin data into a 70% parameter training set and a 30% parameter test set; 70% of the parameter training set is input into the language type recognition model for training to obtain an initial language type recognition model; 30% of the parameter test set is used to test the initial language type recognition model, and the optimal initial language type recognition model that meets the preset dialect type data recognition accuracy is output as the language type recognition model, wherein the output formula of the language type recognition model is: Among them, D y is the language recognition type output probability, K[] is the language type probability corresponding to the data in brackets, min() is the minimum value output of the data in brackets, C I J is the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data of the Jth input language to be recognized, C I is the standard value of the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data, and aI is the proportion coefficient of the Ith parameter in the average pronunciation variant, average speaking speed, average accent tone and average accent phoneme data.
2. A natural language data analysis method based on speech recognition as claimed in claim 1, characterized in that: The data preprocessing strategy in S2 includes the following specific contents: Obtain the input speech signal, divide the input speech signal into frames, divide the speech signal into frame speech with each frame being 10-30 milliseconds, and import the frame speech into the speech processing software for speech smoothing, Fourier transform, energy estimation, noise spectrum estimation, signal-to-noise ratio estimation, noise reduction filtering, and inverse Fourier transform for noise reduction processing; The denoised frame speech is synthesized and overlapped and added to obtain the final denoised speech signal, which is set as the preprocessed language data.
3. A natural language data analysis method based on speech recognition as claimed in claim 2, characterized in that: The language recognition model construction strategy in S3 includes the following specific steps: S31, dividing all frame speech sequences in the obtained pre-processed language data into triphone sequences, and obtaining all possible state sequences of the triphone sequences; S32, extracting data of all possible state sequences and corresponding recognized dialect types, and obtaining pronunciation words corresponding to all possible state sequences in the recognized dialect types, obtaining dialect expression words of all possible state sequences, arranging the dialect expression words in the order of the state sequences, and randomly combining the dialect expression words in the arrangement order to obtain a plurality of arrangement and combination sentences; S33, traversing the probability of each dialect representation word of the permutation and combination sentence appearing in the obtained vocabulary set, substituting it into the overall representation word probability calculation formula to calculate the overall representation word probability of the permutation and combination sentence, wherein the overall representation word probability calculation formula is: Among them, m is the number of words that represent the whole in the permutation and combination sentence, n is the number of permutation and combination sentences, c is the number of words that represent the whole in the permutation and combination sentence, and n is the number of words that represent the whole in the permutation and combination sentence. i is the probability of the i-th representation word in the selected permutation and combination sentence appearing in the representation vocabulary set, where cij is the probability of the i-th representation word in the j-th permutation and combination sentence appearing in the representation vocabulary set, where i is the i-th representation word and j is the j-th permutation and combination sentence.
4. A natural language data analysis method based on speech recognition as claimed in claim 3, characterized in that: The specific content of S3 also includes the following specific steps: S34, obtaining the probability K2 of the occurrence of the permutation and combination sentence in all the permutation and combination sentences outputted in the spoken language, and substituting the obtained overall representation vocabulary probability and the probability K2 of the occurrence of the permutation and combination sentence K1 in all the permutation and combination sentences outputted in the spoken language into the initial probability calculation formula to calculate the initial probability of language recognition, the initial probability calculation formula is: Among them, λ1 is the overall representation vocabulary probability coefficient, λ2 is the probability coefficient of the combination sentence appearing in all the combination sentences in the spoken output, λ1+λ2=1.
5. A natural language data analysis method based on speech recognition as claimed in claim 4, characterized in that: The specific content of S4 is as follows: The acquired natural language data is imported into the constructed language type recognition model and the language recognition model to obtain the language recognition type output probability and the initial probability of language recognition, and the obtained language recognition type output probability and the initial probability of language recognition are imported into the recognition language probability calculation formula to obtain the probability of recognition language, wherein the recognition language probability calculation formula is: Among them, T is the recognition language probability.
6. A natural language data analysis system based on speech recognition, which is implemented based on the natural language data analysis method based on speech recognition as claimed in any one of claims 1 to 5, characterized in that: The system comprises a language type recognition model construction module, a preprocessing module, an initial probability calculation module, a recognition language probability calculation module, a recognition output module and a control module. The language type recognition model construction module is used for collecting non-standard Mandarin data, annotating the collected non-standard Mandarin data with language characteristics, annotating the pronunciation variants, speech speed and accent data of the non-standard Mandarin data, and constructing a language type recognition model. The preprocessing module is used for importing the annotated non-standard Mandarin data into a data preprocessing strategy to perform language clarification processing to obtain preprocessed language data. The initial probability calculation module is used for substituting the obtained preprocessed language data and the annotated data corresponding to the language characteristics into a language recognition model construction strategy to construct and train the language recognition model, thereby obtaining an initial probability of language recognition.
7. A natural language data analysis system based on speech recognition as claimed in claim 6, characterized in that: The recognition language probability calculation module is used to import the acquired natural language data into the constructed language type recognition model and language recognition model to calculate the recognition language probability. The recognition output module is used to extract the recognition language data corresponding to the maximum value of the recognition language probability and output it to obtain the recognition result of the acquired natural language data. The control module is used to control the operation of the language type recognition model construction module, the preprocessing module, the initial probability calculation module, the recognition language probability calculation module, and the recognition output module.
8. A human-computer interaction device, comprising: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; It is characterized in that the processor executes a natural language data analysis method based on speech recognition as described in any one of claims 1 to 5 by calling a computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute a natural language data analysis method based on speech recognition as described in any one of claims 1 to 5.
