Audio data generation method and device, storage medium, electronic equipment and computer program product

By determining the audio data of the previous sampling period and the current sampling period, and using the preset audio generation algorithm to calculate the audio data of the next sampling period, adjusting the audio data in combination with the target, and finally determining the target audio data, the problems of complex audio signal generation, large amount of calculation and harmonic distortion in the existing technology are solved, and efficient and accurate audio data generation is achieved.

CN119697564APending Publication Date: 2025-03-25Z-ONE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411842932.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The mathematical functions used in the prior art to generate audio signals are complex, have large calculations, occupy high computing resources, and the generated audio signals have harmonic distortion problems, resulting in inaccurate test results.

Method used

By determining the audio data of the previous sampling period and the audio data of the current sampling period, the first preset audio generation algorithm is input to obtain the audio data of the next sampling period; at the same time, the adjustment audio data of the previous sampling period and the adjustment audio data of the current sampling period are input, the second preset audio generation algorithm is input to obtain the target adjustment audio data, and finally the target audio data is determined based on the audio data of the next sampling period and the target adjustment audio data.

Benefits of technology

The calculation process of audio data is simplified, the use of computing power resources is reduced, and the audio data in the next sampling period is adjusted through target adjustment audio data, avoiding harmonic distortion and improving the accuracy of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697564A_ABST
    Figure CN119697564A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an audio data generation method and device, a storage medium, electronic equipment and a computer program product. The audio data generation method comprises the following steps: determining audio data of a previous sampling period and audio data of a current sampling period, and adjusting audio data of the previous sampling period and adjusting audio data of the current sampling period; inputting the audio data of the previous sampling period and the audio data of the current sampling period into a first preset audio generation algorithm to obtain audio data of the next sampling period; inputting the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into a second preset audio generation algorithm to obtain target adjusted audio data; and determining target audio data according to the audio data of the next sampling period and the target adjustment audio data. According to the embodiment of the invention, the calculation data volume is small; the audio data of the next sampling period is adjusted through the target adjustment audio data, so that the condition of harmonic distortion can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of vehicle technology, and in particular, to an audio data generating method, device, storage medium, electronic device, and computer program product. Background Art

[0002] In the car audio system, the quality of the audio signal directly affects the user's auditory experience. In order to ensure the stability, clarity and accuracy of the car audio link, the car audio link needs to be tested, and the audio signal for the test needs to be generated during the test.

[0003] In the prior art, the mathematical functions used to generate audio signals are relatively complex, the amount of data calculation is large, and a high amount of computing resources are required. In addition, the generated audio signals have the problem of harmonic distortion, resulting in inaccurate test results. Summary of the invention

[0004] In view of this, embodiments of the present application provide an audio data generating method, device, storage medium, electronic device and computer program product to at least partially solve the above problems.

[0005] According to a first aspect of an embodiment of the present application, a method for generating audio data is provided, comprising: determining audio data of a previous sampling period and audio data of a current sampling period, as well as adjusted audio data of a previous sampling period and adjusted audio data of a current sampling period; inputting the audio data of a previous sampling period and audio data of a current sampling period into a first preset audio generation algorithm to obtain audio data of a next sampling period; inputting the adjusted audio data of a previous sampling period and adjusted audio data of a current sampling period into a second preset audio generation algorithm to obtain target adjusted audio data; and determining target audio data based on the audio data of the next sampling period and the target adjusted audio data.

[0006] In some optional embodiments, the first preset audio generation algorithm includes a first preset parameter and a second preset parameter, and the audio data of the previous sampling period and the audio data of the current sampling period are input into the first preset audio generation algorithm to obtain the audio data of the next sampling period, including: calculating the product of the audio data of the current sampling period and the first preset parameter to obtain the first intermediate data; calculating the product of the second preset parameter and the difference between the first intermediate data and the audio data of the previous sampling period to obtain the audio data of the next sampling period.

[0007] In some optional embodiments, the second preset audio generation algorithm includes a third preset parameter and a fourth preset parameter, and the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period are input into the second preset audio generation algorithm to obtain target adjusted audio data, including: calculating the product of the adjusted audio data of the current sampling period and the third preset parameter to obtain second intermediate data; calculating the product of the fourth preset parameter and the difference between the second intermediate data and the adjusted audio data of the previous sampling period to obtain target adjusted audio data of the next sampling period; the first preset parameter, the second preset parameter, the third preset parameter and the fourth preset parameter are not equal.

[0008] In some optional embodiments, determining the target audio data according to the audio data of the next sampling period and the target adjusted audio data includes: superimposing the audio data of the next sampling period and the target adjusted audio data to obtain the target audio data.

[0009] In some optional embodiments, if the audio data of the previous sampling cycle is the audio data of the first sampling cycle, determining the audio data of the previous sampling cycle and the audio data of the current sampling cycle includes: determining the target parameters based on the target audio frequency and the preset sampling frequency; performing trigonometric function calculations on the target parameters to obtain the audio data of the current sampling cycle; and determining the audio data of the previous sampling cycle based on the target parameters and the audio data of the current sampling cycle.

[0010] In some optional embodiments, the audio data of the previous sampling period is determined based on the target parameters and the audio data of the current sampling period, including: performing a cosine function calculation on the target parameter to obtain an intermediate value; and determining the audio data of the previous sampling period based on the intermediate value and the audio data of the current sampling period.

[0011] According to a second aspect of an embodiment of the present application, an audio data generating device is provided, comprising: a first calculation module, used to determine the audio data of the previous sampling period and the audio data of the current sampling period, as well as the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period; a second calculation module, used to input the audio data of the previous sampling period and the audio data of the current sampling period into a first preset audio generation algorithm to obtain the audio data of the next sampling period; an adjustment module, used to input the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into a second preset audio generation algorithm to obtain target adjusted audio data; and an output module, used to determine the target audio data based on the audio data of the next sampling period and the target adjusted audio data.

[0012] In some optional embodiments, the first preset audio generation algorithm includes a first preset parameter and a second preset parameter, and the second calculation module is further used to: calculate the product of the audio data of the current sampling period and the first preset parameter to obtain the first intermediate data; calculate the product of the second preset parameter and the difference between the first intermediate data and the audio data of the previous sampling period to obtain the audio data of the next sampling period.

[0013] In some optional embodiments, the second preset audio generation algorithm includes a third preset parameter and a fourth preset parameter, and the adjustment module is also used to: calculate the product of the adjusted audio data of the current sampling period and the third preset parameter to obtain the second intermediate data; calculate the product of the fourth preset parameter and the difference between the second intermediate data and the adjusted audio data of the previous sampling period to obtain the target adjusted audio data of the next sampling period; the first preset parameter, the second preset parameter, the third preset parameter and the fourth preset parameter are not equal.

[0014] In some optional embodiments, the output module is further used to: superimpose the audio data of the next sampling period and the target adjusted audio data to obtain the target audio data.

[0015] In some optional embodiments, if the audio data of the previous sampling cycle is the audio data of the first sampling cycle, the first calculation module is also used to: determine the target parameters based on the target audio frequency and the preset sampling frequency; perform trigonometric function calculations on the target parameters to obtain the audio data of the current sampling cycle; determine the audio data of the previous sampling cycle based on the target parameters and the audio data of the current sampling cycle.

[0016] In some optional embodiments, the first calculation module is further used to: perform cosine function calculation on the target parameter to obtain an intermediate value; and determine the audio data of the previous sampling period based on the intermediate value and the audio data of the current sampling period.

[0017] According to a third aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method of the first aspect is implemented.

[0018] According to the fourth aspect of an embodiment of the present application, there is provided an electronic device, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method of the first aspect.

[0019] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, which instruct a computing device to perform operations corresponding to the method of the first aspect.

[0020] The embodiment of the present application provides an audio data generation method, device, storage medium, electronic device and computer program product, wherein the audio data generation method includes: determining the audio data of the previous sampling period and the audio data of the current sampling period, as well as the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period; inputting the audio data of the previous sampling period and the audio data of the current sampling period into a first preset audio generation algorithm to obtain the audio data of the next sampling period; inputting the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into a second preset audio generation algorithm to obtain the target adjusted audio data; determining the target audio data according to the audio data of the next sampling period and the target adjusted audio data. The embodiment of the present application can calculate the audio data of the next sampling period through the audio data of the previous sampling period and the audio data of the current sampling period, and the amount of calculated data is small; and, by adjusting the obtained audio data of the next sampling period through the target adjusted audio data, harmonic distortion can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0022] Figure 1 is a flowchart of a method for generating audio data according to an embodiment of the present application;

[0023] Figure 2 is a structural block diagram of an audio data generating device according to an exemplary embodiment of the present application;

[0024] Figure 3 It is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0026] Reference Figure 1 , shows a step flow chart of a method for generating audio data according to an exemplary embodiment of the present application.

[0027] As shown in the figure, this embodiment mainly includes the following steps:

[0028] S102: Determine the audio data of the previous sampling period and the audio data of the current sampling period, and the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period.

[0029] Audio data is the data obtained after the audio signal is sampled, quantized and encoded, and stored and transmitted in binary form. It is the representation of the audio signal in digital devices such as computers. For example, the data contained in the audio files in the formats of .wav, .mp3, etc. stored in the computer is audio data. Audio signal is the information carrier of the frequency and amplitude changes of regular sound waves with voice, music and sound effects. It is a continuously changing analog signal that can be represented by a continuous curve. For example, the sound waves formed by the sound people hear in daily life propagating through the air are the physical manifestation of sound. The audio data generation method of this embodiment can generate audio data, and then convert the audio data into audio signals through digital-to-analog conversion to test the vehicle audio link.

[0030] The audio data generating method of this embodiment can be applied to an audio data generator, such as a sine wave generator, etc., and this embodiment does not limit this.

[0031] The previous sampling period and the current sampling period of this embodiment can be the first (first) sampling period and the second sampling period set by the user during the test process, or can be any two subsequent adjacent sampling periods, and this embodiment does not limit this. Here, if the previous sampling period and the current sampling period are the first (first) sampling period and the second sampling period, the audio data of the previous sampling period and the audio data of the current sampling period are calculated by a specific calculation method. If the previous sampling period and the current sampling period are any two subsequent adjacent sampling periods, the audio data of the previous sampling period and the audio data of the current sampling period are both calculated by the audio data generation method of this embodiment.

[0032] The process of determining the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period is the same as that of determining the audio data of the previous sampling period and the audio data of the current sampling period, and will not be described in detail here.

[0033] The sampling period of this embodiment can be determined by a preset sampling frequency. The sampling frequency refers to the number of samples extracted from a continuous signal to form a discrete signal per unit time, and the unit is Hertz (Hz). s ) is the time interval between two adjacent samples. The sampling period and sampling frequency are inversely proportional to each other.

[0034] In some optional embodiments, if the audio data of the previous sampling cycle is the audio data of the first sampling cycle, determining the audio data of the previous sampling cycle and the audio data of the current sampling cycle includes: determining the target parameters based on the target audio frequency and the preset sampling frequency; performing trigonometric function calculations on the target parameters to obtain the audio data of the current sampling cycle; and determining the audio data of the previous sampling cycle based on the target parameters and the audio data of the current sampling cycle.

[0035] For example, the target audio frequency and the preset sampling frequency can be flexibly set by those skilled in the art according to actual needs, and this embodiment does not limit this. Assume that the target audio frequency is f0 and the preset sampling frequency is f s , the target parameter is The calculation formula of the target parameter is as follows:

[0036]

[0037] Afterwards, a trigonometric function calculation may be performed on the target parameter to obtain the audio data of the current sampling period. The trigonometric function calculation performed on the target parameter may be a sine function calculation. Assuming that the audio data of the current sampling period is y(n), the calculation formula of the audio data y(n) of the current sampling period is as follows:

[0038]

[0039] Finally, the audio data of the previous sampling period can be determined based on the target parameters and the audio data of the current sampling period. Specifically, a cosine function calculation can be performed on the target parameter to obtain an intermediate value; based on the intermediate value and the audio data of the current sampling period, the audio data of the previous sampling period can be determined.

[0040] In an optional implementation, if the adjusted audio data of the previous sampling cycle is the audio data of the first sampling cycle, determining the adjusted audio data of the previous sampling cycle and the adjusted audio data of the current sampling cycle includes: determining a first target parameter based on a first target audio frequency and a preset sampling frequency; performing trigonometric function calculation on the first target parameter to obtain the adjusted audio data of the current sampling cycle; and determining the adjusted audio data of the previous sampling cycle based on the first target parameter and the adjusted audio data of the current sampling cycle.

[0041] The first target audio frequency in this implementation is less than the aforementioned target audio frequency, which can be flexibly set by those skilled in the art according to actual conditions, and is not performed in this embodiment. In addition, the calculation process used here is the same as the calculation process for calculating the audio data of the current sampling period and the audio data of the previous sampling period, and is not described in detail here.

[0042] In this embodiment, when the audio data of the previous sampling cycle is the audio data of the first sampling cycle, first, the target parameters are determined according to the target audio frequency and the preset sampling frequency; then the trigonometric function calculation is performed on the target parameters to obtain the audio data of the current sampling cycle; finally, the audio data of the previous sampling cycle is determined according to the target parameters and the audio data of the current sampling cycle. The initial audio data of the previous sampling cycle and the audio data of the current sampling cycle can be calculated, the calculation process is simple, and the amount of calculated data is small, which reduces the occupation of computing resources.

[0043] In some optional embodiments, the audio data of the previous sampling period is determined based on the target parameters and the audio data of the current sampling period, including: performing a cosine function calculation on the target parameter to obtain an intermediate value; and determining the audio data of the previous sampling period based on the intermediate value and the audio data of the current sampling period.

[0044] Exemplarily, assuming that the audio data of the previous sampling period is y(n-1), the calculation formula of the audio data y(n) of the previous sampling period is as follows:

[0045]

[0046] Here, the median value is

[0047] In an optional implementation, the adjusted audio data of the previous sampling period is determined based on the first target parameter and the adjusted audio data of the current sampling period, including: performing a cosine function calculation on the first target parameter to obtain a first intermediate value; and determining the adjusted audio data of the previous sampling period based on the first intermediate value and the adjusted audio data of the current sampling period.

[0048] It should be noted that the calculation process used to calculate the adjusted audio data of the current sampling period and the adjusted audio data of the previous sampling period is the same as the calculation process for calculating the audio data of the current sampling period and the audio data of the previous sampling period, and will not be repeated here.

[0049] In this embodiment, the target parameters are determined based on the target audio frequency and the preset sampling frequency; and after performing trigonometric function calculation on the target parameters to obtain the audio data of the current sampling period, the cosine function calculation is performed on the target parameters to obtain the intermediate value; finally, based on the intermediate value and the audio data of the current sampling period, the audio data of the previous sampling period is determined. The calculation process is simple, the amount of calculated data is small, and the occupation of computing resources is reduced.

[0050] S104: Input the audio data of the previous sampling period and the audio data of the current sampling period into a first preset audio generation algorithm to obtain the audio data of the next sampling period.

[0051] Exemplarily, the first preset audio generation algorithm can be a binary linear equation for the audio data of the previous sampling period and the audio data of the current sampling period. The first preset audio generation algorithm can include a first preset parameter and a second preset parameter. The value range of the first preset parameter and the second preset parameter can be [0, 1]. The specific value can be set by a technician in this field according to actual conditions, and this embodiment does not limit this.

[0052] In some optional embodiments, the first preset audio generation algorithm includes a first preset parameter and a second preset parameter, and the audio data of the previous sampling period and the audio data of the current sampling period are input into the first preset audio generation algorithm to obtain the audio data of the next sampling period, including: calculating the product of the audio data of the current sampling period and the first preset parameter to obtain the first intermediate data; calculating the product of the second preset parameter and the difference between the first intermediate data and the audio data of the previous sampling period to obtain the audio data of the next sampling period.

[0053] Exemplarily, assuming that the audio data of the current sampling period is y1(n), and the audio data of the previous sampling period is y1(n-1), the first preset audio generation algorithm may be as follows:

[0054] y1(n+1)=a1*(b1*y1(n)-y1(n-1))

[0055] Among them, a1 is the second preset parameter, b1 is the first preset parameter, b1*y1(n) is the first intermediate data, and y1(n+1) is the audio data of the next sampling period.

[0056] In this embodiment, the audio data of the next sampling period can be calculated through the audio data of the previous sampling period and the audio data of the current sampling period. The calculation process is simple, the amount of calculated data is small, and the occupancy of computing resources is reduced.

[0057] S106: Input the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into a second preset audio generation algorithm to obtain target adjusted audio data.

[0058] Exemplarily, the second preset audio generation algorithm may be a binary linear equation for the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period. The second preset audio generation algorithm may include a third preset parameter and a fourth preset parameter. The value range of the third preset parameter and the fourth preset parameter may be [0, 1]. The specific value may be set by a person skilled in the art according to actual conditions, and this embodiment does not limit this. It should be noted that the second preset audio generation algorithm is different from the first preset audio generation algorithm.

[0059] In some optional embodiments, the second preset audio generation algorithm includes a third preset parameter and a fourth preset parameter, and the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period are input into the second preset audio generation algorithm to obtain target adjusted audio data, including: calculating the product of the adjusted audio data of the current sampling period and the third preset parameter to obtain second intermediate data; calculating the product of the fourth preset parameter and the difference between the second intermediate data and the adjusted audio data of the previous sampling period to obtain target adjusted audio data of the next sampling period; the first preset parameter, the second preset parameter, the third preset parameter and the fourth preset parameter are not equal.

[0060] Exemplarily, assuming that the adjusted audio data of the current sampling period is y2(n), and the adjusted audio data of the previous sampling period is y2(n-1), the second preset audio generation algorithm may be as follows:

[0061] y2(n+1)=a2*(b2*y2(n)-y2(n-1))

[0062] Wherein, a2 is the fourth preset parameter, b2 is the third preset parameter, b2*y2(n) is the second intermediate data, and y2(n+1) is the target adjusted audio data of the next sampling period.

[0063] It should be noted that a1, b1, a2, and b2 are not equal to each other.

[0064] In this embodiment, the target adjusted audio data of the next sampling period can be calculated by the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period. The calculation process is simple, the amount of calculated data is small, and the occupation of computing resources is reduced. In addition, the audio data of the next sampling period is subsequently adjusted by the target adjusted audio data, which can reduce the harmonic distortion of the target audio data finally obtained.

[0065] S108. Determine target audio data according to the audio data of the next sampling period and the target adjusted audio data.

[0066] Exemplarily, the audio data of the next sampling period and the target adjusted audio data may be superimposed to calculate the target audio data, or other mathematical operations may be performed on the audio data of the next sampling period and the target adjusted audio data, which is not limited in this embodiment.

[0067] In some optional embodiments, determining the target audio data according to the audio data of the next sampling period and the target adjusted audio data includes: superimposing the audio data of the next sampling period and the target adjusted audio data to obtain the target audio data.

[0068] Exemplarily, y1(n+1) is the audio data of the next sampling period, y2(n+1) is the target adjusted audio data of the next sampling period, and the calculation formula for calculating the target audio data may be as follows:

[0069] y(n+1)=y1(n+1)+y2(n+1)

[0070] Among them, y(n+1) is the target audio data.

[0071] In this embodiment, the target audio data is obtained by superimposing the audio data of the next sampling period and the target adjusted audio data, and the audio data of the next sampling period is adjusted by the target adjusted audio data, which can reduce the harmonic distortion of the target audio data finally obtained.

[0072] The audio data generation method of the embodiment of the present application determines the audio data of the previous sampling cycle and the audio data of the current sampling cycle, as well as the adjusted audio data of the previous sampling cycle and the adjusted audio data of the current sampling cycle; inputs the audio data of the previous sampling cycle and the audio data of the current sampling cycle into a first preset audio generation algorithm to obtain the audio data of the next sampling cycle; inputs the adjusted audio data of the previous sampling cycle and the adjusted audio data of the current sampling cycle into a second preset audio generation algorithm to obtain the target adjusted audio data; and determines the target audio data according to the audio data of the next sampling cycle and the target adjusted audio data. The embodiment of the present application can calculate the audio data of the next sampling cycle through the audio data of the previous sampling cycle and the audio data of the current sampling cycle, and the amount of calculated data is small, which reduces the occupation of computing resources; and, by adjusting the obtained audio data of the next sampling cycle through the target adjusted audio data, harmonic distortion can be avoided.

[0073] Reference Figure 2 , shows a structural block diagram of an audio data generating device according to an exemplary embodiment of the present application.

[0074] The audio data generating device of this embodiment includes a first calculation module 202 , a second calculation module 204 , an adjustment module 206 and an output module 208 .

[0075] Among them, the first calculation module 202 is used to determine the audio data of the previous sampling period and the audio data of the current sampling period, as well as the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period; the second calculation module 204 is used to input the audio data of the previous sampling period and the audio data of the current sampling period into the first preset audio generation algorithm to obtain the audio data of the next sampling period; the adjustment module 206 is used to input the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into the second preset audio generation algorithm to obtain the target adjusted audio data; the output module 208 is used to determine the target audio data according to the audio data of the next sampling period and the target adjusted audio data.

[0076] In some optional embodiments, the first preset audio generation algorithm includes a first preset parameter and a second preset parameter, and the second calculation module 204 is also used to: calculate the product of the audio data of the current sampling period and the first preset parameter to obtain the first intermediate data; calculate the product of the second preset parameter and the difference between the first intermediate data and the audio data of the previous sampling period to obtain the audio data of the next sampling period.

[0077] In some optional embodiments, the second preset audio generation algorithm includes a third preset parameter and a fourth preset parameter, and the adjustment module 206 is also used to: calculate the product of the adjusted audio data of the current sampling period and the third preset parameter to obtain the second intermediate data; calculate the product of the fourth preset parameter and the difference between the second intermediate data and the adjusted audio data of the previous sampling period to obtain the target adjusted audio data of the next sampling period; the first preset parameter, the second preset parameter, the third preset parameter and the fourth preset parameter are not equal.

[0078] In some optional embodiments, the output module 208 is further configured to: superimpose the audio data of the next sampling period and the target adjusted audio data to obtain the target audio data.

[0079] In some optional embodiments, if the audio data of the previous sampling period is the audio data of the first sampling period, the first calculation module 202 is also used to: determine the target parameters based on the target audio frequency and the preset sampling frequency; perform trigonometric function calculations on the target parameters to obtain the audio data of the current sampling period; determine the audio data of the previous sampling period based on the target parameters and the audio data of the current sampling period.

[0080] In some optional embodiments, the first calculation module 202 is further used to: perform cosine function calculation on the target parameter to obtain an intermediate value; and determine the audio data of the previous sampling period based on the intermediate value and the audio data of the current sampling period.

[0081] The audio data generating device of this embodiment is used to implement the corresponding audio data generating methods in the aforementioned multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here. In addition, the functional implementation of each module in the audio data generating device of this embodiment can refer to the description of the corresponding parts in the aforementioned method embodiments, which will not be described in detail here.

[0082] Reference Figure 3 , shows a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present application. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0083] like Figure 3 As shown, the electronic device may include: a processor (processor) 301 , a memory (memory) 303 , a communication bus 304 , and a communication interface (Communications Interface) 305 .

[0084] Wherein: the processor 301 , the memory 303 and the communication interface 305 communicate with each other via the communication bus 304 .

[0085] The communication interface 305 is used to communicate with other electronic devices or servers.

[0086] The processor 301 is used to execute the program 302, and specifically can execute the steps of any one of the audio data generating methods in the above embodiments.

[0087] Specifically, the program 302 may include program codes, which include computer operation instructions.

[0088] The processor 301 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0089] The memory 303 is used to store the program 302. The memory 303 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0090] The program 302 can be specifically used to enable the processor 301 to execute the steps of any audio data generating method described in the embodiment. The specific implementation of each step in the program 302 can refer to the corresponding description in the steps and units executed by any audio data generating method in the above steps, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiment.

[0091] An embodiment of the present application further provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the audio data generation method as described in any one of the above-mentioned method embodiments is implemented.

[0092] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to the audio data generation method described in any one of the above-mentioned multiple method embodiments.

[0093] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0094] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.

[0095] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0096] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.

Claims

1. A method for generating audio data, characterized in that: include: Determine the audio data of the previous sampling period and the audio data of the current sampling period, and the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period; Inputting the audio data of the previous sampling period and the audio data of the current sampling period into a first preset audio generation algorithm to obtain audio data of the next sampling period; Inputting the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into a second preset audio generation algorithm to obtain target adjusted audio data; The target audio data is determined according to the audio data of the next sampling period and the target adjusted audio data.

2. The audio data generating method according to claim 1, characterized in that: The first preset audio generation algorithm includes a first preset parameter and a second preset parameter, and the audio data of the previous sampling period and the audio data of the current sampling period are input into the first preset audio generation algorithm to obtain the audio data of the next sampling period, including: Calculating the product of the audio data of the current sampling period and the first preset parameter to obtain first intermediate data; The product of the second preset parameter and the difference between the first intermediate data and the audio data of the previous sampling period is calculated to obtain the audio data of the next sampling period.

3. The audio data generating method according to claim 2, characterized in that: The second preset audio generation algorithm includes a third preset parameter and a fourth preset parameter, and the inputting the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into the second preset audio generation algorithm to obtain target adjusted audio data includes: Calculating the product of the adjusted audio data of the current sampling period and the third preset parameter to obtain second intermediate data; The fourth preset parameter and the product of the difference between the second intermediate data and the adjusted audio data of the previous sampling period are calculated to obtain the target adjusted audio data of the next sampling period; the first preset parameter, the second preset parameter, the third preset parameter and the fourth preset parameter are not equal.

4. The audio data generating method according to claim 1, characterized in that: The step of determining target audio data according to the audio data of the next sampling period and the target adjusted audio data includes: The audio data of the next sampling period and the target adjusted audio data are superimposed to obtain target audio data.

5. The audio data generating method according to claim 1, characterized in that: If the audio data of the previous sampling period is the audio data of the first sampling period, the step of determining the audio data of the previous sampling period and the audio data of the current sampling period includes: Determine target parameters according to the target audio frequency and the preset sampling frequency; Perform trigonometric function calculation on the target parameter to obtain audio data of the current sampling period; The audio data of the previous sampling period is determined according to the target parameter and the audio data of the current sampling period.

6. The audio data generating method according to claim 5, characterized in that: The step of determining the audio data of the previous sampling period according to the target parameter and the audio data of the current sampling period includes: Performing cosine function calculation on the target parameter to obtain an intermediate value; The audio data of the previous sampling period is determined according to the intermediate value and the audio data of the current sampling period.

7. An audio data generating device, characterized in that: include: A first calculation module, used to determine the audio data of the previous sampling period and the audio data of the current sampling period, and the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period; A second calculation module, used for inputting the audio data of the previous sampling period and the audio data of the current sampling period into a first preset audio generation algorithm to obtain the audio data of the next sampling period; An adjustment module, configured to input the adjusted audio data of the previous sampling period and the adjusted audio data of the current sampling period into a second preset audio generation algorithm to obtain target adjusted audio data; The output module is used to determine the target audio data according to the audio data of the next sampling period and the target adjusted audio data.

8. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method according to any one of claims 1 to 6.

9. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions instruct a computing device to execute operations corresponding to the method according to any one of claims 1 to 6.