CN110516108A - Method and system for browser to play audio - Google Patents
Method and system for browser to play audio Download PDFInfo
- Publication number
- CN110516108A CN110516108A CN201910831451.2A CN201910831451A CN110516108A CN 110516108 A CN110516108 A CN 110516108A CN 201910831451 A CN201910831451 A CN 201910831451A CN 110516108 A CN110516108 A CN 110516108A
- Authority
- CN
- China
- Prior art keywords
- audio
- data
- group
- stack
- file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
- G06F16/61—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/60—Information retrieval; Database structures therefor; File system structures therefor of audio data
- G06F16/64—Browsing; Visualisation therefor
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B27/00—Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
- G11B27/10—Indexing; Addressing; Timing or synchronising; Measuring tape travel
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Description
技术领域technical field
本申请涉及音频处理技术领域,尤其涉及一种浏览器播放音频的方法及系统。The present application relates to the technical field of audio processing, and in particular, to a method and system for playing audio by a browser.
背景技术Background technique
Wavesurfer.js是一款基于HTML5 canvas和Web Audio的音频播放器插件。能够在浏览器上实现加载网络音频资源,具有播放,暂停等交互功能,并且能够根据音频信息,生成频谱图的播放效果。Wavesurfer.js is an audio player plugin based on HTML5 canvas and Web Audio. It can realize the loading of network audio resources on the browser, has interactive functions such as play and pause, and can generate the playback effect of the spectrogram according to the audio information.
但是,Wavesurfer.js至少存在以下缺陷:However, Wavesurfer.js has at least the following flaws:
加载大音频时会非常缓慢,浏览器会卡顿甚至假死;When loading large audio, it will be very slow, and the browser will freeze or even freeze;
在大音频场景下绘制频谱图,会占用巨大的内存,浏览器会闪退,假死等。Drawing a spectrogram in a large audio scene will take up a huge amount of memory, and the browser will crash and freeze.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种浏览器播放音频的方法及系统,用于至少解决上述技术问题之一。Embodiments of the present application provide a method and system for playing audio by a browser, so as to solve at least one of the above technical problems.
第一方面,本申请实施例提供一种浏览器播放音频的方法,包括:In a first aspect, an embodiment of the present application provides a method for a browser to play audio, including:
S10、预先将音频文件分割为n个音频片段;S10. Split the audio file into n audio segments in advance;
S20、从所述n个音频片段中获取第i个音频片段,解码得到第i组解码音频数据,并存储至音频缓存栈,其中,i取值1至n;S20, obtain the i-th audio clip from the n audio clips, decode to obtain the i-th group of decoded audio data, and store in the audio buffer stack, where i takes a value from 1 to n;
S30、根据所述第i组解码音频数据确定第i组波形数据,并存储至峰值数据缓存栈;S30, determine the i-th group of waveform data according to the i-th group of decoded audio data, and store to the peak data buffer stack;
S40、从所述音频缓存栈和所述峰值数据缓存栈中获取所述第i组解码音频数据和所述第i组波形数据进行同步播放;i的取值增加1并跳转至步骤S20。S40. Acquire the i-th group of decoded audio data and the i-th group of waveform data from the audio buffer stack and the peak data buffer stack for synchronous playback; increase the value of i by 1 and jump to step S20.
第二方面,本申请实施例提供一种浏览器播放音频的系统,包括:In a second aspect, an embodiment of the present application provides a system for playing audio by a browser, including:
音频分割程序模块,用于预先将音频文件分割为n个音频片段;The audio splitter module is used to split the audio file into n audio clips in advance;
音频缓存栈程序模块,用于从所述n个音频片段中获取第i个音频片段,解码得到第i组解码音频数据,并存储至音频缓存栈,其中,i取值1至n;The audio buffer stack program module is used to obtain the i-th audio clip from the n audio clips, decode to obtain the i-th group of decoded audio data, and store it in the audio buffer stack, where i takes a value from 1 to n;
峰值数据缓存栈程序模块,用于根据所述第i组解码音频数据确定第i组波形数据,并存储至峰值数据缓存栈;Peak data cache stack program module, for determining the i-th group of waveform data according to the i-th group of decoded audio data, and storing to the peak data cache stack;
播放程序模块,用于从所述音频缓存栈和所述峰值数据缓存栈中获取所述第i组解码音频数据和所述第i组波形数据进行同步播放;Playing program module, for obtaining described ith group of decoded audio data and described ith group of waveform data from described audio buffer stack and described peak data buffer stack to perform synchronous playback;
跳转程序模块,用于将i的取值增加1,并跳转至所述音频缓存栈程序模块。The jumping program module is used for increasing the value of i by 1, and jumping to the audio buffer stack program module.
第三方面,本申请实施例提供一种存储介质,所述存储介质中存储有一个或多个包括执行指令的程序,所述执行指令能够被电子设备(包括但不限于计算机,服务器,或者网络设备等)读取并执行,以用于执行本申请上述任一项浏览器播放音频的方法。In a third aspect, embodiments of the present application provide a storage medium, where one or more programs including execution instructions are stored in the storage medium, and the execution instructions can be executed by an electronic device (including but not limited to a computer, a server, or a network). device, etc.) to read and execute, so as to execute any one of the above-mentioned methods for playing audio by a browser in this application.
第四方面,提供一种电子设备,其包括:至少一个处理器,以及与所述至少一个处理器通信连接的存储器,其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请上述任一项浏览器播放音频的方法。In a fourth aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, The instructions are executed by the at least one processor, so that the at least one processor can execute any one of the above-mentioned methods for playing audio by a browser in this application.
第五方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任一项浏览器播放音频的方法。In a fifth aspect, embodiments of the present application further provide a computer program product, where the computer program product includes a computer program stored on a storage medium, the computer program includes program instructions, and when the program instructions are executed by a computer, causes the The computer executes any one of the above-mentioned methods for playing audio by a browser.
本申请实施例的有益效果在于:将音频文件进行分段加载,解析成频谱,这样浏览器就不会长时间停滞在一个http请求上,解决了现有技术中在浏览器播放大音频文件出现卡顿甚至卡死的问题。The beneficial effect of the embodiment of the present application is that: the audio files are loaded in sections and parsed into frequency spectrums, so that the browser will not be stuck on an http request for a long time, which solves the problem that the browser plays a large audio file in the prior art. Caton or even stuck.
附图说明Description of drawings
为了更清楚地说明本申请实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为本申请的浏览器播放音频的方法的一实施例的流程图;FIG. 1 is a flowchart of an embodiment of a method for a browser to play audio according to the present application;
图2为本申请的浏览器播放音频的方法的另一实施例的流程图;2 is a flowchart of another embodiment of a method for playing audio by a browser of the present application;
图3为本申请的浏览器播放音频的方法中的频谱渲染过程示意图;3 is a schematic diagram of a spectrum rendering process in the method for playing audio by a browser of the present application;
图4为本申请的浏览器播放音频的系统的原理框图;Fig. 4 is the principle block diagram of the system for the browser of the application to play audio;
图5为本申请的浏览器播放音频的系统中的音频分割程序模块的一实施例示意图;5 is a schematic diagram of an embodiment of an audio segmentation program module in the system for playing audio by a browser of the present application;
图6为本申请的电子设备的一实施例的结构示意图。FIG. 6 is a schematic structural diagram of an embodiment of the electronic device of the present application.
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、元件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, elements, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
在本申请中,“模块”、“装置”、“系统”等指应用于计算机的相关实体,如硬件、硬件和软件的组合、软件或执行中的软件等。详细地说,例如,元件可以、但不限于是运行于处理器的过程、处理器、对象、可执行元件、执行线程、程序和/或计算机。还有,运行于服务器上的应用程序或脚本程序、服务器都可以是元件。一个或多个元件可在执行的过程和/或线程中,并且元件可以在一台计算机上本地化和/或分布在两台或多台计算机之间,并可以由各种计算机可读介质运行。元件还可以根据具有一个或多个数据包的信号,例如,来自一个与本地系统、分布式系统中另一元件交互的,和/或在因特网的网络通过信号与其它系统交互的数据的信号通过本地和/或远程过程来进行通信。In this application, "module", "device", "system", etc. refer to related entities applied to a computer, such as hardware, a combination of hardware and software, software or software in execution, and the like. In detail, for example, an element may be, but is not limited to, a process running on a processor, a processor, an object, an executable element, a thread of execution, a program, and/or a computer. Also, an application program or script program running on the server, and the server can be a component. One or more elements may be in a process and/or thread of execution and an element may be localized on one computer and/or distributed between two or more computers and may be executed from various computer readable media . Elements may also pass through a signal having one or more data packets, for example, a signal from one interacting with another element in a local system, in a distributed system, and/or with data interacting with other systems through a network of the Internet local and/or remote processes to communicate.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”,不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply these entities or that there is any such actual relationship or sequence between operations. Furthermore, the terms "comprising" and "comprising" include not only those elements, but also other elements not expressly listed, or elements inherent to such a process, method, article or apparatus. Without further limitation, an element defined by the phrase "comprises" does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.
如图1所示,本申请的实施例提供一种浏览器播放音频的方法,包括:As shown in FIG. 1, an embodiment of the present application provides a method for a browser to play audio, including:
S10、预先将音频文件分割为n个音频片段;S10. Split the audio file into n audio segments in advance;
示例性地,识别所述音频文件类型;示例性地,音频文件类型包括wav,mp3和acc(包括ADTS和ADIF)。其中,mp3和ADTS格式为一个类型,具备流特征;wav和ADIF格式为一个类型,不具备流特征。Illustratively, the audio file types are identified; exemplarily, audio file types include wav, mp3 and acc (including ADTS and ADIF). Among them, mp3 and ADTS formats are one type and have streaming characteristics; wav and ADIF formats are one type and do not have streaming characteristics.
当所述音频文件具备流特征时,直接将所述音频文件按照预设长度分割为n个音频片段;示例性地,预设长度可以为5分钟。When the audio file has the streaming feature, the audio file is directly divided into n audio segments according to a preset length; for example, the preset length may be 5 minutes.
当所述音频文件不具备流特征时,获取所述音频文件的文件头,并按照预设长度将所述音频文件的数据部分分割为n个数据片段;When the audio file does not have the stream feature, obtain the file header of the audio file, and divide the data portion of the audio file into n data segments according to a preset length;
根据所述文件头为所述n个数据片段中的每个添加文件头得到n个音频片段。Add a file header to each of the n data segments according to the file header to obtain n audio segments.
S20、从所述n个音频片段中获取第i个音频片段,解码得到第i组解码音频数据,并存储至音频缓存栈,其中,i取值1至n;S20, obtain the i-th audio clip from the n audio clips, decode to obtain the i-th group of decoded audio data, and store in the audio buffer stack, where i takes a value from 1 to n;
示例性地,可以通过ws协议接口从所述n个音频片段中获取第i个音频片段。音频加载接口采用ws协议,可以利用ws的数据窗口为64kb的特性,去逐段的加载音频,然后解析等后续一系列操作。由于ws协议有很好的隐蔽性,可以防止audio资源被人从网页上下载下来。Exemplarily, the ith audio segment may be acquired from the n audio segments through the ws protocol interface. The audio loading interface adopts the ws protocol, which can use the data window of ws to be 64kb to load the audio segment by segment, and then parse and other subsequent operations. Because the ws protocol has good concealment, it can prevent audio resources from being downloaded from the web page.
S30、根据所述第i组解码音频数据确定第i组波形数据,并存储至峰值数据缓存栈;S30, determine the i-th group of waveform data according to the i-th group of decoded audio data, and store to the peak data buffer stack;
S40、从所述音频缓存栈和所述峰值数据缓存栈中获取所述第i组解码音频数据和所述第i组波形数据进行同步播放;i的取值增加1并跳转至步骤S20。S40. Acquire the i-th group of decoded audio data and the i-th group of waveform data from the audio buffer stack and the peak data buffer stack for synchronous playback; increase the value of i by 1 and jump to step S20.
示例性地,所述从所述音频缓存栈和所述峰值数据缓存栈中获取所述第i组解码音频数据和所述第i组波形数据进行同步播放包括:当监听到播放指令之后,从所述音频缓存栈中获取所述第i组解码音频数据进行播放;同时,从所述峰值数据缓存栈中获取所述第i组波形数据同步绘制波形。Exemplarily, the acquiring the i-th group of decoded audio data and the i-th group of waveform data from the audio buffer stack and the peak data buffer stack for synchronous playback includes: after listening to the playback instruction, from The i-th group of decoded audio data is acquired from the audio buffer stack for playback; at the same time, the i-th group of waveform data is acquired from the peak data buffer stack to draw waveforms synchronously.
本申请实施例中将大音频文件进行分段加载,预先将该大音频文件切割成5分钟的片段,逐片段的加载,解析成频谱。这样,浏览器就不会长时间停滞在一个http请求上。解决了现有技术中在浏览器播放大音频文件出现卡顿甚至卡死的问题。In the embodiment of the present application, the large audio file is loaded in segments, the large audio file is pre-cut into 5-minute segments, and the segments are loaded and parsed into frequency spectrums. This way the browser doesn't get stuck on one http request for a long time. It solves the problem that the browser freezes or even freezes when playing a large audio file in the prior art.
此外,本申请实施例中在进行分段加载时采用了分段加载并缓存的方式,从而能够使得音频文件更加顺畅的播放,而且可以进行方便快捷的回放。In addition, in the embodiment of the present application, the method of segment loading and caching is adopted when performing segment loading, so that the audio file can be played more smoothly, and the playback can be performed conveniently and quickly.
进一步地,本申请实施例中在分段加载缓存时,对解码得到的音频数据以及用于绘制波形图的波形数据进行了独立的缓存,而且是波形数据是基于已经缓存下来的音频数据计算得到并进行缓存的,而没有在分段解码音频文件时同步进行波形数据的计算,原因在于发明人在实现本申请的过程中发现,无论是解码音频片段还是计算波形数据都是需要占用很多计算资源(例如CPU的占用)的,如果同时进行则会导致浏览器的卡顿甚至卡死等现象的发生,因此本申请实施例中将两者分步进行缓存,并且波形数据还是在解码得到的音频数据的基础上进行计算得到的,这在一定程度上也避免了重复解码音频片段导致的资源开销及时间成本。Further, in the embodiment of the present application, when the buffer is loaded in segments, the audio data obtained by decoding and the waveform data used to draw the waveform diagram are independently buffered, and the waveform data is calculated based on the buffered audio data. The reason is that the inventor found in the process of realizing this application that both decoding the audio segment and calculating the waveform data require a lot of computing resources. (for example, the occupation of the CPU), if it is performed at the same time, it will cause the browser to freeze or even freeze. Therefore, in this embodiment of the present application, the two are cached step by step, and the waveform data is still the audio obtained by decoding. It is calculated on the basis of the data, which also avoids the resource overhead and time cost caused by repeated decoding of audio clips to a certain extent.
如图2所示,为本申请的浏览器播放音频的方法的另一实施例的流程图,该图中具体示出了分段加载过程,从图中可以开出,音频资源预先划分成了多个片段:第一段、第二段、第三段……。As shown in FIG. 2 , it is a flowchart of another embodiment of the method for playing audio in a browser of the present application. The figure specifically shows the segment loading process. It can be seen from the figure that the audio resources are pre-divided into Multiple segments: 1st segment, 2nd segment, 3rd segment….
在浏览器端发出加载视频的请求,从而逐段的加载音频资源,示例性地,首先加载第一段音频片段,并对其进行解码;A request for loading a video is sent on the browser side, so as to load the audio resource segment by segment, for example, the first audio segment is first loaded and decoded;
将对第一段音频片段进行解码得到的音频数据存储到预先配置的音频缓存栈,存储为相应的存储为第一段解码音频数据;The audio data obtained by decoding the first audio segment is stored in a preconfigured audio buffer stack, and stored as the corresponding first segment of decoded audio data;
之后基于存储的第一段解码音频数据计算得到相应的波形数据(例如,波形峰值数据),并将该波形数据存储到预先配置的波形数据缓存栈,存储为第一段波形数据;Then, corresponding waveform data (for example, waveform peak data) is obtained by calculating based on the stored first segment of decoded audio data, and the waveform data is stored in a preconfigured waveform data buffer stack, and stored as the first segment of waveform data;
之后继续加载第二端音频片段,并重复以上步骤;或者Then continue to load the second-end audio clip and repeat the above steps; or
如果检测到播放指令,则获取已经缓存的解码音频数据和波形数据进行音频和波形的同步播放,同时继续加载第二端音频片段,并重复以上步骤。If a playback instruction is detected, the buffered decoded audio data and waveform data are acquired to perform synchronous playback of the audio and waveform, while continuing to load the second-end audio clip, and repeating the above steps.
发明人在实现本申请的过程中发现从音频数据计算出audio buffer(音频缓存)和peak(波峰)数据是非常消耗cpu的操作,而绘制过程的间隔最起码要保证24ms。如果24ms内,音频数据要重新解析成audio buffer和计算peak,可能会发生卡帧的现象。所以为了防止卡帧,本申请在第一次下载完音频就把解析完成的audio buffer和计算出来的peak值都缓存起来。此外,计算peak也是一个很消耗cpu的操作,并且peak值的多少取决于图形的细腻度,如果细腻度越细,计算量越大。本申请实施例的好处在于:播放和绘制过程能保证连贯性,人耳和人眼会察觉不出短暂时间,通过空间来换取时间。During the process of implementing the present application, the inventor found that calculating the audio buffer (audio buffer) and peak (wave peak) data from the audio data is a very CPU-consuming operation, and the interval of the drawing process should be guaranteed at least 24ms. If within 24ms, the audio data needs to be reparsed into the audio buffer and the peak calculated, the frame jam phenomenon may occur. Therefore, in order to prevent the frame from being stuck, this application caches the parsed audio buffer and the calculated peak value after the audio is downloaded for the first time. In addition, calculating the peak is also an operation that consumes a lot of CPU, and the peak value depends on the fineness of the graph. The finer the fineness, the greater the amount of computation. The advantages of the embodiments of the present application are that the playback and drawing processes can ensure continuity, and the human ear and human eyes cannot perceive a short time, and space is used to exchange time.
在一些实施例中,所述波形数据至少包括波形峰值数据;所述从所述峰值数据缓存栈中获取所述第i组波形数据同步绘制波形包括:In some embodiments, the waveform data includes at least waveform peak data; the acquiring the i-th group of waveform data from the peak data buffer stack to synchronously draw waveforms includes:
根据当前播放时间和预设距离,计算出需要从所述峰值数据缓存栈的所述第i组波形数据中获取的峰值数据;According to the current playback time and the preset distance, calculate the peak data that needs to be obtained from the i-th group of waveform data in the peak data cache stack;
根据预设宽度的canvas对所述获取的峰值数据进行渲染得到波形。A waveform is obtained by rendering the acquired peak data according to a canvas with a preset width.
示例性地,如图3所示,为本申请的浏览器播放音频的方法中的频谱渲染过程示意图,在该渲染过程中采用24ms时间帧进行画面的刷新,并且在下一个24ms时,获取已播放的时间,然后根据播放的时间和距离,从peak stack(波峰栈)中计算出所需渲染要用的peak,最后根据peak和canvas的宽度进行渲染即可。Exemplarily, as shown in FIG. 3 , which is a schematic diagram of the spectrum rendering process in the method for playing audio in the browser of the present application, in the rendering process, a 24ms time frame is used to refresh the screen, and in the next 24ms, the playback is obtained. , and then according to the playing time and distance, calculate the peak to be used for rendering from the peak stack (wave peak stack), and finally render according to the width of the peak and canvas.
示例性地,播放的时间指音频已经播放过的时长,“距离”指已经播放过的时长×波形图移动长度/每秒;Exemplarily, the playing time refers to the duration that the audio has been played, and the "distance" refers to the duration that has been played x the moving length of the waveform diagram/second;
根据“播放的时间”和“距离”计算得到需要的peak的步骤如下:The steps to calculate the required peak according to the "playing time" and "distance" are as follows:
-1,图形起点的peak的index=指针位置÷波形图移动长度/每秒;-1, the index of the peak at the starting point of the graph=pointer position÷waveform movement length/second;
图形终点的peak的index=(指针位置+canvas长度)÷波形图移动长度/每秒;The index of the peak at the end of the graph = (pointer position + canvas length) ÷ waveform movement length/second;
通过起点的index,终点的index,从peaks缓存中获取一段peak,重新绘制canvas。Through the index of the starting point and the index of the end point, a peak is obtained from the peaks cache, and the canvas is redrawn.
-2,如果“距离”%“波形宽度”>0,也是说最左边的一格波形,在下一帧画面还存在一部分;-2, if "distance"% "waveform width" > 0, it means that there is still a part of the leftmost waveform in the next frame;
那么,根据(“距离”%“波形宽度”)得到的余数,下一次重新绘制时,所有波形格都向右偏移“余数”距离。Then, based on the remainder obtained from ("distance" % "wavewidth"), on the next redraw, all waveform divisions are shifted to the right by the "remainder" distance.
这样视觉效果就会非常连贯。因为canvas层级复杂,所以计算过程中需要的变量要极其可靠,利用动画的原理,在极短的时间内,在一个固定宽度的canvas中连续重新绘制,效果同样是流动效果,但是却节省内存。The visual effect will be very coherent. Because the canvas level is complex, the variables required in the calculation process must be extremely reliable. Using the principle of animation, in a very short period of time, it is continuously redrawn in a fixed-width canvas. The effect is also a flowing effect, but it saves memory.
在一些实施例中,本申请的浏览器播放音频的方法可以实现分段播放、速度控制、前进及后退等操作,具体示例如下:In some embodiments, the method for playing audio in a browser of the present application can implement operations such as segmented playback, speed control, forward and backward, and specific examples are as follows:
1、分段播放:在播放时,会监听播放器事件,实时计算当前的播放时间等播放状态,当到达分段音频的duration最后时,会根据播放总时长计算出下一段音频的index,从缓存拿出audio buffer,给播放器设置状态,播放器播放音频。1. Segmented playback: During playback, the player event will be monitored, and the current playback time and other playback states will be calculated in real time. When the end of the segmented audio duration is reached, the index of the next audio segment will be calculated according to the total playback duration, starting from The cache takes out the audio buffer, sets the state for the player, and the player plays the audio.
示例性地,播放器播放过程中会触发onaudioprocess事件,监听事件后,根据当前的播放状态,计算数据,然后擦除掉canvas波形,重新绘制。因为事件触发是毫秒级,所以人眼看到的波形仍然是连续的。Exemplarily, the onaudioprocess event will be triggered during the playback of the player. After listening to the event, the data will be calculated according to the current playback state, and then the canvas waveform will be erased and redrawn. Because the event trigger is on the millisecond level, the waveform seen by the human eye is still continuous.
播放状态包括:暂停,播放,结束。当播放状态为“播放”时,计算相关播放数据和绘制数据。Play status includes: pause, play, end. When the playback state is "playing", the related playback data and drawing data are calculated.
1.1、播放数据包括以下数据:1.1. The playback data includes the following data:
指针位置/波形总长度=已播放的时长/总时长;Pointer position/total length of waveform=played duration/total duration;
波形总长度=总时长×设置的参数;其中,设置的参数为波形图移动长度/每秒;The total length of the waveform = the total duration × the set parameter; the set parameter is the waveform movement length/second;
已播放时长=指针位置÷波形总长度×总时长;Played duration = pointer position ÷ total waveform length × total duration;
分段音频的index=已播放的时长÷分段音频时长+1;The index of segmented audio=played duration ÷ segmented audio duration+1;
分段音频已播放的时长=已播放的时长%分段音频时长;Played duration of segmented audio=played duration% segmented audio duration;
通过分段音频已播放的时长,以及自身的总时长,可以判断出当前播放的分段音频是否已经到了自身尾部;Based on the played duration of the segmented audio and its own total duration, it can be judged whether the currently playing segmented audio has reached its end;
如果分段音频到了自身尾部,通过(分段音频的index+1),得到下一段分段音频,进行播放;If the segmented audio reaches the end of itself, pass (index+1 of the segmented audio) to get the next segmented audio and play it;
如果该分段音频已经是最后一个音频,并且到了自身尾部,那么给播放器设置finish状态,触发finish事件。If the segmented audio is already the last audio and reaches the end of itself, set the finish state to the player and trigger the finish event.
1.2、绘制数据包括以下数据:1.2. The drawing data includes the following data:
图形起点的peak的index=指针位置÷波形图移动长度/每秒;The index of the peak at the starting point of the graph=pointer position÷waveform movement length/second;
图形终点的peak的index=(指针位置+canvas长度)÷波形图移动长度/每秒;The index of the peak at the end of the graph = (pointer position + canvas length) ÷ waveform movement length/second;
通过起点的index,终点的index,从peaks缓存中获取一段peak,重新绘制canvas。Through the index of the starting point and the index of the end point, a peak is obtained from the peaks cache, and the canvas is redrawn.
在一些实施例中,擦除掉前一次触发的播放事件后,计算数据得出的peaks绘制出来的波形。因为是实时触发的事件,人眼会感觉不出短暂暂停,看到的画面仍然是连续的。In some embodiments, after erasing the previously triggered play event, the waveform drawn by the peaks obtained by calculating the data. Because it is an event triggered in real time, the human eye will not feel a short pause, and the picture seen is still continuous.
播放是一个连续的过程,过程中播放器会实时触发onaudioprocess事件,触发事件后执行以下步骤:Playing is a continuous process. During the process, the player will trigger the onaudioprocess event in real time. After the event is triggered, the following steps are performed:
(1)计算播放数据,是否finish,是否需要寻找下一段音频;(1) Calculate the playback data, whether it is finished, and whether it is necessary to find the next audio segment;
(2)计算绘制数据,即绘制波形需要的peaks->擦除canvas->重新绘制;(2) Calculate the drawing data, that is, the peaks->erasing canvas->redrawing required to draw the waveform;
(3)重复以下步骤(1)和(2)。(3) Repeat steps (1) and (2) below.
2、速度控制:设置播放速度时,会把每个分段source重新设置播放速度的属性。2. Speed control: When setting the playback speed, each segment source will reset the playback speed attribute.
3、前进/后退:在播放时前进/后退,会根据播放指针所在的位置,计算出duration等信息,然后再计算出属于哪个分段音频,以及该分段音频的start和end,然后播放。3. Forward/backward: forward/backward during playback, it will calculate the duration and other information according to the position of the play pointer, and then calculate which segment audio belongs to, as well as the start and end of the segment audio, and then play.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作合并,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of actions combined, but those skilled in the art should know that the present application is not limited by the described sequence of actions. Because in accordance with the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know 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. In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
如图4所示,本申请的实施例还提供一种浏览器播放音频的系统400,包括:As shown in FIG. 4 , an embodiment of the present application further provides a system 400 for playing audio by a browser, including:
音频分割程序模块410,用于预先将音频文件分割为n个音频片段;an audio splitting program module 410, for splitting the audio file into n audio segments in advance;
音频缓存栈程序模块420,用于从所述n个音频片段中获取第i个音频片段,解码得到第i组解码音频数据,并存储至音频缓存栈,其中,i取值1至n;The audio buffer stack program module 420 is used to obtain the i-th audio clip from the n audio clips, decode to obtain the i-th group of decoded audio data, and store it in the audio buffer stack, where i takes a value from 1 to n;
峰值数据缓存栈程序模块430,用于根据所述第i组解码音频数据确定第i组波形数据,并存储至峰值数据缓存栈;The peak data cache stack program module 430 is used to determine the i-th group of waveform data according to the i-th group of decoded audio data, and store it in the peak data cache stack;
播放程序模块440,用于从所述音频缓存栈和所述峰值数据缓存栈中获取所述第i组解码音频数据和所述第i组波形数据进行同步播放;Playing program module 440 is used to obtain the i-th group of decoded audio data and the i-th group of waveform data from the audio buffer stack and the peak data buffer stack for synchronous playback;
跳转程序模块450,用于将i的取值增加1,并跳转至所述音频缓存栈程序模块。The jumping program module 450 is used for increasing the value of i by 1, and jumping to the audio buffer stack program module.
如图5所示,在一些实施例中所述音频分割程序模块410包括:As shown in FIG. 5, in some embodiments, the audio segmentation program module 410 includes:
类型识别单元411,用于识别所述音频文件类型;Type identification unit 411, for identifying the audio file type;
第一分割单元412,用于当所述音频文件具备流特征时,直接将所述音频文件按照预设长度分割为n个音频片段;The first dividing unit 412 is used to directly divide the audio file into n audio segments according to a preset length when the audio file has a stream feature;
第二分割单元413,用于当所述音频文件不具备流特征时,获取所述音频文件的文件头,并按照预设长度将所述音频文件的数据部分分割为n个数据片段;The second dividing unit 413 is used to obtain the file header of the audio file when the audio file does not have the stream feature, and divide the data portion of the audio file into n data segments according to a preset length;
数据组包单元414,用于根据所述文件头为所述n个数据片段中的每个添加文件头得到n个音频片段。The data grouping unit 414 is configured to add a file header to each of the n data segments according to the file header to obtain n audio segments.
在一些实施例中,所述从所述n个音频片段中获取第i个音频片段包括:In some embodiments, the obtaining the ith audio segment from the n audio segments includes:
通过ws协议接口从所述n个音频片段中获取第i个音频片段。Obtain the ith audio segment from the n audio segments through the ws protocol interface.
在一些实施例中,所述从所述音频缓存栈和所述峰值数据缓存栈中获取所述第i组解码音频数据和所述第i组波形数据进行同步播放包括:In some embodiments, acquiring the i-th group of decoded audio data and the i-th group of waveform data from the audio buffer stack and the peak data buffer stack for synchronous playback includes:
当监听到播放指令之后,从所述音频缓存栈中获取所述第i组解码音频数据进行播放;同时,After listening to the play instruction, obtain the i-th group of decoded audio data from the audio buffer stack to play; at the same time,
从所述峰值数据缓存栈中获取所述第i组波形数据同步绘制波形。Obtain the i-th group of waveform data from the peak data buffer stack to draw waveforms synchronously.
在一些实施例中,所述波形数据至少包括波形峰值数据;所述从所述峰值数据缓存栈中获取所述第i组波形数据同步绘制波形包括:In some embodiments, the waveform data includes at least waveform peak data; the acquiring the i-th group of waveform data from the peak data buffer stack to synchronously draw waveforms includes:
根据当前播放时间和预设距离,计算出需要从所述峰值数据缓存栈的所述第i组波形数据中获取的峰值数据;According to the current playback time and the preset distance, calculate the peak data that needs to be obtained from the i-th group of waveform data in the peak data cache stack;
根据预设宽度的canvas对所述获取的峰值数据进行渲染得到波形。A waveform is obtained by rendering the acquired peak data according to a canvas with a preset width.
在一些实施例中,本申请实施例提供一种非易失性计算机可读存储介质,所述存储介质中存储有一个或多个包括执行指令的程序,所述执行指令能够被电子设备(包括但不限于计算机,服务器,或者网络设备等)读取并执行,以用于执行本申请上述任一项浏览器播放音频的方法。In some embodiments, embodiments of the present application provide a non-volatile computer-readable storage medium, where one or more programs including execution instructions are stored in the storage medium, and the execution instructions can be read by an electronic device (including But not limited to a computer, a server, or a network device, etc.) to read and execute it, so as to execute any of the above-mentioned methods for playing audio by a browser in this application.
在一些实施例中,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非易失性计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任一项浏览器播放音频的方法。In some embodiments, the embodiments of the present application also provide a computer program product, the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, the computer program includes program instructions, when all When the program instructions are executed by a computer, the computer is made to execute any one of the above-mentioned methods for playing audio by a browser.
在一些实施例中,本申请实施例还提供一种电子设备,其包括:至少一个处理器,以及与所述至少一个处理器通信连接的存储器,其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行浏览器播放音频的方法。In some embodiments, the embodiments of the present application further provide an electronic device, which includes: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores data that can be used by the at least one processor. Instructions executed by one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method for a browser to play audio.
在一些实施例中,本申请实施例还提供一种存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现浏览器播放音频的方法。In some embodiments, embodiments of the present application further provide a storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, a method for playing audio by a browser is implemented.
上述本申请实施例的浏览器播放音频的系统可用于执行本申请实施例的浏览器播放音频的方法,并相应的达到上述本申请实施例的实现浏览器播放音频的方法所达到的技术效果,这里不再赘述。本申请实施例中可以通过硬件处理器(hardware processor)来实现相关功能模块。The system for playing audio by a browser according to the embodiment of the present application can be used to execute the method for playing audio on a browser according to the embodiment of the present application, and correspondingly achieve the technical effect achieved by the method for playing audio in a browser according to the embodiment of the present application, I won't go into details here. In the embodiments of the present application, the relevant functional modules may be implemented by a hardware processor (hardware processor).
图6是本申请另一实施例提供的执行浏览器播放音频的方法的电子设备的硬件结构示意图,如图6所示,该设备包括:FIG. 6 is a schematic diagram of the hardware structure of an electronic device for executing a method for playing audio in a browser provided by another embodiment of the present application. As shown in FIG. 6 , the device includes:
一个或多个处理器610以及存储器620,图6中以一个处理器610为例。One or more processors 610 and a memory 620, one processor 610 is taken as an example in FIG. 6 .
执行浏览器播放音频的方法的设备还可以包括:输入装置630和输出装置640。The apparatus for performing the method of playing audio by the browser may further include: an input device 630 and an output device 640 .
处理器610、存储器620、输入装置630和输出装置640可以通过总线或者其他方式连接,图6中以通过总线连接为例。The processor 610, the memory 620, the input device 630, and the output device 640 may be connected by a bus or in other manners, and the connection by a bus is taken as an example in FIG. 6 .
存储器620作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的浏览器播放音频的方法对应的程序指令/模块。处理器610通过运行存储在存储器620中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例浏览器播放音频的方法。As a non-volatile computer-readable storage medium, the memory 620 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as the method for playing audio by the browser in the embodiment of the present application. program instructions/modules. The processor 610 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 620, that is, implementing the method for playing audio by the browser in the above method embodiment.
存储器620可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据浏览器播放音频的装置的使用所创建的数据等。此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器620可选包括相对于处理器610远程设置的存储器,这些远程存储器可以通过网络连接至浏览器播放音频的装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 620 may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function; the stored data area may store data created according to the use of a device for playing audio by a browser, etc. . Additionally, memory 620 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 620 may optionally include memory located remotely from the processor 610, and these remote memories may be connected via a network to the browser to play the audio device. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
输入装置630可接收输入的数字或字符信息,以及产生与浏览器播放音频的装置的用户设置以及功能控制有关的信号。输出装置640可包括显示屏等显示设备。The input device 630 may receive input numerical or character information, and generate signals related to user settings and function control of the device through which the browser plays audio. The output device 640 may include a display device such as a display screen.
所述一个或者多个模块存储在所述存储器620中,当被所述一个或者多个处理器610执行时,执行上述任意方法实施例中的浏览器播放音频的方法。The one or more modules are stored in the memory 620, and when executed by the one or more processors 610, execute the method for playing audio by the browser in any of the above method embodiments.
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。The above product can execute the method provided by the embodiments of the present application, and has functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, reference may be made to the methods provided in the embodiments of this application.
本申请实施例的电子设备以多种形式存在,包括但不限于:The electronic devices of the embodiments of the present application exist in various forms, including but not limited to:
(1)移动通信设备:这类设备的特点是具备移动通信功能,并且以提供话音、数据通信为主要目标。这类终端包括:智能手机(例如iPhone)、多媒体手机、功能性手机,以及低端手机等。(1) Mobile communication equipment: This type of equipment is characterized by having mobile communication functions, and its main goal is to provide voice and data communication. Such terminals include: smart phones (eg iPhone), multimedia phones, feature phones, and low-end phones.
(2)超移动个人计算机设备:这类设备属于个人计算机的范畴,有计算和处理功能,一般也具备移动上网特性。这类终端包括:PDA、MID和UMPC设备等,例如iPad。(2) Ultra-mobile personal computer equipment: This type of equipment belongs to the category of personal computers, has computing and processing functions, and generally has the characteristics of mobile Internet access. Such terminals include: PDAs, MIDs, and UMPC devices, such as iPads.
(3)便携式娱乐设备:这类设备可以显示和播放多媒体内容。该类设备包括:音频、视频播放器(例如iPod),掌上游戏机,电子书,以及智能玩具和便携式车载导航设备。(3) Portable entertainment equipment: This type of equipment can display and play multimedia content. Such devices include: audio and video players (eg iPod), handheld game consoles, e-books, as well as smart toys and portable car navigation devices.
(4)服务器:提供计算服务的设备,服务器的构成包括处理器、硬盘、内存、系统总线等,服务器和通用的计算机架构类似,但是由于需要提供高可靠的服务,因此在处理能力、稳定性、可靠性、安全性、可扩展性、可管理性等方面要求较高。(4) Server: A device that provides computing services. The composition of the server includes a processor, a hard disk, a memory, a system bus, etc. The server is similar to a general computer architecture, but due to the need to provide highly reliable services, the processing power, stability , reliability, security, scalability, manageability and other aspects of high requirements.
(5)其他具有数据交互功能的电子装置。(5) Other electronic devices with data interaction function.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence, or the parts that make contributions to related technologies, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic disks , optical disc, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions recorded in the foregoing embodiments, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910831451.2A CN110516108A (en) | 2019-09-04 | 2019-09-04 | Method and system for browser to play audio |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910831451.2A CN110516108A (en) | 2019-09-04 | 2019-09-04 | Method and system for browser to play audio |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110516108A true CN110516108A (en) | 2019-11-29 |
Family
ID=68629639
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910831451.2A Pending CN110516108A (en) | 2019-09-04 | 2019-09-04 | Method and system for browser to play audio |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110516108A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111341290A (en) * | 2020-02-28 | 2020-06-26 | 腾讯音乐娱乐科技(深圳)有限公司 | Method, device and equipment for determining waveform of audio and storage medium |
| CN113257287A (en) * | 2021-04-27 | 2021-08-13 | 天九共享网络科技集团有限公司 | Audio file visualization method and device, storage medium and electronic equipment |
| CN114895865A (en) * | 2022-03-30 | 2022-08-12 | 深圳市有方科技股份有限公司 | Data transmission method, functional module applying same and electronic equipment |
| CN116110426A (en) * | 2023-02-15 | 2023-05-12 | 思必驰科技股份有限公司 | Audio data processing method, device and storage medium |
| CN116996810A (en) * | 2023-07-31 | 2023-11-03 | 广州星际悦动股份有限公司 | Audio processing method, device, equipment and storage medium for oral care equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101635160A (en) * | 2009-06-17 | 2010-01-27 | 深圳市美赛达科技有限公司 | Music frequency spectrum analyzing method, music frequency spectrum display device and music playing device |
| CN103077723A (en) * | 2013-01-04 | 2013-05-01 | 鸿富锦精密工业(深圳)有限公司 | Audio transmission system |
| CN104205210A (en) * | 2012-04-13 | 2014-12-10 | 索尼公司 | Decoding device and method, audio signal processing device and method, and program |
| CN104575542A (en) * | 2014-12-15 | 2015-04-29 | 天脉聚源(北京)科技有限公司 | Method and device for realizing audio regional play |
| CN109840052A (en) * | 2019-01-31 | 2019-06-04 | 成都超有爱科技有限公司 | A kind of audio-frequency processing method, device, electronic equipment and storage medium |
-
2019
- 2019-09-04 CN CN201910831451.2A patent/CN110516108A/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101635160A (en) * | 2009-06-17 | 2010-01-27 | 深圳市美赛达科技有限公司 | Music frequency spectrum analyzing method, music frequency spectrum display device and music playing device |
| CN104205210A (en) * | 2012-04-13 | 2014-12-10 | 索尼公司 | Decoding device and method, audio signal processing device and method, and program |
| CN103077723A (en) * | 2013-01-04 | 2013-05-01 | 鸿富锦精密工业(深圳)有限公司 | Audio transmission system |
| CN104575542A (en) * | 2014-12-15 | 2015-04-29 | 天脉聚源(北京)科技有限公司 | Method and device for realizing audio regional play |
| CN109840052A (en) * | 2019-01-31 | 2019-06-04 | 成都超有爱科技有限公司 | A kind of audio-frequency processing method, device, electronic equipment and storage medium |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111341290A (en) * | 2020-02-28 | 2020-06-26 | 腾讯音乐娱乐科技(深圳)有限公司 | Method, device and equipment for determining waveform of audio and storage medium |
| CN113257287A (en) * | 2021-04-27 | 2021-08-13 | 天九共享网络科技集团有限公司 | Audio file visualization method and device, storage medium and electronic equipment |
| CN114895865A (en) * | 2022-03-30 | 2022-08-12 | 深圳市有方科技股份有限公司 | Data transmission method, functional module applying same and electronic equipment |
| CN116110426A (en) * | 2023-02-15 | 2023-05-12 | 思必驰科技股份有限公司 | Audio data processing method, device and storage medium |
| CN116996810A (en) * | 2023-07-31 | 2023-11-03 | 广州星际悦动股份有限公司 | Audio processing method, device, equipment and storage medium for oral care equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110516108A (en) | Method and system for browser to play audio | |
| CN110099134B (en) | Video file downloading method and device, electronic equipment and storage medium | |
| EP4207783B1 (en) | VIDEO PROCESSING METHOD AND DEVICE, DEVICE, STORAGE MEDIUM AND COMPUTER PROGRAM PRODUCT | |
| CN114699767B (en) | Game data processing method, device, medium and electronic equipment | |
| CN112333476B (en) | Video loading method and device | |
| US20250069610A1 (en) | Audio processing method, electronic apparatus and storage medium | |
| US9164979B1 (en) | Implicit ratings | |
| CN112908297A (en) | Response speed testing method, device, equipment and storage medium for vehicle-mounted equipment | |
| CN114245229B (en) | A short video production method, device, equipment and storage medium | |
| CN114040245A (en) | Video playing method and device, computer storage medium and electronic equipment | |
| CN113139090A (en) | Interaction method, interaction device, electronic equipment and computer-readable storage medium | |
| CN110022493B (en) | Playing progress display method and device, electronic equipment and storage medium | |
| US9761276B1 (en) | Prioritized playback of media content clips | |
| CN115022702B (en) | Method, device, equipment and medium for displaying gifts in live broadcast room | |
| CN113395549B (en) | Play resource downloading method, device, equipment and storage medium | |
| CN111179973A (en) | Speech synthesis quality evaluation method and system | |
| EP4270930A1 (en) | Video recording method and device, electronic device and storage medium | |
| CN116132742A (en) | Method for determining video playing speed doubling value, video playing method, device and equipment | |
| US20210373670A1 (en) | Vibration control method and system for computer device | |
| WO2024099455A1 (en) | Live-broadcast interaction method and apparatus, and electronic device and storage medium | |
| EP4645887A1 (en) | Online video editing method and apparatus, and electronic device and storage medium | |
| US10726851B2 (en) | Low latency audio stream acceleration by selectively dropping and blending audio blocks | |
| KR20250105651A (en) | Video editing method and apparatus, and electronic device and storage medium | |
| CN117389438A (en) | Page display method, device and electronic equipment | |
| CN110381355B (en) | Method, equipment and readable medium for controlling streaming media playing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: 215123 14 Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou, Jiangsu. Applicant after: Sipic Technology Co.,Ltd. Address before: 215123 14 Tengfei Innovation Park, 388 Xinping street, Suzhou Industrial Park, Suzhou, Jiangsu. Applicant before: AI SPEECH Co.,Ltd. |
|
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191129 |