An automated testing method and system for speech recognition, a computer device and a medium
By generating natural dialogue text using a large language model and superimposing noise, the problem of low efficiency in speech recognition testing in existing technologies is solved. This achieves controllable coverage of target terms and traceability of test results, thereby improving the efficiency of automated testing and the ability to make precise evaluations.
Patent Information
- Application Number
- CN202611607318.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-16
- Publication Date
- 2026-11-27
AI Technical Summary
Existing speech recognition testing solutions are inefficient in vertical fields, the test corpus generation method is ineffective in controlling the coverage of professional terms, the degree of automation in the testing process is insufficient, and there is a lack of fine-grained evaluation at the terminology level and a result regression comparison mechanism.
By receiving test requirement parameters, a large language model is used to generate natural dialogue text containing target terms, which is then converted into speech audio and noise is added. The recognition results are compared, and the test results are recorded to achieve automated testing at the target term level.
It improves the efficiency and coverage of speech recognition testing, achieves controllable distribution of target terms and traceability of test results, and supports systematic regression comparison.
Smart Images

Figure CN123182703A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic digital data processing, and in particular to an automated testing method, system, computer equipment, and medium for speech recognition. Background Technology
[0002] With the widespread application of speech recognition technology in numerous fields such as intelligent customer service, in-vehicle voice interaction, smart homes, medical transcription, and financial risk control, its service scenarios are rapidly expanding into vertical industries. In this process, speech recognition systems face higher testing requirements regarding the accuracy of specialized terminology recognition and robustness in complex acoustic environments. A complete specialized terminology recognition test typically involves constructing test text containing specialized terms, synthesizing or recording corresponding speech, superimposing noise simulating a real-world environment, playing it to the system under test, collecting recognition results, comparing it with standard text and calculating indicators, and recording the results for subsequent comparisons. The entire process involves processing large amounts of text data, converting audio data, and comparing and analyzing recognition results, representing an important application scenario in the field of electronic digital data processing. The quality, controllability, and reusability of the test data directly determine the effectiveness and cost of the test.
[0003] In the field of professional terminology corpus processing and retrieval, existing technologies have established a certain foundation. Existing technology (application publication number CN121786210A) discloses a retrieval enhancement generation method based on a BGE large language model, which improves the semantic encoding accuracy and retrieval relevance of professional terms by collecting professional terms from vertical domains, uniformly encoding synonyms and abbreviations, and combining retrieval fine-tuning, hybrid indexing, and weighted ranking by a reorderer. However, this method mainly targets retrieval enhancement generation scenarios such as knowledge base question answering and professional document retrieval. Its optimization goal focuses on the recall and ranking effect of retrieval results, without addressing the practical needs of constructing, uniformly managing, and reusing professional test corpora in speech recognition system testing scenarios. Currently, various technical solutions have been proposed for testing and corpus generation of speech recognition systems. However, existing technologies still have the following shortcomings: Regardless of whether manual recording, corpus retrieval, or general corpus generation is used, the distribution of terminology in specific professional fields is not effectively controlled, making it difficult to guarantee systematic coverage of key terms. This results in insufficient verification of the speech recognition system's accuracy in professional terminology. Furthermore, the storage and management of test corpora are fragmented, lacking a complete mapping between original text, synthesized speech, noisy speech, and recognition results. The generation and reuse of materials are disconnected, making it difficult to trace, reuse, and compare test materials. Simultaneously, corpus generation, speech synthesis, noise injection, playback testing, and result comparison are often scattered across different technical solutions, resulting in insufficient automation in the testing process. Test results are often measured by macro-level indicators such as overall word error rate, lacking refined evaluation methods for subsets of professional terminology, making it difficult to accurately pinpoint the system's recognition defects at the terminology level. Furthermore, existing solutions offer relatively simple recording and management of test results, lacking a mechanism for systematically comparing test results of the same test material across different time periods and system versions. This makes it difficult to effectively support performance analysis during regression testing and version iteration. Therefore, in testing scenarios for vertical domain speech recognition systems, existing technologies still suffer from low testing efficiency. Summary of the Invention
[0004] In view of the above-mentioned shortcomings or disadvantages, the present invention provides an automated testing method, system, computer equipment and medium for speech recognition, which can solve the technical problem of low testing efficiency in the prior art.
[0005] This invention provides an automated testing method for speech recognition, comprising: Receive test requirement parameters, which include a list of target terms, ratio requirements, and signal-to-noise ratio requirements.
[0006] Based on a pre-built terminology mapping table, a large language model is invoked to generate natural dialogue text containing target terms according to the target term list and matching requirements. The terminology mapping table contains professional terms, their definitions, and contextual information.
[0007] Convert natural dialogue text into speech audio and extract the audio time intervals of the target terms in the speech audio.
[0008] Based on the signal-to-noise ratio requirements, noise superposition processing is performed on the speech audio to generate test audio data.
[0009] The test audio data is input into the speech recognition system under test to obtain the recognition result text. The recognition result text is compared with the natural dialogue text to generate test results and record them.
[0010] According to a second aspect, the present invention provides an automated testing system for speech recognition, comprising: The test requirement parameter receiving module is used to receive test requirement parameters, which include a list of target terms, ratio requirements, and signal-to-noise ratio requirements. The natural dialogue text generation module is used to call a large language model based on a pre-built terminology mapping table to generate natural dialogue text containing target terms according to the target terminology list and matching requirements. The terminology mapping table contains professional terms, their definitions, and contextual information. The audio time interval extraction module is used to convert natural dialogue text into speech audio and extract the audio time interval of the target term in the speech audio. The test audio data generation module is used to perform noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data. The test result recording module is used to input test audio data into the speech recognition system under test to obtain the recognition result text, compare the recognition result text with the natural dialogue text, generate test results and record them.
[0011] According to a third aspect, the present invention provides a computer device comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to perform any of the automated testing methods for speech recognition in the embodiments of the present invention.
[0012] According to another aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute an automated testing method for speech recognition according to any embodiment of the present invention.
[0013] The present invention provides an automated testing method for speech recognition, which is achieved through five core steps: receiving test requirement parameters, generating natural dialogue text in a targeted manner, converting speech audio and extracting audio time intervals, performing noise superposition processing, comparing recognition results and recording. The process involves several steps: receiving test requirement parameters, including a list of target terms, matching requirements, and signal-to-noise ratio (SNR) requirements, providing clear parameter configuration guidelines for automated testing; using a pre-built terminology mapping table, a large language model is invoked to generate natural dialogue text containing target terms based on the target term list and matching requirements. The terminology mapping table stores professional terms, their definitions, and contextual information, enabling automated generation of test dialogue text and targeted coverage of target terms; converting the natural dialogue text into audio and extracting the audio time intervals of target terms from the audio, providing a time alignment benchmark for comparing target term-level recognition results; performing noise superposition processing on the audio based on the SNR requirements to generate test audio data, simulating speech recognition performance under specified noise conditions; inputting the test audio data into the speech recognition system under test to obtain the recognition result text, comparing the recognition result text with the natural dialogue text, generating and recording the test results, thus completing automated testing of the speech recognition system under test and traceable storage of the test results.
[0014] In this technical solution, the present invention addresses the problems of reliance on manually written test texts, difficulty in controlling target terminology coverage, and lack of systematic regression comparison in existing speech recognition testing. It eliminates the reliance on manually written test texts by calling a large language model to generate natural dialogue text. A pre-constructed terminology mapping table provides definitions and contextual information for specialized terms, combined with matching requirements, enabling controllable distribution of target terms in the test dialogue text. By extracting the audio time intervals of target terms and superimposing noise based on signal-to-noise ratio requirements, it achieves target terminology-level detection and flexible configuration for diverse noise scenarios. By comparing the recognized text with the natural dialogue text and recording the test results, a traceable test result data foundation is constructed to support subsequent systematic regression comparison. Therefore, the technical solution of this invention solves the problems of low test text generation efficiency, uncontrollable target terminology coverage, and lack of systematic regression comparison in existing speech recognition testing processes, improving the efficiency, coverage, and traceability of automated speech recognition testing. Attached Figure Description
[0015] Figure 1 This is a flowchart of an automated testing method for speech recognition according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a speech recognition testing system according to an embodiment of the present invention; Figures 3(a) and 3(b) together illustrate a flowchart of a speech recognition testing method in one embodiment of the present invention; Figure 4 (a) Figure 4 (b) Together they illustrate a flowchart of the test material combination screening and generation process according to an embodiment of the present invention; Figures 5(a) and 5(b) together illustrate a flowchart of a terminology standardization and mapping table generation method according to an embodiment of the present invention. Figure 6 is a schematic diagram of the closed-loop feedback system structure for test text generation according to an embodiment of the present invention. Figure 7 This is a schematic diagram of the structure of an automated testing system for speech recognition according to an embodiment of the present invention; Figure 8 This is a block diagram of a computer device for implementing embodiments of the present invention. Detailed Implementation
[0016] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0017] During the development of this invention, researchers conducted numerous experiments and data analysis, discovering that the frequency and positional distribution of technical terms in the test text can be explicitly constrained through a terminology mapping table and matching requirements. Furthermore, an extractable correspondence exists between the time boundaries of the target terms in the audio and the text content. Based on this relationship, this invention innovatively proposes this technical solution. Utilizing the text generation capabilities of a large language model and the structured knowledge representation of a terminology mapping table, it receives test requirement parameters containing a list of target terms, matching requirements, and signal-to-noise ratio (SNR) requirements. Based on the terminology mapping table, it generates natural dialogue text containing the target terms, converts the natural dialogue text into audio, extracts the audio time intervals of the target terms, performs noise superposition processing on the audio according to the SNR requirements, generates test audio data, inputs the test audio data into the speech recognition system under test to obtain the recognition result text, compares the recognition result text with the natural dialogue text, and generates a test result record. This achieves automated target term-level testing of the speech recognition system under test in a controlled noise environment, embodying the core concept of automated testing that combines data-driven and knowledge-guided approaches.
[0018] Specifically, the invention team discovered through experiments that traditional speech recognition testing methods suffer from low efficiency due to reliance on manually written test texts. Manually written test texts struggle to accurately control the coverage and frequency of specialized terms and cannot systematically simulate recognition performance under different noise conditions. The automated testing method proposed in this invention improves the efficiency of test text generation and the directionality of target term coverage. By providing definitions and contextual information for specialized terms through a terminology mapping table, it enables standardized generation of target terms in natural dialogue text. Extracting the audio time intervals of target terms allows for precise comparison of recognition results at the target term level. Superimposing noise based on signal-to-noise ratio requirements allows for flexible configuration and performance evaluation under different noise conditions. This solves the problems of low testing efficiency, uncontrollable target term coverage, and difficulty in systematically regressing and comparing test results caused by reliance on manually written test texts and the lack of term-level time alignment benchmarks in existing speech recognition testing. This improves the efficiency, coverage, and traceability of automated speech recognition testing.
[0019] Therefore, the present invention provides an automated testing method for speech recognition based on the first aspect, which can be applied to an automated speech recognition testing system (hereinafter referred to as the "system"). The system can load and execute a computer program stored in the system memory to run the automated speech recognition testing method of the following embodiments, thereby completing the following steps: receiving test requirement parameters; generating natural dialogue text based on a pre-built terminology mapping table and calling a large language model; converting the natural dialogue text into speech audio and extracting the audio time intervals of the target terms; performing noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data; inputting the test audio data into the speech recognition system under test to obtain the recognition result text; and comparing the recognition result text with the natural dialogue text. This achieves stable execution of the entire automated speech recognition testing process and structured recording of test results. Specifically, the system can be deployed in various computing and execution environments, including but not limited to: centralized servers, distributed computing clusters, edge computing nodes, personal computers, and mobile terminals, either as software algorithm modules or in a combination of hardware and software.
[0020] like Figure 1 As shown, the method may include: Step S110: Receive test requirement parameters.
[0021] Among them, the test requirement parameters are a set of parameters used to configure the automated test conditions for speech recognition, the target term list is a set of professional terms to be tested, the ratio requirement information is information used to indicate the frequency and position distribution of each target term in natural dialogue text, and the signal-to-noise ratio requirement information is information used to indicate the signal-to-noise ratio setting value in noise superposition processing.
[0022] Specifically, the system receives test requirement parameters through the input interface and stores the target term list, ratio requirement information and signal-to-noise ratio requirement information into the corresponding fields in memory for subsequent steps to call.
[0023] For example, the target term list in the test requirement parameters is “speech recognition”, “natural language processing” and “signal-to-noise ratio”. The matching requirement information indicates that “speech recognition” appears twice in the natural dialogue text, and the signal-to-noise ratio requirement information indicates that the signal-to-noise ratio is set to 20 dB.
[0024] Step S120: Based on the pre-built term mapping table, call the large language model to generate natural dialogue text containing the target terms according to the target term list and matching requirements.
[0025] The terminology mapping table is a pre-constructed structured dataset containing definitions and contextual information of technical terms. It also includes standardized grouping identifiers; different terminology variants of the same concept are merged into the same standardized group through conflict resolution, and the standardized form within that group serves as the sole criterion for subsequent generation and statistics. Furthermore, the terminology mapping table uses mutually exclusive interval constraints to ensure that the same character interval belongs to only one standardized term identifier, avoiding duplicate matching statistics and positional labeling conflicts caused by nested or variant terms. The large language model is a deep learning model with natural language generation capabilities; the natural dialogue text is text data simulating real-world dialogue scenarios and containing the target terms.
[0026] Specifically, the system reads the definition and context information corresponding to the target term from the term mapping table, maps each target term in the target term list to the corresponding normalized group in the term mapping table, and uses the normalized form under the group as the term expression for generation; then, it combines the target term list after normalization, the matching requirement information, and the definition and context information into the generation conditions, and calls the large language model to generate natural dialogue text that meets the matching requirements and contains the target term.
[0027] Step S130: Convert the natural dialogue text into speech audio and extract the audio time interval of the target term in the speech audio.
[0028] Among them, speech audio is audio data obtained by converting natural dialogue text through speech synthesis technology; audio time interval is the range between the start time and the end time of the target term in the speech audio.
[0029] Specifically, the system calls the speech synthesis engine to convert natural dialogue text into audio and obtains the timestamp information corresponding to each word in the text. Based on the position of the target term in the natural dialogue text, the start and end times corresponding to the target term are determined, thereby extracting the audio time interval.
[0030] Step S140: Perform noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data.
[0031] Among them, noise superposition processing is a signal processing operation that mixes noise signals with speech audio according to the signal-to-noise ratio requirements; test audio data is the audio data generated after noise superposition processing is completed.
[0032] Specifically, the system determines the gain coefficient of the noise signal based on the signal-to-noise ratio setting value in the signal-to-noise ratio requirement information, and superimposes the noise signal with the speech audio according to the gain coefficient to generate test audio data.
[0033] For example, assuming the root mean square amplitude ratio of the speech audio data and the noise audio data is 1, the signal-to-noise ratio is set to 20dB, the system determines the noise gain coefficient to be 0.1, and superimposes the corresponding noise signal with the speech audio to generate test audio data containing noise.
[0034] Step S150: Input the test audio data into the speech recognition system under test to obtain the recognition result text, compare the recognition result text with the natural dialogue text, generate test results and record them.
[0035] Among them, the speech recognition system under test is a system used to perform speech recognition on input audio and output text; the recognition result text is the text output by the speech recognition system under test after recognizing the test audio data; the test result is data used to characterize the recognition performance of the speech recognition system under test.
[0036] Specifically, the system sends test audio data to the speech recognition system under test, obtains the recognition result text output by the speech recognition system under test, performs text consistency comparison between the recognition result text and the natural dialogue text, generates test results based on the comparison results, and stores the test results in the memory.
[0037] In another embodiment, such as Figure 2 This is a schematic diagram of the speech recognition testing system. For example... Figure 2 As shown, the system comprises an input layer, a core processing layer, an output layer, and external dependencies and devices. The input layer acquires professional domain documents (such as those in medicine, finance, law, and industry) and test configuration parameters (including terminology matching, text-to-speech configuration for the speech synthesis engine, signal-to-noise ratio configuration, etc.). The core processing layer includes a corpus-oriented generation area, a material closed-loop management area, and a speech recognition testing area. The corpus-oriented generation area includes a terminology extraction module 101, a corpus generation module 102, and a corpus synthesis module 103; the material management area includes a material management module 104 (with retrieval and reuse, material generation, and mixing functions), a material layer reuse judgment submodule 1041, and a test audio layer reuse judgment submodule 1042; the speech recognition testing area includes a broadcasting module 105, a capture testing module 106, a result capture module 107, and a recording module 108. The output layer and external dependencies and devices output a test report.
[0038] Specifically, the system uses the terminology extraction module 101 to extract terms, definitions, and contextual information from professional domain documents; the corpus generation module 102 to generate dialogue text containing target terms; the corpus synthesis module 103 to call the speech synthesis engine TTS (Text-to-Speech) to generate audio and obtain text boundary timestamps; the material management module 104 to perform mixing processing to generate test audio data; the playback module 105 to play the test audio data; the capture test module 106 to record playback link parameters; the result capture module 107 to obtain the recognition result text of the speech recognition system under test; and the recording module 108 to perform comparison and generate a test report.
[0039] In another embodiment, Figures 3(a) and 3(b) illustrate a flowchart of a speech recognition testing method. As shown in Figures 3(a) and 3(b), the method includes a first stage (document level) and a second stage (material level).
[0040] Specifically, as shown in Figure 3(a), after the Phase 1 process is initiated, the system determines whether terminology processing is required (triggering conditions include importing new documents, content changes, or insufficient terminology database coverage). If the determination result is Y (yes), the system executes step S1 (terminology extraction): acquiring professional domain documents and using a large language model to extract professional terminology vocabulary, its definitions, and contextual information. Next, step S2 (terminology mapping table and terminology set normalization) is executed: establishing a professional terminology mapping table, storing the correspondence between terminology vocabulary and its definitions and contexts, and performing normalization processing (including conflict resolution and variant merging) to ensure that the same character range belongs to only one terminology ID (terminology identifier). Subsequently, step S3 (test requirement reception) is executed: receiving test requirement parameters, including the target terminology list, matching requirements, text-to-speech engine (TTS) configuration, signal-to-noise ratio requirements, and playback configuration.
[0041] As shown in Figure 3(b), after the start of Phase Two, the system performs a Level 1 judgment: determining whether the material layer is matched (the judgment conditions are terminology coverage greater than or equal to 95%, meeting the matching requirements, and TTS already configured). If the Level 1 judgment is matched, the system reuses existing clean materials and skips steps S4 to S5; if it is not matched, the system performs step S4 (corpus-oriented generation): using a large language model to generate natural dialogue text from professional terms according to a preset matching ratio. Then, step S5 (speech synthesis and time boundary annotation) is performed: calling the text-to-speech engine, synthesizing the dialogue text into dialogue audio based on timbre and speech rate configuration, and obtaining character or word-level time boundary annotations. Subsequently, step S6 (establishing a material mapping table and storing it in the database) is performed: establishing a material mapping table, storing the dialogue text, synthesized audio, and the position annotations of the professional terms (character position plus audio time interval), and including them in the material database management.
[0042] Next, the system performs a secondary judgment: determining whether the test audio layer matches (judgment conditions are matching material identifier, noise scene, and signal-to-noise ratio). If the secondary judgment matches, the system reuses the noisy test audio, skipping steps S7 to S8; if it does not match, the system executes step S7 (noise mixing): setting the signal-to-noise ratio according to test requirements, mixing standard scene noise with synthesized speech audio to generate test audio carrying scene noise (supporting targeted noise addition to speech segments). Then, step S8 (test audio saving): saving the mixed test audio and its corresponding original text, noise type, signal-to-noise ratio, and other metadata to the test audio mapping table for reuse in regression testing. Subsequently, step S9 (playback test): playing the test audio to the speech recognition environment under test through a playback device and recording the playback link parameters. Step S10 (result capture): capturing the recognition result text output by the speech recognition system under test. Finally, step S11 (result comparison and recording) is executed: after removing the speaker prefix, the original text is compared with the recognition result text, the character error rate (CER) and the term error rate (TER) / confusion matrix are calculated, the results are recorded, and the test audio identifier test_audio_id and the material identifier material_id are associated with historical data. The process ends or proceeds to the next test requirement.
[0043] Before comparing the results, the system first aligns the original text with the recognized text, then removes the speaker prefix, and subsequently statistically analyzes term-level indicators by normalized grouping. The speaker prefix is the role identifier at the beginning of each turn of speech in the dialogue text, in the format "role identifier:", and the role identifier corresponds one-to-one with the timbre identifier in the speech synthesis configuration field of the material mapping table. In the case of the same term being spoken by different roles in a two-role dialogue, instances of the same term under different roles are all included in the total number of instances of that term; if the test requirements require distinguishing between roles, the number of instances of the same term is counted separately according to the role dimension. When the ASR (Automatic Speech Recognition) output does not contain a role prefix, the system first aligns the recognized text with the original text based on the minimum edit distance, segments the recognized result according to the turn boundaries of the original text and maps it to the corresponding role turn, and then determines the term to which the corresponding segment in the recognized result belongs based on the term character range in the original text within that turn. The denominator of TER is the total number of target terms after normalization and grouping, which is the sum of the number of times each target term appears after normalization and grouping of the term mapping table established in step S2; the numerator is the total number of error characters in the term interval, including the count of term deletion error characters, term replacement error characters and term insertion error characters. Only term instances within the normalization group are counted. Aliases and variants of terms are first mapped to the corresponding normalization group before being included in the statistics; the confusion matrix is also constructed with the normalization group as rows and the columns as the recognition status of the corresponding terms in the ASR output. For example, if the original text is "A: ECG results are normal. B: Ultrasound shows no abnormalities," and the target terms are "ECG" and "ultrasound," and the ASR output is "ECG results are normal, ultrasound shows no abnormalities" without a role prefix, the system first aligns the original text with the recognition result. It then segments the recognition result into two parts, "ECG results are normal" and "ultrasound shows no abnormalities," according to the original text round boundaries. These parts are mapped to role A round and role B round, respectively. Next, based on the character range of the original text, the system identifies the two term instances, "ECG" and "ultrasound," and includes them in the corresponding normalized groups. Finally, it calculates CER, TER, and the confusion matrix.
[0044] In another embodiment, step S3 (test requirement reception and two-level material reuse determination) is performed, specifically using a two-level determination mechanism of "material layer + test audio layer".
[0045] The system first receives the user's test requirements. The test requirements parameters include, but are not limited to: target term list (automatically mapped to normalized groupings of the term mapping table), matching requirements (the minimum number of times each term needs to appear in the dialogue and the distribution of its occurrence positions), number of dialogue turns, TTS configuration (timbre, speech rate, volume, etc.), noisy scenarios (such as in-vehicle, shopping mall, office, etc.), and SNR (Signal-to-Noise Ratio) requirements (signal-to-noise ratio setting value).
[0046] Next, the first-level judgment is performed. The search object of the first-level judgment is clean audio material with terminology set information recorded in the material mapping table. The search conditions include: the target terminology coverage in the material mapping table is greater than or equal to 95%; the frequency of each term in the material meets the matching ratio requirement; the TTS parameters are consistent, the exact configuration requires complete consistency, and the fuzzy configuration allows a speech rate deviation of less than or equal to 5%; the number of dialogue turns is greater than or equal to the required number of turns. If a single clip meets the above search criteria, it is considered a "clip hit," meaning the clip directly satisfies all search criteria. If a single clip cannot satisfy all criteria simultaneously, a combined hit search is performed. A combined hit means that multiple clips are combined to satisfy the search criteria: the term sets of multiple clips are combined. If the combination of several clips can simultaneously satisfy the target term full coverage (coverage rate greater than or equal to 95%) and the frequency of each term after redundancy trimming meets the matching requirements (judgment criteria are coverage rate greater than or equal to 95% and matching deviation less than or equal to the matching deviation threshold), and there is no matching ratio conflict of the same term among the clips, it is considered a "combined hit." The combined clips are played in sequence according to the set order and are still counted as one clip reuse.
[0047] Among them, the proportioning deviation The ratio deviation threshold θ_ratio is defined as the sum of the absolute values of the differences between the actual number of occurrences of each term and the target number of occurrences, divided by the sum of the target number of occurrences. An example value for θ_ratio can be set to 0.15, indicating that the overall ratio deviation is allowed to be no more than 15%. The specific algorithm for redundancy pruning is as follows: when multiple materials contain the same term, causing the number of occurrences of that term to exceed the target number after merging, redundant instances are pruned according to the principle of positional distribution priority. That is, instances with the smallest deviation from the target positional distribution are retained first. The positional distribution deviation is calculated as the sum of the absolute differences in the proportions of each positional category (sentence beginning, sentence middle, sentence end). If the positional distribution deviations are the same, instances that appear earlier in the material are retained until the number of occurrences of the term equals the target number. The material fragments to which the remaining instances belong after pruning are considered valid content of the combined material.
[0048] If the first-level judgment is successful (single hit or combined hit), update the reuse_count field of the corresponding record in the material mapping table and proceed to the second-level judgment; if the first-level judgment is unsuccessful, first execute steps S4 to S6 to generate and add new materials to the database, and then proceed to the second-level judgment.
[0049] The second-level judgment is then executed. The search object for the second-level judgment is the noisy test audio in the test audio mapping table. The search key is "material identifier (or combination key composed of combination identifiers when a combination hits) + noise scene + SNR + (optional) playback configuration". If the material required for the test has been determined, the second-level judgment will regard the combination of "same material + same noise scene + same SNR" as a reusable object that has already generated noisy test audio; if there is a record in the test audio mapping table that meets the search key, it is judged as "test audio hit", and directly jumps to step S9 to perform the playback test, avoiding repeated mixing and repeated entry into the database (skipping steps S7 to S8); if no match is found, step S7 is entered to perform noise mixing.
[0050] Both levels of judgment support two modes: exact matching and fuzzy matching. Exact matching requires that all search keys be completely identical (term coverage threshold of 95% and SNR completely identical). Fuzzy matching allows matching within a preset tolerance range, such as lowering the term coverage threshold to 90%, speech rate deviation of 5%, and SNR deviation of ±1dB, in order to maximize the reuse rate when completely identical materials do not exist.
[0051] For example, the system receives a test requirement: the target term list is "electrocardiogram" and "ultrasound," with each term appearing twice; the dialogue rounds are three; the TTS configuration is the default tone (normal speech rate); the noise scenario is an office; and the SNR is 20dB. In the first-level judgment, submodule 1041 searches the material mapping table and finds that a single material A contains "electrocardiogram" twice but not "ultrasound," so it is judged as a miss. Then, a combined search is performed; the union of material A and material B satisfies a 95% coverage rate, and the ratio is satisfied after redundancy trimming, so it is judged as a "combination hit." The system updates reuse_count and enters the second-level judgment. Submodule 1042 searches the test audio mapping table with the search key "combination key A+B+office+20dB," but no record is found, so it is judged as a "test audio miss," and the system proceeds to step S7 to perform noise mixing. In another test, if the search key matches successfully, it directly jumps to step S9 to play the test.
[0052] Therefore, according to the above implementation method, the system can achieve efficient reuse of test materials and audio through a two-level judgment mechanism of material layer and test audio layer, combined with precise and fuzzy matching modes.
[0053] In another embodiment, such as Figure 4This demonstrates the generation and evaluation process of test materials for a speech recognition model. The process is triggered by corpus-oriented generation, which calls TTS (Text-to-Speech) to perform speech synthesis, and annotates terms and syllable time boundaries in the generated audio. The synthesized audio file is then stored in a database along with its corresponding material mapping table. The retrieval phase begins with a primary retrieval based on the material layer, matching keywords with a terminology coverage of ≥95%, TTS configuration, and domain information to determine if the material is clean. If a match is found, the material reuse count is updated, and a secondary retrieval begins, matching the test audio layer based on material identifiers and SNR (Single-Rate Notation). If the secondary retrieval determines that a noisy test audio match has been found, it is directly reused for playback; otherwise, directional noise is added according to the set SNR and saved to the test audio mapping table. Playback testing is then performed, capturing the recognition results and comparing them with the previous group, calculating specific indicators such as CER (Critical Erroneous Response) and TER (Term Indicator), recording the results, and associating them with material identifiers and playback configurations. After a system version update, historical test audio is retrieved for regression testing, ultimately generating a comparison report and trend analysis curves to pinpoint areas for recognition degradation or improvement. The above-mentioned test material management and evaluation steps, through digital retrieval, reuse, and index calculation, achieve efficient automated testing and version regression monitoring of the ASR system performance.
[0054] In another embodiment, Figures 5(a) and 5(b) illustrate a flowchart of a test material combination screening and generation process. As shown in Figures 5(a) and 5(b), the method includes test requirement parsing, inverted index retrieval, four-level pruning, greedy approximation, local search refinement, and multi-objective scoring and ranking.
[0055] Specifically, as shown in Figure 5(a), the system performs test requirement analysis, parsing the target term set, term matching, and TTS constraints of the text-to-speech engine. The system enters Phase 1 (inverted index retrieval and coverage bitmap generation), obtaining the inverted posting list based on the term identifier Term_id, generating a candidate coverage bitmap, and constructing a candidate set. The computational complexity of the candidate set is expressed as... Next, we proceed to Phase 2 (Four-level pruning / candidate set shrinking): Perform P1 hard constraint pruning, deleting materials with a speech rate deviation greater than 5%, sampling rate bit depth, or domain mismatch; perform P2 dominance relation pruning, deleting material A if its coverage cov(A) is included in the coverage cov(B) of material B and the cost is not inferior; perform P3 feasibility upper bound pruning, determining the combination as infeasible if the upper bound of coverage is less than the product of the threshold θ_cov and the total number of target elements to be covered, m; perform P4 necessity pruning, forcing terms covered only by a single material to be included in its carrying material. After four levels of pruning, the candidate set is reduced from the order of 10³ to 10¹.
[0056] As shown in Figure 5(b), the system performs a feasibility assessment to determine whether the upper bound of coverage is sufficient (millisecond-level assessment). If the assessment is negative (insufficient upper bound), the process proceeds to the generation phase. If the assessment is positive, the process enters phase 3 (weighted set coverage greedy approximation), where materials are selected based on marginal returns, and incremental scoring is performed. The calculation formula is It performs a covered union (bitmap OR operation) through bitwise operations, processing 64 terms at a time, with an approximation ratio of approximately H(m) of approximately The complexity is expressed as Next, we proceed to stage 4 (local search refinement), executing the replace operator (replacing materials in the solution set with materials from outside the candidate set) and the swap-trim operator (reusing materials after trimming them by round). Early stopping is triggered when there is no improvement after 50 consecutive iterations or a time budget of 200ms. Following this, we proceed to stage 5 (multi-objective scoring and ranking), where the score (S) is calculated using the following formula: The suggested weights are α = 0.35, β = 0.30, γ = 0.15, δ = 0.05, and ε = 0.15.
[0057] The system performs a hit determination. If the coverage Cov is greater than or equal to 95% and the ratio deviation RatioDev is less than or equal to 0.15, it is considered a hit. If it misses, it proceeds to the generation process. If it hits, it performs splicing planning: sequential planning uses positional distribution deviation minimization (full permutation enumeration plus pruning or density staggering); the text layer performs role remapping and seam connection sentence injection (belonging to redundancy pruning); the audio layer sets inter-round silence of 250 to 400ms, crossfade of 10 to 20ms, and loudness normalized to -23LUFS (loudness unit full scale). Finally, it outputs combined material (multiple materials are combined into one usable test material), updates the reuse count (reuse_count), and records the splicing link and ratio achievement status.
[0058] In another embodiment, Figures 6(a) and 6(b) illustrate a flowchart of a terminology standardization and mapping table generation method. As shown in Figures 6(a) and 6(b), the method includes four-level hierarchical processing, a fallback manual review queue, and mutually exclusive interval constraint processing.
[0059] Specifically, as shown in Figure 6(a), the system obtains a set of candidate terms (including nested terms and variants) and the term definition text in each document. System execution level 1: Rule layer processing (deterministic, zero cost), performs longest match validity, inclusion relationship detection, and morphological normalization (including full-width / half-width, uppercase / lowercase, punctuation, and function word processing), and outputs morphologically normalized candidate and nested term candidate pairs. System execution level 2: Dictionary layer processing (deterministic, low cost), utilizes a table of full abbreviations (such as ABPM dynamic blood pressure monitoring) and a thesaurus (mapping external standard term set) to output deterministic variant merging relationships. System execution level 3: Vector layer processing (statistical, medium cost), uses the Embed model (term definition) to vectorize the term definition, and calculates the similarity sim equal to the cosine similarity. The system performs hierarchical clustering using similarity as input, and directly merges the high-confidence results with the medium-confidence results, submitting them to Level 4 for further processing. The similarity threshold is set as follows: if sim is greater than or equal to 0.92, it is directly classified as the same concept; if sim is less than 0.80 and sim is less than 0.92, it is submitted to Level 4 arbitration; if sim is less than or equal to 0.80, it is classified as different concepts. Level 4 of the system executes: a large language model arbitration layer (semantic, high-cost), which outputs a structured judgment on candidate pairs (including whether they agree on the concept, canonical form, relation type, and confidence level). The arbitration acceptance threshold is: if the confidence level is greater than or equal to 0.85, the decision is accepted; if the confidence level is less than 0.85, it is submitted for manual review.
[0060] As shown in Figure 6(b), the system sets up a backup manual review queue, triggered by insufficient confidence or cross-document definition conflicts. It outputs a list of terms to be reviewed for standardization (including evidence and suggestions), and the decision results are written back to the Level 2 dictionary (incremental learning loop). The system outputs a term mapping table containing fields: term identifier (term_id), norm group (norm_group), variant (variant), start position (start), end position (end), document identifier (doc_id), and decision chain. The system performs mutual exclusion interval constraint processing to ensure that the same character interval belongs to only one term identifier. It uses the scanline algorithm (Aho-Corasick multi-pattern matching) to perform sorting (ascending order by start position, descending order by length), detects and resolves interval conflicts (priority is longest match first, standard form first, specificity first, document order first). The mutual exclusion assertion is represented as any two intervals intersecting in an empty set, and the complexity is expressed as O(n log n). The system performs cross-document definition conflict arbitration. Definitions with a similarity SimDef(i,j) less than 0.75 are considered conflicting. The system automatically optimizes the ranking based on document authority, timeliness, consensus, domain matching, and user-specified criteria. Terms that cannot converge or are considered high-risk trigger manual review, and the adjudicator, time, and reasons are recorded.
[0061] In another embodiment, such as Figure 7The diagram shows a closed-loop feedback system structure for test text generation.
[0062] Specifically, the system receives test requirements and inputs them into the G generator (large language model), which generates initial test text. The initial test text is then input into the P parser (structured parser), which performs structured parsing to extract terminology and proportion information. The parsed data is input into the V validator (six indicators), which performs validation based on the six indicators. The validation results are input into the A gap analyzer (gap location analyzer), which analyzes the validation results and locates the indicator gaps that do not meet the standards. The gap analysis results are input into the R prompt word corrector (three types of correction strategies), which generates corrected prompt words based on the three types of correction strategies. If the validation results do not meet the standards, the system returns the corrected prompt words to the G generator to regenerate the test text.
[0063] Therefore, according to the above implementation method, the system achieves its function through five core steps: receiving test requirement parameters, generating natural dialogue text in a targeted manner, converting speech audio and extracting audio time intervals, performing noise superposition processing, comparing recognition results and recording them. The process involves several steps: receiving test requirement parameters, including a list of target terms, matching requirements, and signal-to-noise ratio (SNR) requirements, providing clear parameter configuration guidelines for automated testing; using a pre-built terminology mapping table, a large language model is invoked to generate natural dialogue text containing target terms based on the target term list and matching requirements. The terminology mapping table stores professional terms, their definitions, and contextual information, enabling automated generation of test dialogue text and targeted coverage of target terms; converting the natural dialogue text into audio and extracting the audio time intervals of target terms from the audio, providing a time alignment benchmark for comparing target term-level recognition results; performing noise superposition processing on the audio based on the SNR requirements to generate test audio data, simulating speech recognition performance under specified noise conditions; inputting the test audio data into the speech recognition system under test to obtain the recognition result text, comparing the recognition result text with the natural dialogue text, generating and recording the test results, thus completing automated testing of the speech recognition system under test and traceable storage of the test results.
[0064] Specifically, in this embodiment, the technical solution addresses the problems of reliance on manually written test texts, difficulty in controlling target term coverage, and difficulty in systematically regressing and comparing test results in existing speech recognition testing. It eliminates the reliance on manually written test texts by calling a large language model to generate natural dialogue text. A pre-built terminology mapping table provides definitions and contextual information for specialized terms, combined with matching requirements, enabling controllable distribution of target terms in the test dialogue text. By extracting the audio time intervals of target terms and superimposing noise based on signal-to-noise ratio requirements, it achieves target term-level detection and flexible configuration for diverse noise scenarios. By comparing the recognized text with the natural dialogue text and recording the test results, a traceable test result data foundation is constructed to support subsequent systematic regression and comparison. Therefore, this embodiment solves the problems of low test text generation efficiency, uncontrollable target term coverage, and difficulty in systematically regressing and comparing test results in existing speech recognition testing processes, improving the efficiency, coverage, and traceability of automated speech recognition testing.
[0065] In another embodiment, Table 1 shows a schematic diagram of the data structure of a material mapping table.
[0066] Table 1 contains multiple fields used to store metadata of materials used in the automated speech recognition testing process. Field names include: unique material identifier (material_id, string type), original dialogue text (dialog_text, text type), synthesized speech audio file path (audio_file_path, string type), audio duration (audio_duration, floating-point number in seconds), TTS configuration parameters (tts_config, JSON type, including timbre, speech rate, volume, and role-to-timbre mapping), and terminology list (term_list, JSON array, including term identifier, frequency of occurrence, position markers (start and end of character range), and the audio time range after speech synthesis). The data includes start / end time, creation time (create_time, a timestamp field), source document identifier (source_doc_id, a string field), number of dialog rounds (dialog_rounds, an integer field), domain (domain, a string field), reuse count (reuse_count, an integer field, initially 0, accumulated from multiple materials that are combined), generation quality flag (quality_flag, a string field, including normal / partially compliant, partial compliance indicates fallback generation or not fully compliant), and ratio flag (ratio_flag, a boolean field) for ratios that only meet tolerance when combined.
[0067] For example, after the system generates natural dialogue text, performs speech synthesis, and adds time boundary annotations, it writes the generated data into the corresponding material mapping table record in Table 1. The system assigns a unique identifier to each generated material, stores the natural dialogue text containing "ECG" and "ultrasound" in the original dialogue text field, the synthesized speech audio file path in the audio file path field, and the total audio duration in the audio duration field. The system stores the mapping relationship between the different timbre identifiers corresponding to role A and role B in the TTS configuration parameter field. The system stores the terminology identifiers, frequency of occurrence, character range start and end times, and audio time range start and end times corresponding to "ECG" and "ultrasound" in the terminology list field. The system records the number of dialogue turns, the domain, initializes the reuse count to 0, and sets the generation quality flag to normal.
[0068] Therefore, according to the above implementation method, the system can store the metadata, configuration parameters and terminology time boundary information of the test materials in a structured manner through the material mapping table, providing data support for the subsequent retrieval, combination and reuse of test materials and terminology-level identification and evaluation.
[0069] In another embodiment, Table 2 shows a schematic diagram of a mapping table data structure for test audio data.
[0070] Table 2 contains multiple fields used to store metadata for the test audio after noise overlay processing in automated speech recognition testing. Field names include: unique test audio identifier (test_audio_id, string type), associated original material identifier (material_id, string type, used as a foreign key to associate with the material mapping table, and as a combinatorial key in combined hit scenarios), noisy test audio file path (noisy_audio_path, string type), noise type (noise_type, string type, e.g., vehicle, office, shopping mall), signal-to-noise ratio (SNR, floating-point number in decibels), original clean audio path (clean_audio_path, string type, used for comparison), and original dialogue text (dialog_tex). The data includes: t (text field, redundant storage for fast retrieval), creation time (create_time, timestamp field), domain (string field), total duration of test audio (total_duration, floating-point number in seconds), global signal-to-noise ratio (snr_global_design, floating-point number in decibels), global signal-to-noise ratio measured after mixing (snr_global_measured, floating-point number in decibels), and local signal-to-noise ratio measured for term segments (snr_term_measured, floating-point number in decibels, recorded during directional noise addition).
[0071] For example, after the system performs the directional noise addition step, it writes the generated test audio data into the corresponding test audio mapping table record in Table 2. The system assigns a unique test audio identifier to the generated test audio and stores the associated original material identifier in the associated original material identifier field. The system stores the path of the noisy test audio file in the noisy test audio path field, sets the noise type to vehicle, and stores the signal-to-noise ratio (SNR) setting in the SNR field. The system stores the path of the original clean speech file in the original clean speech path field and stores the original dialogue text containing "electrocardiogram" and "ultrasound" in the original dialogue text field. The system records the creation time and domain, stores the total duration of the test audio in the total duration of the test audio field, stores the designed global SNR and the measured global SNR after mixing in the corresponding fields, and stores the measured local SNR of the terminology segment in the corresponding field.
[0072] Therefore, according to the above implementation method, the system can structurally store the metadata, signal-to-noise ratio parameters and related information of noisy test audio through a test audio mapping table, providing data support for subsequent term-level robustness evaluation of the speech recognition system under test.
[0073] In another embodiment, Table 3 shows a schematic diagram of a mapping table data structure for identification result data.
[0074] Table 3 contains multiple fields used to store evaluation data of the recognition results output by the system under test in automated speech recognition testing. Field names include: unique identifier for result (result_id, string type), test audio identifier (test_audio_id, string type), test time (test_time, timestamp type), system version (system_version, string type), word error rate (cer, floating-point number, percentage), word error rate (wer, floating-point number, percentage, optional), sentence error rate (ser, floating-point number, percentage, optional), term hit rate (thr, floating-point number, percentage, optional), term error rate (ter, floating-point number, percentage, optional), and the original output of the system under test. The system includes the following parameters: raw_result (text field), test environment parameters (environment field, JSON field, including temperature, humidity, background noise level, etc., optional), playback link parameters (playback_config field, JSON field, including playback device model, output gain, sampling rate, channels, pickup distance, etc., used to ensure that playback conditions can be reproduced during regression comparison), material identifier (material_id field, string field, used as a foreign key to associate with the material mapping table), result status (result_status field, enumeration field, including success, timeout, error, etc.), and term alignment quality annotation (align_quality field, string field, including strict / coarse).
[0075] For example, the system writes the recognition evaluation data of the system under test for noisy test audio into the corresponding recognition result mapping table record in Table 3. The system assigns a unique identifier to the generated evaluation result and stores the corresponding test audio identifier and material identifier in the corresponding fields. The system records the test time and the version of the system under test, and stores the original recognition results containing "ECG" and "ultrasound" in the original recognition result field. The system calculates and stores the word error rate, term hit rate, and term error rate. The system stores the temperature and background noise level during the test in the test environment parameter field, the playback device model and pickup distance in the playback link parameter field, marks the result status as successful, and sets the term alignment quality label to strict.
[0076] Therefore, according to the above implementation method, the system can structurally store identification evaluation data, environmental parameters and alignment quality information through an identification result mapping table, providing data support for subsequent term-level robustness analysis and regression test comparison.
[0077] In some embodiments, the construction step of the term mapping table includes: The large language model is invoked to extract specialized terms from the currently acquired professional domain documents, along with the definition and contextual information of each term.
[0078] Among them, the currently acquired professional domain documents refer to the text materials related to the target technical field obtained from external data sources when the system performs the terminology mapping table construction step; definition information refers to the text content that explains the meaning of professional terms; contextual information refers to the description of the context of professional terms in actual application scenarios, which is used to help determine the usage of professional terms.
[0079] Specifically, after acquiring documents in a specific professional domain, the system inputs these documents into a large language model. The large language model then performs a term extraction task on the documents, identifying professional terms and simultaneously extracting the definition and contextual information for each term. Based on pre-trained natural language understanding capabilities and combined with the contextual semantics of the document, the large language model locates sentences containing professional terms. The portion of the sentence explaining the meaning of the professional term is used as definition information, while the portion describing the scenario, scope of use, or related background of the professional term is used as contextual information.
[0080] For example, the professional document obtained is the "White Paper on Speech Recognition Technology," which contains the technical term "speech recognition" and an explanatory statement: "Speech recognition refers to the technology that enables machines to convert human speech signals into text, and it is widely used in scenarios such as intelligent customer service and smart homes." After the system calls the large language model, it extracts the definition information of "speech recognition" from this statement as "the technology that enables machines to convert human speech signals into text," and the contextual information as "applied to scenarios such as intelligent customer service and smart homes."
[0081] Professional terms, definitions, and contextual information are stored in a terminology mapping table.
[0082] The terminology mapping table is a pre-built structured data set used to store professional terms and their definitions and contextual information. Each data record in the terminology mapping table includes three fields: professional term, definition information, and contextual information. Correspondence storage refers to establishing the relationship between professional terms, definition information, and contextual information and writing it into the terminology mapping table so that the system can retrieve the corresponding definition information and contextual information through professional terms.
[0083] Specifically, the system uses the extracted technical terms as index keys and the definition and context information as the corresponding attribute values, writing them into a terminology mapping table in key-value pairs. In each key-value pair, the technical term uniquely identifies a term record, while the definition and context information are stored in their respective data fields, completing structured storage.
[0084] For example, the system associates the technical term "speech recognition" with the definition information "the technology that enables machines to convert human speech signals into text" and the contextual information "applied to scenarios such as intelligent customer service and smart homes," and writes it into the term mapping table with "speech recognition" as the index key to form a complete term record.
[0085] Perform normalization processing on the set of specialized terms in the terminology mapping table.
[0086] The standardization process refers to the process of unifying the set of professional terms in the terminology mapping table. This process includes conflict resolution and variant merging. Conflict resolution means eliminating the inclusion relationship or semantic contradiction between different professional terms, so that the terminology expressions in the terminology mapping table are independent and unambiguous. Variant merging means merging professional terms with different expressions but pointing to the same concept into the same standardized group identifier, so that different terminology expressions of the same concept correspond to the same group identifier in the terminology mapping table.
[0087] Specifically, the system traverses the set of professional terms in the terminology mapping table, performs semantic similarity calculation on each professional term, determines professional terms with semantic similarity exceeding a preset threshold as variant expressions of the same concept, and merges these variant expressions into the same standardized group identifier; at the same time, the system performs hierarchical sorting of professional terms with inclusion relationships, eliminates conflicts between hierarchical concepts, and ensures that each standardized group identifier corresponds to a unique concept scope.
[0088] For example, if there are three expressions in the terminology set: “speech recognition”, “speech identification”, and “speech recognition technology”, the system will determine that the three expressions refer to the same concept after calculating semantic similarity. It will merge “speech identification” and “speech recognition technology” into the standardized group identifier corresponding to “speech recognition”, and then only “speech recognition” will be retained as the standard term expression for this group.
[0089] Therefore, according to the above implementation method, the system can complete the construction of the terminology mapping table, providing structured terminology knowledge support for subsequent targeted generation of natural dialogue text by calling the large language model.
[0090] In some embodiments, based on a pre-built term mapping table, a large language model is invoked to generate natural dialogue text containing target terms according to the target term list and matching requirements, including: Based on the standardized grouping identifier, the standardized expression, definition information and contextual information of the target term are extracted from the term mapping table.
[0091] Among them, the normalized grouping identifier is used to merge different terminological expressions of the same concept; the normalized expression refers to the standard terminological expression selected among different terminological expressions of the same concept; each target term in the target term list is associated with a normalized grouping identifier; the extraction operation refers to reading the normalized expression, definition information and contextual information corresponding to the grouping identifier from the term mapping table using the normalized grouping identifier as the retrieval condition.
[0092] Specifically, the system iterates through each target term in the target term list, reads the normalized group identifier corresponding to each target term, and then uses the normalized group identifier as the query condition to retrieve the matching normalized expression, definition information and contextual information from the data records of the term mapping table. The retrieved three pieces of data are used as the basis for generating natural dialogue text.
[0093] For example, the target term list contains the target term "speech recognition", with the normalized group identifier "A001". Based on "A001", the system extracts the normalized expression "speech recognition", the definition information "the technology that enables machines to convert human speech signals into text", and the contextual information "applied to scenarios such as intelligent customer service and smart home" from the term mapping table.
[0094] Based on standardized expressions, definition information, contextual information, and matching requirements, prompt words are constructed.
[0095] Among them, prompt words refer to input instructions used to guide the large language model to generate specific text content; matching requirement information includes the number of times each target term appears in the natural dialogue text and the distribution of the target occurrence position; construction operation refers to combining standardized expression, definition information, contextual information and matching requirement information into a structured text instruction according to preset template rules.
[0096] Specifically, the system fills the content description area of the prompt word template with standardized expressions, definition information, and contextual information, and fills the constraint condition area of the prompt word template with matching requirement information. The content description area of the prompt word template is used to explain to the large language model the professional concepts and usage scenarios involved in the text to be generated. The constraint condition area is used to explain to the large language model the frequency and positional distribution of each target term in the generated text. After combination, a complete prompt word is generated.
[0097] For example, the standardized expression is "speech recognition," the definition information is "the technology that enables machines to convert human speech signals into text," the context information is "intelligent customer service scenario," and the matching requirement information indicates that "speech recognition" appears twice in the natural dialogue text, once in the first sentence and once in the last sentence. The system-constructed prompt is "Please generate a dialogue text in an intelligent customer service scenario. The dialogue content involves speech recognition technology, which refers to the technology that enables machines to convert human speech signals into text; the word 'speech recognition' is required to appear twice in the entire dialogue, once in the first sentence and once in the last sentence."
[0098] The large language model is invoked to generate candidate natural dialogue text based on prompt words.
[0099] Among them, candidate natural dialogue text refers to text data generated by the large language model based on prompt words that has not yet undergone matching verification; natural dialogue text refers to candidate natural dialogue text that has passed verification and meets the matching requirements.
[0100] Specifically, the system inputs the prompt words into the large language model, which generates a natural dialogue text based on the content description region and constraint condition region in the input command. The system then uses this text as a candidate natural dialogue text and records its full content.
[0101] For example, the system inputs prompt words containing intelligent customer service scenarios, speech recognition definitions, and frequency constraints into a large language model. The large language model then generates candidate natural dialogue text: "Hello, welcome to intelligent customer service. Would you like to learn about speech recognition services? Speech recognition technology allows machines to understand human speech. If you require human assistance, please repeat yourself."
[0102] The frequency and positional distribution of each target term in the candidate natural dialogue text are checked to see if they meet the matching requirements. If not, the prompt words are adjusted and the large language model is called again to generate candidate natural dialogue texts until the matching requirements are met. The candidate natural dialogue texts that meet the matching requirements are then used as the natural dialogue texts.
[0103] The verification operation refers to counting the actual number of times each target term appears in the candidate natural dialogue text and the actual location of each occurrence, and comparing the actual data with the target occurrence frequency and target location distribution in the matching requirement information item by item; the adjustment of prompt words refers to adding explanations to the prompt words to explain the differences such as insufficient, positional deviation or redundancy, modifying the original prompt words and calling the large language model again.
[0104] Specifically, the system performs text segmentation on the candidate natural dialogue text, counting the frequency and location of each target term in the text. The system compares the statistical results with the matching requirements. If the actual frequency of each target term matches the target frequency and the actual location distribution matches the target location distribution, the candidate natural dialogue text is determined to meet the matching requirements. If there is an inconsistency, the system modifies the constraint area in the prompt words according to the type of difference, such as adding instructions like "The text just generated is missing the word 'speech recognition'. Please regenerate and ensure that the word 'speech recognition' appears in the first sentence," and calls the large language model again to generate a new candidate natural dialogue text. The above process is repeated until the generated candidate natural dialogue text meets the matching requirements.
[0105] For example, if the matching requirement indicates that "speech recognition" appears twice, in the first and last sentences, and the candidate natural dialogue text generated by the large language model in the first instance only shows "speech recognition" once, in the first sentence, the system determines that the matching requirement is not met. The prompt is then changed to "Please regenerate a dialogue to ensure that 'speech recognition' appears once in the first and last sentences." The large language model is called again to generate a new candidate natural dialogue text. After statistical analysis, the matching requirement is determined to be met, and the system uses this candidate natural dialogue text as the natural dialogue text.
[0106] Therefore, according to the above implementation method, the system can provide standardized knowledge data of target terms through a term mapping table, and use prompt words to guide the large language model to generate natural dialogue text containing target terms and meeting the matching requirements, thereby realizing automated control of the test text content and term distribution.
[0107] In another embodiment, the system utilizes a large language model to generate natural dialogue text from specialized terms in the terminology mapping table according to preset ratios and contextual definitions. Specifically, the system selects specialized terms to be used from the terminology mapping table, extracts main terms by normalized grouping, and avoids duplicate statistics and interval conflicts caused by nesting or variations. The system sets the frequency and positional distribution of each term in the dialogue according to the ratio requirements in the test requirements. Unlike existing technologies that allow the large language model to generate terminology-containing text freely, this step introduces a constraint generation mechanism with ratio parameterization. The ratio parameters include: term density (the ratio of term instances to effective characters), frequency of single term occurrences, distribution of term occurrence positions (the ratio of sentence beginning, middle, and end), context type (definitive context, narrative context, and response context), and term coverage requirements (ensuring a balanced frequency of different terms).
[0108] In this context, the total number of term instances in term density is counted by instance count, not by deduplicated term count; multiple occurrences of the same term are counted multiple times. The effective character count is the total number of characters in the text after removing speaker role prefixes, punctuation marks, and spaces; numbers and symbols are counted according to the normalized text. The formula for calculating term density is: Term Density = Total Number of Term Instances ÷ Effective Character Count, or it can be expressed as: Total Number of Term Instances ÷ Effective Character Count × 100%. Because mutually exclusive interval constraints are applied during term set normalization, each character interval belongs to only one term. Therefore, there is no issue of the same character being counted repeatedly when calculating term density, and nested terms will not be counted simultaneously for both long and short terms. When setting the matching parameters, the target term density and the target occurrence count satisfy the following relationship: Target Term Density = Sum of Target Occurrence Counts of All Terms ÷ Expected Effective Character Count. After generating the text, the actual term density is calculated based on the actual total number of term instances and the actual effective character count to verify whether the generated result falls within the preset density range. The distribution of term occurrence positions is used to constrain the proportion of term instances at the beginning, middle, and end of a sentence. Together with term density and the number of occurrences of a single term, it constitutes a constraint generation mechanism for parameterized matching.
[0109] Subsequently, the system constructs dialogue generation prompts. The prompt template includes role settings and specific constraints: the role is set as a dialogue generation assistant; constraints include: generating at least a specified number of natural dialogues between two speakers; the dialogue must contain all specified terms, and the frequency of each term must meet the required ratio; terminology usage should conform to its definition and context and be naturally integrated; the dialogue should be fluent, coherent, and conform to everyday habits; and the format should meet the expected rotation of the two speakers. The prompts are filled with a list of terms, including term names, frequency ratios, definitions, and contexts.
[0110] The system inputs prompt words into a large language model to generate candidate natural dialogue text, enabling terms to be naturally embedded in the dialogue and semantically fit the defined context.
[0111] Next, the system verifies the generated dialogue text. Verification items include: terminology coverage verification, ensuring all required terms appear; matching verification, statistically analyzing the actual frequency and location distribution of each term, and calculating the actual terminology density based on the number of effective characters and the total number of term instances to ensure matching requirements are met; naturalness verification can use one of the following two methods to assist in judging the naturalness of the dialogue: Method 1, calling a large language model to score the generated text on a naturalness scale of 1 to 5, and linearly mapping the scoring results to [0, 1] to obtain a naturalness score; Method 2, using a small language model trained on Chinese corpus to calculate the perplexity of the generated text, and normalizing the perplexity to [0, 1] to obtain a naturalness score. In implementation, the large language model can be a general-purpose large language model, and the small language model can be an autoregressive language model trained on Chinese corpus; the pass threshold for naturalness score can be set to no less than 0.85, and this threshold can be recalibrated in the target domain with reference to the calibration method for reuse judgment thresholds. If the naturalness check fails, even if the terminology coverage reaches 100%, the system will not accept the currently generated text. Instead, it will record the rounds with insufficient naturalness and regenerate only the rounds that failed the check using a local regeneration strategy, while retaining the rounds that met the check. If the constraints are still not met after reaching the maximum number of iterations, the system will generate a fallback corpus using slot-forced injection. The quality flag of the material will be set to partial, and a report of non-compliance items will be output. This material can be added to the database but will be marked and will not participate in naturalness-related experimental statistics. Format check ensures that the dialogue format conforms to the expected rotation of the two speakers. If the check fails, the system will iteratively adjust the prompts and regenerate the candidate natural dialogue text or correct the generated result.
[0112] Finally, the system outputs dialogue text with term location annotations, marking term identifiers to specific character ranges for use in subsequent steps such as time boundary annotation and specific indicator calculation.
[0113] For example, the system receives a test requirement: the target term list contains "electrocardiogram" and "ultrasound," with each term appearing twice, distributed at the beginning and middle of sentences, and the dialogue rounds being no less than three. The system extracts the standardized expressions, definitions, and contextual information of "electrocardiogram" and "ultrasound" from the term mapping table, constructs prompt words, and inputs them into a large language model to generate candidate dialogue text. The system verifies the candidate dialogue text and finds that "ultrasound" appears only once, and the actual term density does not fall within the preset density range, determining that the matching ratio is not met. The system iteratively adjusts the prompt words and regenerates the text. After the regenerated dialogue text satisfies all verifications, the system outputs the dialogue text labeled with term identifiers and character ranges.
[0114] Therefore, according to the above implementation method, the system can use the parameterized constraint generation mechanism to call the large language model to generate natural dialogue text containing target terms and realize term location annotation, providing a basis for subsequent audio conversion and special indicator calculation.
[0115] In some embodiments, converting natural dialogue text into speech audio and extracting the audio time interval of the target term in the speech audio includes: Based on the standardized expression corresponding to the target term, the natural dialogue text is segmented to obtain the text position range of each target term in the natural dialogue text.
[0116] The text position range refers to the range of characters between the start and end character positions of the target term in the natural dialogue text; the segmentation operation refers to using the normalized expression as the matching condition to perform string matching on the natural dialogue text, locate the position of the normalized expression in the natural dialogue text, and record the start and end character indices.
[0117] Specifically, the system iterates through the list of target terms. For each target term, it reads the corresponding standardized expression, retrieves the position of each occurrence of the standardized expression in the natural dialogue text, and records the starting character index and ending character index of each occurrence position to form a text position range.
[0118] The speech synthesis engine is invoked to perform speech synthesis processing on natural dialogue text, generating audio and text boundary timestamp information.
[0119] Among them, the speech synthesis engine refers to the software module or hardware device that can convert text data into speech audio data; the speech audio refers to the playable audio data output by the speech synthesis engine corresponding to the natural dialogue text; and the text boundary timestamp information refers to the data set output by the speech synthesis engine used to record the start and end times of each character or each word in the natural dialogue text in the speech audio.
[0120] Specifically, the system inputs natural dialogue text into the speech synthesis engine, which processes the text sentence by sentence. While generating speech waveform data, it outputs text alignment information. Each character or word in the text alignment information corresponds to a start timestamp and an end timestamp. The system uses the waveform data as speech audio and the alignment information as text boundary timestamp information, and stores the two together.
[0121] Based on the text location range and text boundary timestamp information, extract the audio time range of each target term from the speech audio.
[0122] The audio time interval refers to the range between the start and end times of the target term in the speech audio.
[0123] Specifically, the system reads the text position range of each target term, finds the start timestamp corresponding to the start character and the end timestamp corresponding to the end character of the text position range from the text boundary timestamp information, and combines the start timestamp and the end timestamp into the audio time range of the target term.
[0124] Therefore, according to the above implementation method, the system can convert natural dialogue text into speech audio and extract the audio time interval of the target term in the speech audio, providing a time alignment benchmark for subsequent target term-level recognition result comparison.
[0125] In another embodiment, the system utilizes a text-to-speech engine to synthesize natural dialogue text into speech audio and obtain word-level time boundaries. Specifically, the system configures parameters for the text-to-speech engine, including: timbre (defined by timbre identifiers to define speaker timbre characteristics), speech rate (e.g., 0.8x, 1.0x, 1.2x), volume (e.g., -10dB, 0dB, +5dB), sampling rate (e.g., 16kHz, 22.05kHz, 44.1kHz), audio format (e.g., WAV waveform audio file format, MP3 Dynamic Image Expert Compression Standard Audio Layer 3, PCM Pulse Code Modulation), and speaker style (e.g., neutral, cheerful, serious). For multi-speaker dialogues, the system assigns different timbre identifiers to different roles and writes the mapping relationship between roles and timbres into the speech synthesis configuration field of the material mapping table to avoid auditory distortion and damage to the naturalness of the dialogue caused by two speakers with the same timbre.
[0126] The system then divides the natural dialogue text into several synthesis units by sentence or paragraph, with each synthesis unit corresponding to one text-to-speech engine synthesis call. The system sequentially inputs each synthesis unit into the text-to-speech engine for speech synthesis, generating the corresponding audio segment.
[0127] Next, the system splices the audio segments sequentially to generate a complete dialogue audio file. During splicing, a preset silence interval (such as 200ms) is inserted between two synthesis units; in combined reuse scenarios, a natural pause of 250ms to 400ms is used between material rounds to make the dialogue rhythm more natural.
[0128] Subsequently, the system performs time boundary acquisition and annotation. The system acquires the start and end times of each character in the synthesized audio, mapping the terminology character ranges output from the corpus-oriented generation step to audio time ranges. Acquisition methods include: Method 1, the text-to-speech engine natively returns character-level or word-level timestamps (such as the engine's word boundary events, word boundary timestamp interfaces, and speech synthesis markup language markers); Method 2, when the engine does not provide timestamps, forced alignment (i.e., using an acoustic model and pronunciation dictionary to forcibly align known text with synthesized speech) is used to obtain character-level time boundaries. When implementing forced alignment, open-source forced alignment tools or alignment models self-trained based on synthesized speech data can be used. The pronunciation dictionary is derived from a dictionary built based on the target domain corpus. Each entry in the dictionary contains Chinese words and their corresponding phoneme sequences. For out-of-vocabulary words not covered by the pronunciation dictionary, the system automatically generates pronunciations using the front-end text regularization module of the text-to-speech engine or based on a character-phonetic conversion table, and simultaneously writes them into a temporary pronunciation dictionary corresponding to this synthesis task to support alignment calculations. For Chinese polyphonic characters, the system performs disambiguation based on contextual semantics, part of speech, and collocation relationships, and creates separate entries for the same polyphonic character in different word contexts in the pronunciation dictionary. For role aliases, the aliases are first mapped to standardized terms, and then pronunciation dictionary entries are generated according to the standardized terms to avoid pronunciation conflicts caused by the same term due to aliases. The minimum time granularity of the forced alignment output is phoneme or character. When a term is a multi-character word or phrase, it is mapped according to the following character-word time aggregation rules: if the alignment granularity is character, the start time of the term's audio time interval is taken as the alignment start time of the first character of the term, and the end time is taken as the alignment end time of the last character of the term; if the alignment granularity is phoneme, the phoneme time boundaries are first aggregated into character-level time boundaries according to the character segmentation boundaries, and then aggregated according to the above rules. For terms with nesting or variations, the union of the character intervals marked in the term position in the corpus-oriented generation step is taken for aggregation; after aggregation, the system checks whether the duration of the aggregated interval matches the duration of the term's target pronunciation. If the deviation exceeds a preset threshold, realignment is triggered. The system backfills the start and end times of the audio for each term into the time range field of the term list in the material mapping table. This step is a necessary technical means to enable subsequent directional noise addition and term-level robustness assessment to be implemented in the audio domain.
[0129] For example, the system receives natural dialogue text containing "electrocardiogram" and "ultrasound" generated from corpus-oriented data. The text-to-speech engine parameters are configured as follows: speech rate 1.0x, volume 0dB, sampling rate 16kHz, and audio format WAV. For the two roles, A and B, the system assigns different timbre identifiers and writes them into the speech synthesis configuration field. The system segments the dialogue text into several sentences as synthesis units, inputs them sequentially into the engine to synthesize audio segments, and concatenates them in order, inserting 200ms silence intervals between segments. The system obtains character-level time boundaries through the engine's native word boundary timestamp interface, maps the terminology character ranges of "electrocardiogram" and "ultrasound" to audio time ranges, and fills the start and end times back into the time range field of the terminology list.
[0130] Therefore, according to the above implementation method, the system can convert natural dialogue text into speech audio through a text-to-speech engine and accurately extract the audio time interval of the target term, providing a basis for subsequent noise superposition and term-level recognition tests.
[0131] In some embodiments, noise superposition processing is performed on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data, including: Retrieve noise audio data that matches the noise scene type from a pre-built noise material library.
[0132] Among them, the noise material library is a pre-built structured data collection that stores various environmental noise audio data; the noise scene type is information used to indicate the category of simulated environmental noise; and the noise audio data is the audio data in the noise material library that corresponds to the noise scene type.
[0133] Specifically, the system reads the noise scene type from the signal-to-noise ratio (SNR) requirement information, uses the noise scene type as a search condition, indexes audio records matching the noise scene type in the noise material library, and reads the noise audio data from the audio records. If the duration of the noise audio data is less than the duration of the speech audio, the noise audio data is cyclically spliced as needed, and cross-fade-in / fade-out transition processing is used at the splicing points to ensure that the SNR of the entire test audio segment is consistent and there are no noise jumps at the splicing points; if the duration of the noise audio data is greater than or equal to the duration of the speech audio, the duration matching the speech audio is truncated from the starting position.
[0134] Determine the mixing gain parameters for the noisy audio data based on the signal-to-noise ratio setting.
[0135] The mixing gain parameter refers to the coefficient used to scale the amplitude of the noisy audio data, controlling the intensity of the noisy audio data during the superposition process. The signal-to-noise ratio (SNR) setting includes a global SNR setting, or a term segment SNR setting; the global SNR controls the ratio of the speech signal power to the noise signal power after the entire mix, while the term segment SNR is used to apply directional noise to the audio segment containing the target term.
[0136] Specifically, the system calculates the mixing gain parameter based on the signal-to-noise ratio (SNR) setting. The SNR setting is in decibels (dB) and is calculated as follows: the root mean square (RMS) amplitude of the speech audio is divided by the RMS amplitude of the noise audio data, and then multiplied by 10 raised to the power of the SNR setting. In other words, the mixing gain parameter equals the ratio of the RMS amplitude of the speech audio to the RMS amplitude of the noise audio data multiplied by the SNR setting. The RMS amplitudes of the speech audio and noise audio data are calculated based on the amplitude values of the sampling points of the speech audio and noise audio data, respectively. When the above SNR setting is the global SNR setting, this global SNR is defined as 10 multiplied by the logarithm of the ratio of the speech signal power to the noise signal power (base 10). The speech signal power and noise signal power are calculated from the squares of the RMS amplitudes of the sampling points of the speech audio and noise audio data, respectively. The above formula for the mixing gain parameter is equivalent to the power definition.
[0137] In the embodiment of directional noise addition, the signal-to-noise ratio (SNR) requirement information also includes a term segment SNR setting value. After determining the audio time interval of the target term in the speech audio, the system calculates the average power of the clean speech within that time interval, and inversely calculates the speech gain coefficient on the term segment based on the noise signal power and the term segment SNR setting value, such that the ratio of the gain-scaled speech power within the term segment to the noise signal power is equal to the term segment SNR setting value.
[0138] According to the mixing gain parameters, the noisy audio data and the speech audio are mixed and superimposed to generate test audio data.
[0139] Among them, the mixing and superposition processing refers to the operation process of scaling the noise audio data according to the mixing gain parameter and then adding it to the speech audio sample by sample.
[0140] Specifically, for non-directional noise addition scenarios, the system multiplies the amplitude of each sampling point of the noise audio data by the mixing gain parameter to obtain scaled noise audio data. The scaled noise audio data is then added point-by-point to the corresponding sampling points of the speech audio within the same time period, and the sum is used as the sampling point value of the test audio data. The system stores the test audio data in an audio file format. For directional noise addition scenarios, before mixing and superimposing, the system divides the speech audio into term segments and non-term segments based on the audio time interval of the target term. Different gain coefficients are applied to the term segments and non-term segments respectively, ensuring that the local signal-to-noise ratio (SNR) of the term segments meets the set value. Simultaneously, noise scaling calibration ensures that the global SNR of the entire audio segment after mixing still meets the set value. A raised cosine window is used for gain transition between term segments and non-term segments to avoid audible abrupt changes or pops. Subsequently, the speech audio modulated by segmented gain is superimposed with the noise signal scaled according to the global SNR. After the mixing and overlay are completed, the system performs peak detection on the test audio: if the peak exceeds the preset margin threshold, the entire signal is scaled proportionally to keep the signal-to-noise ratio unchanged; if the signal level is too low after proportional scaling, soft limiting is used as a fallback, and the clipping protection trigger status, as well as the measured global signal-to-noise ratio and term segment signal-to-noise ratio, are marked in the record.
[0141] Therefore, according to the above implementation method, the system can perform noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data that conforms to the specified noise scene type and signal-to-noise ratio setting value.
[0142] In some embodiments, test audio data is input into the speech recognition system under test to obtain recognition result text, the recognition result text is compared with natural dialogue text, test results are generated and recorded, including: The test audio data is input into the speech recognition system under test for recognition processing, and the recognition result text is obtained.
[0143] The speech recognition system under test refers to the system that performs speech recognition processing on the input audio and outputs text data; the test audio data is the audio data generated after noise superposition processing; and the recognition result text is the text data output by the speech recognition system under test after recognizing and processing the test audio data.
[0144] Specifically, the system encapsulates the test audio data according to the input format supported by the speech recognition system under test, and sends the encapsulated data to the speech recognition system under test. The speech recognition system under test performs acoustic feature extraction, acoustic model decoding, and language model decoding, and outputs the recognition result text. If the output interface of the speech recognition system under test supports returning timestamp information, the system directly obtains the start and end times corresponding to each word in the recognition result text; if the output interface of the speech recognition system under test does not return timestamp information, the system uses a forced alignment method to supplement the timestamps in the recognition result text: constructing an acoustic model and pronunciation dictionary, treating the recognition result text as known text, performing forced alignment with the test audio data, and obtaining the start and end times of each character in the recognition result text in the test audio data through Viterbi decoding.
[0145] Based on the audio time interval and the text location interval, the recognition result text and the natural dialogue text are aligned to obtain the recognition segment and text segment corresponding to each target term.
[0146] Among them, the recognized segment refers to the text segment in the recognized result text that corresponds to the target term; the text segment refers to the text segment in the natural dialogue text that corresponds to the target term; and the segment alignment refers to the process of establishing the correspondence between the recognized segment and the text segment based on the audio time interval and the text position interval.
[0147] Specifically, when the speech recognition system under test outputs timestamp information, the system reads the audio time interval of the target term, extracts the text content covered by the audio time interval from the recognition result text, and uses this text content as a recognition segment; the system reads the text position interval of the target term, extracts the text content corresponding to the text position interval from the natural dialogue text, and uses this text content as a text segment. When the speech recognition system under test does not output timestamp information, the system performs segment alignment using a text alignment method: it performs global character-level edit distance alignment between the recognition result text and the natural dialogue text to obtain the optimal alignment path, and maps the text position interval of the target term in the natural dialogue text to the corresponding interval in the recognition result text according to this alignment path, using the text content within the corresponding interval as a recognition segment, and using the text content within the text position interval in the natural dialogue text as a text segment; if the target term has no corresponding content in the recognition result text, the recognition segment of the target term is marked as empty.
[0148] The identified fragments are compared with the text fragments to generate identification index data, which is then stored in the test results storage area.
[0149] Among them, the identification index data refers to the data used to characterize the degree of consistency between the identified fragment and the text fragment; the test result storage area refers to the storage area used to persistently store the identification index data.
[0150] Specifically, the system performs a character-by-character comparison between the recognition segment and the text segment, counts the number of matching characters in the recognition segment and the text segment, calculates the ratio of the number of matching characters to the number of characters in the text segment, and uses this ratio as the recognition index data. After associating the recognition index data with the target term, audio time interval, and text position interval, the system writes it into the test result storage area.
[0151] Therefore, according to the above implementation method, the system can perform automatic comparison of the recognition result text output by the speech recognition system under test with the natural dialogue text at the target term level, generate recognition index data and complete storage, providing a data foundation for subsequent speech recognition performance evaluation.
[0152] In some embodiments, after generating the test audio data, the above method further includes: Based on the test requirement parameters, the test audio data is associated with the test requirement parameters and stored in the test material library.
[0153] The test material library is a pre-built structured data collection used to store the relationship between test audio data and test requirement parameters; associated storage refers to writing the test audio data into the test material library after establishing a correspondence between the test audio data and the test requirement parameters used to generate the test audio data.
[0154] Specifically, after generating test audio data, the system reads the test requirement parameters used in the generation process, uses the test requirement parameters as index data, uses the test audio data as indexed data, establishes a key-value pair relationship between the index data and the indexed data, and then writes it into the test material library.
[0155] In response to receiving test requirement parameters again, retrieve stored test audio data that matches the test requirement parameters from the test material library.
[0156] Among them, the stored test audio data refers to the test audio data that has been stored in the test material library and is associated with historical test requirement parameters; retrieval refers to searching for stored test audio data that meets the matching conditions in the test material library using the currently received test requirement parameters as the query conditions; matching means that the current test requirement parameters and the historical test requirement parameters associated with the stored test audio data are consistent in terms of target term list, matching ratio information and signal-to-noise ratio requirement information.
[0157] Specifically, after receiving the test requirement parameters again, the system uses the current test requirement parameters as the query key to index the stored test audio data with the same query key in the test material library; if a query result exists, it is determined that matching stored test audio data has been retrieved.
[0158] If a matching stored test audio data is found, the stored test audio data will be used as the test audio data.
[0159] Using stored test audio data as test audio data means that the system directly reads the stored test audio data and does not re-perform noise superposition processing.
[0160] Specifically, after the system confirms that a matching stored test audio data has been retrieved, it reads the stored test audio data from the test material library and uses the read audio data as the test audio data for the current test process, which is then used for subsequent input into the speech recognition system under test.
[0161] Therefore, according to the above implementation method, the system can reuse the stored test audio data, avoid repeatedly performing natural dialogue text generation, speech synthesis and noise superposition processing for the same test requirements, and improve test efficiency.
[0162] Figure 8 This is a structural block diagram of an automated testing system for speech recognition according to an embodiment of the present invention.
[0163] like Figure 8 As shown, the automated testing system for speech recognition includes: Test requirement parameter receiving module 210 is used to receive test requirement parameters, which include a list of target terms, ratio requirement information and signal-to-noise ratio requirement information. The natural dialogue text generation module 220 is used to call a large language model to generate natural dialogue text containing target terms based on a pre-built terminology mapping table and according to the target terminology list and matching requirements. The terminology mapping table contains professional terms, their definitions, and contextual information. The audio time interval extraction module 230 is used to convert natural dialogue text into speech audio and extract the audio time interval of the target term in the speech audio. The test audio data generation module 240 is used to perform noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data. The test result recording module 250 is used to input test audio data into the speech recognition system under test to obtain recognition result text, compare the recognition result text with natural dialogue text, generate test results and record them.
[0164] The specific functions and examples of each module and submodule of the device in this embodiment of the invention can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.
[0165] According to embodiments of the present invention, the above-described method of the present invention can be applied to a computer device and a readable storage medium.
[0166] Figure 9 A schematic block diagram of an example computer device 600 that can be used to implement embodiments of the present invention is shown. The computer device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The computer device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0167] like Figure 9 As shown, the computer device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. The RAM 603 may also store various programs and data required for the operation of the computer device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0168] Multiple components in computer device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows computer device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0169] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as an automated testing method for speech recognition. For example, in some embodiments, an automated testing method for speech recognition can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the computer device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the automated testing method for speech recognition described above can be performed. Alternatively, in other embodiments, the computing unit 601 may be configured, by any other suitable means (e.g., by means of firmware), to perform an automated testing method for speech recognition.
[0170] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0171] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0172] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0173] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0174] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0175] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0176] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this invention can be achieved, and this is not limited herein.
[0177] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this invention should be included within the scope of protection of this invention.
Claims
1. An automated testing method for speech recognition, characterized in that, include: Receive test requirement parameters, which include a list of target terms, ratio requirements, and signal-to-noise ratio requirements; Based on a pre-built terminology mapping table, a large language model is invoked to generate natural dialogue text containing the target terms according to the target terminology list and the matching requirement information; the terminology mapping table contains professional terms, definitions of professional terms, and contextual information of professional terms. The natural dialogue text is converted into speech audio, and the audio time interval of the target term in the speech audio is extracted; Based on the signal-to-noise ratio requirement information, noise superposition processing is performed on the speech audio to generate test audio data; The test audio data is input into the speech recognition system under test to obtain the recognition result text. The recognition result text is compared with the natural dialogue text to generate test results and record them.
2. The method according to claim 1, characterized in that, The target terms in the target term list correspond to the normalized grouping identifiers in the term mapping table. The normalized grouping identifiers are used to merge different terminological expressions of the same concept. The matching requirement information includes the number of times each target term appears in the natural dialogue text and the distribution of the target appearance locations. The signal-to-noise ratio (SNR) requirement information includes the noise scene type and the SNR setting value; the steps for constructing the terminology mapping table include: The large language model is invoked to extract specialized terms from the currently acquired specialized domain documents, along with the definition and contextual information of each specialized term; The technical terms, the definition information, and the context information are stored in the terminology mapping table; The set of technical terms in the terminology mapping table is subjected to normalization processing, which includes conflict resolution and variant merging. A normalized group identifier is generated for each technical term, and the normalized group identifier is associated with the corresponding technical term and stored in the terminology mapping table. The conflict resolution is used to eliminate inclusion conflicts between terminological expressions, and the variant merging is used to group different terminological expressions of the same concept into the same normalized group identifier.
3. The method according to claim 2, characterized in that, The process, based on a pre-built terminology mapping table, invokes a large language model to generate natural dialogue text containing the target terms according to the target term list and the matching requirement information, including: Based on the standardized group identifier, the standardized expression, definition information and contextual information of the target term are extracted from the term mapping table; Based on the standardized expression, the definition information, the contextual information, and the matching requirement information, prompt words are constructed; The large language model is invoked to generate candidate natural dialogue text based on the prompt words; The frequency and position distribution of each target term in the candidate natural dialogue text are checked to see if they meet the matching requirements. If they do not meet the requirements, the prompt words are adjusted and the large language model is called again to generate candidate natural dialogue texts until the matching requirements are met. The candidate natural dialogue texts that meet the matching requirements are then used as the natural dialogue texts.
4. The method according to claim 3, characterized in that, The step of converting the natural dialogue text into speech audio and extracting the audio time interval of the target term in the speech audio includes: Based on the standardized expression corresponding to the target term, the natural dialogue text is segmented to obtain the text position range of each target term in the natural dialogue text; The speech synthesis engine is invoked to perform speech synthesis processing on the natural dialogue text, generating the speech audio and text boundary timestamp information; Based on the text location range and the text boundary timestamp information, extract the audio time range of each target term from the speech audio.
5. The method according to claim 4, characterized in that, The step of performing noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data includes: Retrieve noise audio data that matches the noise scene type from a pre-built noise material library; Based on the signal-to-noise ratio setting value, determine the mixing gain parameter of the noise audio data; According to the mixing gain parameters, the noise audio data and the speech audio are mixed and superimposed to generate the test audio data.
6. The method according to claim 5, characterized in that, The process of inputting the test audio data into the speech recognition system under test to obtain the recognition result text, comparing the recognition result text with the natural dialogue text, generating test results, and recording them includes: The test audio data is input into the speech recognition system under test for recognition processing to obtain the recognition result text. Based on the audio time interval and the text location interval, the recognition result text and the natural dialogue text are segment aligned to obtain the recognition segment and text segment corresponding to each target term; The identified segment is compared with the text segment to generate identification index data, and the identification index data is stored in the test result storage area.
7. The method according to claim 6, characterized in that, After generating the test audio data, the method further includes: Based on the test requirement parameters, the test audio data is associated with the test requirement parameters and stored in the test material library; In response to receiving the test requirement parameters again, the stored test audio data that matches the test requirement parameters is retrieved from the test material library; The test requirement parameter matching includes matching based on one or more dimensions among the target term set, term ratio, text-to-speech configuration, noise scene type, and signal-to-noise ratio setting in the test requirement parameters. If a matching stored test audio data is found, the stored test audio data is used as the test audio data.
8. An automated testing system for speech recognition, characterized in that, include: The test requirement parameter receiving module is used to receive test requirement parameters, which include a list of target terms, proportioning requirements, and signal-to-noise ratio requirements. The natural dialogue text generation module is used to call a large language model based on a pre-built terminology mapping table to generate natural dialogue text containing the target terms according to the target terminology list and the matching requirement information; the terminology mapping table contains professional terms, definitions of professional terms, and contextual information of professional terms. An audio time interval extraction module is used to convert the natural dialogue text into speech audio and extract the audio time interval of the target term in the speech audio. The test audio data generation module is used to perform noise superposition processing on the speech audio according to the signal-to-noise ratio requirement information to generate test audio data. The test result recording module is used to input the test audio data into the speech recognition system under test to obtain the recognition result text, compare the recognition result text with the natural dialogue text, generate test results, and record them.
9. A computer device, characterized in that, include: At least one processor; and a memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, Computer instructions are used to cause a computer to perform the method according to any one of claims 1-7.
Citation Information
Patent Citations
Retrieval enhancement generation vertical domain optimization method and device based on BGE big language model, equipment and storage medium
CN121786210A
