Audio processing method and device

By configuring the instruction execution interface and encapsulating execution algorithm unit in the browser, the problem that the browser cannot process complex audio data is solved, complex calculations of audio data are realized, browser functions are expanded, and user experience is improved.

CN114546324BActive Publication Date: 2024-09-17SHANGHAI BILIBILI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202011255627.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-11
Publication Date
2024-09-17
Estimated Expiration
2040-11-11

AI Technical Summary

Technical Problem

In the existing technology, browsers do not yet support complex calculation operations on audio data, such as pitch detection and beat detection, and cannot meet users' diversified and complex needs for audio processing.

Method used

Provide an audio processing method and device. By configuring the instruction execution interface in the browser, encapsulating the instruction receiving unit, the instruction processing unit, the execution algorithm unit and the execution result output unit, receiving preset interactive operations, and calling the encapsulated execution algorithm unit Process audio data to implement complex calculations on audio data.

Benefits of technology

It extends the functions of the browser, allows complex audio data processing in the browser, improves the user experience, realizes complex calculation operations on audio data, and meets diversified and complex audio processing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546324B
    Figure CN114546324B
Patent Text Reader

Abstract

The present application provides an audio processing method and device, wherein the audio processing method is applied to a browser, and the method comprises: obtaining first audio data of the audio to be processed through the data interface of the browser, and displaying the waveform corresponding to the first audio data on the audio display interface of the browser; receiving a preset interactive operation for the waveform through the audio display interface of the browser, calling an instruction execution interface to process the first audio data, and obtaining processed second audio data, wherein the instruction execution interface is an interface encapsulated with an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit in the browser, and the execution algorithm unit includes an algorithm corresponding to the execution of the preset interactive operation. In the present application, by calling the encapsulated instruction execution interface in the browser, complex calculation operations on the audio data can be implemented, thereby expanding the functions of the browser.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an audio processing method and device. Background Art

[0002] With the rapid development of computer technology, audio processing technology has also developed accordingly. With the diversification of people's work and life needs, people's processing of audio has gradually become diversified and complicated. In the prior art, users can process audio in the browser. With the support of Web Audio API, users can decode a piece of input audio, write it into the buffer, and perform some basic operations on the audio. However, some more complex operations that require complex calculations on audio data (such as pitch detection, beat detection, etc.) are not supported by browsers yet, so there is an urgent need for an audio processing device that can perform complex processing on audio in the browser. Summary of the invention

[0003] In view of this, an embodiment of the present application provides an audio processing method. The present application also relates to an audio processing device, a computing device, and a computer-readable storage medium to expand the functions of a browser.

[0004] According to a first aspect of an embodiment of the present application, there is provided an audio processing method, which is applied to a browser, and the method includes:

[0005] Acquire first audio data of the audio to be processed through a data interface of the browser, and display a waveform corresponding to the first audio data on an audio display interface of the browser;

[0006] Receiving a preset interactive operation for the waveform through the audio display interface of the browser, calling an instruction execution interface to process the first audio data, and obtaining processed second audio data, wherein the instruction execution interface is an interface in the browser encapsulating an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit, the execution algorithm unit includes an algorithm corresponding to executing the preset interactive operation, and executing the interactive instruction triggered by the preset interactive operation through the instruction execution interface;

[0007] The waveform corresponding to the second audio data is displayed on the audio display interface of the browser.

[0008] According to a second aspect of an embodiment of the present application, there is provided an audio processing device, which is configured in a browser, and the audio processing device includes an instruction execution interface, and the instruction execution interface encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit;

[0009] The instruction receiving unit is configured to receive a calling instruction, wherein the calling instruction carries a preset interactive operation for the waveform of the first audio data obtained through the audio display interface of the browser;

[0010] The instruction processing unit is configured to determine the target execution algorithm unit corresponding to the calling instruction according to the preset interactive operation, and run the target execution algorithm unit to obtain the execution result of the calling instruction;

[0011] The execution result output unit is configured to output the execution result.

[0012] According to a third aspect of an embodiment of the present application, a computing device is provided, including:

[0013] Memory and processor;

[0014] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method:

[0015] Acquire first audio data of the audio to be processed through a data interface of the browser, and display a waveform corresponding to the first audio data on an audio display interface of the browser;

[0016] Receiving a preset interactive operation for the waveform through the audio display interface of the browser, calling an instruction execution interface to process the first audio data, and obtaining processed second audio data, wherein the instruction execution interface is an interface in the browser encapsulating an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit, the execution algorithm unit includes an algorithm corresponding to executing the preset interactive operation, and executing the interactive instruction triggered by the preset interactive operation through the instruction execution interface;

[0017] The waveform corresponding to the second audio data is displayed on the audio display interface of the browser.

[0018] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of the audio processing method are implemented.

[0019] The audio processing method provided in the present application can obtain the first audio data of the audio to be processed through the data interface of the browser, and display the waveform corresponding to the first audio data on the audio display interface of the browser; then receive the preset interactive operation for the waveform through the audio display interface of the browser, call the instruction execution interface to process the first audio data, obtain the processed second audio data, and display the waveform corresponding to the second audio data on the audio display interface of the browser. Among them, the instruction execution interface is an interface encapsulated with an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit in the browser. The execution algorithm unit includes an algorithm corresponding to the execution of the preset interactive operation, and the interactive instruction triggered by the preset interactive operation is executed through the instruction execution interface. In this case, when it is necessary to perform complex operations on the audio data, the encapsulated instruction execution interface is directly called to run the execution algorithm unit encapsulated in the instruction execution interface to perform complex processing on the audio data. In this way, by calling the encapsulated instruction execution interface in the browser, complex calculation operations on the audio data can be realized, which expands the functions of the browser and improves the user experience of the browser.

[0020] The audio processing device provided by the present application is configured in a browser, and the audio processing device includes an instruction execution interface, which encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit; the instruction receiving unit is configured to receive a call instruction, and the call instruction carries a preset interactive operation for the waveform of the first audio data obtained through the audio display interface of the browser; the instruction processing unit is configured to determine the target execution algorithm unit corresponding to the call instruction according to the preset interactive operation, and run the target execution algorithm unit to obtain the execution result of the call instruction; the execution result output unit is configured to output the execution result. In this case, the execution algorithm required for the operation of performing complex calculations on the audio data can be pre-encapsulated in the instruction execution interface, so as to realize the operation of performing complex calculations on the audio data, expand the functions of the browser, and improve the user experience of the browser. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a schematic diagram of the architecture of an audio processing device provided by an embodiment of the present application;

[0022] Figure 2 This is a functional schematic diagram of an instruction execution interface provided by an embodiment of the present application;

[0023] Figure 3 is a functional schematic diagram of an audio processing device provided according to an embodiment of the present application;

[0024] Figure 4is a schematic diagram of analyzing data using an AnalyserNode interface provided according to an embodiment of the present application;

[0025] Figure 5 is a waveform diagram of first audio data provided according to an embodiment of the present application;

[0026] Figure 6 is a waveform diagram of another first audio data provided according to an embodiment of the present application;

[0027] Figure 7 is a flowchart of an audio processing method provided according to an embodiment of the present application;

[0028] Figure 8 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0029] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0030] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0031] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0032] First, the terms involved in one or more embodiments of the present application are explained.

[0033] Pitch: Pitch refers to various sounds of different pitches, that is, the height of the sound, one of the basic characteristics of the sound. The pitch of the sound is determined by the vibration frequency, and the two are positively correlated. The higher the frequency (that is, the number of vibrations per unit time), the higher the sound, and vice versa.

[0034] BPM (Beat Per Minute): The most common concept is the number of sound beats produced in a one-minute period. The unit of this number is BPM, also called the beat number.

[0035] Tempo: Beat, usually measured in BPM, beats per minute, used to measure the speed of music.

[0036] PCM (Pulse Code Modulation) is a classic way to digitize analog signals. PCM is the standard format used in systems such as computers, DVDs, and digital telephones. It converts a time-continuous, continuous-value analog signal into a time-discrete, discrete-value digital signal before transmitting it in the channel. PCM is the process of sampling the analog signal first, quantizing the sample amplitude, and encoding it.

[0037] Sampling frequency: also known as sampling rate or sampling speed, defines the number of samples extracted from a continuous signal per second to form a discrete signal. It is expressed in Hertz (Hz). The reciprocal of the sampling frequency is called the sampling period or sampling time, which is the time interval between samples. In other words, how often the sample is taken? The sound range that the human ear can recognize is 20-20KHZ, so 44.1kHz, 48kHz or 96kHz are generally used as the sampling rate.

[0038] Web Audio API: Provides a very effective and general system for controlling audio on the Web, allowing developers to decode, process and output audio, such as selecting audio sources, adding special effects to audio, visualizing audio, adding spatial effects (such as panning), and so on.

[0039] AudioBuffer interface: represents a short audio resource in memory, which is constructed from an audio file using the AudioContext.decodeAudioData() method, or from raw data using AudioContext.createBuffer(). After putting the audio into AudioBuffer, it can be passed to an AudioBufferSourceNode for playback.

[0040] AnalyserNode interface: represents a node that can provide real-time frequency domain and time domain analysis information. It is an AudioNode that does not make any changes to the audio stream, while allowing the data it generates to be obtained and processed to create audio visualization. AnalyzerNode has only one input and output, and it can work normally even if it is not connected to the output.

[0041] In the present application, an audio processing device is provided. The present application also relates to an audio processing method, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0042] Figure 1 A schematic diagram of the architecture of an audio processing device provided according to an embodiment of the present application is shown. Figure 2 A functional schematic diagram of an instruction execution interface provided according to an embodiment of the present application is shown. Figure 3 FIG. 2 shows a functional schematic diagram of an audio processing device provided according to an embodiment of the present application. Figure 2 As shown, the upper layer functions of the instruction execution interface include instruction reception and execution result output, and the lower layer functions include instruction processing and execution algorithm; Figure 3 As shown, the upper-level functions of the audio processing device include data reception and waveform display, and the lower-level functions include interactive functions and interface calls.

[0043] like Figure 1 As shown, the audio processing device is configured in the browser, and the audio processing device includes an instruction execution interface 102, and the instruction execution interface 102 encapsulates an instruction receiving unit 1021, an instruction processing unit 1022, an execution algorithm unit 1023, and an execution result output unit 1024;

[0044] The instruction receiving unit 1021 is configured to receive a calling instruction, where the calling instruction carries a preset interactive operation for the waveform of the first audio data obtained through the audio display interface of the browser;

[0045] The instruction processing unit 1022 is configured to determine the target execution algorithm unit 1023 corresponding to the calling instruction according to the preset interactive operation, and run the target execution algorithm unit 1023 to obtain the execution result of the calling instruction;

[0046] The execution result output unit 1024 is configured to output the execution result.

[0047] In actual applications, as people's work and life needs become more diversified, people's audio processing has gradually become more diversified and complicated. For some operations that require complex calculations on audio data (such as pitch detection, beat detection, etc.), browsers have not yet supported them.

[0048] Therefore, the present application provides an audio processing device configured in a browser, the audio processing device includes an instruction execution interface, the instruction execution interface encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit; the instruction receiving unit is configured to receive a call instruction, the call instruction carries a preset interactive operation for the waveform of the first audio data obtained through the audio display interface of the browser; the instruction processing unit is configured to determine the target execution algorithm unit corresponding to the call instruction according to the preset interactive operation, and run the target execution algorithm unit to obtain the execution result of the call instruction; the execution result output unit is configured to output the execution result. In this case, the execution algorithm required for the operation of performing complex calculations on the audio data can be pre-encapsulated in the instruction execution interface. When complex operations need to be performed on the audio data, the encapsulated instruction execution interface is directly called to run the execution algorithm unit encapsulated in the instruction execution interface to perform complex processing on the audio data, providing the browser with a more comprehensive audio processing capability.

[0049] There may be multiple execution algorithm units 1023, each of which includes an execution algorithm for performing complex calculations and processing on audio. For example, the instruction execution interface encapsulates three execution algorithm units 1023, namely a pitch detection algorithm unit, which includes a pitch detection algorithm; a beat detection algorithm unit, which includes a beat detection algorithm; and a pitch adjustment algorithm unit, which includes a pitch adjustment algorithm.

[0050] It should be noted that the instruction receiving unit 1021 and the execution result output unit 1024 correspond to Figure 2 The instruction receiving and execution result output in the upper layer function shown in the figure, the instruction processing unit 1022 and the execution algorithm unit 1023 correspond to Figure 2 The execution processing and execution algorithms in the underlying functions are shown.

[0051] In the present application, the execution algorithm required for performing complex calculations on audio data can be pre-encapsulated in an instruction execution interface. When complex operations on audio data are required, the encapsulated instruction execution interface is directly called to run the execution algorithm unit encapsulated in the instruction execution interface to perform complex processing on the audio data. In this way, by calling the encapsulated instruction execution interface in the browser, complex calculations on audio data can be implemented in the browser, thereby expanding the functionality of the browser and improving the browser's user experience.

[0052] In an optional implementation of this embodiment, Figure 1 As shown, the audio processing device further includes a data acquisition module 104, a display module 106, an interaction module 108 and an interface calling module 110;

[0053] The data acquisition module 104 is configured to acquire first audio data of the audio to be processed through a data acquisition interface of the browser;

[0054] A display module 106 is configured to display a waveform corresponding to the first audio data on an audio display interface of the browser;

[0055] The interaction module 108 is configured to receive a preset interaction operation for the waveform through the audio display interface of the browser;

[0056] The interface calling module 110 is configured to call the instruction execution interface 102 to process the first audio data to obtain processed second audio data;

[0057] The display module 106 is further configured to display the waveform corresponding to the second audio data on the audio display interface of the browser.

[0058] In actual implementation, the interface calling module 110 is further configured as follows:

[0059] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the target execution algorithm unit of the instruction execution interface to process the first audio data to obtain processed second audio data;

[0060] The second audio data outputted by the execution result output unit of the instruction execution interface is received.

[0061] The data acquisition module 104 and the display module 106 correspond to Figure 3 The data receiving and waveform display in the upper layer functions shown, the interaction module 108 and the interface calling module 110 correspond to Figure 3 The interactive functions and interface calls in the underlying functions are shown.

[0062] In actual implementation, since the audio data directly obtained are generally time domain signals, when displaying the waveform corresponding to the audio data, the frequency domain waveform corresponding to the audio data is often displayed. Therefore, in order to facilitate the subsequent display module 106 to visualize the first audio data (that is, to display the waveform corresponding to the first audio data), it is also necessary to use the AnalyserNode interface of webaudio to analyze the time domain and frequency domain information of the first audio data, so that the display module 106 can draw the waveform corresponding to the first audio data on the audio display interface of the browser.

[0063] It should be noted that Figure 4 FIG. 4 shows a schematic diagram of analyzing data using an AnalyserNode interface provided according to an embodiment of the present application. The AnalyserNode interface represents a node that can provide real-time frequency domain and time domain analysis information, such as Figure 4 As shown in Figure 1, it is an AudioNode that does not make any changes to the audio stream, while allowing you to obtain and process the data it generates to create audio visualizations.

[0064] In the present application, the first audio data of the audio to be processed can be obtained through the data acquisition interface of the browser, and then the waveform corresponding to the first audio data can be displayed on the audio display interface of the browser; thereafter, the user can perform interactive operations on the displayed waveform on the audio display interface. If a preset interactive operation is received through the audio display interface of the browser, the packaged instruction execution interface can be directly called to run the corresponding execution algorithm unit packaged in the instruction execution interface to perform complex processing on the audio data. When the processed second audio data output by the execution result output unit packaged in the instruction execution interface is received, the waveform corresponding to the second audio data can be re-displayed on the audio display interface of the browser. In this way, by directly calling the packaged instruction execution interface in the browser, complex calculation operations on the audio data can be implemented, thereby expanding the functions of the browser and improving the browser usage experience.

[0065] In an optional implementation of this embodiment, Figure 1 As shown, the audio processing device also includes a data processing module;

[0066] A data processing module, configured to decode the first audio data through a decoding interface of the browser and determine at least one channel data of the first audio data;

[0067] Accordingly, the display module is further configured as follows:

[0068] For each channel data of the at least one channel data, a waveform corresponding to the channel data is displayed on an audio display interface of the browser.

[0069] Specifically, after obtaining the first audio data of the audio to be processed through the data acquisition interface, in order to facilitate the processing of the first audio data, the first audio data can also be decoded through the decodeAudioData interface of WebAudio, and the first audio data can be decoded into a segment of AudioBuffer. AudioBuffer represents a segment of PCM data of audio in the memory. After the first audio data is put into AudioBuffer, the first audio data can be controlled. For songs with multiple channels, the channel data of different channels can be obtained from AudioBuffer, and the different channels of the first audio data can be separated. After that, the waveforms corresponding to the separated channel data can be displayed on the audio display interface of the browser.

[0070] In the present application, not only can the complete waveform corresponding to the first audio data be displayed for the first audio data, but when the first audio data includes multiple channel data, the individual channel data in the first audio data can also be separated to display different channel data separately, that is, the audio data is visualized by channel, which makes it convenient for subsequent users to interact with the waveform of the audio data of a single channel, expands the objects of interactive operations, and improves the applicability of the audio processing device.

[0071] In an optional implementation of this embodiment, the display module 106 is further configured as follows:

[0072] Determine, according to the width of the audio display interface, a first display accuracy of the first audio data, where the first display accuracy refers to displaying a first value number of pixels on the audio display interface, each pixel identifying a second value number of audio sampling points in the first audio data;

[0073] A waveform corresponding to the first audio data is generated according to a first value number of pixels displayed in the audio display interface and a second value number of audio sampling points identified by each pixel.

[0074] Among them, the first audio data of the audio to be processed is sampled at a certain sampling frequency, so the first audio data should include multiple audio sampling points. For example, a section of audio to be processed (i.e., the first audio data) can include 10,000 audio sampling points. However, the width of the audio display interface is certain, that is, the audio display interface can only display a fixed number of pixels. Generally speaking, the number of pixels that can be displayed on the audio display interface will be much smaller than the audio sampling points included in the audio data. Therefore, it is necessary to pre-set a display accuracy, that is, how many audio sampling points can be represented by one pixel in the audio display interface. The first value is the number of pixels displayed in the audio display interface, and the second value is the number of audio sampling points in the first audio data represented by one pixel.

[0075] For example, according to the width of the audio display interface, it is determined that the audio display interface displays 100 pixels. When the first audio data includes 10,000 audio sampling points, one pixel in the audio display interface needs to identify 100 audio sampling points in the first audio data.

[0076] In an optional implementation of this embodiment, the display module 106 is further configured as follows:

[0077] For each pixel in the audio display interface, determine the coordinates of the pixel according to the second numerical value of audio sampling points identified by the pixel, and display the pixel at the coordinates;

[0078] The first value of pixel points displayed in the audio display interface are connected to form a waveform corresponding to the first audio data.

[0079] It should be noted that one pixel point in the audio display interface needs to identify a second value number of audio sampling points, and thus the coordinates of the corresponding pixel point in the audio display interface need to be determined according to the second value number of audio sampling points.

[0080] Two forms of waveforms are provided in this application, one is a broken line waveform. For the broken line waveform, it is necessary to determine the horizontal and vertical coordinates of each pixel point in the audio display interface, and then display each pixel point at the corresponding horizontal and vertical coordinates, and then connect them to obtain the broken line waveform. The specific implementation method can be as follows:

[0081] Determine a first audio sampling point with the highest frequency and a second audio sampling point with the lowest frequency among the second numerical value of audio sampling points identified by the pixel point;

[0082] Determine a frequency mean of the first audio sampling point and the second audio sampling point;

[0083] The frequency mean is used as the vertical coordinate of the pixel point;

[0084] The horizontal coordinate of the pixel point is determined according to the position of the pixel point in the first number of pixel points displayed on the audio display interface.

[0085] It should be noted that one pixel represents the second value number of audio sampling points, and thus the average frequency of the second value number of audio sampling points can be used as the ordinate of the pixel. In order to reduce the amount of calculation, when determining the frequency mean of the second value number of audio sampling points, all frequencies of the second value number of audio sampling points are not calculated, and only the highest frequency and the lowest frequency are taken, and the frequency mean of the highest frequency and the lowest frequency is used as the frequency mean of the second value number of audio samples.

[0086] In addition, the first numerical value of pixels is displayed in the audio display interface, which means that the horizontal axis of the audio display interface is evenly divided into the first numerical value of parts, each part represents a pixel, and thus the position of a certain pixel in the first numerical value of pixels is the horizontal coordinate of the pixel, such as the 30th pixel displayed in the audio display interface, the horizontal coordinate of the pixel is 30.

[0087] For example, Figure 5 FIG. 4 shows a waveform diagram of a first audio data provided according to an embodiment of the present application. Figure 5As shown, 5 pixels are displayed in the audio display interface, and each pixel represents 100 audio sampling points. For the first pixel, its horizontal coordinate is 1. Assuming that the highest frequency of the 100 audio sampling points it represents is 5 and the lowest frequency is 3, the vertical coordinate of the pixel is determined to be 4; for the second pixel, its horizontal coordinate is 2. Assuming that the highest frequency of the 100 audio sampling points it represents is 10 and the lowest frequency is 2, the vertical coordinate of the pixel is determined to be 6; for the third pixel, its horizontal coordinate is 3. Assuming that the highest frequency of the 100 audio sampling points it represents is 9 and the lowest frequency is 7, the vertical coordinate of the pixel is determined to be 8; for the fourth pixel, its horizontal coordinate is 4. Assuming that the highest frequency of the 100 audio sampling points it represents is 4 and the lowest frequency is 2, the vertical coordinate of the pixel is determined to be 3; for the fifth pixel, its horizontal coordinate is 5. Assuming that the highest frequency of the 100 audio sampling points it represents is 3 and the lowest frequency is 1, the vertical coordinate of the pixel is determined to be 2. Afterwards, each pixel point is connected to form a broken line waveform graph of the first audio data.

[0088] In the present application, the first display accuracy of the first audio data can be determined according to the width of the audio display interface, and audio sampling points can be selected from the first audio data according to the first display accuracy and mapped to the horizontal and vertical coordinates in the audio display interface to determine the display position of each pixel point in the audio display interface. Then, each pixel point can be connected to form a line waveform graph of the first audio data. The point selection, mapping, and line connection processes in the audio visualization process are simple, with less calculation, thereby improving the efficiency of visualization.

[0089] In an optional implementation of this embodiment, the display module 106 is further configured as follows:

[0090] For each pixel in the audio display interface, generate a waveform corresponding to the pixel according to a second numerical value of audio sampling points identified by the pixel;

[0091] The waveforms corresponding to the first numerical value of pixel points displayed in the audio display interface are combined into a waveform corresponding to the first audio data.

[0092] It should be noted that two forms of waveforms are provided in the present application. In addition to the above-mentioned broken line waveform graph, a bar waveform graph can also be provided. For the bar waveform graph, each pixel point corresponds to a bar waveform. Combining the bar waveforms corresponding to the respective pixel points is the waveform of the first audio data. The specific implementation method can be as follows:

[0093] Determine the horizontal coordinate of the pixel point according to the position of the pixel point in the first number of pixel points displayed on the audio display interface;

[0094] Determine a first audio sampling point with the highest frequency and a second audio sampling point with the lowest frequency among the second numerical value of audio sampling points identified by the pixel point;

[0095] At the position corresponding to the horizontal axis in the audio display interface, mark the first frequency of the first audio sampling point and the second frequency of the second audio sampling point;

[0096] The first frequency and the second frequency are connected to generate a waveform corresponding to the pixel.

[0097] It should be noted that the waveform magnification of each pixel is a bar graph, the height of which is the frequency difference between the audio sampling point with the highest frequency and the audio sampling point with the lowest frequency, and the width of which is one pixel.

[0098] For example, Figure 6 FIG. 4 shows another waveform diagram of first audio data provided according to an embodiment of the present application. Figure 6 As shown, the audio display interface displays 5 pixels, each pixel represents 100 audio sampling points. For the first pixel, its horizontal coordinate is 1. Assuming that the highest frequency of the 100 audio sampling points it represents is 5 and the lowest frequency is 3, a straight line is drawn from 3 to 5 at the horizontal axis of 1; for the second pixel, its horizontal coordinate is 2. Assuming that the highest frequency of the 100 audio sampling points it represents is 10 and the lowest frequency is 2, a straight line is drawn from 2 to 10 at the horizontal axis of 2; for the third pixel, its horizontal coordinate is 3. Assuming that the highest frequency of the 100 audio sampling points it represents is 10 and the lowest frequency is 2, a straight line is drawn from 2 to 10 at the horizontal axis of 2. The highest frequency is 9 and the lowest frequency is 7, so a straight line is drawn from 7 to 9 at the position of 3 on the horizontal axis; for the fourth pixel point, its horizontal coordinate is 4, assuming that the highest frequency of the 100 audio sampling points represented by it is 4 and the lowest frequency is 2, then a straight line is drawn from 2 to 4 at the position of 4 on the horizontal axis; for the fifth pixel point, its horizontal coordinate is 5, assuming that the highest frequency of the 100 audio sampling points represented by it is 3 and the lowest frequency is 1, then a straight line is drawn from 1 to 3 at the position of 5 on the horizontal axis. The waveform combination of the above 5 pixel points forms a bar waveform graph of the first audio data.

[0099] In addition to displaying a line waveform graph of the first audio data, the present application can also display a bar waveform graph of the first audio data. Different display forms can adapt to different application scenarios, have high adaptability, and flexible waveform display, which can meet the requirements for displayed waveforms in different situations.

[0100] In addition, after the drawing parameters of the waveform of the first audio data are determined, the specific drawing process may be performed in a canvas format or in an svg format, which is not limited in the present application.

[0101] It should be noted that the browser's instruction execution interface encapsulates the execution algorithms required for operations that require complex calculations on audio data, but some basic operations do not require calling the instruction execution interface, and the basic functional units of the browser can be implemented. Therefore, after receiving the interactive operation for the waveform through the browser's audio display interface, it is necessary to determine whether the interactive operation is a preset interactive operation. If the received interactive operation is a preset interactive operation, the instruction execution interface can be called to process the first audio data to obtain the processed second audio data; if the received interactive operation is not a preset interactive operation, the interactive operation can be directly implemented through the basic functional modules of the browser. Among them, the preset interactive operation refers to the operation that encapsulates the corresponding execution algorithm unit in the instruction execution interface (that is, the operation that is more complex and needs to be executed by an algorithm).

[0102] In an optional implementation of this embodiment, the received interaction operation is a waveform zooming operation (not a preset interaction operation), and the interaction module 108 is further configured as follows:

[0103] Receiving a waveform zoom operation on the waveform through the audio display interface of the browser;

[0104] Accordingly, the display module 106 is further configured as follows:

[0105] Determine, according to the zoom operation and the first display accuracy, a second display accuracy of the first audio data, where the second display accuracy refers to displaying a third value of pixels on the audio display interface, each pixel identifying an audio sampling point in a fourth value of the first audio data;

[0106] A waveform corresponding to the first audio data is generated according to the third value number of pixels displayed in the audio display interface and the fourth value number of audio sampling points identified by each pixel.

[0107] It should be noted that in order to accurately visualize a certain section of audio data, a certain section of the waveform can be interactively expanded, so the present application also provides a function of scaling the waveform. For example, by rolling the mouse wheel forward / backward, the waveform can be expanded / scaled.

[0108] In specific implementation, each time a zoom operation is performed on a waveform, it is necessary to re-determine the display accuracy of the audio display interface according to the zoom operation, and then re-select points, map, and other operations on the first audio data to re-draw the waveform after the zoom operation on the audio display interface. Specifically, the zoom scale corresponding to each operation can be pre-set, and then the target zoom scale is determined according to the current zoom operation, and the current display accuracy is adjusted according to the target zoom scale to determine the display accuracy after the zoom operation.

[0109] For example, the first audio data includes 10,000 audio sampling points, and the first display accuracy is 100 pixels displayed on the audio display interface. Assuming that the zoom operation indicates a doubling of the size, 200 pixels are displayed on the audio display interface, and each pixel represents 50 audio sampling points.

[0110] The present application provides a function of zooming in and out of the displayed waveform, so as to meet different needs of users, and display the waveform of the first audio data more finely or roughly, with flexible display mode and higher adaptability. And each zoom operation will reselect points, map, and redraw the waveform, instead of simply zooming in and out of the already drawn waveform, so as to ensure the accuracy of the waveform displayed after the zoom operation.

[0111] In an optional implementation of this embodiment, the received interaction operation is a waveform clipping operation (not a preset interaction operation), and the interaction module 108 is further configured to:

[0112] Receiving, through the audio display interface of the browser, a waveform cropping operation for a third target band of the waveform;

[0113] Accordingly, the display module 106 is further configured as follows:

[0114] Determine third audio data corresponding to a third target band from the first audio data;

[0115] Determine, according to the width of the audio display interface, a third display accuracy of the third audio data, where the third display accuracy refers to displaying a fifth value number of pixels on the audio display interface, each pixel identifying an audio sampling point in a sixth value number of the third audio data;

[0116] A waveform corresponding to the third audio data is generated according to the fifth numerical value of pixels displayed in the audio display interface and the sixth numerical value of audio sampling points identified by each pixel.

[0117] In the present application, not only can the displayed waveform be cropped, but when displaying the cropped waveform, the cropped waveform can be enlarged and displayed, that is, for the third target band to be cropped (that is, the selected band), the display accuracy can be re-determined, the points can be re-selected and mapped, so as to accurately display the waveform of the cropped target band.

[0118] In addition to redrawing the cropped band, you can also simply crop the displayed waveform, that is, select the start and end points of the third target band, and extract the waveform between the start and end points for display. When implementing it specifically, you can choose according to your needs.

[0119] In an optional implementation of this embodiment, the received interaction operation is a pitch detection operation (a preset interaction operation), and the interaction module 108 is further configured as follows:

[0120] Receiving, through the audio display interface of the browser, a selection operation for a first target band of the waveform, and receiving a pitch detection operation for the target band;

[0121] Accordingly, the interface calling module is further configured as follows:

[0122] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the pitch detection algorithm unit of the instruction execution interface to detect the audio data of the first target band to obtain the pitch data of the first target band;

[0123] Receive the pitch data output by the execution result output unit of the instruction execution interface.

[0124] In the present application, the pitch of the audio data can be detected by directly calling the encapsulated instruction execution interface to run the pitch detection algorithm unit encapsulated in the instruction execution interface, thereby expanding the function of the browser so that the pitch of the audio can also be detected through the browser.

[0125] In an optional implementation of this embodiment, the received interaction operation is a pitch adjustment operation (a preset interaction operation), and the interaction module 108 is further configured as follows:

[0126] receiving, through the audio display interface of the browser, a pitch adjustment operation for a second target band of the waveform, the pitch adjustment operation carrying the target pitch;

[0127] Accordingly, the interface calling module 110 is further configured as follows:

[0128] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the pitch adjustment algorithm unit of the instruction execution interface to adjust the current pitch of the audio data of the second target band to the target pitch, and obtaining audio data corresponding to the target pitch;

[0129] The audio data corresponding to the target pitch outputted by the execution result output unit of the instruction execution interface is received.

[0130] The present application can directly call a packaged instruction execution interface to run the pitch adjustment algorithm unit encapsulated in the instruction execution interface, and adjust the pitch of the audio data through a preset pitch adjustment algorithm, thereby expanding the function of the browser so that the pitch of the audio can also be adjusted through the browser.

[0131] In an optional implementation of this embodiment, the received interaction operation is a beat detection operation (a preset interaction operation), and the interaction module 108 is further configured as follows:

[0132] Receive a beat detection operation on the waveform through the browser's audio display interface;

[0133] Accordingly, the interface calling module is further configured as follows:

[0134] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the beat detection algorithm unit of the instruction execution interface to perform beat detection on the first audio data to obtain beat data of the first audio data;

[0135] Receive the beat data output by the execution result output unit of the instruction execution interface.

[0136] In a specific implementation, after the beat of the first audio data is detected, a beat line corresponding to the beat data may be displayed on the audio display interface of the browser.

[0137] In this application, the encapsulated instruction execution interface can be directly called to run the beat detection algorithm unit encapsulated in the instruction execution interface, detect the beat of the audio data, and draw the beat line on the audio display interface, thereby expanding the function of the browser so that the audio beat can also be detected and the beat line can be drawn through the browser.

[0138] It should be noted that in this application, only the execution algorithm unit encapsulated in the instruction execution interface includes a pitch detection algorithm unit, a pitch adjustment algorithm unit, and a beat detection algorithm unit. In actual implementation, the instruction execution interface can also encapsulate execution algorithm units of other complex algorithms to achieve other complex operations, and this application does not limit this.

[0139] The audio processing device provided by the present application is configured in a browser, and the audio processing device includes an instruction execution interface, which encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit; the instruction receiving unit is configured to receive a call instruction, and the call instruction carries a preset interactive operation for the waveform of the first audio data obtained through the audio display interface of the browser; the instruction processing unit is configured to determine the target execution algorithm unit corresponding to the call instruction according to the preset interactive operation, and run the target execution algorithm unit to obtain the execution result of the call instruction; the execution result output unit is configured to output the execution result. In this case, the execution algorithm required for the operation of performing complex calculations on the audio data can be pre-encapsulated in the instruction execution interface. When it is necessary to perform complex operations on the audio data, the encapsulated instruction execution interface is directly called to run the execution algorithm unit encapsulated in the instruction execution interface to perform complex processing on the audio data. In this way, by calling the encapsulated instruction execution interface in the browser, the operation of performing complex calculations on the audio data can be realized, which expands the functions of the browser and improves the user experience of the browser.

[0140] Figure 7 This is a flowchart of an audio processing method provided according to an embodiment of the present application, which is applied in a browser and specifically includes the following steps:

[0141] Step 702: Acquire first audio data of the audio to be processed through the data interface of the browser, and display a waveform corresponding to the first audio data on the audio display interface of the browser.

[0142] In an optional implementation of this embodiment, the waveform corresponding to the first audio data is displayed on the audio display interface of the browser, and the specific implementation method may be as follows:

[0143] Determine, according to the width of the audio display interface, a first display accuracy of the first audio data, where the first display accuracy refers to displaying a first value number of pixels on the audio display interface, each pixel identifying a second value number of audio sampling points in the first audio data;

[0144] A waveform corresponding to the first audio data is generated according to a first value number of pixels displayed in the audio display interface and a second value number of audio sampling points identified by each pixel.

[0145] In an optional implementation of this example, a waveform corresponding to the first audio data is generated according to the first value of pixels displayed in the audio display interface and the second value of audio sampling points identified by each pixel. An implementation method may be as follows:

[0146] For each pixel in the audio display interface, determine the coordinates of the pixel according to the second numerical value of audio sampling points identified by the pixel, and display the pixel at the coordinates;

[0147] The first value of pixel points displayed in the audio display interface are connected to form a waveform corresponding to the first audio data.

[0148] The coordinates of the pixel point are determined according to the second numerical value of the audio sampling point identified by the pixel point. The specific implementation process may be as follows:

[0149] Determine a first audio sampling point with the highest frequency and a second audio sampling point with the lowest frequency among the second numerical value of audio sampling points identified by the pixel point;

[0150] Determine a frequency mean of the first audio sampling point and the second audio sampling point;

[0151] The frequency mean is used as the vertical coordinate of the pixel point;

[0152] The horizontal coordinate of the pixel point is determined according to the position of the pixel point in the first number of pixel points displayed on the audio display interface.

[0153] In an optional implementation of this example, a waveform corresponding to the first audio data is generated according to the first value of pixels displayed in the audio display interface and the second value of audio sampling points identified by each pixel. Another implementation method may be as follows:

[0154] For each pixel in the audio display interface, generate a waveform corresponding to the pixel according to a second numerical value of audio sampling points identified by the pixel;

[0155] The waveforms corresponding to the first numerical value of pixel points displayed in the audio display interface are combined into a waveform corresponding to the first audio data.

[0156] Among them, for each pixel point in the audio display interface, a waveform corresponding to the pixel point is generated according to the second numerical value audio sampling point identified by the pixel point. The specific implementation process can be as follows:

[0157] Determine the horizontal coordinate of the pixel point according to the position of the pixel point in the first number of pixel points displayed on the audio display interface;

[0158] Determine a first audio sampling point with the highest frequency and a second audio sampling point with the lowest frequency among the second numerical value of audio sampling points identified by the pixel point;

[0159] At the position corresponding to the horizontal axis in the audio display interface, mark the first frequency of the first audio sampling point and the second frequency of the second audio sampling point;

[0160] The first frequency and the second frequency are connected to generate a waveform corresponding to the pixel point.

[0161] Step 704: receiving a preset interactive operation for the waveform through the audio display interface of the browser, calling an instruction execution interface to process the first audio data, and obtaining processed second audio data.

[0162] Among them, the instruction execution interface is an interface in the browser that encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit. The execution algorithm unit includes an algorithm corresponding to the preset interactive operation, and the interactive instructions triggered by the preset interactive operation are executed through the instruction execution interface.

[0163] In an optional implementation of this example, the instruction execution interface is called to process the first audio data to obtain the processed second audio data. The specific implementation process may be as follows:

[0164] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the target execution algorithm unit of the instruction execution interface to process the first audio data to obtain processed second audio data;

[0165] The second audio data outputted by the execution result output unit of the instruction execution interface is received.

[0166] It should be noted that the browser's instruction execution interface encapsulates the execution algorithms required for operations that require complex calculations on audio data, but some basic operations do not require calling the instruction execution interface, and the basic functional units of the browser can be implemented. Therefore, after receiving the interactive operation for the waveform through the browser's audio display interface, it is necessary to determine whether the interactive operation is a preset interactive operation. If the received interactive operation is a preset interactive operation, the instruction execution interface can be called to process the first audio data to obtain the processed second audio data; if the received interactive operation is not a preset interactive operation, the interactive operation can be directly implemented through the basic functional modules of the browser. Among them, the preset interactive operation refers to the operation that encapsulates the corresponding execution algorithm unit in the instruction execution interface (that is, the operation that is more complex and needs to be executed by an algorithm).

[0167] In an optional implementation of this example, the received interactive operation is a pitch detection operation (the pitch detection operation is a preset interactive operation), and a selection operation for a first target band of a waveform is received through the audio display interface of the browser, and a pitch detection operation for the target band is received. At this time, the instruction execution interface is called to process the first audio data to obtain the processed second audio data. The specific implementation process may be as follows:

[0168] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the pitch detection algorithm unit of the instruction execution interface to detect the audio data of the first target band to obtain the pitch data of the first target band;

[0169] Receive the pitch data output by the execution result output unit of the instruction execution interface.

[0170] In an optional implementation of this example, the preset interactive operation may be a pitch adjustment operation (the pitch adjustment operation is a preset interactive operation), and the pitch adjustment operation for the second target band of the waveform is received through the audio display interface of the browser. The pitch adjustment operation carries the target pitch. At this time, the instruction execution interface is called to process the first audio data to obtain the processed second audio data. The specific implementation process may be as follows:

[0171] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the pitch adjustment algorithm unit of the instruction execution interface to adjust the current pitch of the audio data of the second target band to the target pitch, and obtaining audio data corresponding to the target pitch;

[0172] The audio data corresponding to the target pitch outputted by the execution result output unit of the instruction execution interface is received.

[0173] In an optional implementation of this example, the preset interactive operation may be a beat detection operation (the beat detection operation is a preset interactive operation), and the beat detection operation for the waveform is received through the audio display interface of the browser. At this time, the instruction execution interface is called to process the first audio data to obtain the processed second audio data. The specific implementation process may be as follows:

[0174] Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the beat detection algorithm unit of the instruction execution interface to perform beat detection on the first audio data to obtain beat data of the first audio data;

[0175] Receive the beat data output by the execution result output unit of the instruction execution interface.

[0176] In an optional implementation of this example, the received interactive operation is a waveform zoom operation (not a preset interactive operation), and the waveform zoom operation for the waveform is received through the audio display interface of the browser. At this time, the second display accuracy of the first audio data can be directly determined based on the zoom operation and the first display accuracy. The second display accuracy refers to displaying a third numerical value of pixels on the audio display interface, each pixel identifying a fourth numerical value of audio sampling points in the first audio data; then, based on the third numerical value of pixels displayed in the audio display interface and the fourth numerical value of audio sampling points identified by each pixel, a waveform corresponding to the first audio data is generated.

[0177] In an optional implementation of this example, the received interactive operation is a waveform cropping operation (not a preset interactive operation), and the waveform cropping operation for the third target band of the waveform is received through the audio display interface of the browser. At this time, the third audio data corresponding to the third target band can be directly determined from the first audio data; then, according to the width of the audio display interface, the third display accuracy of the third audio data is determined, and the third display accuracy refers to displaying a fifth numerical value of pixels on the audio display interface, each pixel identifying a sixth numerical value of audio sampling points in the third audio data; then, based on the fifth numerical value of pixels displayed in the audio display interface and the sixth numerical value of audio sampling points identified by each pixel, a waveform corresponding to the third audio data is generated.

[0178] Step 706: Display the waveform corresponding to the second audio data on the audio display interface of the browser.

[0179] In an optional implementation of this embodiment, when the preset interactive operation is a beat detection operation, the obtained second audio data is the beat data of the first audio data, so at this time the beat line corresponding to the beat data can also be displayed on the audio display interface of the browser.

[0180] The audio processing method provided by the present application can obtain the first audio data of the audio to be processed through the data interface of the browser, and display the waveform corresponding to the first audio data on the audio display interface of the browser; then receive the preset interactive operation for the waveform through the audio display interface of the browser, call the instruction execution interface to process the first audio data, obtain the processed second audio data, and display the waveform corresponding to the second audio data on the audio display interface of the browser. In this case, when it is necessary to perform complex operations on the audio data, directly call the encapsulated instruction execution interface to run the execution algorithm unit encapsulated in the instruction execution interface to perform complex processing on the audio data. In this way, by calling the encapsulated instruction execution interface in the browser, it is possible to implement operations for complex calculations on the audio data, thereby expanding the functions of the browser and improving the user experience of the browser.

[0181] The above is a schematic scheme of an audio processing method of this embodiment. It should be noted that the technical scheme of the audio processing method and the technical scheme of the above audio processing device belong to the same concept, and the details not described in detail in the technical scheme of the audio processing method can be referred to the description of the technical scheme of the above audio processing device.

[0182] Figure 8 The structure block diagram of a computing device 800 provided according to an embodiment of the present application is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and the database 850 is used to store data.

[0183] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0184] In one embodiment of the present application, the above components of the computing device 800 and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0185] The computing device 800 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 800 may also be a mobile or stationary server.

[0186] The processor 820 is used to execute the following computer executable instructions to implement the following method:

[0187] Acquire first audio data of the audio to be processed through a data interface of the browser, and display a waveform corresponding to the first audio data on an audio display interface of the browser;

[0188] Receiving a preset interactive operation for the waveform through the audio display interface of the browser, calling an instruction execution interface to process the first audio data, and obtaining processed second audio data, wherein the instruction execution interface is an interface in the browser encapsulating an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit, the execution algorithm unit includes an algorithm corresponding to executing the preset interactive operation, and executing the interactive instruction triggered by the preset interactive operation through the instruction execution interface;

[0189] The waveform corresponding to the second audio data is displayed on the audio display interface of the browser.

[0190] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above audio processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above audio processing method.

[0191] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which are used to implement the method steps of the above-mentioned audio processing method when executed by a processor.

[0192] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above audio processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above audio processing method.

[0193] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0194] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0195] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0196] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0197] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. An audio processing method, characterized in that: Applied to a browser, the method comprises: Acquire first audio data of the audio to be processed through a data interface of the browser, and display a waveform corresponding to the first audio data on an audio display interface of the browser; An interactive operation for the waveform is received through the audio display interface of the browser, and it is determined whether the interactive operation is a preset interactive operation. If the received interactive operation is a preset interactive operation, an instruction execution interface is called to process the first audio data to obtain processed second audio data. If the received interactive operation is not a preset interactive operation, the interactive operation is implemented through the basic functional module of the browser, wherein the instruction execution interface is an interface in the browser that encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit, the execution algorithm unit includes an algorithm corresponding to the execution of the preset interactive operation, and the interactive instruction triggered by the preset interactive operation is executed through the instruction execution interface, and the preset interactive operation refers to an operation encapsulated in the instruction execution interface with a corresponding execution algorithm unit; The waveform corresponding to the second audio data is displayed on the audio display interface of the browser.

2. The audio processing method according to claim 1, characterized in that: After obtaining the first audio data of the audio to be processed through the data interface of the browser, the method further includes: Decoding the first audio data through a decoding interface of the browser, and determining at least one channel data of the first audio data; Correspondingly, displaying the waveform corresponding to the first audio data on the audio display interface of the browser includes: For each channel data of the at least one channel data, a waveform corresponding to the channel data is displayed on the audio display interface of the browser.

3. The audio processing method according to claim 1 or 2, characterized in that: The step of displaying the waveform corresponding to the first audio data on the audio display interface of the browser includes: Determining, according to the width of the audio display interface, a first display accuracy of the first audio data, where the first display accuracy refers to displaying a first value number of pixels on the audio display interface, each of the pixels identifying a second value number of audio sampling points in the first audio data; A waveform corresponding to the first audio data is generated according to the first numerical value of pixel points displayed in the audio display interface and the second numerical value of audio sampling points identified by each pixel point.

4. The audio processing method according to claim 3, characterized in that: The generating a waveform corresponding to the first audio data according to the first value number of pixels displayed in the audio display interface and the second value number of audio sampling points identified by each pixel point includes: For each pixel point in the audio display interface, determine the coordinates of the pixel point according to a second numerical value of audio sampling points identified by the pixel point, and display the pixel point at the coordinates; The first numerical value of pixel points displayed in the audio display interface is connected to form a waveform corresponding to the first audio data.

5. The audio processing method according to claim 4, characterized in that: The step of determining the coordinates of the pixel point according to the second numerical value of the audio sampling points identified by the pixel point includes: Determine a first audio sampling point with the highest frequency and a second audio sampling point with the lowest frequency among the second numerical value of audio sampling points identified by the pixel point; Determine a frequency mean of the first audio sampling point and the second audio sampling point; Taking the frequency mean as the ordinate of the pixel point; The horizontal coordinate of the pixel point is determined according to the position of the pixel point in a first number of pixel points displayed on the audio display interface.

6. The audio processing method according to claim 3, characterized in that: The step of generating a waveform corresponding to the first audio data according to the first numerical value of pixel points displayed in the audio display interface and the second numerical value of audio sampling points identified by each pixel point includes: For each pixel point in the audio display interface, generating a waveform corresponding to the pixel point according to a second numerical value of audio sampling points identified by the pixel point; The waveforms corresponding to the first numerical value of pixel points displayed in the audio display interface are combined into a waveform corresponding to the first audio data.

7. The audio processing method according to claim 6, characterized in that: The step of generating a waveform corresponding to each pixel in the audio display interface according to a second numerical value of audio sampling points identified by the pixel includes: Determine the horizontal coordinate of the pixel point according to the position of the pixel point in a first value of pixel points displayed on the audio display interface; Determine a first audio sampling point with the highest frequency and a second audio sampling point with the lowest frequency among the second numerical value of audio sampling points identified by the pixel point; Marking a first frequency of the first audio sampling point and a second frequency of the second audio sampling point at a position corresponding to the horizontal axis in the audio display interface; The first frequency and the second frequency are connected to generate a waveform corresponding to the pixel point.

8. The audio processing method according to claim 1 or 2, characterized in that: The receiving, through the audio display interface of the browser, an interactive operation for the waveform, and determining whether the interactive operation is a preset interactive operation, if the received interactive operation is a preset interactive operation, includes: Receiving, through the audio display interface of the browser, a selection operation for a first target band of the waveform, and receiving a pitch detection operation for the target band; Correspondingly, the calling instruction execution interface processes the first audio data to obtain processed second audio data, including: Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the pitch detection algorithm unit of the instruction execution interface to detect the audio data of the first target band to obtain the pitch data of the first target band; Receive the pitch data output by the execution result output unit of the instruction execution interface.

9. The audio processing method according to claim 1 or 2, characterized in that: The receiving, through the audio display interface of the browser, an interactive operation for the waveform, and determining whether the interactive operation is a preset interactive operation, if the received interactive operation is a preset interactive operation, includes: receiving, through the audio display interface of the browser, a pitch adjustment operation for a second target band of the waveform, the pitch adjustment operation carrying a target pitch; Correspondingly, the calling instruction execution interface processes the first audio data to obtain processed second audio data, including: Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the pitch adjustment algorithm unit of the instruction execution interface to adjust the current pitch of the audio data of the second target band to the target pitch, and obtaining audio data corresponding to the target pitch; Receive the audio data corresponding to the target pitch output by the execution result output unit of the instruction execution interface.

10. The audio processing method according to claim 1 or 2, characterized in that: The receiving, through the audio display interface of the browser, an interactive operation for the waveform, and determining whether the interactive operation is a preset interactive operation, if the received interactive operation is a preset interactive operation, includes: Receiving a beat detection operation for the waveform through the audio display interface of the browser; Correspondingly, the calling instruction execution interface processes the first audio data to obtain processed second audio data, including: Sending a call instruction to the instruction receiving unit of the instruction execution interface to run the beat detection algorithm unit of the instruction execution interface to perform beat detection on the first audio data to obtain beat data of the first audio data; Receive the beat data output by the execution result output unit of the instruction execution interface.

11. An audio processing device, characterized in that: Configured in a browser, the audio processing device includes an instruction execution interface, and the instruction execution interface encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit; The instruction receiving unit is configured to, when the audio display interface of the browser receives an interactive operation for a waveform, determine whether the interactive operation is a preset interactive operation, and if the received interactive operation is a preset interactive operation, receive a call instruction, the call instruction carrying the preset interactive operation for the waveform of the first audio data obtained through the audio display interface of the browser, and if the received interactive operation is not a preset interactive operation, implement the interactive operation through the basic function module of the browser; The instruction processing unit is configured to determine the target execution algorithm unit corresponding to the calling instruction according to the preset interactive operation, and run the target execution algorithm unit to obtain the execution result of the calling instruction, wherein the preset interactive operation refers to the operation of the corresponding execution algorithm unit encapsulated in the instruction execution interface; The execution result output unit is configured to output the execution result.

12. A computing device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the following method: Acquire first audio data of the audio to be processed through a data interface of the browser, and display a waveform corresponding to the first audio data on an audio display interface of the browser; An interactive operation on a waveform is received through the audio display interface of the browser, and it is determined whether the interactive operation is a preset interactive operation. If the received interactive operation is a preset interactive operation, an instruction execution interface is called to process the first audio data to obtain processed second audio data. If the received interactive operation is not a preset interactive operation, the interactive operation is implemented through the basic functional module of the browser, wherein the instruction execution interface is an interface in the browser that encapsulates an instruction receiving unit, an instruction processing unit, an execution algorithm unit, and an execution result output unit, the execution algorithm unit includes an algorithm corresponding to the preset interactive operation, and the interactive instruction triggered by the preset interactive operation is executed through the instruction execution interface, and the preset interactive operation refers to an operation encapsulated with a corresponding execution algorithm unit in the instruction execution interface; The waveform corresponding to the second audio data is displayed on the audio display interface of the browser.

13. A computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the audio processing method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program / instruction, which, when executed by a processor, implements the steps of the audio processing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Device that determines whether to launch an application locally or remotely as a webapp

    CN101663647A

  • Audio sound mixing method and device

    CN103903625A

  • Volume adjustment method and device for browser

    CN105677286A

  • Waveform drawing method and device, computer device and readable storage medium

    CN110246204A

  • Data processor, data processing method, browser system, browser device, and recording medium

    JP2001282503A