Rail transit voice recognition data set generation method and device based on large model
By constructing a symbol-tag-pronunciation mapping system and a large language model, the accuracy and security issues of professional terminology recognition in rail transit speech recognition systems have been solved, generating high-quality speech datasets that support rapid iterative optimization and efficient recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-02
- Publication Date
- 2026-04-14
AI Technical Summary
Existing technologies for speech recognition systems in the rail transit field struggle to adapt to specialized terminology and pronunciation rules, resulting in low recognition accuracy and potential safety hazards. Furthermore, data generation and model iteration are inefficient and unable to quickly adapt to dynamically changing specialized terminology.
A multi-level mapping system of symbols, markers, and pronunciations is constructed. A large language model is used to generate text corpus that conforms to rail transit regulations. Speech data is synthesized through a text-to-speech model. Combined with data augmentation technology and automatic language recognition model training, high-precision recognition of professional terms and accurate restoration of standard symbols are achieved.
It achieves high-precision recognition of rail transit professional terms, avoids safety hazards caused by recognition errors, improves the professionalism and coverage of the corpus, supports rapid iterative optimization, and generates a highly robust speech dataset.
Smart Images

Figure CN121862091A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of speech recognition technology, specifically relating to a method and apparatus for generating a rail transit speech recognition dataset based on a large model. Background Technology
[0002] With the increasing maturity of deep learning and end-to-end architecture, lightweight speech recognition systems, represented by SenseVoice, have reached commercial-grade performance standards in general scenarios. They can accurately recognize common speech content such as daily conversations and news broadcasts, and are widely used in various general speech interaction scenarios.
[0003] However, when such general-purpose speech recognition systems are extended to specialized fields such as rail transit, the lack of specific rail transit terminology samples in the training data makes it difficult for the models to adapt to the specific needs of the field. The core pain points are concentrated in the following three aspects: First, the rail transit field has a large number of specialized terms (such as "paving marks", "moving A line", "the previous departure track", etc.), whose acoustic characteristics are significantly different from general vocabulary. The general-purpose model lacks corresponding training samples to support it, making it difficult to achieve accurate matching and recognition. Second, this field has specific pronunciation rules, such as the letter "G" being pronounced as "gao" and the number "1" being pronounced as "yao". The general-purpose model does not incorporate these special rules, resulting in pronunciation recognition errors. Third, in key scenarios such as dispatching and command, and emergency response, the above-mentioned defects in terminology recognition and pronunciation adaptation may lead to misunderstandings of instructions, thereby creating serious safety hazards.
[0004] Currently, industry solutions for the challenge of professional terminology recognition mainly fall into two categories, but both have significant limitations: First, manually collecting and annotating professional speech data, which involves organizing railway dispatchers to record professional scenario speech and manually annotating it. This solution has inherent drawbacks such as long collection cycles, high on-site operational safety and compliance risks, and high costs for large-scale data annotation, making it difficult to meet the needs of rapid iteration. Second, hot word matching and regular expression replacement solutions, which achieve terminology replacement and generation through predefined professional vocabulary databases and text matching rules. This solution relies on manually maintained static word lists, which cannot cover the dynamically evolving terminology expressions in the rail transit field, nor can it adapt to complex contextual scenarios, resulting in insufficient adaptability and scalability.
[0005] In the speech synthesis stage, general text-to-speech (TTS) models also suffer from limitations in professional adaptation: on the one hand, they cannot automatically recognize the specific pronunciation rules of the rail transit field, making it difficult to convert letters like "G" and "1" into standard calling terms such as "gao" and "yao"; on the other hand, they lack the ability to distinguish the contextual pronunciation of polyphonic characters, making it difficult to select the correct pronunciation according to the actual needs of the dispatching scenario. These deficiencies lead to a systematic deviation between the synthesized corpus and the actual operational speech. If such corpus is used for model training, the model will learn incorrect speech patterns, further weakening its accuracy in recognizing professional terms and its ability to generalize to specific scenarios.
[0006] Furthermore, in terms of corpus management, there is currently a lack of version control and incremental update mechanisms for training tasks, resulting in low model iteration efficiency, difficulty in quickly adapting to dynamic technical terms brought about by new lines and new equipment, and inability to achieve continuous optimization of recognition capabilities.
[0007] In summary, existing technologies have significant bottlenecks in the generation and model adaptation of professional speech data for rail transit. There is an urgent need for a synthesis method that can quickly generate high-quality speech data of rail transit terminology, which can significantly shorten the development cycle of professional speech recognition models while ensuring data quality and standardization, and at the same time avoid security and compliance risks and reduce data acquisition costs, thus providing technical support for the accuracy and standardization of speech recognition in the rail transit field. Summary of the Invention
[0008] To address the problems raised in the background, the purpose of this invention is to provide a method and apparatus for generating a rail transit speech recognition dataset based on a large model. This method constructs a multi-level mapping system of symbols, markers, and pronunciations, utilizes a large language model (LLM) to generate diverse text corpora containing specialized terminology, and combines this with text-to-speech (TTS) synthesis technology to generate speech data conforming to the specific pronunciation standards of rail transit. Finally, a training dataset with reversible pronunciation markers is formed. This dataset can provide precisely aligned training samples for automatic speech recognition (ASR) models, achieving high-precision recognition of rail transit specialized terminology and accurate restoration of its corresponding standard symbols.
[0009] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows: A method for generating a rail transit speech recognition dataset based on a large model, the method comprising the following steps: S1, construct a structured knowledge base of symbols, tags, and pronunciations, and a professional terminology database; S2 generates diverse text corpora with specialized terminology based on the Large Language Model (LLM). S3, perform symbol parsing, pronunciation conversion, and metadata construction on the text corpus; S4 synthesizes speech data through a text-to-speech (TTS) model and completes the dataset construction; S5 trains an Automatic Speech Recognition (ASR) model based on a dataset, performs symbol inverse mapping on the model output, and outputs standard symbol text.
[0010] Further specifying, step S1 includes the following sub-steps: S1-1 defines the symbol layer, sorting out the symbols to be identified in the rail transit field, forming a symbol set Σ={s1, s2, ..., s...} containing Arabic numerals, uppercase letters, special characters, and fixed combinations. n Each symbol corresponds to a unique standard writing form; S1-2, Construct a professional terminology database, sort out the equipment names, station names, operating instructions, line signs and emergency scenario terms in rail transit operation, mark business categories and typical application scenarios, and support dynamic expansion; S1-3, Design the tagging layer, assigning a unique, immutable tag ID in the format <category_symbol> to each symbol, forming a tag set; S1-4, Construct a pronunciation layer. Based on the actual operation standards of rail transit, establish a special pronunciation dictionary P to clarify the standard pronunciation corresponding to each marker ID; S1-5 defines contextual pattern constraints, sets regular expression rules for each symbol, and describes its legal combination patterns in technical terms. S1-6 integrates the symbol layer, tag layer, pronunciation layer, and context mode constraints to build a standardized JSON-structured SMP knowledge base; S1-7, Generate the reverse mapping table M -1 Construct a deterministic hash mapping from tag ID to symbol to ensure unambiguous restoration.
[0011] Further specifying, step S2 specifically includes the following sub-steps: S2-1, Construct a candidate terminology database, integrating native vocabulary from the professional terminology database, core scenario names of rail transit, and standardized numbers randomly generated according to preset rules; S2-2, Set text generation requirements: the number of words in a single text should be controlled between 20 and 35, each text should contain 2 to 3 candidate thesaurus elements, and each professional term should appear at least 30 times in the end; S2-3, Design a large language model Prompt template, which includes requirements for calling candidate vocabulary elements, scenario description, and word count limit; S2-4, invoke the pre-trained large language model, adopt a multi-round generation strategy, and initially generate a total of 20 original corpora of the total number of candidate words; S2-5 involves data cleaning and distribution verification, filtering out texts that exceed the word limit, contain garbled characters, or are not from the candidate thesaurus, and statistically analyzing the actual frequency of terms. If the requirements are not met, additional data is generated until they are satisfied.
[0012] Further specifying, S3 specifically includes the following sub-steps: S3-1, Text Symbol Parsing, performs regular expression matching on each generated statement to identify professional terms and symbol sequences that conform to pattern constraints; S3-2, Symbol-to-Tag Replacement: Based on the SMP structured knowledge base, the extracted symbols and terms are converted into a tag ID sequence to generate tag text; S3-3, the conversion from markers to pronunciation: iterate through the marked text, replace each marker ID with the corresponding standard pronunciation, and generate the pronunciation sequence text; S3-4, Dataset Metadata Construction: Construct a multi-dimensional metadata structure for each sample, including tag ID, scene type, tag text, and pronunciation sequence text, to ensure traceability of training and evaluation.
[0013] Further specifying, S4 specifically includes the following sub-steps: S4-1, record standard pronunciation audio, and collect audio with clear pronunciation and no noise as the source material for timbre cloning; S4-2 calls the cloned TTS model, clones the timbre based on standard pronunciation audio, and generates speech data in batches; S4-3, Data augmentation processing, which includes superimposing rail transit environmental noise and using a speed factor for audio speed change processing; S4-4, Dataset pairing: Construct a dual-label pairing structure so that each piece of speech data is simultaneously associated with the spoken text and the labeled text; S4-5, Dataset partitioning: Divide the dataset into training and validation sets according to a preset ratio, and additionally construct a test set for manual review; S4-6, Dataset Management, sets dataset version, records generation parameter configurations and subsequent model training logs, and supports iterative optimization.
[0014] Further specifying, S5 specifically includes the following sub-steps: S5-1, ASR model training, is based on the dataset in S4-6, using the pronunciation text in the dataset as training labels, so that the model can learn the special pronunciation patterns of rail transit. S5-2 performs a conversion on the pronunciation text output by the ASR model, restoring it to standard symbol text; S5-3, Test set evaluation and closed-loop optimization, uses word error rate, character error rate and term recall rate as indicators for identification evaluation. If the indicators are not met, it will fall back to S2-S4 and optimize the term database and mapping rules.
[0015] Further specifying, S5-2 specifically includes the following sub-steps: S5-2-1, Pronunciation Segment Extraction and Tagging: Identify special pronunciation words in the ASR output and replace them with corresponding tag IDs to generate a tag sequence; S5-2-2, Deterministic reverse mapping, splits the token sequence into independent token units, including token ID and plain text. The token ID is obtained by querying the reverse mapping table M. -1 Replace the tokens with the corresponding symbols, leave the plain text as is, and then concatenate all the processed tokens into a string in their original order; S5-2-3, Validation and Output: Performs regular expression validation on the processed string. If the validation passes, it outputs the standard symbol text; otherwise, it restores the text to its pronunciation.
[0016] A large-model-based device for generating rail transit speech recognition datasets includes a terminology database management module, a text generation configuration module, an LLM module, a metadata management module, a TTS module, a data augmentation module, a dataset management module, an ASR module, and a post-processing and evaluation module. The terminology database management module is connected to the text generation configuration module, the text generation configuration module is connected to the LLM module, the LLM module is connected to the metadata management module, the metadata management module is connected to the TTS module, the TTS module is connected to the data augmentation module, the data augmentation module is connected to the dataset management module, the dataset management module is connected to the ASR module, and the ASR module is connected to the post-processing and evaluation module.
[0017] Further specifying, the terminology database management module is used to input professional terms, words with special pronunciations, and scene names to build an SMP structured knowledge base and a reverse mapping table; The text generation configuration module is used to build a candidate word library, set text generation constraints, and design and optimize the Prompt template. The LLM module is used to generate diverse text corpora that conform to rail transit regulations based on the Prompt. The metadata management module performs symbol parsing, token replacement, and pronunciation conversion to construct structured text samples with metadata. The TTS module is used to synthesize speech data based on spoken text; The data enhancement module adds environmental noise and adjusts speech rate to improve robustness of the speech data; The described dataset management module pairs text with audio data, implements dataset partitioning, version management, and associates training logs; The described ASR module uses the dataset in the dataset module to train the model and obtains new model weights; The described post-processing and evaluation module is used to reversely map the ASR output to standard symbols, evaluate recognition metrics, and feedback optimization signals to the text generation configuration module.
[0018] Advantages of the present invention: 1. Construct a symbol-token-pronunciation (SMP) structured reversible mapping system Break through the limitation of the binding of symbols and pronunciations in traditional speech recognition, innovatively design a three-layer structured knowledge base of "symbol layer-token layer-pronunciation layer", decouple symbols and pronunciations through a unique immutable token ID, and then rely on a deterministic reverse mapping table (M -1 ), construct an unambiguous and reversible reduction link from the ASR recognition result (pronunciation text) to the original professional symbol. This design accurately solves the recognition confusion and symbol reduction problems brought by "homophonic different symbols" (such as different symbols corresponding to the same pronunciation) and "special pronunciations" (such as "G→high", "1→yao") in the rail transit scenario, improves the symbol reduction accuracy of professional terms compared with existing general models, and completely avoids potential safety hazards caused by term recognition errors.
[0019] 2. Scenario-constrained professional corpus generation mechanism based on large language models Construct a "scenario + term + rule" triple-driven Prompt template to guide the large language model to generate diverse and compliant text corpora highly fitting the rail transit business scenario under specified constraints (such as word count, term frequency, naming convention), effectively improving the professionalism, coverage, and practicality of the corpus, and having a very high generation efficiency.
[0020] 3. Support TTS synthesis with standard pronunciation norms and combine data augmentation strategies Combine the standard pronunciation audio recorded in real time for timbre cloning, and integrate enhancement technologies such as the unique environmental noise in rail transit (such as station hall voices, rail friction sounds) and speed perturbation to generate highly robust voice data.
[0021] 4. Traceable dataset construction and closed-loop optimization process s From corpus generation, symbol parsing, speech synthesis to ASR training and post-processing, establish a full-link metadata management mechanism (including scenario type, original text, token text, pronunciation text, audio parameters, etc.), and introduce an evaluation feedback loop based on metrics such as term recall rate, supporting dynamic iterative optimization of the term library, mapping rules, or data distribution, forming a closed loop of high-quality dataset generation that can continuously evolve. Description of the Drawings
[0022] The present invention can be further illustrated by the non-limiting embodiments given in the accompanying drawings; Figure 1 This is an overall flowchart of an embodiment of a method and apparatus for generating a rail transit speech recognition dataset based on a large model according to the present invention; Figure 2 This is a structural block diagram of an embodiment of a method and apparatus for generating rail transit speech recognition datasets based on a large model, according to the present invention. Figure 3 This is a flowchart illustrating the text corpus generation process of an embodiment of a method and apparatus for generating rail transit speech recognition datasets based on a large model, according to the present invention. Figure 4 This is a flowchart illustrating the text corpus symbol-tag-pronunciation conversion process of an embodiment of a method and apparatus for generating rail transit speech recognition datasets based on a large model, according to the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be further described below with reference to the accompanying drawings and embodiments. The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention. It should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0024] like Figure 1 As shown, Figure 1 This is an overall flowchart of the rail transit speech recognition data synthesis method in an embodiment of the present invention. The present invention provides a method for generating a rail transit speech recognition dataset based on a large model, the method comprising the following steps: S1, construct a structured knowledge base of symbols, tags, and pronunciations, and a professional terminology database; The specific process of S1 is as follows: Organize the symbols to be identified, professional terms, and professional scenarios to construct an SMP structured knowledge base and a professional terminology database. For example, the letter G is marked as...<LET_G> The pronunciation is "gao," and the regular expression rule is [GDZK]\\d{2,4}. The digit 0 is marked as...<NUM_0> The pronunciation is "dong", and the regular expression rule is \\d{2,4}. The number 1 is marked as...<NUM_1> The pronunciation is "yao", and the regular expression rule is \\d{2,4}. Terms without special pronunciations, such as "paving markers", "Zhuangzhai Station", etc., are entered into the professional terminology database. The scenario database includes "train arrival", "fault handling", "equipment operation", etc. A reverse mapping table M is generated based on SMP. -1 Construct a deterministic hash mapping from tag ID to symbol to ensure unambiguous restoration in the future.
[0025] S2 generates diverse text corpora with specialized terminology based on the Large Language Model (LLM). The specific process of S2 is as follows: A candidate terminology lexicon is constructed, containing professional terms, scene names, and standardized numbers randomly generated according to preset rules (such as train number G45, equipment number X10). Text generation requirements are set, including that each text entry should have 20-35 characters, contain 2-3 candidate terminology elements, and each professional term should appear at least 30 times. A Prompt template is designed to call a large language model (such as Qwen3) for multiple rounds of generation, with the initial total number of generated texts being the total number of candidate terms × 30. Finally, the generated text is cleaned and its distribution is validated, filtering out texts that exceed the character limit, contain garbled characters, or contain symbols not found in the candidate terminology lexicon, and supplementing the generated text to meet the frequency requirements.
[0026] S3, perform symbol parsing, pronunciation conversion, and metadata construction on the text corpus; The specific process of S3 is as follows: Perform regular expression matching on each generated statement to identify professional terms that conform to the pattern constraint (e.g., match the pattern "[GDZK]\d{2,4}" for "G10 train entering the station" and extract the symbol sequence ["G","1", "0"]); convert the extracted symbol sequence into a tag ID sequence based on the SMP knowledge base (e.g., generate...).<LET_G><NUM_1><NUM_0> The train is about to arrive at the station); iterate through the labeled text, replace each labeled ID with the corresponding pronunciation, and generate a pronunciation sequence text (such as "the train at Gaoyaodong is about to arrive at the station"); then construct a multi-dimensional metadata structure for each sample, including information such as sample ID, scene type, source text, labeled text and pronunciation text, to ensure that training and evaluation are traceable.
[0027] S4 synthesizes speech data through a text-to-speech (TTS) model and completes the dataset construction; The specific process of S4 is as follows: Record standard pronunciation audio with clear pronunciation and no noise as the source material for timbre cloning; call a cloned TTS model (such as CosyVoice2) to generate speech data in batches based on the recorded audio; perform data augmentation by superimposing environmental noise (such as voices at a station) and randomly setting the signal-to-noise ratio (0-20dB), and applying speed perturbation (factor 0.9-1.1) to simulate different speaking speeds; construct a dual-label paired dataset structure to ensure that each speech is simultaneously associated with the pronunciation text and the labeled text; divide the dataset into training set and validation set at a ratio of 85% / 15%, and construct a test set for manual review; set the dataset version, record generation parameters, configuration information and training logs, and support iterative optimization.
[0028] S5 trains an Automatic Speech Recognition (ASR) model based on a dataset, performs symbol inverse mapping on the model output, and outputs standard symbol text.
[0029] The specific process of S5 is as follows: ASR model training and symbol inverse mapping post-processing are performed. The ASR model is trained using a dataset with the pronunciation text as the training label to ensure the model learns specific pronunciation patterns. The ASR output undergoes three post-processing steps: first, pronunciation segments are extracted and replaced with labeled ID sequences; then, the inverse mapping table M is used... -1 The marker ID is deterministically converted into a symbol, and the regular expression rules are finally verified and the standard symbol text is output. The recognition performance is evaluated on the test set, and the word error rate (WER), character error rate (CER) and term recall rate are calculated. If the indicators do not meet the standards, the process is regressed to the S2-S4 stage to optimize the term library and mapping rules, forming a closed loop iteration.
[0030] In practical applications of this embodiment, step S1 includes the following sub-steps: S1-1 defines the symbol layer, sorting out the symbols to be identified in the rail transit field, forming a symbol set Σ={s1, s2, ..., s...} containing Arabic numerals, uppercase letters, special characters, and fixed combinations. n Each symbol corresponds to a unique standard writing form; Specifically, Arabic numerals are 0-9, uppercase letters are AZ, special characters include "-", " / ", etc., fixed combinations are such as XN, SN, XF, XQ, etc.; unique standard writing forms are such as "s1='G'", "s2='1'", "s3='XN'". S1-2, Construct a professional terminology database, sort out the equipment names, station names, operating instructions, line signs and emergency scenario terms in rail transit operation, mark business categories and typical application scenarios, and support dynamic expansion; Specifically, technical terms include, but are not limited to: Equipment Names: ATP Vehicle-Mounted Equipment, LKJ Monitoring Device, Signal Controller; Station names: Zhuangzhai Station, Lijiazhai Station, Rilanchang Station; Operation instructions: Drawing marks, moving on Route A, single operation for positioning; Line identifications: Up line, down line, main line, side line, storage line; Emergency scenarios: Fire alarm, door failure, loss of power in the overhead line, vehicle swaying; Each term is labeled with its business classification and typical application scenarios to form a structured term library, supporting dynamic expansion.
[0031] Sect.1-3, Design the marking layer, assign a unique immutable marking ID in the format of <category_symbol> to each symbol to form a marking set; Specifically, assign a unique immutable marking ID (mark_id) to each symbol, and construct a standardized marking in the format of <category_symbol>. For example, the markings for numbers are <NUM_0> to <NUM_9>, the markings for letters are <LET_A> to <LET_Z>, and the markings for combinations are <COMBO_XN>, <COMBO_XQN>, etc., to form a marking set M={m1, m2, ..., m n}. The design of the marking ID ensures decoupling from the symbol layer and supports subsequent deterministic reverse mapping; Sect.1-4, Construct the pronunciation layer. Based on the actual operation standards of rail transit, establish a special pronunciation dictionary P to clarify the standard pronunciation corresponding to each marking ID; Specifically, the special pronunciation dictionary P={(m1, "gao"), (m2, "yao"), (m3, "xia ni"),...}, where the pronunciations of numbers include "0→dong", "1→yao", "2→liang", "7→guai", the pronunciations of letters include "G→gao", "D→dong", "Z→zhi", "K→kuai", and the pronunciations of combinations include "XN→xia ni", "SN→shang ni", "XQN→xia qu ni"; Sect.1-5, Define the context pattern constraints, set regular expression rules for each symbol to describe its legal combination patterns in professional terms. For example: The train number pattern is pattern="[GDZK]\d{2,4}", and the signal machine number pattern is pattern="[XS]\d{2}" to ensure that the generated corpus complies with the rail transit naming规范; Sect.1-6, Integrate the symbol layer, marking layer, pronunciation layer, and context pattern constraints to construct an SMP structured knowledge base in a standardized JSON structure: { "symbol": "G", "mark_id": "<LET_G>", "pronunciation": "gao", "pattern": "[GDZK]\\d{2,4}", "category": "letter" }, { "symbol": "1", "mark_id": "<NUM_1>", "pronunciation": "yao", "pattern": "\\d{2,4}", "category": "number" }, { "symbol": "XN", "mark_id": "<COMBO_XN>", "pronunciation": "xia ni", "pattern": "[XS]N", "category": "combo" } S1-7, generate the reverse mapping table M -1 , construct a deterministic hash mapping from the mark ID to the symbol to ensure unambiguous restoration in the post-processing stage of the ASR output. The reverse mapping table is of hash table structure: { # Numeric markers "<NUM_0>": "0", "<NUM_1>": "1", "<NUM_2>": "2", "<NUM_7>": "7", # Alphabetic markers "<LET_G>": "G", "<LET_D>": "D", "<LET_Z>": "Z", "<LET_T>": "T", # Combo markers "<COMBO_XN>": "XN", "<COMBO_SN>": "SN", "<COMBO_XQN>": "XQN", } In the practical application of this embodiment, S2 specifically includes the following sub-steps: S2-1, Construct a candidate terminology database, integrating native vocabulary from the professional terminology database, core scenario names of rail transit, and standardized numbers randomly generated according to preset rules; Specifically, the candidate terminology database is constructed with the structured professional terminology database S1-2 as the core, integrating three types of core elements to form the candidate terminology database: ① native words from the professional terminology database (such as "Zhuangzhai Station", "XN signal", "paving mark", etc.); ② core scene names of rail transit (such as "train arrival", "fault handling", "emergency evacuation", "equipment operation", etc.); ③ standardized numbers randomly generated according to preset rules (train number: following the "[GDZK]\d{2,4}" rule, such as G45, D5057; equipment number: following the "^[XS]\d{2}$" rule, such as X10, S03).
[0032] S2-2 sets the requirements for generated text, including length constraints: the number of characters in a single text should be strictly controlled between 20-35, meeting the requirement that the duration of the synthesized TTS audio should be around 10 seconds. Terminology coverage: each text must contain elements from 2-3 candidate terms. Frequency requirements: the final occurrence frequency of each specialized term in the candidate terminology should be no less than 30 times to ensure the model receives sufficient training data. S2-3, Design a large language model Prompt template, which includes requirements for calling candidate vocabulary elements, scenario description, and word count limit; Specifically, the large language model Prompt template adopts a "scenario constraint + element combination" template design, which clearly includes the requirements for calling candidate vocabulary elements, scenario description, and word count limit. An example template is shown below: Please generate conversational text for the rail transit {scene name}, which must meet the following requirements: 1. Includes 2-3 terms from the {technical terminology}; 2. The word count should be 25-30 characters, conforming to industry standard terminology.
[0033] S2-4 involves calling a pre-trained large language model and employing a multi-round generation strategy. The initial generated corpus consists of 20 original words from the total candidate vocabulary. Specifically, the pre-trained large language model can be from the Qwen series or the DeepSeek series. S2-5 involves data cleaning and distribution verification, filtering out texts that exceed the word limit, contain garbled characters, or are not from the candidate thesaurus, and statistically analyzing the actual frequency of terms. If the requirements are not met, additional data is generated until they are satisfied.
[0034] Specifically, data cleaning and distribution validation are used to filter out sentences that do not meet the requirements. These include texts with fewer than 20-35 characters, texts containing garbled characters (non-UTF-8 encoded characters, invalid control characters), and texts containing letters, combinations, or special symbols not found in the candidate thesaurus. The actual frequency of each technical term in the candidate thesaurus is counted. If the frequency of a term is lower than the requirement in S2-2, the corresponding text is generated using the method in S2-4 until the requirement is met. In practical applications of this embodiment, step S3 specifically includes the following sub-steps: S3-1, text symbol parsing, performs regular expression matching on each generated statement to identify professional terms and symbol sequences that conform to the pattern constraints; for example, for "G1102 train arrives at the station", the pattern "[GDZK]\d{2,4}" is matched, and the symbol sequence ["G", "1", "1", "0", "2"] is extracted.
[0035] S3-2, Symbol-to-Tag Replacement: Based on the SMP structured knowledge base, the extracted symbols and terms are converted into a tag ID sequence to generate tag text; for the example above, the following is generated: Original text: Train G1102 is about to arrive at the station. Please prepare to receive the train. Marked text:<LET_G><NUM_1><NUM_1><NUM_0><NUM_2> The train is about to arrive at the station. Please prepare to receive it.
[0036] S3-3, Mark-to-Pronunciation Conversion: Iterate through the marked text, replacing each mark ID (mark_id) with the corresponding standard pronunciation to generate a pronunciation sequence text; Example result: Pronunciation sequence text: Gao Yaoyao Dong, two trains are about to arrive at the station, please prepare to receive them.
[0037] S3-4, Dataset Metadata Construction: A multi-dimensional metadata structure is built for each sample, containing the tag ID, scene type, tag text, and pronunciation sequence text, ensuring traceability of training and evaluation. { "sample_id": "TRAIN_0001", "scene_type": "Entering the station", "source_text": "Train G1102 is about to arrive at the station, please prepare to receive it", "text_markup": "<LET_G><NUM_1><NUM_1><NUM_0><NUM_2> The next train is about to arrive at the station. Please prepare to receive it. "text_pronunciation": "Two trains from Gaoyaodong are about to arrive at the station. Please prepare to receive them." } In practical applications of this embodiment, step S4 specifically includes the following sub-steps: S4-1, record standard pronunciation audio, and collect audio with clear pronunciation and no noise as the source material for timbre cloning; S4-2, Call a cloned TTS model (such as CosyVoice2), clone the timbre based on the standard audio recorded in step S4-1, and generate speech data in batches; S4-3, Data augmentation processing, which includes superimposing rail transit environmental noise and using a speed factor for audio speed change processing; Specifically, noise injection involves superimposing realistic rail transit environment noise, such as human voices in the station hall, wind noise and track friction noise from train operation, and equipment humming in the driver's cab. The signal-to-noise ratio (SNR) of the noise can be randomly selected within the range of 0-20 dB. Speed perturbation involves applying slight speed factors (e.g., 0.9, 1.0, 1.1) to the audio to simulate the speaking speed of different people, increasing the model's generalization ability.
[0038] S4-4, Dataset pairing: Construct a dual-label pairing structure so that each piece of speech data is simultaneously associated with the spoken text and the labeled text. { "sample_id": "TRAIN_0001", "audio_path": " / data / audio / TRAIN_0001.wav", "text_pronunciation": "Gao Yaoyao's two trains are about to arrive at the station, please prepare to receive them", / / ASR training input labels "text_markup": "<LET_G><NUM_1><NUM_1><NUM_0><NUM_2> The next train is about to arrive at the station; please prepare to receive it. / / Assessment and post-processing basis "metadata": { "duration": 4.50, "sample_rate": 16000, "format": "WAV", "snr_db": 20 } } S4-5, Dataset partitioning: The dataset is divided into training and validation sets according to a preset ratio (85% / 15%), and an additional manually reviewed test set is constructed; this ensures the quality of the evaluation. S4-6, Dataset Management: Sets the dataset version, records all data in the dataset, including parameter configurations during the generation process, and links these records to logs used for subsequent model training. This provides feasibility for iterative optimization of the dataset. In practical applications of this embodiment, step S5 specifically includes the following sub-steps: S5-1, ASR model training, is based on the dataset in S4-6, using text_pronunciation (pronunciation text) in the dataset as training labels, enabling the model to learn the special pronunciation patterns of rail transit; S5-2 performs a conversion on the pronunciation text output by the ASR model, restoring it to standard symbol text; S5-3, Test set evaluation and closed-loop optimization, uses word error rate, character error rate and term recall rate as indicators for identification evaluation. If the indicators are not met, it will fall back to S2-S4 and optimize the term database and mapping rules.
[0039] Specifically, common metrics for evaluating the test set include word error rate (WER), character error rate (CER), and term recall. If the metrics are not met, the process can revert to S2-S4 to further expand or adjust the terminology database and mapping rules, forming a closed-loop optimization.
[0040] In practical applications of this embodiment, S5-2 specifically includes the following sub-steps: S5-2-1, Pronunciation Segment Extraction and Tagging: Identify special pronunciation words in the ASR output and replace them with corresponding tag IDs to generate a tag sequence; Specifically, the ASR model outputs continuous pronunciation text (e.g., "gao yao yao dong two trains entered the station"). First, special pronunciation words (e.g., "gao", "yao", "dong") need to be identified and replaced with their corresponding tag IDs. Global matching and replacement is then used to convert the special pronunciation text into a tag sequence (e.g., "...").<LET_G><NUM_1><NUM_1><NUM_0><NUM_2> The next train is arriving at the station.
[0041] S5-2-2, Deterministic reverse mapping, splits the token sequence into independent token units, including token ID and plain text. The token ID is obtained by querying the reverse mapping table M. -1 Replace the tokens with the corresponding symbols, leave the plain text as is, and then concatenate all the processed tokens into a string in their original order; Specifically, the token sequence is split into independent token units, including the token ID (such as "...").<LET_G> The token is divided into plain text (e.g., "The next train is arriving"). For each token, the following checks are performed: if it is a tag ID (starting with "<" and ending with ">"), then it is replaced with the corresponding symbol (e.g., "") by querying the reverse mapping table M-1.<LET_G> (→"G"); If it is plain text, keep it as is, and then concatenate all the processed tokens into a string in the original order.
[0042] S5-2-3, Validation and Output: Performs regular expression validation on the processed string. If the validation passes, it outputs the standard symbol text; otherwise, it restores the pronunciation text. After successful validation, the final output is the standard symbol text (e.g., "G1102 train arrives at the station").
[0043] like Figure 2 As shown, a rail transit speech recognition dataset generation device based on a large model includes a terminology database management module, a text generation configuration module, an LLM module, a metadata management module, a TTS module, a data augmentation module, a dataset management module, an ASR module, and a post-processing and evaluation module. The terminology database management module is connected to the text generation configuration module, the text generation configuration module is connected to the LLM module, the LLM module is connected to the metadata management module, the metadata management module is connected to the TTS module, the TTS module is connected to the data augmentation module, the data augmentation module is connected to the dataset management module, the dataset management module is connected to the ASR module, and the ASR module is connected to the post-processing and evaluation module.
[0044] In the practical application of this embodiment, the terminology database management module is used to input professional terms, special pronunciation words and scene names, and to build an SMP structured knowledge base and reverse mapping table; The text generation configuration module is used to build a candidate word library, set text generation constraints, and design and optimize the Prompt template. The LLM module is used to generate diverse text corpora that conform to rail transit regulations based on the Prompt. The metadata management module performs symbol parsing, token replacement, and pronunciation conversion to construct structured text samples with metadata. The TTS module is used to synthesize speech data based on spoken text; The data enhancement module adds environmental noise and adjusts speech rate to improve robustness of the speech data; The dataset management module pairs text and audio data, performs dataset partitioning, version management, and associates training logs. The described ASR module uses the dataset in the dataset module to train the model and obtain new model weights. The described post-processing and evaluation module is used to reverse map the ASR output to standard symbols, evaluate the recognition metrics, and feedback optimization signals to the text generation configuration module.
[0045] Figure 3 This is the flowchart for generating text corpus in the embodiments of the present invention. This process first constructs a term candidate library (integrating professional terms and scenarios), then designs a Prompt template to clarify the generation constraints (scenarios, elements, and word count requirements), and then calls the LLM to batch generate the initial corpus. The generated corpus undergoes data cleaning and verification: if there are issues such as inconsistent length, garbled characters, or illegal characters, it is returned to the LLM for regeneration; if the term frequency is insufficient, the missing terms are analyzed and the Prompt or supplementary strategy is dynamically adjusted, triggering generation again; only when it fully complies with the specifications, a qualified and diverse text corpus is output.
[0046] Figure 4 This is the flowchart for symbol-token-pronunciation conversion of text corpus in the embodiments of the present invention, showing the bidirectional conversion process from symbols to pronunciation and from pronunciation to symbols. On the left is the data generation link: after the original text is symbolically parsed, the professional symbols (such as "XN") are converted into token IDs (such as "<COMBO_XN>") through the SMP knowledge base, and then mapped to the standard pronunciation text (such as "xià nì"), and finally the TTS module generates training voices that conform to the pronunciation norms of rail transit; on the right is the recognition post-processing link: the pronunciation text output by the ASR model is first converted into a token ID, and then restored to the original symbol through the reverse mapping table, combined with regular verification to ensure the correct recognition result. This process is the core mechanism for realizing the recognition of professional terms and symbol restoration.
[0047] The above embodiments only exemplarily illustrate the principles and effects of the present invention, rather than being used to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes completed by those with ordinary knowledge in the technical field without departing from the spirit and technical idea disclosed by the present invention should still be covered by the claims of the present invention.
Claims
1. A method for generating a rail transit speech recognition dataset based on a large model, characterized in that, The method includes the following steps: S1, construct a structured knowledge base of symbols, tags, and pronunciations, and a professional terminology database; S2 generates diverse text corpora with specialized terminology based on the Large Language Model (LLM). S3, perform symbol parsing, pronunciation conversion, and metadata construction on the text corpus; S4 synthesizes speech data through a text-to-speech (TTS) model and completes the dataset construction; S5 trains an Automatic Speech Recognition (ASR) model based on a dataset, performs symbol inverse mapping on the model output, and outputs standard symbol text.
2. The method for generating a rail transit speech recognition dataset based on a large model according to claim 1, characterized in that, S1 includes the following sub-steps: S1-1 defines the symbol layer, sorting out the symbols to be identified in the rail transit field, forming a symbol set Σ={s1, s2, ..., s...} containing Arabic numerals, uppercase letters, special characters, and fixed combinations. n Each symbol corresponds to a unique standard writing form; S1-2, Construct a professional terminology database, sort out the equipment names, station names, operating instructions, line signs and emergency scenario terms in rail transit operation, mark business categories and typical application scenarios, and support dynamic expansion; S1-3, Design the tagging layer, assigning a unique, immutable tag ID in the format <category_symbol> to each symbol, forming a tag set; S1-4, Construct a pronunciation layer. Based on the actual operation standards of rail transit, establish a special pronunciation dictionary P to clarify the standard pronunciation corresponding to each marker ID; S1-5 defines contextual pattern constraints, sets regular expression rules for each symbol, and describes its legal combination patterns in technical terms. S1-6 integrates the symbol layer, tag layer, pronunciation layer, and context mode constraints to build a standardized JSON-structured SMP knowledge base; S1-7, Generate the reverse mapping table M -1 Construct a deterministic hash mapping from tag ID to symbol to ensure unambiguous restoration.
3. The method for generating a rail transit speech recognition dataset based on a large model according to claim 1, characterized in that, S2 specifically includes the following sub-steps: S2-1, Construct a candidate terminology database, integrating native vocabulary from the professional terminology database, core scenario names of rail transit, and standardized numbers randomly generated according to preset rules; S2-2, Set text generation requirements: the number of words in a single text should be controlled between 20 and 35, each text should contain 2 to 3 candidate thesaurus elements, and each professional term should appear at least 30 times in the end; S2-3, Design a large language model Prompt template, which includes requirements for calling candidate vocabulary elements, scenario description, and word count limit; S2-4, invoke the pre-trained large language model, adopt a multi-round generation strategy, and initially generate a total of 20 original corpora of the total number of candidate words; S2-5 involves data cleaning and distribution verification, filtering out texts that exceed the word limit, contain garbled characters, or are not from the candidate thesaurus, and statistically analyzing the actual frequency of terms. If the requirements are not met, additional data is generated until they are satisfied.
4. The method for generating a rail transit speech recognition dataset based on a large model according to claim 2, characterized in that, S3 specifically includes the following sub-steps: S3-1, Text Symbol Parsing, performs regular expression matching on each generated statement to identify professional terms and symbol sequences that conform to pattern constraints; S3-2, Symbol-to-Tag Replacement: Based on the SMP structured knowledge base, the extracted symbols and terms are converted into a tag ID sequence to generate tag text; S3-3, the conversion from markers to pronunciation: iterate through the marked text, replace each marker ID with the corresponding standard pronunciation, and generate the pronunciation sequence text; S3-4, Dataset Metadata Construction: Construct a multi-dimensional metadata structure for each sample, including tag ID, scene type, tag text, and pronunciation sequence text, to ensure traceability of training and evaluation.
5. The method for generating a rail transit speech recognition dataset based on a large model according to claim 2, characterized in that: S4 specifically includes the following sub-steps: S4-1, record standard pronunciation audio, and collect audio with clear pronunciation and no noise as the source material for timbre cloning; S4-2 calls the cloned TTS model, clones the timbre based on standard pronunciation audio, and generates speech data in batches; S4-3, Data augmentation processing, which includes superimposing rail transit environmental noise and using a speed factor for audio speed change processing; S4-4, Dataset pairing: Construct a dual-label pairing structure so that each piece of speech data is simultaneously associated with the spoken text and the labeled text; S4-5, Dataset partitioning: Divide the dataset into training and validation sets according to a preset ratio, and additionally construct a test set for manual review; S4-6, Dataset Management, sets dataset version, records generation parameter configurations and subsequent model training logs, and supports iterative optimization.
6. The method for generating a rail transit speech recognition dataset based on a large model according to claim 5, characterized in that: S5 specifically includes the following sub-steps: S5-1, ASR model training, is based on the dataset in S4-6, using the pronunciation text in the dataset as training labels, so that the model can learn the special pronunciation patterns of rail transit. S5-2 performs a conversion on the pronunciation text output by the ASR model, restoring it to standard symbol text; S5-3, Test set evaluation and closed-loop optimization, uses word error rate, character error rate and term recall rate as indicators for identification evaluation. If the indicators are not met, it will fall back to S2-S4 and optimize the term database and mapping rules.
7. The method for generating a rail transit speech recognition dataset based on a large model according to claim 6, characterized in that: S5-2 specifically includes the following sub-steps: S5-2-1, Pronunciation Segment Extraction and Tagging: Identify special pronunciation words in the ASR output and replace them with corresponding tag IDs to generate a tag sequence; S5-2-2, Deterministic reverse mapping, splits the token sequence into independent token units, including token ID and plain text. The token ID is obtained by querying the reverse mapping table M. -1 Replace the tokens with the corresponding symbols, leave the plain text as is, and then concatenate all the processed tokens into a string in their original order; S5-2-3, Validation and Output: Performs regular expression validation on the processed string. If the validation passes, it outputs the standard symbol text; otherwise, it restores the text to its pronunciation.
8. A device for generating a rail transit speech recognition dataset based on a large model, characterized in that: It includes a terminology database management module, a text generation configuration module, an LLM module, a metadata management module, a TTS module, a data augmentation module, a dataset management module, an ASR module, and a post-processing and evaluation module; The terminology database management module is connected to the text generation configuration module, the text generation configuration module is connected to the LLM module, the LLM module is connected to the metadata management module, the metadata management module is connected to the TTS module, the TTS module is connected to the data augmentation module, the data augmentation module is connected to the dataset management module, the dataset management module is connected to the ASR module, and the ASR module is connected to the post-processing and evaluation module.
9. The device for generating a rail transit speech recognition dataset based on a large model according to claim 8, characterized in that: The terminology database management module is used to input professional terms, words with special pronunciations, and scene names to build an SMP structured knowledge base and a reverse mapping table; The text generation configuration module is used to build a candidate word library, set text generation constraints, and design and optimize the Prompt template. The LLM module is used to generate diverse text corpora that conform to rail transit regulations based on the Prompt. The metadata management module performs symbol parsing, token replacement, and pronunciation conversion to construct structured text samples with metadata. The TTS module is used to synthesize speech data based on spoken text; The data enhancement module adds environmental noise and adjusts speech rate to improve robustness of the speech data; The dataset management module pairs text and audio data, performs dataset partitioning, version management, and associates training logs. The ASR module uses the dataset in the dataset module to train the model and obtain new model weights; The post-processing and evaluation module is used to reverse map the ASR output to standard symbols, evaluate the recognition indicators, and feed back optimization signals to the text generation configuration module.