A Text Printing Method and System Based on Speech Recognition
By constructing a hybrid language speech recognition model and a text printing template database, the problem of poor speech recognition performance in existing printers has been solved, achieving real-time and accurate speech recognition and text printing, thereby improving the printer's intelligence and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 魏鹏飞
- Filing Date
- 2023-03-30
- Publication Date
- 2026-05-26
AI Technical Summary
Existing printers have poor voice recognition performance and low recognition efficiency, and lack organic integration with the printer, which affects the user experience.
A hybrid language speech recognition model is constructed, which combines the DBN-CTC-IGWO-RNN-LM algorithm to achieve real-time recognition of speech audio data and text printing. The organic combination of speech text data and text printing templates is achieved through a text printing template database and a data fusion unit.
It improves the efficiency and effectiveness of speech recognition, realizes a text printing process controlled by voice commands, and enhances the level of intelligence and user experience.
Smart Images

Figure CN116339655B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of text printing technology, specifically relating to a text printing method and system based on speech recognition. Background Technology
[0002] As an office tool, a printer is one of the computer output devices used to print computer-processed results onto relevant media. With the development of technology and computer hardware, printers are evolving towards being lighter, thinner, shorter, smaller, lower power consumption, higher speed, and more intelligent, with increasingly richer functions. Voice recognition technology is a high-tech technology that enables machines to convert speech signals into corresponding text or commands through recognition and understanding. In recent years, voice recognition technology has made significant progress, moving from the laboratory to the market, and is increasingly being applied to various fields such as industry, home appliances, communications, automotive electronics, medical, home services, and consumer electronics.
[0003] Existing printers offer the simple function of printing data files stored on a computer, but their low level of intelligence fails to meet market demands. While existing technologies combine voice recognition with printers, these solutions suffer from poor voice recognition performance and low efficiency, failing to achieve real-time recognition and printing, thus impacting user experience. Furthermore, current methods for integrating voice recognition with printers are still in the early stages of research, merely providing simple instructions to print voice-recognized results without a truly integrated approach. Summary of the Invention
[0004] To address the problems of low intelligence, poor speech recognition performance, low recognition efficiency, and lack of organic integration in existing technologies, the present invention aims to provide a text printing method and system based on speech recognition.
[0005] The technical solution adopted in this invention is as follows:
[0006] A text printing method based on speech recognition includes the following steps:
[0007] Construct a text printing template database containing several language types and several text printing templates;
[0008] Construct a mixed-language speech recognition model;
[0009] Real-time acquisition of speech audio data, and input of real-time speech audio data into a mixed language speech recognition model for speech recognition, to obtain real-time speech text data and language type;
[0010] Based on the real-time language type, match several corresponding text printing templates in the text printing template database;
[0011] Based on real-time voice and text data, select one text printing template from several text printing templates;
[0012] By fusing real-time voice and text data with the selected text printing template, real-time text printing data material is obtained.
[0013] Based on real-time voice and text data, the real-time text printing data material is printed to obtain real-time printed paper material.
[0014] Furthermore, the voice text data includes control commands, identification data, and print text data, or a combination of two or all three types of data. The control commands are used to select a text printing template or start a text printing task. The identification data is used to select a preset text printing data material for text printing. The print text data is used to merge with the selected text printing template to generate the corresponding text printing data material.
[0015] Furthermore, the method also includes the following steps:
[0016] Construct a text printing data material library containing several preset text printing data materials;
[0017] Set preset identifier data for each preset text print data material in the text print data material library;
[0018] The identifier data contained in the real-time voice and text data is matched with all preset identifier data to obtain the matched identifier data;
[0019] Extract the preset text print data material corresponding to the matching identifier data from the text print data material library;
[0020] Based on the control commands contained in the real-time voice and text data, the preset text printing data material is printed to obtain the preset text printing paper material.
[0021] Furthermore, the language types include Chinese, English, and a mixture of Chinese and English;
[0022] The text printing templates include Chinese text printing templates, English text printing templates, mixed Chinese and English text printing templates with Chinese as the primary language, and mixed Chinese and English text printing templates with English as the primary language.
[0023] Furthermore, constructing a mixed-language speech recognition model includes the following steps:
[0024] Training sample sets of Chinese speech, English speech, and mixed Chinese and English speech were collected, each with language type labels. The Chinese speech training sample set, English speech training sample set, and mixed Chinese and English speech training sample set were combined to obtain a mixed language speech training sample set.
[0025] The DBN-CTC-IGWO-RNN-LM algorithm was used to construct an initial mixed-language speech recognition model;
[0026] The mixed-language speech training sample set is input into the initial mixed-language speech recognition model for optimization training to obtain the optimal mixed-language speech recognition model.
[0027] Furthermore, the mixed-language speech recognition model includes a speech character recognition sub-model constructed using the DBN-CTC-IGWO algorithm and a speech text recognition sub-model constructed using the RNN-LM algorithm;
[0028] The speech character recognition sub-model uses a DBN network as the basic network structure. The DBN network includes an input layer, several hidden layers and an output layer. The initial connection weights and thresholds of the neurons in the several hidden layers of the DBN network are optimized using the IGWO optimization algorithm. The output layer of the DBN network uses a pre-trained Elman neural network as a classifier, and the output terminal of the output layer of the DBN network is equipped with the CTC algorithm.
[0029] The input layer of the speech-text recognition sub-model is connected to the output layer of the speech-text recognition sub-model, and the output layer of the speech-text recognition sub-model is used to output speech-text data and language type.
[0030] Furthermore, the traditional Grey Wolf optimization algorithm is optimized by introducing the Circle chaotic sequence initialization and dynamic reverse learning strategy, resulting in the IGWO optimization algorithm;
[0031] The initialization formula for the Circle chaotic sequence is:
[0032]
[0033] In the formula, x i+1,j+1 The initial position of the gray wolf population is mapped to the Chaos Map of Circle; x i,j To randomly generate the initial position of the gray wolf population; mod(·) is the mod function; i is the individual indicator; j is the dimension indicator;
[0034] The formula for the dynamic reverse learning strategy is:
[0035] x' ij (t)=k(a j (t)+b j (t))-xij (t)
[0036] In the formula, x' ij (t), x ij (t) represents the reverse and forward positions of the i-th gray wolf individual in the j-th dimension, respectively; a j (t), b j (t) represents the upper and lower bounds of the j-th dimension of the current gray wolf population, respectively; k is the decreasing inertia factor, k = 0.9 - 0.5D / D max D, D max These represent the current iteration count and the maximum iteration count, respectively; t is the time indicator.
[0037] The formula for the IGWO optimization algorithm is:
[0038]
[0039] In the formula, X(t+1) is the position moved by the artificial gray wolf during its hunting activity at time t+1; X1, X2, X3, X ω These represent the positions of the optimal leader wolves α, β, and δ, and the random wolf ω, respectively; D1, D2, D3, D ω Let A1, A2, A3, and A' be the distances from the artificial gray wolf to α, β, δ, and ω wolves, respectively. ω All are convergence influence coefficient vectors, determined by the convergence factor a; W1 and W2 are both location coefficients, W1 = w·r, W2 = (1-w)·r, w is the location factor, determined by the number of iterations and negatively correlated with the number of iterations, and w∈(0,1], r is a random number between [0,1]; i is the parameter indicator; t is the time indicator.
[0040] Furthermore, real-time audio data is acquired and input into a mixed-language speech recognition model for speech recognition to obtain real-time speech-text data and language type, including the following steps:
[0041] Real-time acquisition of speech audio data, obtaining real-time speech audio data, and preprocessing of real-time speech audio data to obtain preprocessed speech audio data;
[0042] The preprocessed speech audio data is input into the mixed language speech recognition model, and the speech character recognition sub-model is used to perform character recognition to obtain several speech character data.
[0043] Several speech character data are input into the speech-text recognition sub-model for text processing to obtain real-time speech-text data and language type.
[0044] A text printing system based on speech recognition is applied to a text printing method. The system includes a database construction unit, a model construction unit, a storage unit, a speech audio acquisition unit, a speech recognition application unit, a template matching unit, a template selection unit, a data fusion unit, and a printer. The storage unit is connected to the database construction unit, the model construction unit, the speech audio acquisition unit, the speech recognition application unit, the template matching unit, the template selection unit, the data fusion unit, and the printer. The model construction unit is connected to an external corpus database.
[0045] The database construction unit is used to receive several text printing templates of several languages uploaded by users, construct a text printing template database based on the several text printing templates of several languages, and store the text printing template database in the storage unit.
[0046] The model building unit is used to collect Chinese speech training sample sets, English speech training sample sets, and mixed Chinese and English speech training sample sets, all of which are labeled with language type in external corpus databases. Based on the Chinese speech training sample sets, English speech training sample sets, and mixed Chinese and English speech training sample sets, the DBN-CTC-IGWO-RNN-LM algorithm is used to build a mixed language speech recognition model, and the model metadata of the mixed language speech recognition model is stored in the storage unit.
[0047] The voice audio acquisition unit is used to acquire voice audio data in real time and store the real-time voice audio data in the storage unit;
[0048] The speech recognition application unit is used to extract the model metadata of the mixed language speech recognition model stored in the storage unit, reconstruct the model metadata of the mixed language speech recognition model to obtain the reconstructed mixed language speech recognition model, extract the real-time speech audio data stored in the storage unit, input the real-time speech audio data into the mixed language speech recognition model for speech recognition, obtain the real-time speech text data and language type, and store the real-time speech text data and language type in the storage unit; the real-time speech text data includes real-time control commands, identification data, and printed text data;
[0049] The template matching unit is used to extract the real-time language type stored in the storage unit, and match several corresponding text printing templates in the text printing template database based on the real-time language type.
[0050] The template selection unit is used to extract real-time voice and text data stored in the storage unit, and select a text printing template from several matching text printing templates in the text printing template database according to the control instructions contained in the real-time voice and text data.
[0051] The data fusion unit is used to extract real-time voice and text data stored in the storage unit and text printing templates selected by the template selection unit, fuse the real-time voice and text data with the text printing templates selected in the text printing template database to obtain real-time text printing data materials, and store the real-time text printing data materials in the storage unit.
[0052] The printer is used to extract real-time voice and text data and real-time text printing data materials stored in the storage unit, and to print text from the real-time text printing data materials according to the control instructions contained in the real-time voice and text data, so as to obtain real-time text printing paper materials.
[0053] The storage unit is used to store the text printing template database, the model metadata of the mixed language speech recognition model, real-time speech audio data, real-time speech text data, real-time language types, and real-time text printing data materials.
[0054] Furthermore, the system also includes a material library construction unit, an identification data setting unit, an identification data matching unit, and a data material extraction unit, all of which are connected to the storage unit.
[0055] The material library construction unit is used to receive several preset text printing data materials uploaded by users, construct a text printing data material library based on the several preset text printing data materials, and store the text printing data material library in the storage unit.
[0056] The identification data setting unit is used to set preset identification data for each preset text print data material in the text print data material library in the storage unit;
[0057] The identifier data matching unit is used to extract real-time voice and text data stored in the storage unit, match the identifier data contained in the real-time voice and text data with all preset identifier data in the text printing data material library, obtain the matched identifier data, and store the matched identifier data in the storage unit.
[0058] The data material extraction unit is used to extract the matching identifier data stored in the storage unit, extract the corresponding preset text printing data material from the text printing data material library based on the matching identifier data, and store the preset text printing data material in the storage unit.
[0059] The printer is also used to extract preset text printing data materials stored in the storage unit, and to print the preset text printing data materials according to the control instructions contained in the real-time voice and text data, so as to obtain preset text printing paper materials.
[0060] The beneficial effects of this invention are as follows:
[0061] This invention provides a text printing method and system based on speech recognition. It constructs a mixed-language speech recognition model to recognize the user's speech audio data in multiple languages in real time and accurately, thereby improving the efficiency and effect of speech recognition. It also constructs a text printing template database to provide a variety of text printing templates, realizing the fusion printing of speech text data and text printing templates, which improves the printing effect and user experience. Furthermore, it adopts voice command control of the text printing process, avoiding manual operation and improving the level of intelligence, thus realizing the organic integration of speech recognition and printer.
[0062] Other beneficial effects of the present invention will be further explained in the specific embodiments. Attached Figure Description
[0063] Figure 1 This is a flowchart of the text printing method based on speech recognition in this invention.
[0064] Figure 2 This is a structural block diagram of the text printing system based on speech recognition in this invention. Detailed Implementation
[0065] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.
[0066] Example 1:
[0067] like Figure 1 As shown, this embodiment provides a text printing method based on speech recognition, including the following steps:
[0068] Construct a text printing template database containing several language types and several text printing templates;
[0069] The text printing templates include Chinese text printing templates, English text printing templates, mixed Chinese and English text printing templates with Chinese as the main language, and mixed Chinese and English text printing templates with English as the main language. Each language type has several styles of text printing templates, which improves the user experience and is applicable to multiple language types. When Chinese is the main language, the main body of the text printing template is Chinese, and small-font English annotations can be selected.
[0070] Constructing a mixed-language speech recognition model includes the following steps:
[0071] Training sample sets of Chinese speech, English speech, and mixed Chinese and English speech were collected, each with language type labels. The Chinese speech training sample set, English speech training sample set, and mixed Chinese and English speech training sample set were combined to obtain a mixed language speech training sample set.
[0072] The DBN-CTC-IGWO-RNN-LM algorithm was used to construct an initial mixed-language speech recognition model;
[0073] The hybrid language speech recognition model includes a speech character recognition sub-model constructed using the DBN-CTC-IGWO algorithm and a speech text recognition sub-model constructed using the recurrent neural network (RNN-LM) algorithm.
[0074] The speech character recognition sub-model adopts a Deep Belief Network (DBN) as the basic network structure. The DBN network includes an input layer, several hidden layers, and an output layer. The initial connection weights and thresholds of the neurons in the several hidden layers of the DBN network are optimized using the Improved Grey Wolf Optimization Algorithm (IGWO). The output layer of the DBN network uses a pre-trained Elman neural network as a classifier, and the output of this output layer of the DBN network is equipped with a Connectionist Temporal Classification (CTC) algorithm. The CTC algorithm is commonly used in speech recognition, text recognition, and other fields to solve the problem of inconsistent input and output sequence lengths and lack of alignment.
[0075] The input layer of the speech-text recognition sub-model is connected to the output layer of the speech-text recognition sub-model, and the output layer of the speech-text recognition sub-model is used to output speech-text data and language type;
[0076] Several hidden layers of the DBN network can accurately learn the audio data features of mixed language speech training samples, improving the accuracy and real-time performance of speech recognition. Meanwhile, the Elman neural network, as a classifier, can improve the recognition efficiency and effectiveness of speech recognition.
[0077] The traditional Grey Wolf optimization algorithm is optimized by introducing the Circle chaotic sequence initialization and dynamic reverse learning strategy, resulting in the IGWO optimization algorithm;
[0078] The initialization formula for the Circle chaotic sequence is:
[0079]
[0080] In the formula, x i+1,j+1 The initial position of the gray wolf population is mapped to the Chaos Map of Circle; x i,j To randomly generate the initial position of the gray wolf population; mod(·) is the mod function; i is the individual indicator; j is the dimension indicator;
[0081] The formula for the dynamic reverse learning strategy is:
[0082] x' ij (t)=k(a j (t)+b j (t))-x ij (t)
[0083] In the formula, x' ij (t), x ij (t) represents the reverse and forward positions of the i-th gray wolf individual in the j-th dimension, respectively; a j (t), b j (t) represents the upper and lower bounds of the j-th dimension of the current gray wolf population, respectively; k is the decreasing inertia factor, k = 0.9 - 0.5D / D max D, D max These represent the current iteration count and the maximum iteration count, respectively; t is the time indicator.
[0084] The formula for the IGWO optimization algorithm is:
[0085]
[0086] In the formula, X(t+1) is the position moved by the artificial gray wolf during its hunting activity at time t+1; X1, X2, X3, X ω These represent the positions of the optimal leader wolves α, β, and δ, and the random wolf ω, respectively; D1, D2, D3, D ω Let A1, A2, A3, and A' be the distances from the artificial gray wolf to α, β, δ, and ω wolves, respectively. ω All are convergence influence coefficient vectors, determined by the convergence factor a; W1 and W2 are both location coefficients, W1 = w·r, W2 = (1-w)·r, w is the location factor, determined by the number of iterations and negatively correlated with the number of iterations, and w∈(0,1], r is a random number between [0,1]; i is the parameter indicator; t is the time indicator;
[0087] In the early stages of iteration, the location coefficient W1 is maintained at a high value, ensuring the gray wolf population's global hunting and search capabilities. In the later stages of iteration, the location coefficient W2 is maintained at a high value, ensuring the gray wolf population's local attack capabilities. Therefore, the IGWO optimization algorithm can improve the convergence performance and convergence speed of the DBN network, avoid premature convergence and getting trapped in local optima in the DBN neural network, and improve the accuracy and efficiency of speech recognition.
[0088] The mixed language speech training sample set is input into the initial mixed language speech recognition model for optimization training to obtain the optimal mixed language speech recognition model;
[0089] Real-time acquisition of speech audio data, followed by inputting the real-time speech audio data into a mixed-language speech recognition model for speech recognition, yields real-time speech-text data and language type. This process includes the following steps:
[0090] Real-time acquisition of speech audio data is performed to obtain real-time speech audio data, and preprocessing of the real-time speech audio data is performed to obtain preprocessed speech audio data. The preprocessing includes Gaussian noise reduction to remove the interference of ambient noise on key speech, thereby improving the accuracy of speech recognition.
[0091] The preprocessed speech audio data is input into the mixed language speech recognition model, and the speech character recognition sub-model is used to perform character recognition to obtain several speech character data.
[0092] Several speech character data are input into the speech-text recognition sub-model for text processing to obtain real-time speech-text data and language type;
[0093] The voice text data consists of control commands, identification data, and print text data, or a combination of two or all three types of data. The control commands are used to select a text print template or start a text print task. The identification data is used to select a preset text print data material for text printing. The print text data is used to merge with the selected text print template to generate the corresponding text print data material.
[0094] Before receiving the control command for text printing, voice recognition is performed in real time. Printing only begins after receiving the control command for text printing, ensuring the smoothness and integrity of the text printing process.
[0095] The language types include Chinese, English, and a mixture of Chinese and English;
[0096] Based on the real-time language type, match several corresponding text printing templates in the text printing template database;
[0097] Based on real-time voice and text data, select one text printing template from several text printing templates;
[0098] By fusing real-time voice and text data with the selected text printing template, real-time text printing data material is obtained.
[0099] Based on real-time voice and text data, the real-time text printing data material is printed to obtain real-time printed paper material.
[0100] Preferably, the method further includes the following steps:
[0101] Construct a text printing data material library containing several preset text printing data materials;
[0102] Set preset identifier data for each preset text print data material in the text print data material library;
[0103] The identifier data contained in the real-time voice and text data is matched with all preset identifier data to obtain the matched identifier data;
[0104] Extract the preset text print data material corresponding to the matching identifier data from the text print data material library;
[0105] Based on the control commands contained in the real-time voice and text data, the preset text printing data material is printed to obtain the preset text printing paper material.
[0106] This invention provides a fast and accurate preset text printing function for speech recognition-based text printing methods. By retrieving text data from a text printing data library using identifier data, it can meet printing tasks that do not require text input or preset text.
[0107] Example 2:
[0108] like Figure 2 As shown, this embodiment provides a text printing system based on speech recognition, applied to a text printing method. The system includes a database construction unit, a model construction unit, a storage unit, a speech audio acquisition unit, a speech recognition application unit, a template matching unit, a template selection unit, a data fusion unit, and a printer. The storage unit is connected to the database construction unit, the model construction unit, the speech audio acquisition unit, the speech recognition application unit, the template matching unit, the template selection unit, the data fusion unit, and the printer, respectively. The model construction unit is connected to an external corpus database.
[0109] The database construction unit is used to receive several text printing templates of several languages uploaded by users, construct a text printing template database based on the several text printing templates of several languages, and store the text printing template database in the storage unit.
[0110] The model building unit is used to collect Chinese speech training sample sets, English speech training sample sets, and mixed Chinese and English speech training sample sets, all of which are labeled with language type in external corpus databases. Based on the Chinese speech training sample sets, English speech training sample sets, and mixed Chinese and English speech training sample sets, the DBN-CTC-IGWO-RNN-LM algorithm is used to build a mixed language speech recognition model, and the model metadata of the mixed language speech recognition model is stored in the storage unit.
[0111] The voice audio acquisition unit is used to acquire voice audio data in real time and store the real-time voice audio data in the storage unit;
[0112] The speech recognition application unit is used to extract the model metadata of the mixed language speech recognition model stored in the storage unit, reconstruct the model metadata of the mixed language speech recognition model to obtain the reconstructed mixed language speech recognition model, extract the real-time speech audio data stored in the storage unit, input the real-time speech audio data into the mixed language speech recognition model for speech recognition, obtain the real-time speech text data and language type, and store the real-time speech text data and language type in the storage unit; the real-time speech text data includes real-time control commands, identification data, and printed text data;
[0113] The template matching unit is used to extract the real-time language type stored in the storage unit, and match several corresponding text printing templates in the text printing template database based on the real-time language type.
[0114] The template selection unit is used to extract real-time voice and text data stored in the storage unit, and select a text printing template from several matching text printing templates in the text printing template database according to the control instructions contained in the real-time voice and text data.
[0115] The data fusion unit is used to extract real-time voice and text data stored in the storage unit and text printing templates selected by the template selection unit, fuse the real-time voice and text data with the text printing templates selected in the text printing template database to obtain real-time text printing data materials, and store the real-time text printing data materials in the storage unit.
[0116] The printer is used to extract real-time voice and text data and real-time text printing data materials stored in the storage unit, and to print text from the real-time text printing data materials according to the control instructions contained in the real-time voice and text data, so as to obtain real-time text printing paper materials.
[0117] The storage unit is used to store the text printing template database, the model metadata of the mixed language speech recognition model, real-time speech audio data, real-time speech text data, real-time language types, and real-time text printing data materials.
[0118] Furthermore, the system also includes a material library construction unit, an identification data setting unit, an identification data matching unit, and a data material extraction unit, all of which are connected to the storage unit.
[0119] The material library construction unit is used to receive several preset text printing data materials uploaded by users, construct a text printing data material library based on the several preset text printing data materials, and store the text printing data material library in the storage unit.
[0120] The identification data setting unit is used to set preset identification data for each preset text print data material in the text print data material library in the storage unit;
[0121] The identifier data matching unit is used to extract real-time voice and text data stored in the storage unit, match the identifier data contained in the real-time voice and text data with all preset identifier data in the text printing data material library, obtain the matched identifier data, and store the matched identifier data in the storage unit.
[0122] The data material extraction unit is used to extract the matching identifier data stored in the storage unit, extract the corresponding preset text printing data material from the text printing data material library based on the matching identifier data, and store the preset text printing data material in the storage unit.
[0123] The printer is also used to extract preset text printing data materials stored in the storage unit, and to print the preset text printing data materials according to the control instructions contained in the real-time voice and text data, so as to obtain preset text printing paper materials.
[0124] This invention provides a text printing method and system based on speech recognition. It constructs a mixed-language speech recognition model to recognize the user's speech audio data in multiple languages in real time and accurately, thereby improving the efficiency and effect of speech recognition. It also constructs a text printing template database to provide a variety of text printing templates, realizing the fusion printing of speech text data and text printing templates, which improves the printing effect and user experience. Furthermore, it adopts voice command control of the text printing process, avoiding manual operation and improving the level of intelligence, thus realizing the organic integration of speech recognition and printer.
[0125] This invention is not limited to the optional embodiments described above, and anyone can derive other various forms of products based on the inspiration of this invention. The specific embodiments described above should not be construed as limiting the scope of protection of this invention; the scope of protection of this invention should be determined by the claims, and the specification can be used to interpret the claims.
Claims
1. A text printing method based on speech recognition, characterized in that: Includes the following steps: Construct a text printing template database containing several language types and several text printing templates; The language types mentioned include Chinese, English, and a mixture of Chinese and English; The text printing templates include Chinese text printing templates, English text printing templates, mixed Chinese and English text printing templates with Chinese as the main language, and mixed Chinese and English text printing templates with English as the main language. Construct a mixed-language speech recognition model; The hybrid language speech recognition model includes a speech character recognition sub-model constructed using the DBN-CTC-IGWO algorithm and a speech text recognition sub-model constructed using the RNN-LM algorithm; The speech character recognition sub-model adopts a DBN network as the basic network structure of the model. The DBN network includes an input layer, several hidden layers and an output layer. The initial connection weights and thresholds of the neurons in the several hidden layers of the DBN network are optimized using the IGWO optimization algorithm. The output layer of the DBN network uses a pre-trained Elman neural network as a classifier, and the output terminal of the output layer of the DBN network is equipped with the CTC algorithm. The input layer of the speech-text recognition sub-model is connected to the output layer of the speech-text recognition sub-model, and the output layer of the speech-text recognition sub-model is used to output speech-text data and language type; Real-time acquisition of speech audio data, followed by inputting the real-time speech audio data into a mixed-language speech recognition model for speech recognition, yields real-time speech-text data and language type. This process includes the following steps: Real-time acquisition of speech audio data, obtaining real-time speech audio data, and preprocessing of real-time speech audio data to obtain preprocessed speech audio data; The preprocessed speech audio data is input into the mixed language speech recognition model, and the speech character recognition sub-model is used to perform character recognition to obtain several speech character data. Several speech character data are input into the speech-text recognition sub-model for text processing to obtain real-time speech-text data and language type; Based on the real-time language type, match several corresponding text printing templates in the text printing template database; Based on real-time voice and text data, select one text printing template from several text printing templates; By fusing real-time voice and text data with the selected text printing template, real-time text printing data material is obtained. Based on real-time voice and text data, the real-time text printing data material is printed to obtain real-time printed paper material.
2. The text printing method based on speech recognition according to claim 1, characterized in that: The voice text data includes at least one of control commands, identification data, and printed text data. The control commands are used to select a text printing template or start a text printing task. The identification data is used to select a preset text printing data material for text printing. The printed text data is used to merge with the selected text printing template to generate the corresponding text printing data material.
3. The text printing method based on speech recognition according to claim 2, characterized in that: The method further includes the following steps: Construct a text printing data material library containing several preset text printing data materials; Set preset identifier data for each preset text print data material in the text print data material library; The identifier data contained in the real-time voice and text data is matched with all preset identifier data to obtain the matched identifier data; Extract the preset text print data material corresponding to the matching identifier data from the text print data material library; Based on the control commands contained in the real-time voice and text data, the preset text printing data material is printed to obtain the preset text printing paper material.
4. The text printing method based on speech recognition according to claim 1, characterized in that: Constructing a mixed-language speech recognition model includes the following steps: Training sample sets of Chinese speech, English speech, and mixed Chinese and English speech were collected, each with language type labels. The Chinese speech training sample set, English speech training sample set, and mixed Chinese and English speech training sample set were combined to obtain a mixed language speech training sample set. The DBN-CTC-IGWO-RNN-LM algorithm was used to construct an initial mixed-language speech recognition model; The mixed-language speech training sample set is input into the initial mixed-language speech recognition model for optimization training to obtain the optimal mixed-language speech recognition model.
5. A text printing method based on speech recognition according to claim 4, characterized in that: The traditional Grey Wolf optimization algorithm is optimized by introducing the Circle chaotic sequence initialization and dynamic reverse learning strategy, resulting in the IGWO optimization algorithm described above. The initialization formula for the Circle chaotic sequence is: In the formula, Map the initial position of the gray wolf population to the Circle chaos map; To randomly generate the initial location of the gray wolf population; For the mod function; i For individual indicators; j For dimension indication; The formula for the dynamic back-learning strategy is: In the formula, The first i Gray Wolf Individual Number j The reverse and forward positions of the dimension; These are the current gray wolf population numbers. j The upper and lower bounds of a dimension; To decrease the inertia factor, ; These are the current iteration count and the maximum iteration count, respectively. For time indication; The formula for the IGWO optimization algorithm is: In the formula, for The location of the artificial gray wolf during its hunting activities; The optimal leader is the wolf. And random wolves Location; From artificial gray wolf to The distance of the wolves; All are convergence influence coefficient vectors, derived from the convergence factor. Decide; All of these are location positioning coefficients. , , The location factor is determined by the number of iterations and is negatively correlated with the number of iterations. , for Random numbers between; i For individual indicators; This is a time indicator.
6. A text printing system based on speech recognition, applied to the text printing method as described in any one of claims 1-5, characterized in that: The system includes a database construction unit, a model construction unit, a storage unit, a voice and audio acquisition unit, a voice recognition application unit, a template matching unit, a template selection unit, a data fusion unit, and a printer. The storage unit is connected to the database construction unit, the model construction unit, the voice and audio acquisition unit, the voice recognition application unit, the template matching unit, the template selection unit, the data fusion unit, and the printer. The model construction unit is connected to an external corpus database. The database construction unit is used to receive several text printing templates of several languages uploaded by users, construct a text printing template database based on the several text printing templates of several languages, and store the text printing template database in the storage unit. The model building unit is used to collect Chinese speech training sample sets, English speech training sample sets, and mixed Chinese and English speech training sample sets, all of which are labeled with language type in external corpus databases. Based on the Chinese speech training sample sets, English speech training sample sets, and mixed Chinese and English speech training sample sets, the DBN-CTC-IGWO-RNN-LM algorithm is used to build a mixed language speech recognition model, and the model metadata of the mixed language speech recognition model is stored in the storage unit. The voice audio acquisition unit is used to acquire voice audio data in real time and store the real-time voice audio data in the storage unit; The speech recognition application unit is used to extract the model metadata of the mixed language speech recognition model stored in the storage unit, reconstruct the model metadata of the mixed language speech recognition model to obtain the reconstructed mixed language speech recognition model, extract the real-time speech audio data stored in the storage unit, input the real-time speech audio data into the mixed language speech recognition model for speech recognition, obtain the real-time speech text data and language type, and store the real-time speech text data and language type in the storage unit; the real-time speech text data includes real-time control commands, identification data, and printed text data; The template matching unit is used to extract the real-time language type stored in the storage unit, and match several corresponding text printing templates in the text printing template database based on the real-time language type. The template selection unit is used to extract real-time voice and text data stored in the storage unit, and select a text printing template from several matching text printing templates in the text printing template database according to the control instructions contained in the real-time voice and text data. The data fusion unit is used to extract real-time voice and text data stored in the storage unit and text printing templates selected by the template selection unit, fuse the real-time voice and text data with the text printing templates selected in the text printing template database to obtain real-time text printing data materials, and store the real-time text printing data materials in the storage unit. The printer is used to extract real-time voice and text data and real-time text printing data materials stored in the storage unit, and to print text from the real-time text printing data materials according to the control instructions contained in the real-time voice and text data, so as to obtain real-time text printing paper materials. The storage unit is used to store the text printing template database, the model metadata of the mixed language speech recognition model, real-time speech audio data, real-time speech text data, real-time language types, and real-time text printing data materials.
7. A text printing system based on speech recognition according to claim 6, characterized in that: The system further includes a material library construction unit, an identification data setting unit, an identification data matching unit, and a data material extraction unit, all of which are connected to the storage unit. The material library construction unit is used to receive several preset text printing data materials uploaded by users, construct a text printing data material library based on the several preset text printing data materials, and store the text printing data material library in the storage unit. The identification data setting unit is used to set preset identification data for each preset text print data material in the text print data material library in the storage unit; The identifier data matching unit is used to extract real-time voice and text data stored in the storage unit, match the identifier data contained in the real-time voice and text data with all preset identifier data in the text printing data material library, obtain the matched identifier data, and store the matched identifier data in the storage unit. The data material extraction unit is used to extract the matching identifier data stored in the storage unit, extract the corresponding preset text printing data material from the text printing data material library based on the matching identifier data, and store the preset text printing data material in the storage unit. The printer is also used to extract preset text printing data materials stored in the storage unit, and to print the preset text printing data materials according to the control instructions contained in the real-time voice and text data, so as to obtain preset text printing paper materials.