An audio testing method and apparatus
By extracting and comparing the sound effect event list and sound effect files in the application and calculating the degree of difference, the problems of low efficiency and poor accuracy of sound effect elements in the existing technology are solved, and efficient and accurate difference comparison is achieved.
Patent Information
- Application Number
- CN202111405631.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2041-11-24
AI Technical Summary
The prior art is difficult to efficiently and accurately compare the differences between sound effects elements in two different versions of applications, resulting in huge workloads and inability to accurately quantify the differences.
By extracting the list of sound effects events in the two versions of the application, loading the application, triggering and recording the sound effects elements of each sound effects event, comparing the corresponding sound effects files, and calculating the degree of difference to achieve efficient and accurate difference comparison.
It significantly improves the recording efficiency of sound effects elements, reduces the workload of differential comparisons, and accurately compares the differences between sound effects elements in two different versions of the application.
Smart Images

Figure CN114185774B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to an audio testing method and device. Background Art
[0002] With the development of audio processing technology, people have higher and higher requirements for the quality of various types of audio. In the update and iteration of applications, errors that occur during the development process may cause noise in the sound elements of the new version of the application, thereby affecting the sound quality of the sound elements played by the application. Therefore, it is necessary to find the differences in sound elements during the version iteration of the application to solve the noise problem.
[0003] Related technologies usually use manual comparison to determine the differences in sound elements between different versions of applications one by one. This kind of difference comparison obviously requires a huge workload, and at the same time, it is impossible to accurately quantify the differences in sound elements between two different versions of applications.
[0004] There is no effective solution in the related technology on how to efficiently and accurately compare the differences between the sound elements in two different versions of an application. Summary of the invention
[0005] The embodiments of the present application provide an audio testing method, device, computer-readable storage medium, and computer program product, which can efficiently and accurately compare the differences between sound effect elements in two different versions of an application.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] The present application provides an audio testing method, including:
[0008] Extract the list of sound effect events in the two versions of the application respectively;
[0009] The following process is performed for each version of the application:
[0010] Loading the application, triggering the application to play the sound effect element corresponding to each sound effect event included in the sound effect event list in the application, and recording to obtain a sound effect file corresponding to each sound effect event;
[0011] A comparison process is performed on two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, wherein the two sound effect files correspond one-to-one to the two versions of the application program.
[0012] The present application provides an audio testing device, comprising:
[0013] An extraction module, used for respectively extracting the sound effect event lists in the two versions of the application;
[0014] A processing module is used to perform the following processing for each version of the application: loading the application, triggering the application to play the sound effect element corresponding to each sound effect event included in the sound effect event list in the application, and recording and obtaining the sound effect file corresponding to each sound effect event;
[0015] The comparison module is used to compare two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, wherein the two sound effect files correspond one-to-one to the two versions of the application.
[0016] An embodiment of the present application provides an electronic device, including:
[0017] A memory for storing executable instructions;
[0018] The processor is used to implement the audio testing method provided in the embodiment of the present application when executing the executable instructions stored in the memory.
[0019] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the audio testing method provided in the embodiment of the present application.
[0020] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the audio test method described above in the embodiment of the present application.
[0021] The embodiments of the present application have the following beneficial effects:
[0022] On the one hand, since the application can trigger the application to play and record the sound effect elements corresponding to each sound effect event included in the sound effect event list, the recording efficiency of the sound effect elements can be significantly improved, and the workload of difference comparison can be effectively reduced, so that the differences between the sound effect elements in two different versions of the application can be efficiently compared; on the other hand, through precise calculation of the comparison processing, the accurate difference degree value describing the difference between the sound effect elements of the same sound effect event can be obtained, thereby realizing the accurate comparison of the differences between the sound effect elements in two different versions of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1is a structural diagram of the audio test system architecture provided in an embodiment of the present application;
[0024] Figure 2 is a structural schematic diagram of an audio testing device provided in an embodiment of the present application;
[0025] FIG. 3A to FIG. 3E is a flowchart of an audio testing method provided in an embodiment of the present application;
[0026] FIG. 4A to FIG. 4I It is a schematic diagram of the principle of the audio testing method provided in the embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0028] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0029] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0031] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0032] 1) Audio: refers to sound waves with frequencies between 20 Hz and 20 kHz that can be heard by the human ear, or refers to files that store sound content.
[0033] 2) Application: refers to a computer program that plays and records sound elements of sound events. Applications can usually be divided into graphical user interfaces (GUIs) and engines. Each application runs in an independent process and has its own independent address space. The boundary between different applications is called a process boundary. Applications can be game applications, video applications, live broadcast applications, etc.
[0034] 3) Sound effect elements: a set of sound effects or voices with the same attributes. For example, sound effect elements can be footsteps, running sounds, wind sounds, flame sounds, waterfall sounds, bird sounds, etc. Each sound effect event can correspond to at least one sound effect element. For example, when a sound effect event occurs, the application can be triggered to play at least one corresponding sound effect element at the same time. That is, when a sound effect event occurs, the sound of flames, waterfalls, birds, etc. can be played at the same time, thereby simulating the real sound environment of the sound effect event. The types of sound effect elements can include voices and skill sound effects of characters (for example, virtual characters in games).
[0035] 5) Random container: A storage structure used to store sound effect elements. By accessing the random container, sound effect elements can be selected and played in the random container.
[0036] 6) Sound effect file: A file formed after recording a sound effect element. The sound effect file includes the spectrogram, audio length, frequency distribution information changing over time, loudness information, etc. of the recorded sound effect element, which can reflect the audio characteristics of the recorded sound effect element.
[0037] 8) Game Audio: It is the background music played when specific behaviors or operations occur in electronic games.
[0038] 9) Game Engine: Game engine refers to some pre-written editable computer game systems or core components of some interactive real-time graphics applications. These systems provide game designers with various tools needed to write games, with the aim of allowing game designers to easily and quickly create game programs without starting from scratch. Most of them support multiple operating platforms, such as Linux, Mac OS X, and Microsoft Windows. Game engines include the following systems: rendering engine (i.e. "renderer", including 2D graphics engine and 3D graphics engine), physics engine, collision detection system, sound effects, script engine, computer animation, artificial intelligence, network engine, and scene management.
[0039] 10) Sound engine: Also known as an audio engine, such as Wwise, is an audio middleware application that can be used to develop game sound effects.
[0040] 11) Audio middleware: used to manage, modify, and mix audio resources. Audio middleware is a third-party audio tool that directly interacts with the game engine. Audio middleware can improve the efficiency of audio development.
[0041] 12) Audio Precision: A way for the sound engine to drive the music, dialogues and other sounds in the game, which can control the playback, pause, stop, etc. of the specified sound engine object.
[0042] 13) Sound effect events: Sound effect events can represent events that occur in a sound scene. For example, a sound effect event in a game scene can be an attack launched by a game object in the current game scene, causing another game object to be damaged. The corresponding sound effect elements in this sound effect event may include gunshots, screams of damaged game objects, cheers of attacking game objects, etc.
[0043] During the implementation of the embodiments of the present application, the applicant discovered that the related technologies have the following problems: In the related technical solutions, there are problems such as high time cost, low efficiency, some sound effects need to be repeatedly triggered in specific scenes for testing, and narrow coverage. When the number of sound effects is large, manual testing can only cover the required parts, and the business requirements for testers are high. Testers need to know the sound effects well in order to clearly find problems. The audio testing method provided in the embodiments of the present application can efficiently and accurately compare the differences between the sound effect elements in two different versions of the application.
[0044] In some embodiments, in the application scenario of online games, since online games need to constantly adapt to the needs of players, the update and iteration speed of online game versions is usually fast. During the update and iteration process of the version, certain noise may be brought to the sound effect files of the online games, thereby affecting the sound quality of the sound effect files, thereby affecting the user experience of the players. Through the audio testing method provided in the embodiment of the present application, the difference between the sound effect elements of two different versions of the same online game can be efficiently and accurately compared, so that the noise brought by the online game during the version update and iteration process can be discovered in time and repaired in time, thereby improving the user experience of the players.
[0045] In other embodiments, in the application scenario of online video live broadcast, in the scenario where the screens of two hosts are interconnected, the audience of one host room and the audience of the other host room are in two completely different host channels, but the pictures and sound effects of the two hosts are completely consistent. However, due to the different network environments in which the two hosts are located, there are certain differences in the sound effects between the hosts. In order to allow the audience of the two hosts to have exactly the same auditory experience, the broadcast server can use the audio testing method provided in the embodiment of the present application to efficiently and accurately compare the exact differences between the sound effect elements of the two hosts, so as to facilitate subsequent adjustments to enhance the user experience.
[0046] The embodiments of the present application provide an audio testing method, apparatus, device, computer-readable storage medium, and computer program product, which can efficiently and accurately compare the differences between two different versions of sound effect elements. The exemplary application of the audio testing device provided by the embodiments of the present application is described below. The device provided by the embodiments of the present application can be implemented as various types of user terminals such as laptop computers, tablet computers, desktop computers, set-top boxes, mobile devices (for example, mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and can also be implemented as servers.
[0047] See also Figure 1 , Figure 1 It is an optional architectural diagram of the audio test system 100 provided in an embodiment of the present application. To realize the application scenario of audio testing (for example, testing the difference between sound effect elements of different versions of the same sound effect event), a terminal (terminal 400 is shown as an example) is connected to a server 200 via a network 300. The network 300 may be a wide area network or a local area network, or a combination of the two.
[0048] The terminal 400 is used for the user to use the client 410, which is displayed on a graphical interface 410-1 (graphic interface 410-1 is shown as an example). The terminal 400 and the server 200 are connected to each other via a wired or wireless network.
[0049] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a car terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0050] In some embodiments, the terminal 400 sends two versions of the application to the server 200. After receiving the two versions of the application, the server 200 obtains the difference between the sound effect elements of the same sound effect event by loading the application, and sends the obtained difference to the terminal 400. After receiving the difference, the terminal 400 displays a reminder message indicating successful receipt in the graphical interface 410-1, and searches for errors in the sound effect elements of the same sound effect event during the update and iteration process based on the difference, and eliminates the noise introduced in the sound effect elements due to the errors.
[0051] In other embodiments, the server 200 sends two versions of the application to the terminal 400. After receiving the two versions of the application, the terminal 400 obtains the difference between the sound effect elements of the same sound effect event by loading the application, and sends the obtained difference to the server 200, so that after receiving the difference, the server 200 can find errors in the sound effect elements of the same sound effect event during the update and iteration process based on the difference, and eliminate the noise introduced in the sound effect elements due to the errors.
[0052] See also Figure 2 , Figure 2 is a structural diagram of a server 200 of the audio testing method provided in an embodiment of the present application, Figure 2 The server 200 shown includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the server 200 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .
[0053] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0054] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0055] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0056] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0057] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic businesses and process hardware-based tasks.
[0058] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless LAN (WiFi), and Universal Serial Bus (USB).
[0059] In some embodiments, the audio testing device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 The audio test device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: an extraction module 4551, a processing module 4552, and a comparison module 4553. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. The functions of each module will be explained below.
[0060] In other embodiments, the audio test device provided in the embodiments of the present application can be implemented in hardware. As an example, the audio test device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the audio test method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0061] In some embodiments, the terminal or server can implement the audio test method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in an operating system; in general, the computer program can be an application, module or plug-in in any form.
[0062] The audio testing method provided in the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the terminal provided in the embodiment of the present application.
[0063] See also Figure 3A , Figure 3A is a flowchart of the audio testing method provided in the embodiment of the present application, which will be combined with Figure 3A Steps 101 to 103 are shown for explanation.
[0064] In step 101, the sound effect event lists in the two versions of the application are respectively extracted.
[0065] In some embodiments, the application may be a computer program that plays and records sound effect elements, wherein the application includes a sound effect event list and an audio resource file, and the types of application include game APPs, short video APPs, and instant messaging APPs. The sound effect event list may represent the mapping relationship between sound effect events and sound effect elements, for example, sound effect elements A1, A2, and A3 corresponding to sound effect event A. Sound effect events may represent events that occur in an audio scene.
[0066] As an example, the two versions of an application may be a historical version of an application and a current version of an application. The sound effect event list in the historical version of the application corresponds to the sound effect elements A1, A2, and A3 of the sound effect event A; the sound effect event list in the current version of the application corresponds to the sound effect elements A1, A2, A3, and A4 of the sound effect event A.
[0067] In some embodiments, when the sound effect event lists in the two versions of the application are extracted respectively in the above step 101, the audio resource file can also be obtained in the following manner: the audio resource files in the two versions of the application are extracted respectively, and the audio resource file (Sound Bank) can be a file including audio resources or audio data.
[0068] As an example, the audio resource files in the historical version of the application may include audio resources of sound effect elements A1, A2, and A3 corresponding to sound effect event A, and the audio resource files in the current version of the application may include audio resources of sound effect elements A1, A2, A3, and A4 corresponding to sound effect event A.
[0069] In some embodiments, see Figure 3B , Figure 3B 104 to 105. After extracting the audio resource files in the two versions of the application respectively, that is, after step 101 and before step 102, the audio resource files can be preprocessed by executing steps 104 to 105.
[0070] In step 104, the audio resource files in the two versions of the application are parsed to obtain binary data of the two versions of the audio resource files respectively.
[0071] In some embodiments, the parsing process may be implemented by converting the audio data in the audio resource file into binary data.
[0072] As an example, see Figure 4B , Figure 4B It is a schematic diagram of the principle of the audio testing method provided in the embodiment of the present application. Figure 4B What is shown is the hexadecimal data of a version of the audio resource file obtained after parsing the audio resource file. Figure 4B The hexadecimal data shown is converted into binary data to obtain the binary data of the audio resource file.
[0073] In step 105, the following processing is performed on the binary data of each version of the audio resource file: the playback attribute of the audio resource file is set by modifying the binary data of the audio resource file.
[0074] As an example, the following processing is performed on the binary data of the audio resource file of the historical version of the application: the playback attributes of the audio resource file of the historical version are set by modifying the binary data of the audio resource file of the historical version. The following processing is performed on the binary data of the audio resource file of the current version of the application: the playback attributes of the audio resource file of the current version are set by modifying the binary data of the audio resource file of the current version. The audio resource file of the historical version can be any version of the audio resource file among multiple historical versions of audio resource files.
[0075] As an example, see Figure 4C , Figure 4C Schematic diagram of the principle of the audio test method provided in the embodiment of the present application. Figure 4C When the hexadecimal data shown is the hexadecimal data of the audio resource file of the historical version, the hexadecimal data 51 of the audio resource file of the historical version is the hexadecimal data before modification, and the hexadecimal data 52 of the audio resource file of the historical version is the modified hexadecimal data, that is, the relevant data in the hexadecimal data 51 is modified to 01 and 1A, and the other data remains unchanged, that is, the modified hexadecimal data is obtained. Then, the modified hexadecimal data is converted to the base system to obtain the modified binary data, thereby realizing the modification of the binary data of the audio resource file of the historical version, thereby realizing the setting of the playback attributes of the audio resource file of the historical version.
[0076] In this way, by modifying the binary data of the audio resource file, the playback attributes of the audio resource file are set to the playback attributes that are most conducive to subsequent comparison processing, thereby effectively ensuring that the final difference is valuable.
[0077] In some embodiments, participating Figure 3B , Figure 3B The flowchart of the audio test method provided by the embodiment of the present application is shown in FIG. 105. In the above step 105, the playback attribute of the audio resource file is set by modifying the binary data of the audio resource file, which can be achieved by executing steps 1051 to 1052.
[0078] In step 1051, binary data associated with the random mode is determined from the binary data of the audio resource file.
[0079] In some embodiments, the random method may be a random sampling method, for example, a random sampling method with replacement, a random sampling method without replacement, a random sorting method, a descending sorting method, an ascending sorting method, and the like.
[0080] As an example, see Figure 4B , see Figure 4B The hexadecimal data of the audio resource file shown, the determined binary data associated with the random mode can be obtained by converting the hexadecimal data ffff, that is, the binary data associated with the random mode can be 1111111111111111. It can be understood that the binary data associated with the random mode can be used to control the playback properties of the audio resource file.
[0081] In step 1052, the binary data associated with the random manner is replaced with first preset binary data, wherein the first preset binary data is used to set the playback attribute of the audio resource file to a random sorting attribute.
[0082] In some embodiments, the playback attributes of an audio resource file include a random sorting attribute and a random sampling attribute with replacement, etc. When the playback attribute of an audio resource file is a random sorting attribute, during playback, multiple sound effect elements corresponding to each sound effect event in the audio resource file can be stored in a random container, and then at least one sound effect element in the random container is selected by random sampling without replacement, and the selected at least one sound effect element is played; when the playback attribute of an audio resource file is a random sampling attribute with replacement, during playback, multiple sound effect elements corresponding to each sound effect event in the audio resource file can be stored in a random container, and then at least one sound effect element in the random container is selected by random sampling with replacement, and the selected at least one sound effect element is played.
[0083] In some embodiments, the first preset binary data is used to set the playback attribute of the audio resource file to a random sorting attribute. For example, the first preset binary data may be 00001111 or the like.
[0084] In this way, by replacing the binary data associated with the random method with the first preset binary data, the playback attribute of the audio resource file is set to a random sorting attribute, so that when playing the sound effect element, at least one sound effect element in the random container is selected for playing by random sampling without replacement, thereby ensuring that the sound effect elements played are non-repetitive.
[0085] In some embodiments, see Figure 3C In the above step 105, the playback attribute of the audio resource file is set by modifying the binary data of the audio resource file, which can be achieved by executing steps 1053 to 1054.
[0086] In step 1053, binary data associated with the playing mode in the binary data of the audio resource file is determined.
[0087] In some embodiments, the playing method may include playing a plurality of sound effect elements in a random container continuously and playing only one sound effect element in a random container at a time.
[0088] As an example, see Figure 4B , see Figure 4B The hexadecimal data of the audio resource file shown, the determined binary data associated with the playing mode can be obtained by converting the hexadecimal data d005, that is, the binary data associated with the playing mode can be 1101000000000101. It can be understood that the binary data associated with the playing mode can be used to control the playing properties of the audio resource file.
[0089] In step 1054, the binary data associated with the play mode is replaced with second preset binary data, wherein the second preset binary data is used to set the play attribute of the audio resource file to a continuous play attribute.
[0090] In some embodiments, the playback attribute of the audio resource file may also include a continuous playback attribute and a single playback attribute, etc. When the playback attribute of the audio resource file is a continuous playback attribute, during playback, multiple sound effect elements corresponding to each sound effect event in the audio resource file can be stored in a random container, and then one sound effect element in the random container is selected in turn, and each selected sound effect element is played in turn; when the playback attribute of the audio resource file is a single playback attribute, during playback, multiple sound effect elements corresponding to each sound effect event in the audio resource file can be stored in a random container, and then one sound effect element in the random container is selected and the selected sound effect element is played singlely.
[0091] As an example, when the second preset binary data is 0010100001100101, the binary data 1101000000000101 associated with the play mode may be replaced with 0010100001100101.
[0092] In this way, by replacing the binary data associated with the playback mode with the second preset binary data, the playback attribute of the audio resource file is set to a continuous playback attribute, so that when playing the sound effect element, a sound effect element in the random container is selected in turn, and each selected sound effect element is played in turn, thereby ensuring the continuous playback of multiple sound effect elements.
[0093] In some embodiments, see Figure 3D In the above step 105, the playback attribute of the audio resource file is set by modifying the binary data of the audio resource file, which can be achieved by executing steps 1055 to 1058.
[0094] In step 1055 , binary data associated with the loop attribute in the binary data of the audio resource file is determined.
[0095] In some embodiments, the loop attribute may be an attribute of a loop-played sound effect element. Corresponding to the loop attribute is a non-loop attribute, which may be an attribute of a single-played sound effect element.
[0096] As an example, see Figure 4B , see Figure 4B The hexadecimal data of the audio resource file shown, the determined binary data associated with the loop attribute can be obtained by converting the hexadecimal data 0200, that is, the binary data associated with the loop attribute can be 1000000000. It can be understood that the binary data associated with the loop attribute can be used to control the playback attribute of the audio resource file.
[0097] In step 1056, the binary data associated with the loop attribute is replaced with third preset binary data, wherein the third preset binary data is used to turn off the loop attribute of the audio resource file.
[0098] In some embodiments, when the loop property of an audio resource file is in a closed state, during playback, an application program may be triggered to play at least one sound effect element corresponding to each sound effect event in the audio resource file once, that is, the at least one sound effect element corresponding to each sound effect event in the audio resource file is not played in a loop; when the loop property of an audio resource file is in an open state, during playback, an application program may be triggered to play at least one sound effect element corresponding to each sound effect event in the audio resource file in a loop, that is, after playing at least one sound effect element corresponding to each sound effect event in the audio resource file once, the at least one sound effect element corresponding to each sound effect event in the audio resource file continues to be played in a loop.
[0099] As an example, when the third preset binary data is 0111100001100101, the binary data 1000000000 associated with the cyclic attribute may be replaced with 0010100001100101.
[0100] In this way, by replacing the binary data associated with the loop attribute with the third preset binary data, the loop attribute of the audio resource file is placed in a closed state, so that when the sound effect element is played, at least one sound effect element corresponding to each sound effect event in the audio resource file is not played in a loop, thereby ensuring that when at least one sound effect element is played, there is no loop playback, effectively avoiding the situation where the difference information amount is affected due to playback disorder.
[0101] In step 1057, binary data associated with the probability attribute in the binary data of the audio resource file is determined.
[0102] In some embodiments, binary data associated with a probability attribute may be used to control the probability of playing a sound effect element in a random container.
[0103] As an example, see Figure 4B , see Figure 4B The hexadecimal data of the audio resource file shown, the determined binary data associated with the loop attribute can be obtained by converting the hexadecimal data bb33, that is, the binary data associated with the loop attribute can be 1011101100110011. It can be understood that the binary data associated with the probability attribute can be used to control the playback attribute of the audio resource file.
[0104] In step 1058, the binary data associated with the probability attribute is replaced with fourth preset binary data, wherein the fourth preset binary data is used to modify the probability attribute value of the audio resource file to 1.
[0105] In some embodiments, when the probability attribute value of an audio resource file is 1, during playback, the application may be triggered to play each sound effect element corresponding to each sound effect event in the audio resource file; when the probability attribute value of an audio resource file is less than 1, during playback, the application may be triggered to play some sound effect elements corresponding to each sound effect event in the audio resource file.
[0106] In this way, by replacing the binary data associated with the probability attribute in the binary data of the audio resource file with the fourth preset binary data, when the sound effect element of each sound effect event is played, all sound effect elements of each sound effect event are triggered to play, that is, each sound effect element is triggered to play.
[0107] In step 102, the following processing is performed for each version of the application: the application is loaded, and according to each sound effect event included in the sound effect event list in the application, the application is triggered to play the sound effect element corresponding to each sound effect event, and the sound effect file corresponding to each sound effect event is recorded.
[0108] As an example, in the application scenario of online games, a sound effect event can be an event in the current game scene, and the sound effect element of the sound effect event can be the sound effect that each game object in the current game scene needs to emit. For example, a sound effect event can be a game object in the current game scene launching an attack that causes another game object to be damaged. The corresponding sound effect element in this sound effect event can be a gunshot, a scream from a damaged game object, a cheer from an attacking game object, and so on.
[0109] As an example, in the application scenario of online games, the application can be triggered to play the sound effect elements corresponding to each sound effect event by calling the corresponding interface of the C# layer of the sound engine in the game engine, where the C# layer includes the interface layer, business logic layer and data access layer.
[0110] In some embodiments, a sound effect event may correspond to at least one sound effect element. For example, in the application scenario of video conferencing, in a sound effect event where the host is hosting a meeting, the sound effect event may correspond to one sound effect element, namely, the host's sound effect element; in a sound effect event of a free discussion, the sound effect event may correspond to multiple sound effect elements, namely, sound effect elements corresponding to multiple conference participants.
[0111] As an example, the following processing is performed for the current version of the application: the current version of the application is loaded, and according to each sound effect event included in the sound effect event list in the current version of the application, the application is triggered to play the sound effect element corresponding to each sound effect event, and the sound effect file corresponding to each sound effect event is recorded; the following processing is performed for any historical version of the application among multiple historical versions of the application: any historical version of the application is loaded, and according to each sound effect event included in the sound effect event list in the recorded historical version of the application, the application is triggered to play the sound effect element corresponding to each sound effect event, and the sound effect file corresponding to each sound effect event is recorded.
[0112] In some embodiments, see Figure 3B When the playback attribute of the audio resource file is a random sorting attribute, triggering the application to play the sound effect element corresponding to each sound effect event in the above step 102 can be achieved by executing steps 1021 to 1023.
[0113] In step 1021, multiple sound effect elements corresponding to each sound effect event in the audio resource file are stored in a random container.
[0114] In some embodiments, the random container may be a storage structure for storing sound effect elements. By storing multiple sound effect elements corresponding to each sound effect event in the audio resource file into the random container, it is convenient to select the corresponding sound effect element from the random container for playback later.
[0115] In step 1022, at least one sound effect element in the random container is selected by random sampling without replacement.
[0116] As an example, the method of random sampling without playback may be that after selecting a sound effect element in a random container, the selected sound effect element is not put back into the random container, that is, the selected sound effect element is deleted from the random container.
[0117] As an example, when the multiple sound effect elements of sound effect event A stored in the random container are 1, 2, 3, 4, 5, and 6, the process of selecting at least one sound effect element in the random container by sampling without replacement can be: if the sound effect element randomly selected for the first time is 2, then the sound effect element randomly selected for the second time is 3; then the sound effect element randomly selected for the third time is 1, 4, 5, and 6. For example, the sound effect element randomly selected for the third time can be 5; and so on, the selection is performed by sampling without replacement.
[0118] In this way, by selecting at least one sound effect element in the random container through random sampling without replacement, the sound effect elements finally played can be non-repeated.
[0119] In step 1023, the selected at least one sound effect element is played.
[0120] As an example, after selecting at least one sound effect element in a random container by random sampling without replacement, the selected at least one sound effect element is played, so as to achieve the effect of not repeatedly playing the same sound effect element. It is understandable that if at least one sound effect element in a random container is selected by random sampling with replacement, the same sound effect element will be played repeatedly, which will increase the complexity of subsequent difference calculation.
[0121] In some embodiments, see Figure 3C When the play attribute of the audio resource file is a continuous play attribute, triggering the application to play the sound effect element corresponding to each sound effect event in the above step 102 can be achieved by executing steps 1024 to 1025.
[0122] In step 1024, multiple sound effect elements corresponding to each sound effect event in the audio resource file are stored in a random container.
[0123] In some embodiments, the random container may be a storage structure for storing sound effect elements. By storing multiple sound effect elements corresponding to each sound effect event in the audio resource file into the random container, it is convenient to select the corresponding sound effect element from the random container for playback later.
[0124] In step 1025, a sound effect element in the random container is selected in sequence, and each selected sound effect element is played in sequence.
[0125] As an example, one sound effect element in the random container is selected in sequence, rather than selecting only one element in the random container, that is, at least two sound effect elements in the random container are selected.
[0126] As an example, when the multiple sound effect elements of sound effect event A stored in the random container are 1, 2, 3, 4, 5, and 6, the process of selecting one sound effect element in the random container in sequence can be: the sound effect element randomly selected for the first time is 2, the sound effect element randomly selected for the second time is 1; the sound effect element randomly selected for the third time can be 1; and so on, the selection is performed in sequence.
[0127] In this way, by selecting one sound effect element in the random container in turn, multiple sound effect elements can be played in the end.
[0128] In some embodiments, when the playback attributes of the audio resource file are set to continuous playback attributes and random sorting attributes at the same time, a sound effect element in the random container is selected in sequence by random sampling without replacement, and each selected sound effect element is played in sequence.
[0129] In some embodiments, see Figure 3D In the above step 102, triggering the application to play the sound effect element corresponding to each sound effect event can be achieved by executing steps 1026 to 1028.
[0130] In step 1026, when the loop attribute of the audio resource file is in a closed state, the application is triggered to play at least one sound effect element corresponding to each sound effect event in the audio resource file once.
[0131] As an example, when the loop property of an audio resource file is turned off, the application will only play at least one sound effect element corresponding to each sound effect event in the audio resource file once, and will not loop at least one sound effect element corresponding to each sound effect event in the audio resource file.
[0132] In some embodiments, when the playback attributes of an audio resource file are set to both continuous playback and random sorting attributes, and when the loop attribute of the audio resource file is in the off state, the application is triggered to select a sound effect element in a random container in sequence by random sampling without replacement, and play each selected sound effect element in sequence.
[0133] In step 1027, when the loop attribute of the audio resource file is in an on state, the application is triggered to loop play at least one sound effect element corresponding to each sound effect event in the audio resource file.
[0134] As an example, when the loop property of an audio resource file is turned on, the application will loop and play at least one sound effect element corresponding to each sound effect event in the audio resource file, rather than playing at least one sound effect element corresponding to each sound effect event in the audio resource file only once.
[0135] In step 1028, when the probability attribute value of the audio resource file is 1, the application is triggered to play each sound effect element corresponding to each sound effect event in the audio resource file.
[0136] In some embodiments, the probability attribute value of the audio resource file can be any value between 0 and 1, for example, 0.66, etc. The probability attribute value of the audio resource file represents the probability of triggering the application to play the sound effect element corresponding to each sound effect event in the audio resource file, that is, each sound effect element corresponding to each sound effect event in the audio resource file can have a probability attribute value.
[0137] As an example, when the probability attribute value of the audio resource file is 1, the application is triggered to play each sound effect element corresponding to each sound effect event in the audio resource file. When the probability attribute value of the audio resource file is less than 1, the application is triggered to play some sound effect elements corresponding to each sound effect event in the audio resource file.
[0138] In step 103, a comparison process is performed on two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, wherein the two sound effect files correspond one-to-one to the two versions of the application program.
[0139] As an example, two sound effect files corresponding to the same sound effect event are compared to obtain the difference between the sound effect elements of the same sound effect event, which can be achieved by the following formula:
[0140]
[0141] Among them, audio an Represents a version of the sound effect file, audio bn Represents another version of the sound file, audio an and audio bn are all one-dimensional vectors of length n; the spec function is used to calculate the spectrogram matrix of the sound effect file. The spec function is calculated by fast Fourier transform. The calculation result of the spec function is of dimension A two-dimensional matrix, nfft represents the length of overlap between each data frame, m represents the number of intervals after the frequency range is divided; the abs function is used to take the average of each item in the result matrix.
[0142]
[0143] Among them, n represents audio an and audio bn The length of m represents the number of intervals after the frequency range is divided; Representation spectral matrix; diff audioCharacterize the difference value.
[0144] In some embodiments, see Figure 3E In the above step 103, the two sound effect files corresponding to the same sound effect event are compared to obtain the difference between the sound effect elements of the same sound effect event, which can be achieved by executing steps 1031 to 1034.
[0145] In step 1031, the spectrum function is called to process two sound effect files corresponding to the same sound effect event to obtain the spectrum matrices corresponding to the two sound effect files respectively.
[0146] As an example, the spectrum function may be a spec function, that is, by calling the spec function to process two sound effect files corresponding to the same sound effect event, the spectrum matrices corresponding to the two sound effect files are obtained, wherein the expression of the spectrum matrix may be:
[0147] spec(audio an ) (3)
[0148] spec(audio an ) (4)
[0149] Among them, spec(audio an ) represents the spectral matrix of a version of the sound effect file, spec(audio an ) represents a spectral matrix of another version of a sound effect file.
[0150] In step 1032, the matrix items at the same position in the spectrum matrix corresponding to the two sound effect files are compared respectively to obtain the comparison result of each position.
[0151] As an example, when the spectral matrices corresponding to the two sound effect files are three-order matrices, the expressions of the spectral matrices corresponding to the two sound effect files can be:
[0152]
[0153]
[0154] Among them, a11 represents the matrix items of the first row and first column of the spectrum matrix of a version of the sound effect file; a12 represents the matrix items of the first row and second column of the spectrum matrix of a version of the sound effect file; a13 represents the matrix items of the first row and third column of the spectrum matrix of a version of the sound effect file; a21 represents the matrix items of the second row and first column of the spectrum matrix of a version of the sound effect file; a22 represents the matrix items of the second row and second column of the spectrum matrix of a version of the sound effect file; a23 represents the matrix items of the second row and third column of the spectrum matrix of a version of the sound effect file; a31 represents the matrix items of the third row and first column of the spectrum matrix of a version of the sound effect file; a32 represents the matrix items of the third row and second column of the spectrum matrix of a version of the sound effect file; a33 represents the matrix items of the third row and third column of the spectrum matrix of a version of the sound effect file; similarly, b11 represents the matrix items of the first row and first column of the spectrum matrix of another version of the sound effect file, and so on.
[0155] As an example, the matrix items at the same position in the spectrum matrix corresponding to the two sound effect files are compared and processed respectively to obtain the comparison result of each position. The expression for comparing the matrix items in the first row and the first column in the spectrum matrix corresponding to the two sound effect files can be:
[0156] c11=a11-b11 (7)
[0157] Among them, c11 represents the comparison result of the first row and the first column; b11 represents the matrix item of the first row and the first column of the spectrum matrix of another version of the sound effect file; a11 represents the matrix item of the first row and the first column of the spectrum matrix of one version of the sound effect file.
[0158] In step 1033, when the comparison result is a negative number, the comparison result is replaced with the opposite number of the comparison result.
[0159] As an example, when the comparison result c11 of the first row and the first column is a negative number, the comparison result of the first row and the first column is replaced with the opposite number of c11, that is, -c11.
[0160] In step 1034, the comparison results of each position are summed, the summed result is multiplied by the difference coefficient, and the multiplied result is divided by the length of the sound effect file to obtain the difference between the sound effect elements of the same sound effect event.
[0161] As an example, the comparison results of each position are summed up, and the expression for the summation result can be:
[0162] sum=|c11|+|c12|+|c13|+|c21|+|c22|+|c23|+|c31|+|c32|+|c33| (8)
[0163] Among them, |c11| represents the comparison result of the first row and the first column; |c12| represents the comparison result of the first row and the second column; |c13| represents the comparison result of the first row and the third column, and so on; sum represents the summation processing result.
[0164] As an example, the coefficient of variation could be 10 7 Etc. The expression for multiplying the summation result by the difference coefficient can be:
[0165] d = 10 7 ×sum (9)
[0166] Among them, d represents the result of multiplication processing; sum represents the result of summation processing; 10 7 Characterize the coefficient of variation.
[0167] In this way, by determining the difference between the sound effect elements of the same sound effect event in the two versions of the application, the difference between the sound effect elements of the same sound effect event in the two versions of the application can be compared, which facilitates the subsequent repair of the latest version of the application and effectively improves the efficiency and accuracy of comparing the difference between the sound effect elements.
[0168] The following is an explanation of an exemplary application of an embodiment of the present application in a practical application scenario.
[0169] In some embodiments, the embodiments of the present application may have the following application scenarios. For example, in the audio test scenario of an online game, the development of the game is usually achieved through a game engine, which is usually divided into a graphics engine, a sound engine, a network engine, a script engine, and the like. As for the development of game audio, it is usually developed through a sound engine, which is used to play game sound effects, provide underlying support, and manage various sound resources. The playing, pausing, and stopping of game sound effects can be achieved through the event mechanism of the sound engine. Specifically, the game engine can send the event name to the sound engine in the game engine, thereby triggering the playing, pausing, and stopping of game sound effects.
[0170] As the game version is updated and iterated, the various sound effects in the game are also updated and iterated accordingly. For different versions of games, the sound effect elements of the same sound effect event may have various errors during the update and iteration process. Since the number of sound effect elements in a game is very large, it is extremely difficult to find these errors by manual search, and the efficiency is extremely low to manually compare the differences of each sound effect element in the game one by one. The audio testing method provided by the embodiment of the present application can be widely used in the audio testing of games, and can quickly find the difference between the sound effect elements of the same sound effect event in two different versions of the game, so as to facilitate the subsequent rapid discovery of various errors that may occur in the sound effect elements of the same sound effect event during the update and iteration process, and timely modify these possible errors, thereby significantly improving the testing efficiency of game audio.
[0171] As an example, in an online game developed by a game engine (Unity), the play, pause, stop, etc. of its sound effects are all implemented through the event mechanism of the sound engine (Wwise). Specifically, in the game engine, the event name is sent to the sound engine to trigger the play, stop, pitch, volume, etc. of the sound. The event names of each game object's voice lines, skill sound effects, etc. are all configured in advance in the configuration table. Some higher-level game objects may reconfigure the sound effects of the original skin, then a skin-specific suffix will be added to all event names of the original skin. By analyzing the relevant configuration files, a full list of sound effect events for the skins of all game objects can be combined, where the full list of sound effect events includes a one-dimensional string array. All sound effect resources in a game are stored in the audio resource file (Sound Bank) and wem file exported by the sound engine. The audio resource file and wem file contain the original audio data and event object configurations of all game events.
[0172] The embodiment of the present application obtains the full list of sound effect event names and audio resource files (Sound Bank) of two released versions of a game, pre-processes the sound library files, and then imports the two into a pre-built Unity project. The project includes the same version of Wwise integration as that used in the game project (mainly script code - C# layer API provided by the Wwise engine). The written C# script logic triggers each event to play and record the sound one by one, and then compares the recorded audios of the two released versions of the game to quantify the difference (i.e., the degree of difference described above).
[0173] As an example, see Figure 4A , Figure 4A1 is a schematic diagram of the principle of the audio testing method provided in the embodiment of the present application. The sound library file 1 and event list 1 of game version 1 and the sound library file 2 and event list 2 of game version 2 are pre-processed and loaded into the corresponding version of the Wwise integrated game engine project. After playing and recording, the sound effect differences of the two versions are compared.
[0174] During the specific implementation of the embodiments of the present application, the applicant found that there are usually the following three problems in the process of playing and recording:
[0175] First, there are problems with random sound effects. Specifically, there are a large number of game object voices and game object skill sound effects in random sound effects. For example, when game object 1 moves, an event will be triggered to control the random container to play the sound effect of game object 1. At this time, the game object will play a line. For example, one of the following five lines may be played randomly, such as playing line 1, playing line 2, playing line 3, playing line 4, and playing line 5. Due to the randomness of the line triggering, line 1 may be triggered at one time point and line 2 may be triggered at another time point. Then, when recording the game object voices and game object skill sound effects of two game versions, it is possible that the voice of the game object in one version is recorded as line 1, and the voice of the game object in the other version is recorded as line 2. There is a huge difference between line 1 and line 2, and there is no comparability. Therefore, this will result in the difference obtained by comparison having no information.
[0176] Secondly, there are problems with probabilistic sound effects. Specifically, there are a large number of game object voices and game object skill sound effects in probabilistic sound effects. For example, the triggering settings of some voice events are not 100% triggering, such as the triggering settings of some voice events are 30% triggering. Then, even if the event is triggered, there is a 70% probability that the voice will not be triggered. Probabilistic sound effects are similar to random sound effects. When recording the voices and skill sound effects of game objects in two versions of the game, there may be a 30% probability that the voice of the game object recorded in one version is line 1, and a 30% probability that the voice of the game object recorded in another version is line 1. Then, the voices of the two versions of the game objects are different, and there is no comparability. Therefore, this will result in the difference obtained by comparison without any information.
[0177] Third, there are problems with looping sound effects. Specifically, looping sound effects usually have an irregular playback duration. Some skill sound effects and background music are determined by the game player's behavior. For example, a game object moves from one position to another in the game scene in response to the game player's operation. The playback duration of the looping sound effect is determined by the length between one position and another. In this case, the event of playing the looping sound effect will cause the looping sound effect to play in a loop continuously.
[0178] Therefore, after realizing the above problems, the applicants set the playback properties of the audio resource files by modifying the binary data of the audio resource files, thereby solving the above problems and effectively improving the accuracy of the obtained difference.
[0179] As an example, see Figure 4B , Figure 4B It is a schematic diagram of the principle of the audio testing method provided in the embodiment of the present application. Figure 4B , which is a schematic diagram of hexadecimal data of an audio resource file provided in an embodiment of the present application, can be Figure 4B After the hexadecimal data of the audio resource file is converted into binary data, the playback attribute of the audio resource file is set by modifying the binary data of the audio resource file.
[0180] As an example, see Figure 4C , Figure 4C 1 is a schematic diagram of the principle of the audio test method provided by the embodiment of the present application. In the hexadecimal data 51 before modification, the third column data and the fifth column data in the 0001CFC7 row are modified to obtain the third column data 01 and the fifth column data 1A in the 0001CFC7 row in the modified hexadecimal data 52, and then the modified third column data 01 and the fifth column data 1A are converted to obtain the corresponding binary data.
[0181] In some embodiments, by modifying the corresponding binary configuration data in the random container into binary data associated with the random mode (Shuffle) and binary data associated with the play mode (Continuous), for example, the binary data associated with the random mode (Shuffle) can be converted from hexadecimal data 0x01, and the binary data associated with the play mode (Continuous) can be converted from hexadecimal data 0x1A. In addition, by setting a random seed in the C# layer of the game engine (wherein the C# layer includes the interface layer, the business logic layer, and the data access layer) to fix the play order of the play sequence, when the application is triggered to play the sound effect element corresponding to each sound effect event, all the sound effects or voices in the random container (the sound effects or voices are the sound effect elements described above) will be played in a fixed order.
[0182] In some embodiments, the random sampling method of the above-mentioned random container includes a random method (Shuffle) and a random replacement method (Standard), wherein the random method (Shuffle) is used to randomly sort all audio elements in the random container (i.e., the sound effect elements described above), and sample the audio elements in the random container using a sampling method without replacement; the random replacement method (Standard) is used to sample the audio elements in the random container using a sampling method with replacement.
[0183] In some embodiments, the quantity playback mode of the above-mentioned random container includes a playback mode (Continuous) and a quantity mode (step), wherein the playback mode (Continuous) is used to continuously play a sequence composed of several elements in the random container, and the quantity mode (step) is used to play only one element in the random container at a time (i.e., the sound effect element described above).
[0184] In some embodiments, by setting a random seed at the C# layer of the game engine, the same random container plays the elements in the random container (ie, the sound effect elements described above) in the same fixed sequence during different runtimes.
[0185] As an example, the following uses the playback results of the random container triggered during two runs to illustrate the differences in playback results caused by the permutations and combinations of the above settings. Before the specific description, the example scenario is explained. For example, in a random container including 5 elements (i.e., the sound effect elements described above), different numerical labels represent different elements or voice content (i.e., the sound effect elements described above), and a sequence of numbers separated by multiple commas represents the process of sequential continuous playback.
[0186] For example, when the random replacement method (Standard) and the quantity method (step) are combined, that is, a single element is played, and the two plays are inconsistent, the playback triggered by the two runs is shown as follows:
[0187] Triggered when first run: 2;
[0188] Trigger when running for the second time: 3;
[0189] Among them, 2 represents the element played during the first run, and 3 represents the element played during the second run.
[0190] For example, when the random replay mode (Standard) and the playback mode (Continuous) are combined, that is, a non-fixed number of elements are played, and there may be repeated and omitted elements in one run, the playback triggered by two runs is shown as follows:
[0191] Trigger on first run: 1, 3, 2, 3, 5, 3;
[0192] The second run triggers: 2, 1, 4;
[0193] Among them, 1, 3, 2, 3, 5, 3 represent the elements played during the first run, and 2, 1, 4 represent the elements played during the second run.
[0194] For example, when the random mode (Shuffle) and the playback mode (Continuous) are combined, the playback of all elements in the random container is triggered, but the order of the elements played during the two runs is inconsistent. The playback triggered during the two runs is shown as follows:
[0195] Trigger on first run: 1, 2, 3, 4, 5;
[0196] The second run triggers: 3, 1, 5, 4, 2;
[0197] Among them, 1, 2, 3, 4, 5 represent the elements played during the first run, and 3, 1, 5, 4, 2 represent the elements played during the second run.
[0198] For example, when the random mode (Shuffle) and the playback mode (Continuous) are combined, the random seed is set in the C# layer of the game engine at the same time, which triggers the playback of all elements in the random container. However, the order of the elements played in the two runs is the same. The playback triggered by the two runs is shown as follows:
[0199] Trigger on first run: 1, 3, 2, 4, 5;
[0200] The second run triggers: 1, 3, 2, 4, 5;
[0201] Among them, 1, 3, 2, 4, and 5 represent the elements played during the first run, and 1, 3, 2, 4, and 5 represent the elements played during the second run.
[0202] In some embodiments, the trigger of the voice time may be set to 100% trigger by modifying the data value of the trigger attribute in the audio resource file from any value to 0x000C842.
[0203] In some embodiments, the loop attribute of the loop sound effect is canceled (the binary data value representing the loop attribute of the audio object in the audio resource file is changed from 0x00 to 0x01), and the original loop sound effect trigger will only play once.
[0204] In some embodiments, the sound effect playback and recording process is mainly integrated into the interface provided by the C# layer through the sound engine in the game engine project, thereby loading the audio resource file through the load group (Load Bank), sending events to the sound engine through the event processing function (Post Event) and binding the end of playback, the callback function of stopping recording sound, recording the output of the sound engine to a file through the first code (Start Output Capture), and stopping recording through the second code (Stop Output Capture).
[0205] As an example, see Figure 4D , Figure 4D It is a schematic diagram of the principle of the audio test method provided in the embodiment of the present application. In the recording and playing process of the embodiment of the present application, the playing and recording are performed by using an application programming interface (API).
[0206] In some embodiments, for the parts of the audio files finally recorded in the two versions with different audio contents, the difference degree is calculated to measure the difference between the two sounds heard by the human ear, and the difference value is calculated using the following formula:
[0207]
[0208]
[0209] Among them, audio an Representation version a for the audio data corresponding to the same event, audio bn Representation version b for the audio data corresponding to the same event, audio an and audio bn are all one-dimensional vectors of length n; the spec function is used to calculate the spectrogram of the audio. The spec function is calculated by fast Fourier transform. The calculation result of the spec function is of dimension A two-dimensional matrix, nfft represents the length of overlap between each data frame, and m represents the number of intervals after the frequency range is divided; the abs function is used to take the average value of each item in the result matrix; The difference matrix representing the spectrogram; diff audio Characterize the difference value.
[0210] For example, when the difference value is 0.05, the difference is small, that is, the human ear can hardly feel the difference between the two versions; when the difference value is 3.5, there is a certain difference, that is, the human ear can perceive the subtle difference between the two versions; when the difference value is 75, the difference is large, that is, the human ear can perceive the obvious difference between the two versions.
[0211] In some embodiments, see FIG. 4E to FIG. 4F , FIG. 4E to FIG. 4F Schematic diagram of the principle of the audio test method provided in the embodiment of the present application. By calculating the difference between the audio of two different versions of the same event, and summarizing the difference of each event, a sound effect difference table (such as Figure 4F shown) and event difference tables (such as Figure 4E The event difference table includes records of adding, modifying, and deleting event names in the configuration file, see Figure 4E The event difference table shown includes a list of sound effect events deleted in version 218031 (available in version 198701 but not in this version), configuration changes in version 218031-198701, and a list of sound effect events added in version 218031 (available in version 198701 but not in this version); the sound effect difference table includes the results of the newly added, modified, deleted, and modified playback and recording sound effects of the two versions of the application, arranged in ascending or descending order according to the comparison difference results, see Figure 4F The sound effect difference table shown includes a list of sound effect events that are not available in version 218031 but are available in version 198701 (configuration deleted, no sound effect resources), a list of sound effect content changes between version 218031 and 198701, and a list of sound effect events that are newly added in version 218031 (not available in version 198701 and only available in this version).
[0212] In some embodiments, see Figure 4G , Figure 4G Schematic diagram of the principle of the audio test method provided in the embodiment of the present application. The sound effect files recorded in the two versions can be wav format files, and the relevant sound effects of the game can be played in response to the opening operation. Figure 4G As shown, the file name of the sound effect file can be Play-XXXX.wav, etc., the modification date of the sound effect file can be 2021 / 5 / 31xx / xx, the file type of the sound effect file can be wav format, and the file size of the sound effect file can be xx (KB).
[0213] In some embodiments, see Figure 4H , Figure 4H It is a schematic diagram of the principle of the audio testing method provided in the embodiment of the present application. Figure 4HThe waveform and spectrogram of the two versions of the sound effect files are shown. From the waveform and spectrogram, you can intuitively see the length of the audio, the frequency distribution over time, the loudness information, and the specific time period of the difference between the two audios.
[0214] In some embodiments, see Fig. 4I , Fig. 4I Schematic diagram of the principle of the audio testing method provided in the embodiment of the present application. Through the audio testing method provided in the embodiment of the present application, some problems that are not easy to find by manual inspection can be discovered in advance, so that the efficiency of the sound effect test is greatly improved, and the experience of game players is better guaranteed. Fig. 4I As shown, in version v62, the killing sound effect in version v61 was adjusted to compare the difference between the sound effects of version v61 and version v62. The developer submitted the corresponding error report to facilitate subsequent repair work.
[0215] It can be understood that in the embodiments of the present application, audio data related to sound effect elements of sound effect events, when the embodiments of the present application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0216] The following is a description of an exemplary structure of the audio testing device 455 provided in the embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the audio testing device 455 of the memory 450 may include: an extraction module 4551, used to extract the sound effect event lists in the two versions of the application respectively; a processing module 4552, used to perform the following processing for each version of the application: loading the application, triggering the application to play the sound effect elements corresponding to each sound effect event included in the sound effect event list in the application, and recording the sound effect file corresponding to each sound effect event; a comparison module 4553, used to compare two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, wherein the two sound effect files correspond one-to-one to the two versions of the application.
[0217] In some embodiments, the audio testing device 455 further includes: a second extraction module, used to extract audio resource files from two versions of the application respectively; when the playback attribute of the audio resource file is a random sorting attribute, the processing module 4552 is also used to trigger the application to perform the following processing: storing multiple sound effect elements corresponding to each sound effect event in the audio resource file into a random container; selecting at least one sound effect element in the random container by random sampling without replacement; and playing at least one selected sound effect element.
[0218] In some embodiments, when the playback attribute of the audio resource file is a continuous playback attribute, the above-mentioned processing module 4552 is also used to trigger the application to perform the following processing: storing multiple sound effect elements corresponding to each sound effect event in the audio resource file into a random container; selecting a sound effect element in the random container in turn, and playing each selected sound effect element in turn.
[0219] In some embodiments, the above-mentioned processing module 4552 is also used to trigger the application to play at least one sound effect element corresponding to each sound effect event in the audio resource file once when the loop attribute of the audio resource file is in the off state; when the loop attribute of the audio resource file is in the on state, trigger the application to loop play at least one sound effect element corresponding to each sound effect event in the audio resource file; when the probability attribute value of the audio resource file is 1, trigger the application to play each sound effect element corresponding to each sound effect event in the audio resource file.
[0220] In some embodiments, the comparison module 4553 is also used to call the spectrum function to process two sound effect files corresponding to the same sound effect event to obtain the spectrum matrices corresponding to the two sound effect files respectively; compare the matrix items at the same position in the spectrum matrices corresponding to the two sound effect files respectively to obtain the comparison result of each position; when the comparison result is a negative number, replace the comparison result with the opposite of the comparison result; sum the comparison result of each position, multiply the summation result by the difference coefficient, divide the multiplication result by the length of the sound effect file to obtain the difference between the sound effect elements of the same sound effect event.
[0221] In some embodiments, the above-mentioned audio testing device 455 also includes: a parsing module, which is used to parse and process the audio resource files in the two versions of the application, and obtain the binary data of the two versions of the audio resource files respectively; a setting module, which is used to perform the following processing on the binary data of each version of the audio resource file: setting the playback properties of the audio resource file by modifying the binary data of the audio resource file.
[0222] In some embodiments, the above-mentioned setting module is also used to determine binary data associated with the random method from the binary data of the audio resource file; replace the binary data associated with the random method with first preset binary data, wherein the first preset binary data is used to set the playback attribute of the audio resource file to a random sorting attribute.
[0223] In some embodiments, the above-mentioned setting module is also used to determine the binary data associated with the playback mode in the binary data of the audio resource file; replace the binary data associated with the playback mode with second preset binary data, wherein the second preset binary data is used to set the playback attribute of the audio resource file to a continuous playback attribute.
[0224] In some embodiments, the above-mentioned setting module is also used to determine the binary data associated with the loop attribute in the binary data of the audio resource file; replace the binary data associated with the loop attribute with third preset binary data, wherein the third preset binary data is used to put the loop attribute of the audio resource file into a closed state; determine the binary data associated with the probability attribute in the binary data of the audio resource file; replace the binary data associated with the probability attribute with fourth preset binary data, wherein the fourth preset binary data is used to modify the probability attribute value of the audio resource file to 1.
[0225] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the audio test method described above in the embodiment of the present application.
[0226] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the audio test method provided by the present application embodiment, for example, Figure 3A The audio test method is shown.
[0227] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0228] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0229] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0230] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0231] In summary, the embodiments of the present application have the following beneficial effects:
[0232] (1) By modifying the binary data of the audio resource file, the playback attribute of the audio resource file is set, so that the playback attribute of the audio resource file is set to the playback attribute that is most conducive to subsequent comparison processing, thereby effectively ensuring that the final difference is valuable.
[0233] (2) By replacing the binary data associated with the random method with the first preset binary data, the playback attribute of the audio resource file is set to a random sorting attribute, so that when playing the sound effect element, at least one sound effect element in the random container is selected for playing by a random sampling method without replacement, thereby ensuring that the played sound effect elements are non-repetitive.
[0234] (3) By replacing the binary data associated with the loop attribute with the third preset binary data, the loop attribute of the audio resource file is set to a closed state, so that when the sound effect element is played, at least one sound effect element corresponding to each sound effect event in the audio resource file is not played in a loop, thereby ensuring that when at least one sound effect element is played, no loop playback occurs, effectively avoiding the situation where the difference information amount is affected due to playback disorder.
[0235] (4) By replacing the binary data associated with the playback mode with the second preset binary data, the playback attribute of the audio resource file is set to a continuous playback attribute, so that when playing the sound effect element, one sound effect element in the random container is selected in turn, and each selected sound effect element is played in turn, thereby ensuring the continuous playback of multiple sound effect elements.
[0236] (5) By replacing the binary data associated with the probability attribute in the binary data of the audio resource file with the fourth preset binary data, when the sound effect element of each sound effect event is played, all the sound effect elements of each sound effect event are triggered to play, that is, each sound effect element is triggered to play.
[0237] (6) By storing multiple sound effect elements corresponding to each sound effect event in the audio resource file into a random container, it is convenient to select the corresponding sound effect element from the random container for playback later.
[0238] (7) By selecting at least one sound effect element in the random container through random sampling without replacement, the sound effect elements finally played can be non-repetitive.
[0239] (8) By determining the difference between the sound effect elements of the same sound effect event in two versions of the application, the difference between the sound effect elements of the same sound effect event in the two versions of the application can be compared, which facilitates the subsequent repair of the latest version of the application and effectively improves the efficiency and accuracy of the difference comparison between the sound effect elements.
[0240] (9) Since the application can trigger the application to play and record the sound effect elements corresponding to each sound effect event included in the sound effect event list, the recording efficiency of the sound effect elements can be significantly improved, and the time cost of calculating the difference degree can be effectively shortened. At the same time, through the precise calculation of the comparison processing, the accurate difference degree value describing the difference between the sound effect elements of the same sound effect event can be obtained, thereby realizing the efficient and accurate comparison of the difference between two different versions of the sound effect elements.
[0241] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. An audio testing method, characterized in that: The method comprises: Extract the list of sound effect events in the two versions of the application respectively; The following process is performed for each version of the application: Loading the application, triggering the application to play the sound effect element corresponding to each sound effect event included in the sound effect event list in the application, and recording to obtain a sound effect file corresponding to each sound effect event; A comparison process is performed on two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, wherein the two sound effect files correspond one-to-one to the two versions of the application program.
2. The method according to claim 1, characterized in that When the corresponding sound effect event lists are extracted from the two versions of the application program respectively, the method further comprises: Extracting audio resource files from the two versions of the application respectively; When the play attribute of the audio resource file is a random sort attribute, triggering the application to play the sound effect element corresponding to each sound effect event includes: Trigger the application to perform the following processing: Storing multiple sound effect elements corresponding to each of the sound effect events in the audio resource file into a random container; Selecting at least one of the sound effect elements in the random container by random sampling without replacement; Play at least one of the selected sound effect elements.
3. The method according to claim 1, characterized in that When the play attribute of the audio resource file extracted from the two versions of the application is a continuous play attribute, the triggering of the application to play the sound effect element corresponding to each of the sound effect events includes: Trigger the application to perform the following processing: Storing multiple sound effect elements corresponding to each sound effect event in the audio resource file into a random container; Select one of the sound effect elements in the random container in turn, and play the selected sound effect elements one by one in turn.
4. The method according to claim 1, characterized in that The triggering the application to play the sound effect element corresponding to each of the sound effect events includes: When the loop attribute of the audio resource file extracted from the two versions of the application is in a closed state, triggering the application to play once at least one sound effect element in the audio resource file corresponding to each of the sound effect events; When the loop attribute of the audio resource file is in an on state, triggering the application to loop and play at least one sound effect element corresponding to each sound effect event in the audio resource file; When the probability attribute value of the audio resource file is 1, the application is triggered to play each sound effect element corresponding to each sound effect event in the audio resource file.
5. The method according to claim 1, characterized in that The comparing process is performed on two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, including: Calling the spectrum function to process two sound effect files corresponding to the same sound effect event, and obtaining the spectrum matrices corresponding to the two sound effect files respectively; Comparing the matrix items at the same position in the spectrum matrix corresponding to the two sound effect files respectively, and obtaining the comparison result of each position; When the comparison result is a negative number, replacing the comparison result with the opposite number of the comparison result; The comparison results of each position are summed, the summed result is multiplied by the difference coefficient, and the multiplied result is divided by the length of the sound effect file to obtain the difference between the sound effect elements of the same sound effect event.
6. The method according to claim 2, characterized in that After respectively extracting the audio resource files in the two versions of the application, the method further includes: Parsing the audio resource files in the two versions of the application to obtain binary data of the two versions of the audio resource files respectively; The following processing is performed on the binary data of each version of the audio resource file: The playing attribute of the audio resource file is set by modifying the binary data of the audio resource file.
7. The method according to claim 6, characterized in that The method of setting the playback attribute of the audio resource file by modifying the binary data of the audio resource file includes: Determine binary data associated with the random method from the binary data of the audio resource file; replace the binary data associated with the random method with first preset binary data, wherein the first preset binary data is used to set the playback attribute of the audio resource file to a random sorting attribute.
8. The method according to claim 6, characterized in that The method of setting the playback attribute of the audio resource file by modifying the binary data of the audio resource file includes: Determine binary data associated with the playback mode in the binary data of the audio resource file; The binary data associated with the play mode is replaced with second preset binary data, wherein the second preset binary data is used to set the play attribute of the audio resource file to a continuous play attribute.
9. The method according to claim 6, characterized in that The method of setting the playback attribute of the audio resource file by modifying the binary data of the audio resource file includes: Determine binary data associated with a loop attribute in the binary data of the audio resource file; Replacing the binary data associated with the loop attribute with third preset binary data, wherein the third preset binary data is used to turn off the loop attribute of the audio resource file; Determine binary data associated with a probability attribute in the binary data of the audio resource file; The binary data associated with the probability attribute is replaced with fourth preset binary data, wherein the fourth preset binary data is used to modify the probability attribute value of the audio resource file to 1.
10. An audio testing device, characterized in that: The device comprises: An extraction module, used for respectively extracting the sound effect event lists in the two versions of the application; A processing module is used to perform the following processing for each version of the application: loading the application, triggering the application to play the sound effect element corresponding to each sound effect event included in the sound effect event list in the application, and recording and obtaining the sound effect file corresponding to each sound effect event; The comparison module is used to compare two sound effect files corresponding to the same sound effect event to obtain the difference between the sound effect elements of the same sound effect event, wherein the two sound effect files correspond one-to-one to the two versions of the application.
11. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; A processor, configured to implement the audio testing method according to any one of claims 1 to 9 when executing the executable instructions stored in the memory.
12. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by a processor, the audio testing method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the audio testing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Method for testing voice recognition equipment and testing device
CN111369976A
Multimedia file processing method and device, equipment and medium
CN111888765A