A terminal-to-cloud voice recognition test method and device
Patent Information
- Application Number
- CN202311794213.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-23
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-12-23
AI Technical Summary
[0004]为此,本发明提供一种终端到云端的语音识别测试方法及装置,解决传统技术测试不全面,只能统计最终识别结果,无法对整个链路中存在缺陷进行分析的问题
[0028]本发明具有如下优点:将预置音频保存在本地文件夹,并通过路径表格对所述预置音频的播放路径及所述预置音频对应的音频内容进行保存;按照所述路径表格对所述预置音频进行播放,并对播放的所述预置音频进行录音得到实时录音文件,将得到的所述实时录音文件以第一命名进行本地保存;将得到的所述实时录音文件传送到SSP引擎进行处理,对SSP引擎处理后的所述实时录音文件以第二命名进行本地保存;将SSP引擎处理后的所述实时录音文件发送到云端进行识别,将上传至云端进行识别的所述实时录音文件以第三命名进行本地保存,输出当前识别的会话标识;当所述路径表格中的所述预置音频全部识别结束后,通过日志得到所述预置音频对应识别结果和会话标识;通过会话标识获取当前轮次云端识别收到的音频数据,将云端识别收到的音频数据以第四命名进行保存;根据第一命名的所述实时录音文件生成单声道音频文件,将所述单声道音频文件、第二命名文件、第三命名文件、第四命名文件的MD5值进行比对,若MD5值比对结果一致,将得到的所述预置音频的识别结果和所述预置音频对应的音频内容进行比较,根据所述预置音频的识别结果和所述预置音频对应的音频内容比较结果判断是否收集原始音频优化SSP引擎性能。本发明可以实现全自动化的语音识别测试流程协助排查和定位,直观体现识别准确性,提升内部研发效率,可以作为通用的测试方案,在不同的平台适用。
Smart Images

Figure CN117524195B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of speech recognition technology, specifically relating to a terminal-to-cloud speech recognition testing method and apparatus. Background Technology
[0002] Currently, because the entire speech recognition process, from the start of recording to SSP noise reduction processing, and then to uploading the recognized audio to the cloud for recognition, involves multiple threads in each process, there will be inconsistencies in audio data, i.e., improper asynchronous processing leading to audio loss issues.
[0003] Currently, speech recognition testing relies on manual methods or tools to play audio and compare the actual playback results with the recognition results to statistically analyze the speech recognition performance. This approach is not only time-consuming and labor-intensive, but also incomplete. Furthermore, it only provides the final recognition result and cannot pinpoint the problem in the entire process, such as issues with the original recording, noise reduction, terminal audio reading, or network transmission. Therefore, automating the process to assist in troubleshooting and location of problems, thereby improving internal R&D efficiency, has practical application significance. Summary of the Invention
[0004] To address this, the present invention provides a terminal-to-cloud speech recognition testing method and apparatus, which solves the problem that traditional technology testing is incomplete, can only statistically analyze the final recognition results, and cannot analyze defects in the entire process.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a terminal-to-cloud speech recognition testing method, comprising:
[0006] The preset audio is saved in a local folder, and the playback path of the preset audio and the corresponding audio content are saved through a path table;
[0007] The preset audio is played according to the path table, and the played preset audio is recorded to obtain a real-time recording file. The obtained real-time recording file is saved locally with a first name.
[0008] The obtained real-time recording file is sent to the SSP engine for processing, and the real-time recording file processed by the SSP engine is saved locally with a second name.
[0009] The real-time recording file processed by the SSP engine is sent to the cloud for recognition. The real-time recording file uploaded to the cloud for recognition is saved locally with a third name, and the currently recognized session identifier is output.
[0010] After all the preset audio in the path table has been recognized, the recognition result and session identifier corresponding to the preset audio are obtained through the log; the audio data received by the cloud recognition in the current round is obtained through the session identifier, and the audio data received by the cloud recognition is saved with the fourth name;
[0011] A mono audio file is generated based on the real-time recording file with the first name. The MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file are compared. If the MD5 value comparison results are consistent, the recognition result of the preset audio is compared with the audio content corresponding to the preset audio. Based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio, it is determined whether to collect the original audio to optimize the performance of the SSP engine.
[0012] As a preferred method for terminal-to-cloud speech recognition testing, the preset audio is played using a computer and a high-fidelity audio system according to the path table, and the device output log is obtained in real time by connecting a mobile device containing a speech recognition application via a USB cable.
[0013] As a preferred method for terminal-to-cloud speech recognition testing, the mono audio file is generated by calling a bare engine script using the first named real-time recording file.
[0014] As a preferred method for terminal-to-cloud speech recognition testing, during the comparison of the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file, if the MD5 value comparison results are inconsistent, the named file with inconsistent MD5 values is extracted, and the corresponding processing flow for the named file with inconsistent MD5 values is reprocessed.
[0015] As a preferred method for terminal-to-cloud speech recognition testing, if the recognition result of the preset audio is consistent with the comparison result of the audio content corresponding to the preset audio, it is determined that the preset audio and the data processed by the SSP engine meet the preset requirements; if the recognition result of the preset audio is inconsistent with the comparison result of the audio content corresponding to the preset audio, the inconsistent original audio is re-collected to optimize the performance of the SSP engine.
[0016] The present invention also provides a terminal-to-cloud speech recognition testing device, comprising:
[0017] A preset audio storage module is used to save preset audio in a local folder and to save the playback path of the preset audio and the corresponding audio content through a path table;
[0018] The first named file generation module is used to play the preset audio according to the path table, record the played preset audio to obtain a real-time recording file, and save the obtained real-time recording file locally with a first name.
[0019] The second naming file generation module is used to transmit the obtained real-time recording file to the SSP engine for processing, and to save the real-time recording file processed by the SSP engine locally with the second name.
[0020] The third naming file generation module is used to send the real-time recording file processed by the SSP engine to the cloud for recognition, save the real-time recording file uploaded to the cloud for recognition locally with the third name, and output the currently recognized session identifier.
[0021] The fourth naming file generation module is used to obtain the recognition result and session identifier corresponding to the preset audio through the log after all the preset audio in the path table has been recognized; obtain the audio data received by the cloud recognition in the current round through the session identifier, and save the audio data received by the cloud recognition with the fourth name;
[0022] The named file comparison module is used to generate a mono audio file based on the real-time recording file with the first name, and to compare the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file.
[0023] The recognition result analysis module is used to compare the recognition result of the preset audio with the audio content corresponding to the preset audio if the MD5 value comparison result is consistent, and to determine whether to collect the original audio to optimize the SSP engine performance based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio.
[0024] As a preferred solution for a terminal-to-cloud speech recognition testing device, the first naming file generation module plays the preset audio using a computer and a high-fidelity speaker according to the path table, and obtains the device output log in real time by connecting to a mobile device containing a speech recognition application via a USB cable.
[0025] As a preferred solution for a terminal-to-cloud speech recognition testing device, the named file comparison module uses the first named real-time recording file to call a bare engine script to generate the mono audio file.
[0026] As a preferred solution for a terminal-to-cloud speech recognition testing device, it also includes a designated reprocessing module, which is used to extract the named files with inconsistent MD5 values if the MD5 value comparison results are inconsistent during the comparison of the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file, and to reprocess the corresponding processing flow of the named files with inconsistent MD5 values.
[0027] As a preferred solution for a terminal-to-cloud speech recognition testing device, in the recognition result analysis module: if the recognition result of the preset audio is consistent with the comparison result of the audio content corresponding to the preset audio, it is determined that the preset audio and the data processed by the SSP engine meet the preset requirements; if the recognition result of the preset audio is inconsistent with the comparison result of the audio content corresponding to the preset audio, the inconsistent original audio is re-collected to optimize the performance of the SSP engine.
[0028] The present invention has the following advantages: Preset audio is saved in a local folder, and a path table is used to save the playback path of the preset audio and the corresponding audio content; the preset audio is played according to the path table, and the played preset audio is recorded to obtain a real-time recording file; the obtained real-time recording file is saved locally with a first name; the obtained real-time recording file is sent to the SSP engine for processing, and the real-time recording file processed by the SSP engine is saved locally with a second name; the real-time recording file processed by the SSP engine is sent to the cloud for recognition, and the real-time recording file uploaded to the cloud for recognition is saved locally with a third name, and the currently recognized session identifier is output; After all the preset audio in the path table has been recognized, the recognition result and session identifier corresponding to the preset audio are obtained through the log; the audio data received by the cloud recognition in the current round is obtained through the session identifier, and the audio data received by the cloud recognition is saved with a fourth name; a mono audio file is generated based on the real-time recording file with the first name, and the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file are compared. If the MD5 value comparison results are consistent, the recognition result of the preset audio is compared with the audio content corresponding to the preset audio. Based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio, it is determined whether to collect the original audio to optimize the SSP engine performance. This invention can realize a fully automated speech recognition testing process to assist in troubleshooting and localization, intuitively reflect the recognition accuracy, improve internal R&D efficiency, and can be used as a general testing solution applicable to different platforms. Attached Figure Description
[0029] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.
[0030] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0031] Figure 1 This is a schematic diagram of the terminal-to-cloud speech recognition testing method provided in an embodiment of the present invention;
[0032] Figure 2 A speech recognition function application interface developed for the terminal-to-cloud speech recognition testing method provided in the embodiments of the present invention;
[0033] Figure 3 This is a real-time log recording interface for the implementation process of the terminal-to-cloud speech recognition testing method provided in this embodiment of the invention;
[0034] Figure 4 This is a schematic diagram of the terminal-to-cloud speech recognition testing device architecture provided in an embodiment of the present invention. Detailed Implementation
[0035] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] The speech recognition process, from voice collection at the terminal to noise reduction and then uploading the recognition results to the cloud, involves a complete speech processing chain. This includes: original device recording, voice after SSP noise reduction, voice uploaded to the cloud via the SDK layer, and voice used for actual cloud testing. Different operations are performed by different threads: reading device recordings is one thread, SSP processing is another, and uploading recordings is yet another. In this multi-threaded operation, unsatisfactory speech recognition results often lead to extensive manual troubleshooting, resulting in extremely low efficiency. Therefore, this invention provides a terminal-to-cloud speech recognition testing method and apparatus. This fully automated process assists in troubleshooting and locating problems, improving internal R&D efficiency and indirectly benefiting the company. It is applicable to different platforms and serves as a general testing solution and tool for troubleshooting speech issues. The following are the specific details of this invention.
[0037] Example 1
[0038] See Figure 1 Embodiment 1 of the present invention provides a terminal-to-cloud speech recognition testing method, comprising the following steps:
[0039] S1. Save the preset audio in a local folder, and save the playback path of the preset audio and the corresponding audio content through a path table;
[0040] S2. Play the preset audio according to the path table, and record the played preset audio to obtain a real-time recording file. Save the obtained real-time recording file locally with a first name.
[0041] S3. The obtained real-time recording file is sent to the SSP engine for processing, and the real-time recording file processed by the SSP engine is saved locally with a second name.
[0042] S4. Send the real-time recording file processed by the SSP engine to the cloud for recognition, save the real-time recording file uploaded to the cloud for recognition locally with a third name, and output the currently recognized session identifier.
[0043] S5. After all the preset audio in the path table has been recognized, the recognition result and session identifier corresponding to the preset audio are obtained through the log; the audio data received by the cloud recognition in the current round is obtained through the session identifier, and the audio data received by the cloud recognition is saved with the fourth name.
[0044] S6. Generate a mono audio file based on the real-time recording file with the first name. Compare the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file. If the MD5 value comparison results are consistent, compare the recognition result of the preset audio with the audio content corresponding to the preset audio. Based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio, determine whether to collect the original audio to optimize the SSP engine performance.
[0045] In this embodiment, the preset audio is played using a computer and a high-fidelity audio system according to the path table, and the device output log is obtained in real time by connecting a mobile device containing a voice recognition application via a USB cable.
[0046] See Figure 2 The process involves launching an application with integrated speech recognition and enabling the recognition function; opening a test tool on a computer; playing preset audio through the computer and high-fidelity speakers; storing the preset audio in a local folder; and storing the path and audio content of each preset audio file in a path table; and then playing the preset audio in the order of the path table.
[0047] See Figure 3 Simultaneously, the testing tool can connect to an Android device with a voice recognition application installed via a computer to obtain the Android device's real-time logs and a list of preset audio content. It can also connect to a device containing a voice recognition application via USB to obtain the device's output logs in real time.
[0048] In this embodiment, the acquired real-time recording file is saved locally using an application with integrated speech recognition functionality and stored under a first named filename. The real-time recording file is then sent to the SSP engine for processing. The processed data from the SSP engine is also saved locally under a second named filename. After processing the real-time recording file data, the SSP engine continuously transmits it to the cloud. Before transmitting to the cloud, it saves the audio data of the uploaded real-time recording file locally and stores it under a third named filename, while simultaneously outputting the session identifier for the current recognition. After recognition is complete, the preset audio corresponding to the recognition result and the session identifier are obtained from the log. Then, the audio data received from the cloud for this round of recognition is obtained using the session identifier and stored under a fourth named filename.
[0049] In this embodiment, the real-time recording file with the first name is used to call the bare engine script to generate the mono audio file. During the process of comparing the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file, if the MD5 value comparison results are inconsistent, the named file with inconsistent MD5 values is extracted, and the processing flow corresponding to the named file with inconsistent MD5 values is reprocessed.
[0050] Specifically, the activated speech recognition application continuously saves the real-time recording data of the acquired preset audio. After obtaining the real-time recording data, the testing tool generates a new mono audio file by calling the PC version of the bare engine (SSP processing) script. Then, it compares the generated mono file with the second named file saved by the recognition application in step 3, the third named file of the recognition in step S4, and the fourth named file of the recognition obtained from the cloud with their MD5 values. Since the contents of the above five files are consistent, theoretically the MD5 values should also be the same. If any of the second, third, or fourth named files is different from the mono audio file processed by the bare engine, then there is a problem with the file processing flow corresponding to the manual.
[0051] The specific process by which SSP processes and generates a new mono audio file is as follows:
[0052] The first step, preprocessing: This step includes steps such as noise filtering, signal amplification, and signal quality improvement;
[0053] The second step is signal analysis: using pre-defined algorithms (such as Fourier transform) to analyze the spectral content to extract other features of the signal;
[0054] The third step is signal processing, which includes compression, reverb addition, equalization, dynamic range adjustment, filtering, pitch transformation, and time stretching.
[0055] Step 4, Synthesis / Effects Addition: This step involves adding additional sound effects to synthesize a new mono sound.
[0056] The core code for SSP processing to generate new mono audio files is as follows:
[0057]
[0058]
[0059] In this embodiment, if the recognition result of the preset audio is consistent with the comparison result of the audio content corresponding to the preset audio, it is determined that the preset audio and the data processed by the SSP engine meet the preset requirements; if the recognition result of the preset audio is inconsistent with the comparison result of the audio content corresponding to the preset audio, the inconsistent original audio is collected again to optimize the performance of the SSP engine.
[0060] Specifically, in step S6, all five audio files—the mono audio file, the second named file, the third named file, and the fourth named file—are identical, indicating that no audio loss occurred throughout the entire process and that the integrated SSP engine code logic is correct. Then, it is necessary to compare the audio recognition and transcription results obtained from the cloud with the preset audio content results. Theoretically, the audio recognition and transcription results obtained from the cloud should be consistent with the audio content played by the high-fidelity speaker in step S2. However, due to external noise and self-noise, the audio transcription results uploaded to the cloud may be inconsistent with the content played by the speaker. Therefore, it is necessary to collect the original recordings corresponding to the inconsistent audio to improve the noise reduction effect of the SSP engine.
[0061] In summary, this invention saves preset audio in a local folder and saves the playback path and corresponding audio content of the preset audio using a path table; plays the preset audio according to the path table and records the played preset audio to obtain a real-time recording file, which is then saved locally with a first name; the real-time recording file is sent to the SSP engine for processing, and the processed real-time recording file is saved locally with a second name; the processed real-time recording file is sent to the cloud for recognition, and the real-time recording file uploaded to the cloud for recognition is saved locally with a third name, and the currently recognized session identifier is output; when After all the preset audio in the path table has been recognized, the recognition result and session identifier corresponding to the preset audio are obtained through the log. The audio data received from cloud recognition in the current round is obtained through the session identifier and saved with a fourth name. A mono audio file is generated based on the real-time recording file with the first name. The MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file are compared. If the MD5 comparison results are consistent, the recognition result of the preset audio is compared with the corresponding audio content. Based on the comparison result of the recognition result of the preset audio and the corresponding audio content, it is determined whether to collect the original audio to optimize SSP engine performance. This invention can realize a fully automated speech recognition testing process to assist in troubleshooting and localization, intuitively demonstrate recognition accuracy, improve internal R&D efficiency, and can serve as a general testing solution applicable to different platforms.
[0062] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.
[0063] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0064] Example 2
[0065] See Figure 4 Embodiment 2 of the present invention also provides a terminal-to-cloud speech recognition testing device, comprising:
[0066] The preset audio storage module 1 is used to save preset audio in a local folder and save the playback path of the preset audio and the corresponding audio content through a path table;
[0067] The first naming file generation module 2 is used to play the preset audio according to the path table, record the played preset audio to obtain a real-time recording file, and save the obtained real-time recording file locally with a first name.
[0068] The second naming file generation module 3 is used to transmit the obtained real-time recording file to the SSP engine for processing, and to save the real-time recording file processed by the SSP engine locally with the second name.
[0069] The third naming file generation module 4 is used to send the real-time recording file processed by the SSP engine to the cloud for recognition, save the real-time recording file uploaded to the cloud for recognition locally with a third name, and output the currently recognized session identifier.
[0070] The fourth naming file generation module 5 is used to obtain the recognition result and session identifier corresponding to the preset audio through the log after all the preset audio in the path table has been recognized; obtain the audio data received by the cloud recognition in the current round through the session identifier, and save the audio data received by the cloud recognition with the fourth naming;
[0071] The naming file comparison module 6 is used to generate a mono audio file based on the real-time recording file with the first name, and to compare the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file.
[0072] The recognition result analysis module 7 is used to compare the recognition result of the preset audio with the audio content corresponding to the preset audio if the MD5 value comparison result is consistent, and to determine whether to collect the original audio to optimize the SSP engine performance based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio.
[0073] In this embodiment, the first naming file generation module 2 plays the preset audio using a computer and a high-fidelity audio system according to the path table, and obtains the device output log in real time by connecting a mobile device containing a voice recognition application via a USB cable.
[0074] In this embodiment, the named file comparison module 6 uses the first named real-time recording file to call the bare engine script to generate the mono audio file.
[0075] In this embodiment, a designated reprocessing module 8 is also included, which is used to extract the named files with inconsistent MD5 values if the MD5 value comparison results are inconsistent during the comparison of the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file, and to reprocess the corresponding processing flow of the named files with inconsistent MD5 values.
[0076] In this embodiment, in the recognition result analysis module 7: if the recognition result of the preset audio is consistent with the comparison result of the audio content corresponding to the preset audio, it is determined that the preset audio and the SSP engine processing data meet the preset requirements; if the recognition result of the preset audio is inconsistent with the comparison result of the audio content corresponding to the preset audio, the inconsistent original audio is re-collected to optimize the performance of the SSP engine.
[0077] It should be noted that the information interaction and execution process between the modules of the above-mentioned device are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.
[0078] Example 3
[0079] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code for a terminal-to-cloud speech recognition testing method. The program code includes instructions for executing the terminal-to-cloud speech recognition testing method of Embodiment 1 or any possible implementation thereof.
[0080] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives, SSDs).
[0081] Example 4
[0082] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;
[0083] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can execute the terminal-to-cloud speech recognition test method of Embodiment 1 or any possible implementation thereof by calling the program instructions.
[0084] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.
[0085] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0086] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0087] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A terminal-to-cloud speech recognition testing method, characterized in that, include: The preset audio is saved in a local folder, and the playback path of the preset audio and the corresponding audio content are saved through a path table; The preset audio is played according to the path table, and the played preset audio is recorded to obtain a real-time recording file. The obtained real-time recording file is saved locally with a first name. The obtained real-time recording file is sent to the SSP engine for processing, and the real-time recording file processed by the SSP engine is saved locally with a second name. The real-time recording file processed by the SSP engine is sent to the cloud for recognition. The real-time recording file uploaded to the cloud for recognition is saved locally with a third name, and the currently recognized session identifier is output. After all the preset audio in the path table has been recognized, the recognition result and session identifier corresponding to the preset audio are obtained through the log; the audio data received by the cloud recognition in the current round are obtained through the session identifier, and the audio data received by the cloud recognition is saved with the fourth name; A mono audio file is generated based on the real-time recording file with the first name. The MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file are compared. If the MD5 value comparison results are consistent, the recognition result of the preset audio is compared with the audio content corresponding to the preset audio. Based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio, it is determined whether to collect the original audio to optimize the performance of the SSP engine.
2. The terminal-to-cloud speech recognition testing method according to claim 1, characterized in that, The preset audio is played using a computer and a high-fidelity audio system according to the path table, and the device output log is obtained in real time by connecting a mobile device containing a voice recognition application via a USB cable.
3. The terminal-to-cloud speech recognition testing method according to claim 1, characterized in that, The mono audio file is generated by calling a bare engine script using the first named real-time recording file.
4. The terminal-to-cloud speech recognition testing method according to claim 1, characterized in that, During the comparison of the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file, if the MD5 value comparison results are inconsistent, the named file with inconsistent MD5 values is extracted, and the corresponding processing flow for the named file with inconsistent MD5 values is reprocessed.
5. The terminal-to-cloud speech recognition testing method according to claim 1, characterized in that, If the recognition result of the preset audio is consistent with the comparison result of the audio content corresponding to the preset audio, it is determined that the preset audio and the data processed by the SSP engine meet the preset requirements; if the recognition result of the preset audio is inconsistent with the comparison result of the audio content corresponding to the preset audio, the inconsistent original audio is collected again to optimize the performance of the SSP engine.
6. A terminal-to-cloud speech recognition testing device, characterized in that, include: A preset audio storage module is used to save preset audio in a local folder and to save the playback path of the preset audio and the corresponding audio content through a path table; The first named file generation module is used to play the preset audio according to the path table, record the played preset audio to obtain a real-time recording file, and save the obtained real-time recording file locally with a first name. The second naming file generation module is used to transmit the obtained real-time recording file to the SSP engine for processing, and to save the real-time recording file processed by the SSP engine locally with the second name. The third naming file generation module is used to send the real-time recording file processed by the SSP engine to the cloud for recognition, save the real-time recording file uploaded to the cloud for recognition locally with the third name, and output the currently recognized session identifier. The fourth naming file generation module is used to obtain the recognition result and session identifier corresponding to the preset audio through the log after all the preset audio in the path table has been recognized; obtain the audio data received by the cloud recognition in the current round through the session identifier, and save the audio data received by the cloud recognition with the fourth name; The named file comparison module is used to generate a mono audio file based on the real-time recording file with the first name, and to compare the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file. The recognition result analysis module is used to compare the recognition result of the preset audio with the audio content corresponding to the preset audio if the MD5 value comparison results are consistent, and to determine whether to collect the original audio to optimize the SSP engine performance based on the comparison result of the recognition result of the preset audio and the audio content corresponding to the preset audio.
7. The terminal-to-cloud speech recognition testing device according to claim 6, characterized in that, In the first naming file generation module, the preset audio is played using a computer and a high-fidelity speaker according to the path table, and the device output log is obtained in real time by connecting a mobile device containing a voice recognition application via a USB cable.
8. The terminal-to-cloud speech recognition testing device according to claim 6, characterized in that, In the named file comparison module, the real-time recording file with the first name is used to call the bare engine script to generate the mono audio file.
9. A terminal-to-cloud speech recognition testing device according to claim 6, characterized in that, It also includes a designated reprocessing module, which is used to extract the named files with inconsistent MD5 values when comparing the MD5 values of the mono audio file, the second named file, the third named file, and the fourth named file, and to reprocess the corresponding processing flow of the named files with inconsistent MD5 values.
10. A terminal-to-cloud speech recognition testing device according to claim 6, characterized in that, In the recognition result analysis module: if the recognition result of the preset audio is consistent with the comparison result of the audio content corresponding to the preset audio, it is determined that the preset audio and the SSP engine processed data meet the preset requirements; if the recognition result of the preset audio is inconsistent with the comparison result of the audio content corresponding to the preset audio, the inconsistent original audio is re-collected to optimize the performance of the SSP engine.
Citation Information
Patent Citations
System and method for authentication, data transfer, and protection against phishing
CN101816148A
Electronic device forming network slices and data sessions and method of operating same
CN115836514A