CN112365902A - Test method of voice processing system, related equipment and storage device - Google Patents

Test method of voice processing system, related equipment and storage device Download PDF

Info

Publication number
CN112365902A
CN112365902A CN202011112439.5A CN202011112439A CN112365902A CN 112365902 A CN112365902 A CN 112365902A CN 202011112439 A CN202011112439 A CN 202011112439A CN 112365902 A CN112365902 A CN 112365902A
Authority
CN
China
Prior art keywords
message
executing
command field
received
response message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011112439.5A
Other languages
Chinese (zh)
Inventor
沈简
任兆丰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
iFlytek Co Ltd
Original Assignee
iFlytek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN202011112439.5A priority Critical patent/CN112365902A/en
Publication of CN112365902A publication Critical patent/CN112365902A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/78Detection of presence or absence of voice signals
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The application discloses a testing method of a voice processing system, related equipment and a storage device. The voice processing system comprises a service end and a server, and the testing method of the voice processing system is applied to the service end. The testing method of the voice processing system comprises the following steps: reading a pre-stored test script, wherein the pre-stored test script is compiled by adopting a similar natural language, the pre-stored test script comprises a variable field, the variable field is used for acquiring information required by the test, and the information required by the test is acquired from a configuration file and/or system information; and executing the pre-stored test script to obtain a test result of the voice processing system. By the scheme, the readability of the pre-stored test script can be improved, the compiling difficulty of the pre-stored test script is reduced, and the test efficiency is improved.

Description

Test method of voice processing system, related equipment and storage device
Technical Field
The present application relates to the field of voice processing, and in particular, to a method for testing a voice processing system, and related device and storage apparatus.
Background
In recent years, speech processing techniques have been developed. The telecommunication and financial industries with mass voice data are the best application places of voice processing technology, and typical applications of the voice processing technology include intelligent customer service, intelligent outbound and the like. At present, in order to know the voice processing service performance of a voice processing system, when the voice processing system is tested, a software engineer familiar with various communication protocols needs to compile a test script through programming, and the compiling difficulty of the test script is high.
Disclosure of Invention
The technical problem mainly solved by the application is to provide a testing method of a voice processing system, related equipment and a storage device, which can improve the readability of a pre-stored test script and reduce the compiling difficulty of the pre-stored test script.
In order to solve the above problem, a first aspect of the present application provides a method for testing a voice processing system, where the voice processing system includes a service end and a server, and the method is applied to the service end, and the method for testing the voice processing system includes: reading a pre-stored test script, wherein the pre-stored test script is compiled by adopting a natural language-like language, the pre-stored test script comprises a variable field, the variable field is used for acquiring information required by the test, and the information required by the test is acquired from a configuration file and/or system information; and executing the pre-stored test script to obtain the voice data to be processed, and sending the voice data to be processed to the server to obtain a test result of the voice processing system.
Wherein the pre-stored test script further comprises a command field; the command field is a class natural language encapsulated with a bottom layer code and is used for realizing steps in a test process.
Wherein the command field is used in an implemented test procedure comprising at least one of: sending a message, waiting for the completion of a preset step, controlling the waiting time, detecting whether the received message comprises preset content, storing an audio file and sending the audio file; the information required for the test includes at least one of: the network address of the service end, the related information of the message, a preset audio file, a preset grammar file and a preset synthetic text.
The testing method of the voice processing system is executed by the service end, and the executing of the pre-stored testing script comprises the following steps: executing a first sending command field to read a preset audio file as voice data to be processed, and sending the voice data to be processed to the server by using a real-time transmission protocol; executing a first waiting command field to determine whether a first event message fed back by the server is received within a first preset time, wherein the first event message indicates that the recognition of the voice data to be processed is completed and includes a recognition result of the voice data to be processed; if the first event message is not received within a first preset time, recording a first error state which indicates that the first event message is not received; and if the first event message is received within a first preset time, taking the identification result as the test result.
Wherein, before executing the first wait command field, the executing the pre-stored test script further comprises: executing a second waiting command field to determine whether a second event message fed back by the server is received within a second preset time, wherein the second event message indicates that a front end point of the voice data to be processed is found; if the second event message is received within second preset time, executing the first waiting command field; otherwise, recording a second error status indicating that the second event message is not received; and/or, if the first event message is received within a first preset time, taking the identification result as the test result, including: if the first event message is received within a first preset time, executing a first detection command field to detect whether the first event message contains a first status code; if the first event message contains a first state code, taking the recognition result of the voice data to be processed as the test result; otherwise, a third error status is recorded indicating that the first event message does not contain the first status code.
Wherein, prior to executing the first send command field, the executing the pre-stored test script further comprises: executing a second sending command field and a plurality of first variable fields to obtain first information to be transmitted by utilizing the plurality of first variable fields, generating the identification request message by utilizing the first information to be transmitted and sending the identification request message to the server; executing a third waiting command field to determine whether a first response message of the server is received within a third preset time; if the first response message is not received within the third preset time, recording a fourth error state indicating that the first response message is not received; if the first response message is received within the third preset time, executing a second detection command field to detect whether the first response message contains a second state code; executing the first sending command field if the first response message contains a second state code; otherwise, a fifth error status is recorded indicating that the first response message does not contain a second state code.
Wherein, before executing the second send command field, the executing the pre-stored test script further comprises: executing a third sending command field and a plurality of second variable fields to obtain second to-be-transmitted information by using the plurality of second variable fields, generating the parameter configuration message by using the second to-be-transmitted information and sending the parameter configuration message to the server; executing a fourth waiting command field to determine whether a second response message of the server is received within a fourth preset time; if the second response message is not received within the fourth preset time, recording a sixth error state indicating that the second response message is not received; if a second response message is received within the fourth preset time, executing a third detection command field to detect whether the second response message contains a third status code; if the second response message contains a third status code, executing the second sending command field; otherwise, a seventh error status is recorded indicating that the second response message does not contain a third status code.
Before executing the third send command field, the executing the pre-stored test script further includes: executing a fourth sending command field and a plurality of third variable fields to obtain third to-be-transmitted information by using the plurality of third variable fields, generating the session request message by using the third to-be-transmitted information and sending the session request message to the server; executing a fifth waiting command field to determine whether a third response message of the server is received within a fifth preset time; if the third response message is not received within the fifth preset time, recording an eighth error state indicating that the third response message is not received; if a third response message is received within the fifth preset time, executing a fourth detection command field to detect whether the third response message contains a fourth status code; if the third response message contains a fourth status code, executing a fifth sending command field to send a confirmation message to the server; otherwise, a ninth error status is recorded indicating that the third response message does not contain a fourth status code.
The protocol adopted by the parameter configuration message, the second response message, the identification request message, the first response message and the first event message is a media resource control protocol; the protocol adopted by the session request message, the third response message and the confirmation message is a session initial protocol; and/or the first information to be transmitted and the second information to be transmitted comprise at least one of message length, identification code and content length of corresponding message, and the third information to be transmitted comprises: the network address of the service end, the network address of the service end and a transport layer protocol, an identification code, a sequence number, a transaction identification, a label domain content and a message length used by a corresponding message.
Wherein the test results include at least one of: the identification result, the message sending time and the message receiving time in the test process, the identification time delay parameter and the identification time delay performance result; the identification time delay parameter is the time difference between the end of sending the preset audio file and the end of receiving the first event message, and the identification time delay performance result is the comparison result between the time difference and a preset threshold value.
Wherein the executing the pre-stored test script comprises: and executing a plurality of pre-stored test scripts in parallel.
In order to solve the above problem, a second aspect of the present application provides an electronic device, which includes a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is configured to execute the program instructions to implement the method for testing the speech processing system according to the first aspect.
In order to solve the above problem, a third aspect of the present application provides a storage device, which stores program instructions capable of being executed by a processor, the program instructions being used for implementing the method for testing a speech processing system according to the first aspect.
In the scheme, the pre-stored test script is obtained and executed to obtain the test result of the voice processing system, the pre-stored test script is compiled by a natural language-like language, the pre-stored test script comprises a variable field for obtaining information required by the test, and the information required by the test is obtained from a configuration file and/or system information, so that complex parameters in the pre-stored test script can be generated by using the variable field, the readability of the pre-stored test script can be improved, the compiling difficulty of the pre-stored test script is reduced, the service end can obtain the voice data to be processed during the process of executing the pre-stored test script and send the voice data to be processed to the service end so that the service end processes the voice data to be processed and feeds back the processing result to the service end, and the service end can realize interactive voice processing, the testing efficiency is improved.
Drawings
FIG. 1 is a flow chart illustrating an embodiment of a method for testing a speech processing system of the present application;
FIG. 2 is a flow chart of a first portion of another embodiment of a method for testing a speech processing system according to the present application;
FIG. 3 is a flow chart of a second portion of another embodiment of a method for testing a speech processing system according to the present application;
FIG. 4 is a flow chart of a third portion of another embodiment of a method for testing a speech processing system according to the present application;
FIG. 5 is a flow chart illustrating an exemplary embodiment of a method for testing a speech processing system;
FIG. 6 is a block diagram of an embodiment of an electronic device of the present application;
FIG. 7 is a block diagram of an embodiment of a memory device according to the present application.
Detailed Description
The following describes in detail the embodiments of the present application with reference to the drawings attached hereto.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular system structures, interfaces, techniques, etc. in order to provide a thorough understanding of the present application.
The terms "system" and "network" are often used interchangeably herein. The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. Further, the term "plurality" herein means two or more than two.
In recent years, speech processing techniques have been developed. The telecommunication and financial industries with mass voice data are the best application places of voice processing technology, and typical applications of the voice processing technology include intelligent customer service, intelligent outbound and the like. The voice processing system can comprise a service end and a service end, wherein the service end can acquire voice data to be processed and send the voice data to be processed to the service end in the process of executing the pre-stored test script, so that the service end processes the voice data to be processed and feeds back a processing result to the service end, and the service end can realize interactive voice processing. The voice processing includes, but is not limited to, services such as voice recognition, voice synthesis, etc., and in the voice processing system, the service end is connected to the service end, and provides a process control service required by the voice processing service process, etc. To understand the speech processing service performance of a speech processing system, automated performance testing of the speech processing system may be performed.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a testing method of a speech processing system according to an embodiment of the present application. Specifically, the method of the present embodiment includes the following steps:
step S11: and reading a pre-stored test script.
The voice processing system can comprise a service end and a service end. And in the process of executing the pre-stored test script, the service end acquires the voice data to be processed and sends the voice data to be processed to the service end, so that the service end processes the voice data to be processed and feeds back a processing result to the service end, and the service end executes the test method of the voice processing system to obtain a test result of the voice processing system. The test method of the voice processing system comprises the steps that a service end in the voice processing system sends voice data to be processed to a service end, and the service end processes the voice data to be processed and feeds back a processing result to the service end to carry out test. The test method of the voice processing system is applied to a service end. The service end and/or the service end may be an electronic device and/or a server, and is not particularly limited herein. The voice processing system includes but is not limited to an interactive voice response system (IVR), and a service end included in the voice processing system may implement voice processing through communication protocols such as a Session Initiation Protocol (SIP), a Real-time Transport Protocol (RTP), a Media Resource Control Protocol (MRCP), and the like. The version of the communication Protocol is not particularly limited, and for example, the Media Resource Control Protocol may be a second version- (MRCPv2, Media Resource Control Protocol v 2). The testing method of the voice processing system can be executed by the service end of the voice processing system but is not limited to the method.
The pre-stored test script is written in a natural language-like language. The service end reads the pre-stored test script and can simulate the communication flow of the voice processing system in different scenes, thereby realizing the automatic test of the voice processing system.
The contents of the pre-stored test script are complicated, if the contents of each communication flow in the pre-stored test script are manually compiled, readability is poor, manual compiling is complicated, difficult and prone to errors, and therefore in order to simplify compiling difficulty of the pre-stored test script, the pre-stored test script can comprise a variable field, and the variable field is used for obtaining information required by testing. The information required for the test may include, but is not limited to, at least one of: the network address of the service end, the related information of the message, the preset audio file, the preset grammar file and the preset synthetic text. The information required by the test is acquired from the configuration file and/or the system information, and particularly, the configuration file and/or the system information can comprise information which repeatedly appears in the automatic test, is easy to confuse and is required by manually compiling complex tests, so that the accuracy of pre-storing the test script can be improved, and the difficulty of compiling the pre-stored test script can be reduced. As shown in table 1, table 1 is a function table of variable fields in an embodiment of the testing method of the speech processing system of the present application.
Table 1 variable field function table of an embodiment of a testing method of a speech processing system according to the present application
Figure BDA0002729035260000051
Figure BDA0002729035260000061
Figure BDA0002729035260000071
When the information required for the test includes the network address of the service end, the method may be, but is not limited to, acquiring the server network address of the SIP service end specified in the configuration file by using a session.
In the case that the information required for the test includes the network address of the server, the information may be, but is not limited to, acquiring the server network address of the server specified in the configuration file by using the session.
In the case that the information required for the test includes the related information of the message, but not limited to, the current round of SIP message sequence number is obtained by using a session.getcseq variable field, the SIP message sequence number is added with 1 on the basis of the last round of SIP interaction by using a session.textcseq variable field, the content of a from field tag field of the SIP message is automatically generated by using a session.fromtag variable field, the content of a to field tag of the SIP message is automatically generated by using a session.totag variable field, the byte length of the SIP or MRCPv2 message after replacing the completion variable is automatically calculated by using an msg.contentlength variable field, the unique identification code of the SIP or MRCPv2 message after replacing the completion variable is automatically generated by using an msg.getcallld variable field, the unique identification code of the SIP session is automatically generated by using a session.getidid variable field, the unique identification code of the session is obtained by using a session.getidentifier field in a session.getsession.nettype session, and the transmission protocol used in a session.ptv transmission protocol field of the session, and the transmission protocol of the session, the transport protocol, the transport layer, the, the variable field of the related information of the acquisition message is not particularly limited. The related information of the message includes, but is not limited to, a transport layer protocol used by the corresponding message, an identification code, a sequence number, a transaction identification, a tag domain content and a message length, for example, a SIP message sequence number, a SIP message from field tag domain content, a SIP message to field tag domain content, a SIP or MRCPv2 message byte length, a SIP or MRCPv2 message body byte length, a unique identification code of a SIP session, a unique identification code of an MRCPv2 session, a transport layer protocol used by the SIP protocol, a transport layer protocol used by the MRCPv2 protocol, and the like.
In the case that the information required for the test includes a preset audio file, the audio file used by the WaveFile variable field can be but is not limited to be specified; acquiring next transcription audio under a test directory by using a nextWaveFile variable field; the external file is read using FTP using the file variable field.
In the case that the information required by the test includes a preset grammar file, but is not limited to the grammar file specified by the grammar file variable field; acquiring a next grammar file under the appointed directory by using a nextgammafile variable field; the external file is read using FTP using the file variable field.
In the case where the information required for the test includes a preset synthesized text, the synthesized text used may be specified by, but is not limited to, the textfile variable field; acquiring a next synthetic text under the test directory by using a variable field of the nextTextFile; the external file is read using FTP using the file variable field.
It is understood that the expression form of the variable field is not limited, and the field for realizing the same or similar function is the variable field of the present application.
In an embodiment, the pre-stored test script may further include a command field, and the command field is a natural language-like language encapsulated with a bottom layer code, so that the writing difficulty of the pre-stored test script is reduced, and therefore, even if a field operation and maintenance tester without a programming basis is used, the pre-stored test script may be written by using the command field. The command field is used to implement a step in the test procedure. Specifically, the steps in the test procedure for implementation of the command field include at least one of: the method comprises the steps of sending a message, waiting for the completion of a preset step, controlling the waiting time, detecting whether the received message comprises preset content, storing an audio file and sending the audio file. The preset steps, the preset contents and other contents can be set by self, and are not limited specifically herein. By utilizing the command field, various protocol communication scenes of the voice processing system, particularly complex protocol communication scenes, can be simulated. As shown in table 2, table 2 is a table of command field functions of an embodiment of the testing method of the speech processing system of the present application.
Table 2 command field function table of an embodiment of a test method for a speech processing system of the present application
Figure BDA0002729035260000081
Figure BDA0002729035260000091
It is understood that the pre-stored test script may include only a command field, only a variable field, and both the command field and the variable field, and the command field and the variable field of the pre-stored test script may be freely combined to simulate various speech processing scenarios, which is not limited in detail herein. The command field is encapsulated with the class natural language of the bottom layer code, so that the step bottom realization in the abstract test process of the command field can be realized, and the variable field is used for acquiring the information required by the test, so that the specific content in the message can be automatically generated by using the variable field, the readability of the pre-stored test script can be improved, and the compiling difficulty of the pre-stored test script is reduced.
Step S12: and executing the pre-stored test script to obtain the voice data to be processed, and sending the voice data to be processed to the server to obtain a test result of the voice processing system.
And acquiring the pre-stored test script, namely executing the pre-stored test script to obtain the voice data to be processed, and sending the voice data to be processed to the server to obtain a test result of the voice processing system. Different pre-stored test scripts can include the same or different test procedures, so that different test results of the voice processing system can be obtained. The test results include at least one of: the identification result, the message sending time and the message receiving time in the test process, the identification time delay parameter and the identification time delay performance result. The recognition result is the result of recognition and/or synthesis and other processing of the voice data to be processed. The identification time delay parameter is the time difference between the completion of the preset audio file transmission and the reception of the first event message, and the first event message represents the completion of the voice data to be processed identification and includes the identification result of the voice data to be processed, so that the time difference between the completion of the preset audio file transmission and the reception of the first event message is the processing time of the voice data to be processed, and the identification time delay parameter indicates the processing speed of the voice data to be processed. The service end can acquire a first time when the preset audio file is sent, acquire a second time when the first event message is received, and use a difference value between the second time and the first time as an identification time delay parameter, so that the processing speed of the service end on the voice data to be processed is acquired based on the size of the identification time delay parameter. The result of identifying the time delay performance may be a comparison result between a time difference between the completion of sending the preset audio file and the reception of the first event message and a preset threshold, and reflect a processing speed of the voice data to be processed. The size of the preset threshold may be set by a user, and is not particularly limited herein. The service end obtains the time difference between the time when the preset audio file is sent and the time when the first event message is received, judges whether the time difference between the time when the preset audio file is sent and the time when the first event message is received is smaller than a preset threshold value, if so, obtains a comparison result showing good identification delay performance, otherwise, obtains a comparison result showing the poor identification delay performance, namely, after the identification delay parameter is obtained, judges whether the identification delay parameter is smaller than the preset threshold value, if so, obtains a comparison result showing good identification delay performance, and if not, obtains a comparison result showing the poor identification delay performance.
In an embodiment, the testing method of the voice processing system is executed by a service terminal of the voice processing system, and when a pre-stored test script is executed, a first sending command field is executed to read a preset audio file as voice data to be processed, and the voice data to be processed is sent to a service terminal by using a real-time transmission protocol. The first transmission command field may be, but is not limited to, a command field for transmitting an audio file, such as audio. Since the preset audio file may be an audio file in a specified directory in the configuration file, in an embodiment, in order to sequentially read the preset audio file in the specified directory in the configuration file as the to-be-processed voice data, the first send command field may further include a nextWaveFile variable field, so as to sequentially read the preset audio file as the to-be-processed voice data, and send the to-be-processed voice data to the server using a real-time transport protocol.
After the voice data to be processed is sent to the server, executing a first waiting command field to determine whether a first event message fed back by the server is received within a first preset time; if the first event message is not received within the first preset time, recording a first error state indicating that the first event message is not received; and if the first event message is received within the first preset time, taking the recognition result as a test result.
The first event message indicates that the recognition of the voice data to be processed has been completed and includes a recognition result of the voice data to be processed, for example, the first event message may be an MRCPv2Recognize Complete event. The first event message indicates that the server side has finished recognizing the voice data to be processed, and can feed back the recognition result of the voice data to be processed to the service side. In order to improve the accuracy of the first event message, the status code of the first event message may be detected, and only when the status code of the first event message is the first status code, the recognition result of the voice data to be processed is used as the test result. The first status code is a command field of preset content, and is used for representing that no problem exists between a service end and a service end for transmitting the first event message, namely reflecting the security of the first event message. Specifically, a first event message is received within a first preset time, and when the recognition result is used as a test result, if the first event message is received within the first preset time, a first detection command field is executed to detect whether the first event message contains a first status code; if the first event message contains the first state code, taking the recognition result of the voice data to be processed as a test result; otherwise, a third error condition is recorded indicating that the first event message does not contain the first status code. In an application embodiment, the first event message is an MRCPv2Recognize Complete event, the first detection command field may be a command field for retchack and the like to detect whether the received message includes preset content, the first status code is 200, so as to detect whether the MRCPv2Recognize Complete event is the first status code 200, if so, the recognition result of the voice data to be processed is taken as the test result; otherwise, a third error status is recorded indicating that the first event message does not contain the first status code 200.
The first wait command field may be a command field for waiting for the completion of the preset step, such as MRCPWAIT. In an embodiment, before executing the first waiting command field, when executing the pre-stored test script, the second waiting command field may also be executed to determine whether a second event message fed back by the server is received within a second preset time; if the second event message is received within second preset time, executing a first waiting command field; otherwise, a second error status is recorded indicating that the second event message was not received. Wherein the second event message indicates that a front end point of the pending voice data has been found, for example, the second event message may be MRCPv2 Start of input event.
Therefore, the service end reads the preset audio file as the voice data to be processed by using the audio command field and sends the voice data to the service end by using the real-time transmission protocol, and the service end returns the recognition result of the voice data to be processed to the service end through the first event message.
In one embodiment, the request message may be formally initiated during execution of the pre-stored test script prior to execution of the first send command field. Specifically, before executing the first sending command field, executing the second sending command field and the first variable fields to obtain the first information to be transmitted by using the first variable fields, and generating and sending the identification request message to the server by using the first information to be transmitted. The second send command field includes, but is not limited to, a command field of a MRCPSEND or the like send message. The identify request message includes, but is not limited to, a MRCPv2Recognize message. The first variable field includes, but is not limited to, an msg. The first information to be transmitted includes at least one of a message length, an identification code, and a content length of the corresponding message, which is not particularly limited herein.
After the identification request message is sent to the server, a third waiting command field can be executed to determine whether a first response message of the server is received within a third preset time; if the first response message is not received within the third preset time, recording a fourth error state indicating that the first response message is not received; if the first response message is received within the third preset time, executing a second detection command field to detect whether the first response message contains a second state code; if the first response message contains the second state code, executing the first sending command field; otherwise, a fifth error status is recorded indicating that the first response message does not contain the second state code. The second state code is a command field of preset content, and is used for representing that no problem exists between a service end and a service end for transmitting the first response message, namely reflecting the security of the first response message.
The first response message may be MRCPv 2200 in Progress, indicating that the identification request message is being processed. The second detection command field may be a command field for retchack or the like to detect whether the received message includes preset content, and is used to detect whether the first response message includes the second state code 200. In practical applications, the error status may be displayed except for the status code of 200.
Therefore, the service end sends an identification request message to the service end by using the MRCPSEND command field, and the service end may reply to the MRCPv 2200 in Progress first response message, which indicates that the identification request message is being processed.
In order to enable the service end and the service end to communicate better, the configuration parameters can be negotiated in advance before the voice processing. Specifically, before executing the second sending command field, in the process of executing the pre-stored test script, the third sending command field and the plurality of second variable fields may also be executed, so as to obtain the second to-be-transmitted information by using the plurality of second variable fields, and generate and send the parameter configuration message to the server by using the second to-be-transmitted information. The third send command field includes, but is not limited to, a command field of a MRCPSEND or the like send message. The parameter configuration message may be a message such as MRCPv2define-gram for determining relevant configuration parameters in the voice processing flow. The second variable field may be an msg.length variable field used for automatically calculating the byte length of the SIP or MRCPv2 message after the complete variable is replaced, a session.channeldentidentifier variable field used for acquiring the unique identification code of the MRCPv2 session, an msg.contentlength used for automatically calculating the byte length of the message body of the SIP or MRCPv2 message after the complete variable is replaced, and the like. The second information to be transmitted includes at least one of a message length, an identification code, and a content length of the corresponding message. The MRCPv2 message indicates a message communicated using a media resource control protocol.
After the parameter configuration message is sent to the server, executing a fourth waiting command field to determine whether a second response message of the server is received within a fourth preset time; if the second response message is not received within the fourth preset time, recording a sixth error state indicating that the second response message is not received; if the second response message is received within the fourth preset time, executing a third detection command field to detect whether the second response message contains a third status code; if the second response message contains the third status code, executing a second sending command field; otherwise, a seventh error status is recorded indicating that the second response message does not contain the third status code. The fourth wait command field is, for example, a command field such as MRCPWAIT for waiting for the preset step to complete. The second response message may be an MRCPv 2200 Complete message, which indicates that the parameter configuration is successful. The third detection command field may be a command field for retchack or the like to detect whether the received message includes preset content, and is used to detect whether the second response message includes the second state code 200. The third status code is a command field of preset content, and is used for representing that no problem exists between the service end and the service end for transmitting the second response message, that is, for reflecting the security of the second response message.
Therefore, the service end uses the MRCPSEND command field to send an identification request message MRCPv2define-gram message to the service end, and the service end may reply to the MRCPv 2200 Complete second response message, thereby indicating that the parameter configuration is successful.
In an embodiment, before executing the third sending command field, when executing the pre-stored test script, the fourth sending command field and the plurality of third variable fields may also be executed, so as to obtain third to-be-transmitted information by using the plurality of third variable fields, and generate and send a session request message to the server by using the third to-be-transmitted information. The fourth send command field includes, but is not limited to, a command field of a send message such as sip send. The session request message includes, but is not limited to, a SIP invite message. The third variable field includes, but is not limited to, a session.sip server variable field for obtaining a server network address of a server specified in a configuration file, a session.transporttype variable field for obtaining a transport layer protocol used by a SIP protocol specified in the configuration file, a session.branch variable field for automatically generating a transaction identifier of a SIP session, a session.host SIP variable field for obtaining a server network address of a SIP service end specified in the configuration file, a session.from tag variable field for automatically generating a tag field content of a SIP message, a session.getcallld variable field for automatically generating a unique identifier of the SIP session, a session.getcseq variable field for obtaining a sequence number of a SIP message of a current turn, a msg.contentlengtvariable for automatically calculating a message body byte length of a SIP or cpv2 message after replacing a variable, a session.c.contentlengtnt variable for returning to a session.mrpcv transport layer protocol used in a configuration file 2, and a SDP vector field for automatically calculating a message address of a message of a media session. Getfreerttport variable field of one RTP port service port number, etc. is generated. The third information to be transmitted may include the network address of the service end, and a transport layer protocol, an identification code, a sequence number, a transaction identification, tag domain content, and a message length used by a corresponding message.
After the session request message is sent to the server, executing a fifth waiting command field to determine whether a third response message of the server is received within a fifth preset time; if the third response message is not received within the fifth preset time, recording an eighth error state indicating that the third response message is not received; if the third response message is received within the fifth preset time, executing a fourth detection command field to detect whether the third response message contains a fourth status code; if the third response message contains the fourth status code, executing a fifth sending command field to send a confirmation message to the server; otherwise, a ninth error status is recorded indicating that the third response message does not contain the fourth status code. The fourth status code is a command field of preset content, and is used for representing that no problem exists between the service end and the service end for transmitting the third response message, that is, for reflecting the security of the third response message. The first to fourth status codes may be, but not limited to, command fields with the same predetermined content, for example, the first to fourth status codes are all 200. In practical applications, the error status may be displayed except for the status code of 200. The fifth WAIT command field may be a command field for waiting for completion of the preset step, such as WAIT. The third response message is a reply of the server to the session request message. The fifth send command field may be a command field of SIPACKSEND or the like send message. The acknowledgement message may be a SIP ack message indicating that the service end receives the third response message of the service end.
Therefore, the lower-layer implementation of the session request message is abstracted through the command field, and the variable field is used for automatically generating complex parameters such as transaction identification, session unique identification code, Tag field and the like in the SIP message.
The protocol used by the parameter configuration message, the second response message, the identification request message, the first response message, and the first event message may be a media resource control protocol, and the protocol used by the session request message, the third response message, and the acknowledgement message may be a session initiation protocol. The first to ninth error states indicate that the corresponding message does not include the preset expected content, and may reflect the performance of the voice processing system server to some extent. The first to fifth preset times may be set by a user, and the obtaining manner is not particularly limited, and may be obtained from a configuration file and/or system information, for example.
Therefore, the bottom layer implementation of the steps in the test process can be abstracted through the command field, and the information required by the test, especially the complex and fussy information can be acquired by using the variable field, so that the readability of the pre-stored test script can be improved, and the compiling difficulty of the pre-stored test script can be reduced. Through the command field and/or the variable field, the pre-stored test script is simply and easily executed, and various complex voice processing scenes are simulated. The pre-stored test script required by the voice processing system test can comprise a command field and/or a variable field, and can be compiled to obtain the pre-stored test script only by adding, reducing and replacing the command field and/or the variable field by a pre-stored test script writer, so that the pre-stored test script writer only needs to know the basic communication flow.
In an embodiment, when the pre-stored test script is executed, a plurality of pre-stored test scripts can be executed in parallel. A plurality of pre-stored test scripts are executed in parallel through a computer program, a plurality of test results of the voice processing system are obtained, various voice processing scenes are simulated at the same time, all error states occurring in the test process are recorded at the same time, test cost is greatly reduced, omission and error recording are avoided, subjective factor interference of a test user in a traditional actual call dial test scene is eliminated, and testing of stability under a high concurrency scene which saves manpower can be achieved. Particularly, the stability of the voice processing system under a high-flow and high-concurrency scene is tested, a plurality of pre-stored test scripts are automatically executed in parallel by utilizing a computer program, the high-concurrency scene is simulated, and the labor cost can be greatly saved.
By the method, the pre-stored test script is obtained and executed, so that the test result of the voice processing system can be obtained, the pre-stored test script is compiled by adopting a natural language-like language, the pre-stored test script comprises the variable field for obtaining the information required by the test, and the information required by the test is obtained from the configuration file and/or the system information, so that the complex parameters in the pre-stored test script can be generated by using the variable field, the readability of the pre-stored test script can be improved, and the compiling difficulty of the pre-stored test script is reduced.
For a clear description of the testing process of executing the pre-stored test script, please refer to fig. 2-4, and fig. 2-4 are partial flow diagrams of another embodiment of the testing method of the speech processing system according to the present application. FIG. 2 is a flow chart of a first portion of another embodiment of a method for testing a speech processing system according to the present application; FIG. 3 is a flow chart of a second portion of another embodiment of a method for testing a speech processing system according to the present application; FIG. 4 is a flow chart of a third part of another embodiment of a testing method of a speech processing system according to the present application. Specifically, the method of the present embodiment includes the following steps:
as shown in fig. 2, before the voice processing, the configuration parameters may be determined in advance between the service end and the service end, specifically:
step S21: and executing the fourth sending command field and the plurality of third variable fields to obtain third to-be-transmitted information by using the plurality of third variable fields, and generating a session request message by using the third to-be-transmitted information and sending the session request message to the server.
The fourth send command field includes, but is not limited to, a sip send command field. The session request message includes, but is not limited to, a SIP invite message. The third variable fields include, but are not limited to, a session. sipserver variable field representing the network address of the server of the SIP server, a session. transporttype variable field representing the transport layer protocol used by the SIP message, a session. branch variable field for generating a transaction identifier in the SIP message, a session. host sipclient variable field representing the network address of the SIP client, a session. fromtag variable field for generating a distinction between the client and server fields Tag in the SIP message, a session. getcallld variable field representing a unique identification code of the SIP message, a session. getcseq variable field for generating a sequence number of the SIP message, an msg. contentlengt variable field for automatically calculating the length of the SIP message body, a session. mtptransport variable field representing the transport layer protocol used by the cpv2 message, a MRCPv2 free. session variable field representing the client address of the client address, a random session. rtrtp variable field for generating a random RTP protocol field. The third information to be transmitted may include the network address of the service end, and a transport layer protocol, an identification code, a sequence number, a transaction identification, tag domain content, and a message length used by a corresponding message. The third to-be-transmitted information is used for representing configuration parameters required by the service end and the service end for data communication under the session initial protocol, so that the service end generates a session request message by using the third to-be-transmitted information and sends the session request message to the service end, and the configuration parameters required by the data communication under the session initial protocol are sent to the service end for determination. The configuration parameters required for data communication under the session initiation protocol include, but are not limited to, a network address of the service end, and a transport layer protocol, an identification code, a sequence number, a transaction identifier, tag domain content, and a message length used by a corresponding message, for example, a network address of a server of the SIP service end, a transport layer protocol used by the SIP message, a transaction identifier in the SIP message, and the like.
Step S22: and executing the fifth wait command field to determine whether the third response message of the server is received within a fifth preset time.
The fifth WAIT command field may be a WAIT command field. The third response message is a reply of the server to the session request message.
If yes, go to step S23; if not, recording an eighth error state, namely if the third response message is not received within the fifth preset time, recording an eighth error state indicating that the third response message is not received.
Step S23: the fourth test command field is executed to test whether the third response message contains a fourth status code.
If yes, go to step S24; if not, recording a seventh error state, that is, recording a seventh error state indicating that the third response message does not include the fourth status code.
Step S24: and executing the fifth sending command field to send the confirmation message to the server.
The fifth send command field may be an SIPACKSEND command field. The acknowledgement message may be a SIP ack message indicating that the service end receives the third response message of the service end.
Therefore, under the session initiation protocol, the service end can implement data communication between the service end and the service end by executing the fourth sending command field, the plurality of third variable fields, the fifth waiting command field, the fourth detection command field and the fifth sending command field, determine the third information to be transmitted, and further determine the configuration parameters for data communication between the service end and the service end.
Step S25: and executing the third sending command field and the plurality of second variable fields to obtain second information to be transmitted by using the plurality of second variable fields, generating a parameter configuration message by using the second information to be transmitted, and sending the parameter configuration message to the server.
The third sending command field includes, but is not limited to, an MRCPSEND command field, which may be used to send a parameter configuration message such as MRCPv2define-gram to negotiate related configuration parameters in the voice processing flow. The second variable field may be an msg.length variable field for automatically calculating the length of the MRCPv2 message, a session.channel identifier variable field for indicating a unique identification code of the MRCPv2 message, msg.contentlength for automatically calculating the content length of the MRCPv2 message, etc. The second information to be transmitted includes at least one of a message length, an identification code and a content length of a corresponding message, where the corresponding message may be interaction information when the service end communicates with the service end. The second information to be transmitted is used for representing configuration parameters required by the service end and the service end for data communication under the media resource control protocol, so that the service end generates parameter configuration information by using the second information to be transmitted and sends the parameter configuration information to the service end, and the configuration parameters required by the data communication under the media resource control protocol are sent to the service end for determination. The configuration parameters required for data communication under the media resource control protocol include at least one of a message length, an identification code and a content length of the corresponding message.
Step S26: and executing the fourth waiting command field to determine whether a second response message of the server is received within a fourth preset time.
Wherein the fourth wait command field is the MRCPWAIT command field. The second response message may be an MRCPv 2200 Complete message, which indicates that the parameter configuration is successful.
If yes, go to step S27; if not, a sixth error state is recorded, that is, the sixth error state indicating that the second response message is not received is recorded.
Step S27: the third detection command field is executed to detect whether the second response message contains a third status code.
Wherein the third detection command field may be a rethceck command field for detecting whether the second response message includes the second state code 200.
If yes, go to step S28, i.e., step S31 of fig. 3; if not, recording a ninth error state, namely recording the ninth error state indicating that the second response message does not contain the third status code.
In an embodiment, the command field related to the parameter configuration message in step S25-step S27 may also be sent to the server as the first information to be transmitted when the second send command field is executed.
In step S21-step S27, the protocol used by the session request message, the third response message and the confirmation message may be a session initiation protocol; the protocol adopted by the parameter configuration message and the second response message can be a media resource control protocol.
Step S28: the second send command field is executed.
Therefore, in an application embodiment, the service end may send an identification request message MRCPv2define-gram message to the service end using the MRCPSEND command field, and the service end may reply to the MRCPv 2200 Complete second response message, thereby indicating that the parameter configuration is successful.
The configuration parameters include, but are not limited to, parameter information included in the second to-be-transmitted information and/or the third to-be-transmitted information, that is, the configuration parameters may include a network address of a service end under a session initiation protocol, a network address of a service end, a transport layer protocol, an identification code, a sequence number, a transaction identifier, tag domain content, and a message length used by a corresponding message, may also include at least one of a message length, an identification code, and a content length of a corresponding message under a media resource control protocol, and may also include parameter information required for implementing voice processing under other communication protocols, which is not specifically limited herein.
As shown in fig. 3, a connection between the service end and the service end identification service is established through the identification request message, specifically:
step S31: and executing the second sending command field and the first variable fields to obtain the first information to be transmitted by using the first variable fields, generating an identification request message by using the first information to be transmitted, and sending the identification request message to the server.
The second transmission command field includes, but is not limited to, an MRCPSEND command field, and the first variable field includes, but is not limited to, an msg. The identify request message includes, but is not limited to, MRCPv2 Recognize.
Step S32: and executing the third waiting command field to determine whether the first response message of the server is received within a third preset time.
If yes, go to step S33; if not, recording a fourth error state, namely recording the fourth error state which indicates that the first response message is not received.
Wherein, the third waiting command field may be MRCPWAIT; the first response message may be MRCPv 2200 in Progress, indicating that the identification request message is being processed.
Step S33: the second detection command field is executed to detect whether the first response message contains a second state code.
The second detection command field may be a rethcek command field for detecting whether the first response message contains the second state code 200.
If yes, go to step S34, i.e., step S41 of fig. 4; if not, recording five error states, namely recording a fifth error state which indicates that the first response message does not contain the second state code.
Step S34: the first send command field is executed.
The protocol adopted by the identification request message and the first response message may be a media resource control protocol.
Therefore, the service end uses the second sending command field such as MRCPSEND to send the identification request message to the service end, and the service end may reply the first response message such as MRCPv 2200 in Progress, indicating that the identification request message is being processed.
As shown in fig. 4, the service end may read a preset audio file as the to-be-processed voice data, and send the to-be-processed voice data to the service end using the real-time transport protocol, and the service end may return the recognition result of the to-be-processed voice data to the service end, specifically:
step S41: and executing the first sending command field to read a preset audio file as the voice data to be processed, and sending the voice data to be processed to the server by using a real-time transmission protocol.
The first transmission command field may be, but is not limited to, an audio command field.
Step S42: and executing the second waiting command field to determine whether a second event message fed back by the server side is received within a second preset time.
If yes, go to step S43; if not, recording a second error state, namely recording a second error state indicating that the second event message is not received.
Wherein the second event message indicates that the front end point of the voice data to be processed has been found. The second event message may be MRCPv2 Start-of-input. The second wait command field may be an MRCPWAIT command field.
Step S43: and executing the first waiting command field to determine whether a first event message fed back by the server side is received within a first preset time.
If yes, go to step S44; if not, recording a first error state, namely recording the first error state which indicates that the first event message is not received.
The first event message represents that the recognition of the voice data to be processed is completed and comprises a recognition result of the voice data to be processed. The first event message may be MRCPv2Recognize Complete. The protocol employed by the first event message may be a media resource control protocol. The first wait command field may be an MRCPWAIT command field.
Step S44: the first test command field is executed to test whether the first event message contains a first status code.
If yes, go to step S45; if not, recording a third error state, namely recording the third error state which indicates that the first event message does not contain the first state code.
Step S45: and taking the recognition result of the voice data to be processed as a test result.
In an embodiment, after the recognition result of the voice data to be processed is taken as the test result, executing a sixth sending command field and a plurality of fourth variable fields to obtain fourth information to be transmitted by using the plurality of fourth variable fields, generating an end message by using the fourth information to be transmitted, and sending the end message to the server; executing the sixth waiting command field to determine whether a fourth response message of the server is received within a sixth preset time, and if the fourth response message is not received within the sixth preset time, recording a tenth error state indicating that the fourth response message is not received; and if the fourth response message is received within the sixth preset time, ending the voice processing.
The sixth transmission command field may be a command field of a sip send or the like transmission message. The ending message may be a message such as SIP bye for ending the voice processing and initializing the voice recognition resource. The fourth response message indicates that the voice processing of this time is confirmed to be finished. The fourth variable field includes, but is not limited to, a session.answercontact variable field for returning a bye (SIP response) message header file field regarding service end address information, a session.branch variable field for generating a transaction identifier in an SIP message, a session.sipserver variable field for representing a network address of a server of an SIP service end, a session.totag variable field for automatically generating contents of a to field Tag field of an SIP message, a session.hostsiplient variable field for representing a network address of an SIP client, a session.portsipclient variable field for generating a network port of a random SIP service end, a session.omtag variable field for generating a session.omtag variable field for distinguishing a client field from a service end field Tag in an SIP message, a session.getcallld variable field for automatically generating a unique identifier of the SIP session, and a session.nextcseq variable field for acquiring a sequence number of the SIP message of the current turn.
Therefore, in an application embodiment, the service end may send an identification request message MRCPv2define-gram message to the service end using the MRCPSEND command field, and the service end may reply to the MRCPv 2200 Complete second response message, thereby indicating that the parameter configuration is successful. The service end uses the second sending command field such as MRCPSEND to send the identification request message to the service end, and the service end may reply to the first response message such as MRCPv 2200 in Progress, which indicates that the identification request message is being processed. The service end reads a preset audio file as voice data to be processed by using the audio command field, and sends the voice data to the service end by using a real-time transmission protocol, and the service end returns the recognition result of the voice data to be processed to the service end through the first event message.
In this embodiment, a pre-stored test script similar to a natural language is provided by combining a command field and a variable field, so that steps in a test process of sending a message, waiting for completion of a preset step, controlling waiting time, detecting whether the received message includes preset content, storing an audio file, sending the audio file and the like can be realized, and information required by the test is acquired by using the variable field, thereby abstracting and simplifying a complex field in the message. Compared with manual writing of a pre-stored test script, the testing method of the voice processing system executes the pre-stored test script to obtain the testing result of the voice processing system, a testing user does not need to know the SIP, MRCPv2 and a bottom computer of an RTP protocol, and can effectively simulate various complex communication scenes by only mastering the basic communication flow of the MRCPv2 protocol. The performance parameter statistics and error recording work in the test process are automatically executed by the command field, so that the test workload is further reduced. In addition, by combining different command fields and/or variable fields, various voice processing scenes of different network environments and/or test flows can be simulated, and the voice processing scenes under special environments can be stably reproduced.
When the test result includes the recognition result, the first event message indicates that the recognition of the voice data to be processed is completed and includes the recognition result of the voice data to be processed, and therefore the recognition result of the voice data to be processed is taken as the test result.
When the test result includes the message sending time and the message receiving time in the test process, the message sending time in the test process may be any one or more of the above message sending times, including but not limited to the time for sending the session request message, the confirmation message, the parameter configuration message, and the identification request message to the server; and the message receiving time in the test process may be any one or more of the above message receiving times, including but not limited to the time when the first response message, the second response message, and the third response message of the server are received. The message connectivity between the service end and the service end of the voice processing system can be reflected by the conditions of the message sending time and the message receiving time in the test process.
Under the condition that the test result comprises the identification delay parameter and/or the identification delay performance result, reading a preset audio file from the step S41 as the voice data to be processed, and sending the preset audio file to the server by using a real-time transmission protocol, so that the time for sending the preset audio file can be known; and determining from step S43 that the first event message fed back by the server is received within the first preset time, and obtaining the time when the first event message is received, thereby obtaining the time difference between the time when the preset audio file is sent and the time when the first event message is received, and obtaining the identification delay parameter, such as the RECOG-lastersp delay. And obtaining a comparison result between the time difference between the sending of the preset audio file and the receiving of the first event message and a preset threshold value, and obtaining a time delay performance identification result. The time of sending the last frame of the preset audio file corresponds to the time point of the end of the speaking of the test user in the actual call dial test scene, and the time of receiving the recognition result can correspond to the time point of the voice broadcast feedback given by the recognition service, so that the time delay performance of the voice recognition processing system can be effectively quantized, and the service time delay performance can be reflected by the recognition time delay parameter and the recognition time delay performance result. Compared with the actual telephone dialing test scene, the test user subjectively judges the interference of subjective factors when the time delay performance of the voice processing system exists, reflects the service time delay performance by utilizing the identification time delay parameter and/or the identification time delay performance result, and quantificationally measures the time delay performance of the voice processing service, so that the test of the time delay performance is more objective and standardized. In an application embodiment, the identification delay parameter is a RECOG-lastersp delay, the preset threshold is 400ms, whether the identification delay parameter is smaller than the preset threshold is judged, and if so, it indicates that the delay characteristic of the voice processing system meets the requirement. In order to reflect the time delay performance of the voice processing system more accurately, the time delay parameters can be tested and acquired repeatedly, the comparison result between the time difference between the time when the preset audio file is sent and the time when the first event message is received and the preset threshold value can be acquired, the ratio between the time when the preset audio file is sent and the time when the first event message is received and the preset ratio threshold value can be acquired, and the comparison result between the ratio and the preset ratio can be acquired. For example, the recognition delay parameter is a RECOG-lastelsp delay, the preset threshold is 400ms, the preset proportion threshold is 2500ms, and the preset proportion is 0.5%, so that whether the recognition delay parameter is smaller than the preset threshold 400ms or not is judged, if yes, whether the proportion that the recognition delay parameter is larger than the preset proportion threshold 2500ms is smaller than the preset proportion 0.5% or not is judged, and if yes, it indicates that the delay characteristic of the speech processing system meets the requirement. The preset threshold, the preset proportion threshold and the preset proportion can be set by self according to needs, and the delay performance of the voice processing service is measured by setting feasible quantitative indexes such as the preset threshold and the like.
Referring to fig. 5, fig. 5 is a flowchart illustrating an application embodiment of a testing method of a speech processing system according to the present application.
In this embodiment, the voice processing system includes a service end for providing the voice data to be processed and a service end for processing the voice data to be processed, and the test method of the voice processing system is executed by the service end of the voice processing system.
Step S501: SIPSND: SIP invite.
And executing the SIP SEND command field and sending the SIP invite message to the server. In an application embodiment, the SIP send command field and the third variable fields are executed to obtain third to-be-transmitted information by using the third variable fields, and an SIP invite message is generated by using the third to-be-transmitted information and sent to the server.
Step S502: WAIT: the SIP 200 OK.
That is, the fifth WAIT command field WAIT is executed to determine whether the third response message of the server is received within the fifth preset time, and the fourth detection command field may also be executed to detect whether the third response message contains the fourth status code 200.
Step S503: SIPACKSEND: SIP ack.
The fifth send command field SIPACKSEND is executed to send an acknowledgement message SIP ack to the server. The SIPACKSEND command field is a fifth send command field. The SIP ack message is an acknowledgement message indicating that the service end receives the third response message of the service end.
Step S504: MRCPSEND: MRCPv2 define-gram.
And executing the MRCPSEND command field and the plurality of second variable fields to obtain second information to be transmitted by using the plurality of second variable fields, and generating MRCPv2define-gram by using the second information to be transmitted and sending the MRCPSEND 2define-gram to the server.
Step S505: MRCPWAIT: MRCPv 2200 Complete.
The MRCPWAIT command field is executed to determine whether the MRCPv 2200 Complete of the server is received within a fourth preset time, and the rethcck command field may also be executed to detect whether the MRCPv 2200 Complete contains the third status code 200. The MRCPWAIT command field is a fourth wait command field. The MRCPv 2200 Complete message is a second response message, and the MRCPv 2200 Complete message indicates that the parameter configuration is successful.
For the rest of the description of steps S501 to S505, reference may be made to the above description of the embodiment shown in fig. 2, and further description is omitted here.
Step S506: MRCPSEND: MRCPv2 Recognize.
And executing the MRCPSEND command field and the first variable fields to obtain first information to be transmitted by using the first variable fields, and generating MRCPv2Recognize by using the first information to be transmitted and sending the MRCPSEND 2Recognize to the server. The MRCPSEND command field is a second send command field and MRCPv2Recognize is an identify request message.
Step S507: MRCPWAIT: MRCPv 2200 in Progress.
The MRCPWAIT command field is executed to determine whether the MRCPv 2200 in Progress of the server is received within the third preset time, and the rethck command field is also executed to detect whether the MRCPv 2200 in Progress contains the second state code 200. MRCPWAIT is a third waiting command field; MRCPv 2200 in Progress is a first response message indicating that the server is processing the identification request message. The rethceck command field is a second detection command field.
For the rest of the descriptions of step S506 to step S507, reference may be made to the above description of the embodiment shown in fig. 3, and further description is omitted here.
Step S508: AUDIOSEND: RTP voice data to be processed.
And executing the AUDIOSEND command field to read a preset audio file as the voice data to be processed, and sending the voice data to the server by using a real-time transmission protocol. Audiosendend is a first transmission command field.
Step S509: MRCPWAIT MRCPv2 Start-of-input.
The MRCPWAIT command field is executed to determine whether MRCPv2 Start-of-input of the server side feedback was received within a second preset time. MRCPv2 Start-of-input is a second event message indicating that a front end point of the voice data to be processed has been found; the MRCPWAIT command field is a second wait command field.
Step S510: MRCPWAIT: MRCPv2Recognize Complete.
And executing the MRCPWAIT command field to determine whether a first event message fed back by the service end is received within a first preset time. The MRCPv2Recognize Complete is a first event message indicating that the recognition of the voice data to be processed has been completed and including the recognition result of the voice data to be processed; the MRCPWAIT command field is a first wait command field. It is of course also possible to implement the first detection command field to detect whether the first event message contains the first status code.
Step S511: SIPSND: SIP bye.
And executing the SIPSND command field and the plurality of fourth variable fields to obtain fourth to-be-transmitted information by using the plurality of fourth variable fields, and generating an SIP bye by using the fourth to-be-transmitted information and sending the SIP bye to the server. The SIPSND command field is a sixth sending command field; the SIP bye is a message for ending the voice processing and initializing the voice recognition resources.
Step S512: 200 ok.
And executing the sixth waiting command field to determine that 200ok of the server is received within the sixth preset time, thus finishing the test of the voice processing system. 200ok is a fourth response message sent by the server.
For the rest of the descriptions of steps S508 to S512, reference may be made to the above description of the embodiment shown in fig. 4, and further description is omitted here.
Referring to fig. 6, fig. 6 is a schematic frame diagram of an embodiment of an electronic device according to the present application. Specifically, the electronic device 600 in this embodiment includes a memory 610 and a processor 620 coupled to each other. The memory 610 is used for storing program instructions and data required to be stored when the processor 620 processes the program instructions.
The processor 620 controls the memory 610 and itself to implement the steps of any of the embodiments of the method for testing a speech processing system described above. Processor 620 may also be referred to as a CPU (Central Processing Unit). Processor 620 may be an integrated circuit chip having signal processing capabilities. The Processor 620 may also be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 620 may be commonly implemented by a plurality of circuit-forming chips.
Referring to fig. 7, fig. 7 is a schematic diagram of a memory device according to an embodiment of the present application. The memory device 700 of the present application stores program instructions 701 that can be executed by a processor, and the program instructions 701 are used for implementing steps of any of the above-described embodiments of the testing method of the speech processing system.
The storage device 700 may be a medium that can store the program instructions 701, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, or may be a server that stores the program instructions 701, and the server may send the stored program instructions 701 to another device for operation, or may self-operate the stored program instructions 701.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some interfaces, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (13)

1. A testing method for a voice processing system is characterized in that the voice processing system comprises a service end and a server, the method is applied to the service end, and the method comprises the following steps:
reading a pre-stored test script, wherein the pre-stored test script is compiled by adopting a natural language-like language, the pre-stored test script comprises a variable field, the variable field is used for acquiring information required by the test, and the information required by the test is acquired from a configuration file and/or system information;
and executing the pre-stored test script to obtain voice data to be processed, and sending the voice data to be processed to the server to obtain a test result of the voice processing system.
2. The method of claim 1, wherein the pre-stored test script further comprises a command field; the command field is a class natural language encapsulated with a bottom layer code and is used for realizing steps in a test process.
3. The method of claim 2, wherein the step of the command field in the test procedure for implementation comprises at least one of: sending a message, waiting for the completion of a preset step, controlling the waiting time, detecting whether the received message comprises preset content, storing an audio file and sending the audio file;
the information required for the test includes at least one of: the network address of the service end, the related information of the message, a preset audio file, a preset grammar file and a preset synthetic text.
4. The method according to claim 2, wherein the testing method of the speech processing system is executed by the service end, and the executing the pre-stored test script comprises:
executing a first sending command field to read a preset audio file as voice data to be processed, and sending the voice data to be processed to the server by using a real-time transmission protocol;
executing a first waiting command field to determine whether a first event message fed back by the server is received within a first preset time, wherein the first event message indicates that the recognition of the voice data to be processed is completed and includes a recognition result of the voice data to be processed;
if the first event message is not received within a first preset time, recording a first error state which indicates that the first event message is not received;
and if the first event message is received within a first preset time, taking the identification result as the test result.
5. The method of claim 4, wherein prior to executing the first wait command field, the executing the pre-stored test script further comprises:
executing a second waiting command field to determine whether a second event message fed back by the server is received within a second preset time, wherein the second event message indicates that a front end point of the voice data to be processed is found;
if the second event message is received within second preset time, executing the first waiting command field; otherwise, recording a second error status indicating that the second event message is not received;
and/or, if the first event message is received within a first preset time, taking the identification result as the test result, including:
if the first event message is received within a first preset time, executing a first detection command field to detect whether the first event message contains a first status code;
if the first event message contains a first state code, taking the recognition result of the voice data to be processed as the test result; otherwise, a third error status is recorded indicating that the first event message does not contain the first status code.
6. The method of claim 4, wherein prior to executing the first send command field, the executing the pre-stored test script further comprises:
executing a second sending command field and a plurality of first variable fields to obtain first information to be transmitted by utilizing the plurality of first variable fields, generating the identification request message by utilizing the first information to be transmitted and sending the identification request message to the server;
executing a third waiting command field to determine whether a first response message of the server is received within a third preset time;
if the first response message is not received within the third preset time, recording a fourth error state indicating that the first response message is not received;
if the first response message is received within the third preset time, executing a second detection command field to detect whether the first response message contains a second state code;
executing the first sending command field if the first response message contains a second state code; otherwise, a fifth error status is recorded indicating that the first response message does not contain a second state code.
7. The method of claim 6, wherein executing the pre-stored test script prior to executing the second send command field further comprises:
executing a third sending command field and a plurality of second variable fields to obtain second to-be-transmitted information by using the plurality of second variable fields, generating the parameter configuration message by using the second to-be-transmitted information and sending the parameter configuration message to the server;
executing a fourth waiting command field to determine whether a second response message of the server is received within a fourth preset time;
if the second response message is not received within the fourth preset time, recording a sixth error state indicating that the second response message is not received;
if a second response message is received within the fourth preset time, executing a third detection command field to detect whether the second response message contains a third status code;
if the second response message contains a third status code, executing the second sending command field; otherwise, a seventh error status is recorded indicating that the second response message does not contain a third status code.
8. The method of claim 7, wherein executing the pre-stored test script prior to executing the third send command field further comprises:
executing a fourth sending command field and a plurality of third variable fields to obtain third to-be-transmitted information by using the plurality of third variable fields, generating the session request message by using the third to-be-transmitted information and sending the session request message to the server;
executing a fifth waiting command field to determine whether a third response message of the server is received within a fifth preset time;
if the third response message is not received within the fifth preset time, recording an eighth error state indicating that the third response message is not received;
if a third response message is received within the fifth preset time, executing a fourth detection command field to detect whether the third response message contains a fourth status code;
if the third response message contains a fourth status code, executing a fifth sending command field to send a confirmation message to the server; otherwise, a ninth error status is recorded indicating that the third response message does not contain a fourth status code.
9. The method according to claim 8, wherein the protocol adopted by the parameter configuration message, the second response message, the identification request message, the first response message, and the first event message is a media resource control protocol; the protocol adopted by the session request message, the third response message and the confirmation message is a session initial protocol;
and/or the first information to be transmitted and the second information to be transmitted comprise at least one of message length, identification code and content length of corresponding message, and the third information to be transmitted comprises: the network address of the service end, the network address of the service end and a transport layer protocol, an identification code, a sequence number, a transaction identification, a label domain content and a message length used by a corresponding message.
10. The method of claim 4, wherein the test results include at least one of: the identification result, the message sending time and the message receiving time in the test process, the identification time delay parameter and the identification time delay performance result; the identification time delay parameter is the time difference between the end of sending the preset audio file and the end of receiving the first event message, and the identification time delay performance result is the comparison result between the time difference and a preset threshold value.
11. The method of claim 1, wherein the executing the pre-stored test script comprises:
and executing a plurality of pre-stored test scripts in parallel.
12. An electronic device comprising a memory and a processor coupled to each other, the memory having stored therein program instructions, the processor being configured to execute the program instructions to implement the method of testing a speech processing system according to any one of claims 1 to 11.
13. A memory device storing program instructions executable by a processor for implementing a method of testing a speech processing system according to any one of claims 1 to 11.
CN202011112439.5A 2020-10-16 2020-10-16 Test method of voice processing system, related equipment and storage device Pending CN112365902A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011112439.5A CN112365902A (en) 2020-10-16 2020-10-16 Test method of voice processing system, related equipment and storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011112439.5A CN112365902A (en) 2020-10-16 2020-10-16 Test method of voice processing system, related equipment and storage device

Publications (1)

Publication Number Publication Date
CN112365902A true CN112365902A (en) 2021-02-12

Family

ID=74508173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011112439.5A Pending CN112365902A (en) 2020-10-16 2020-10-16 Test method of voice processing system, related equipment and storage device

Country Status (1)

Country Link
CN (1) CN112365902A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113223496A (en) * 2021-06-22 2021-08-06 北京字节跳动网络技术有限公司 Voice skill testing method, device and equipment

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363301B1 (en) * 1997-06-04 2002-03-26 Nativeminds, Inc. System and method for automatically focusing the attention of a virtual robot interacting with users
CN1529466A (en) * 2003-09-29 2004-09-15 港湾网络有限公司 Network device automatic measuring method
CN1756200A (en) * 2004-09-28 2006-04-05 中兴通讯股份有限公司 Integrated tester and integrated testing method for media server
CN101043543A (en) * 2006-03-24 2007-09-26 中兴通讯股份有限公司 Automatized test tool and method for program controlled exchanger
CN102508775A (en) * 2011-10-31 2012-06-20 彭勇 Interactive automation test system
CN102664764A (en) * 2012-04-01 2012-09-12 Ut斯达康通讯有限公司 Call control flow testing tool based on media gateway control protocol and method thereof
CN104281516A (en) * 2013-07-09 2015-01-14 尼尔森(美国)有限公司 Methods and apparatus to characterize households with media meter data
CN104932980A (en) * 2015-06-30 2015-09-23 北京奇虎科技有限公司 Automatic software test method and device
CN106095398A (en) * 2016-05-10 2016-11-09 深圳前海信息技术有限公司 Big data mining application process based on DSL and device
CN106326114A (en) * 2016-08-16 2017-01-11 北京控制工程研究所 Automatic aerospace software testing method for approximately natural language testing case script
CN106484613A (en) * 2016-09-13 2017-03-08 郑州云海信息技术有限公司 A kind of interface automated test frame based on fitnese
CN107050763A (en) * 2017-06-14 2017-08-18 韶关星火创客科技有限公司 A kind of its control method of new robot for rehabilitation of anklebone
WO2018121531A1 (en) * 2016-12-30 2018-07-05 中兴通讯股份有限公司 Method and apparatus for generating test case script
CN109309578A (en) * 2017-07-28 2019-02-05 中国移动通信有限公司研究院 Speech quality detection method, detection service device, communication terminal and storage medium
CN111414303A (en) * 2020-03-17 2020-07-14 中国建设银行股份有限公司 Auxiliary system and method for script performance test
CN111488267A (en) * 2019-01-25 2020-08-04 北京搜狗科技发展有限公司 Interface test script generation method and device and electronic equipment

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363301B1 (en) * 1997-06-04 2002-03-26 Nativeminds, Inc. System and method for automatically focusing the attention of a virtual robot interacting with users
CN1529466A (en) * 2003-09-29 2004-09-15 港湾网络有限公司 Network device automatic measuring method
CN1756200A (en) * 2004-09-28 2006-04-05 中兴通讯股份有限公司 Integrated tester and integrated testing method for media server
CN101043543A (en) * 2006-03-24 2007-09-26 中兴通讯股份有限公司 Automatized test tool and method for program controlled exchanger
CN102508775A (en) * 2011-10-31 2012-06-20 彭勇 Interactive automation test system
CN102664764A (en) * 2012-04-01 2012-09-12 Ut斯达康通讯有限公司 Call control flow testing tool based on media gateway control protocol and method thereof
CN104281516A (en) * 2013-07-09 2015-01-14 尼尔森(美国)有限公司 Methods and apparatus to characterize households with media meter data
CN104932980A (en) * 2015-06-30 2015-09-23 北京奇虎科技有限公司 Automatic software test method and device
CN106095398A (en) * 2016-05-10 2016-11-09 深圳前海信息技术有限公司 Big data mining application process based on DSL and device
CN106326114A (en) * 2016-08-16 2017-01-11 北京控制工程研究所 Automatic aerospace software testing method for approximately natural language testing case script
CN106484613A (en) * 2016-09-13 2017-03-08 郑州云海信息技术有限公司 A kind of interface automated test frame based on fitnese
WO2018121531A1 (en) * 2016-12-30 2018-07-05 中兴通讯股份有限公司 Method and apparatus for generating test case script
CN107050763A (en) * 2017-06-14 2017-08-18 韶关星火创客科技有限公司 A kind of its control method of new robot for rehabilitation of anklebone
CN109309578A (en) * 2017-07-28 2019-02-05 中国移动通信有限公司研究院 Speech quality detection method, detection service device, communication terminal and storage medium
CN111488267A (en) * 2019-01-25 2020-08-04 北京搜狗科技发展有限公司 Interface test script generation method and device and electronic equipment
CN111414303A (en) * 2020-03-17 2020-07-14 中国建设银行股份有限公司 Auxiliary system and method for script performance test

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
杨学敏等: "发动机控制软件自动测试脚本技术研究", 测控技术, 31 December 2017 (2017-12-31) *
柳晓华等: "基于BDD的数据驱动自动化测试方法", 青岛大学学报(自然科学版), 31 August 2016 (2016-08-31) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113223496A (en) * 2021-06-22 2021-08-06 北京字节跳动网络技术有限公司 Voice skill testing method, device and equipment

Similar Documents

Publication Publication Date Title
US7653547B2 (en) Method for testing a speech server
CN106782551B (en) Voice recognition system and method
WO2017041366A1 (en) Method and device for image recognition
US8275586B2 (en) Enabling end-to-end testing of applications across networks
CN106201794B (en) A kind of detection method and device of server
CN113190388B (en) TCP interface test method, medium, equipment and device
US9799214B2 (en) Systems and methods for multi-device interaction
CN110399306B (en) Automatic testing method and device for software module
WO2023207965A1 (en) Chip verification method and platform
US11955113B1 (en) Electronic signatures via voice for virtual assistants' interactions
CN112365902A (en) Test method of voice processing system, related equipment and storage device
CN110908913A (en) Test method and device for return visit robot, electronic equipment and storage medium
CN110543428B (en) Application system testing method and device
CN111506496A (en) Test data acquisition method and device, electronic equipment and storage medium
US8713619B2 (en) Creation and use of test cases for automated testing of media-based applications
CN106454403A (en) Data display method, equipment and data display system
CN111817916B (en) Test method, device, equipment and storage medium based on mobile terminal cluster
CN103458318B (en) media data transmission method and system
US9203637B2 (en) Automated audio stream testing
CN110471776B (en) Application data communication method, device and system
CN112615853B (en) Android device audio data access method
CN110221958B (en) Application testing method, device, computing equipment and computer readable storage medium
CN111490928A (en) Instant communication message reading and replying method and device and electronic equipment
CN114093392A (en) Audio labeling method, device, equipment and storage medium
CN107276852B (en) Data security detection method and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination