技术领域technical field
本发明涉及信息处理技术领域,特别涉及一种音频处理方法、装置及计算机可读存储介质。The present invention relates to the technical field of information processing, in particular to an audio processing method, device and computer-readable storage medium.
背景技术Background technique
当前,用户可以从终端中选择一首目标歌曲,以使终端播放该目标歌曲的伴奏音频。其中,在终端播放该目标歌曲的伴奏音频的同时,用户可以演唱该目标歌曲。终端采集用户演唱该目标歌曲时的声音,得到录音音频。之后,终端可以将该伴奏音频和录音音频进行合成,得到合成音频,并存储该合成音频。后续当终端需要对该录音音频和伴奏音频进行播放等形式的处理时,只能针对该录音音频和伴奏音频合成得到的合成音频进行处理,处理方式比较局限。Currently, the user can select a target song from the terminal, so that the terminal plays the accompaniment audio of the target song. Wherein, while the terminal plays the accompaniment audio of the target song, the user can sing the target song. The terminal collects the user's voice when singing the target song, and obtains the recorded audio. Afterwards, the terminal can synthesize the accompaniment audio and recording audio to obtain the synthesized audio, and store the synthesized audio. Later, when the terminal needs to perform processing such as playing the recorded audio and the accompaniment audio, it can only process the synthesized audio obtained by synthesizing the recorded audio and the accompaniment audio, and the processing method is relatively limited.
发明内容Contents of the invention
本发明实施例提供了一种音频处理方法、装置及计算机可读存储介质,可以用于解决将录音音频和伴奏音频合成后存储的情况下,后续对录音音频和伴奏音频进行处理时处理方式局限的问题。所述技术方案如下:Embodiments of the present invention provide an audio processing method, device, and computer-readable storage medium, which can be used to solve the limitation of processing methods for subsequent processing of the recorded audio and accompaniment audio when the recorded audio and accompaniment audio are synthesized and stored The problem. Described technical scheme is as follows:
第一方面,提供了一种音频处理方法,所述方法包括:In a first aspect, an audio processing method is provided, the method comprising:
获取待处理的录音音频的标识,所述录音音频的标识用于唯一标识所述录音音频;Acquiring the identification of the recording audio to be processed, the identification of the recording audio is used to uniquely identify the recording audio;
基于所述录音音频的标识,获取所述录音音频的存储路径、与所述录音音频相关联的伴奏音频的标识以及所述伴奏音频的存储路径;Based on the identification of the recording audio, acquire the storage path of the recording audio, the identification of the accompaniment audio associated with the recording audio, and the storage path of the accompaniment audio;
基于所述录音音频的标识、所述录音音频的存储路径、与所述录音音频相关联的伴奏音频的标识以及所述伴奏音频的存储路径分别查找所述录音音频和所述伴奏音频;searching for the recorded audio and the accompaniment audio based on the identifier of the recorded audio, the storage path of the recorded audio, the identifier of the accompaniment audio associated with the recorded audio, and the storage path of the accompaniment audio;
对查找到的所述录音音频和所述伴奏音频进行处理。Processing the found audio recording and accompaniment audio.
可选地,所述基于所述录音音频的标识,获取所述录音音频的存储路径、与所述录音音频相关联的伴奏音频的标识以及所述伴奏音频的存储路径,包括:Optionally, the acquiring the storage path of the recorded audio, the identifier of the accompaniment audio associated with the recorded audio, and the storage path of the accompaniment audio based on the identifier of the recorded audio includes:
基于所述录音音频的标识,从映射关系表中获取与所述录音音频的标识相对应的所述录音音频的存储路径、所述伴奏音频的标识和所述伴奏音频的存储路径;Based on the identification of the recording audio, obtaining the storage path of the recording audio corresponding to the identification of the recording audio, the identification of the accompaniment audio, and the storage path of the accompaniment audio from a mapping relationship table;
其中,所述映射关系表存储有多个录音音频的标识、所述多个录音音频的标识中每个录音音频的标识对应的录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径。Wherein, the mapping relationship table stores a plurality of recording audio identifiers, a storage path of the recording audio corresponding to each recording audio identifier in the plurality of recording audio identifiers, an accompaniment audio identifier, and a storage path of the accompaniment audio.
可选地,所述方法还包括:Optionally, the method also includes:
当录音结束生成所述录音音频时,存储所述录音音频,并获取所述录音音频的存储路径;When the recording ends and the recorded audio is generated, store the recorded audio, and obtain a storage path of the recorded audio;
确定所述录音音频的哈希值,并将所述录音音频的哈希值作为所述录音音频的标识;Determine the hash value of the recorded audio, and use the hash value of the recorded audio as the identifier of the recorded audio;
确定与所述录音音频相关联的伴奏音频的哈希值以及存储路径,并将所述伴奏音频的哈希值作为所述伴奏音频的标识;Determine the hash value and storage path of the accompaniment audio associated with the recording audio, and use the hash value of the accompaniment audio as the identifier of the accompaniment audio;
将所述录音音频的哈希值、所述录音音频的存储路径、所述伴奏音频的标识和所述伴奏音频的存储路径对应存储在所述映射关系表中。The hash value of the recording audio, the storage path of the recording audio, the identifier of the accompaniment audio, and the storage path of the accompaniment audio are correspondingly stored in the mapping relationship table.
可选地,所述伴奏音频为加密音频;Optionally, the accompaniment audio is encrypted audio;
所述对查找到的所述录音音频和所述伴奏音频进行处理之前,还包括:Before processing the found recorded audio and the accompaniment audio, it also includes:
对查找到的所述伴奏音频进行解密;Decrypting the found accompaniment audio;
若解密失败,则向服务器发送下载请求,所述下载请求携带所述伴奏音频的标识;If the decryption fails, a download request is sent to the server, and the download request carries the identification of the accompaniment audio;
接收服务器基于所述伴奏音频的标识返回的音频,并将所述伴奏音频更新为所述服务器返回的音频。receiving the audio returned by the server based on the identification of the accompaniment audio, and updating the accompaniment audio to the audio returned by the server.
可选地,所述方法还包括:Optionally, the method also includes:
若未查找到所述伴奏音频,则向服务器发送下载请求,所述下载请求携带所述伴奏音频的标识;If the accompaniment audio is not found, a download request is sent to the server, and the download request carries the identifier of the accompaniment audio;
接收所述服务器基于所述伴奏音频的标识返回的所述伴奏音频,并将接收到的所述伴奏音频作为查找到的伴奏音频。receiving the accompaniment audio returned by the server based on the identifier of the accompaniment audio, and using the received accompaniment audio as the found accompaniment audio.
可选地,所述方法还包括:Optionally, the method also includes:
显示伴奏列表,所述伴奏列表中显示有多个伴奏音频的标识;Displaying the accompaniment list, the accompaniment list shows a plurality of accompaniment audio identification;
当检测到针对所述伴奏列表中的目标标识的删除操作时,检测是否存在与所述目标标识所标识的目标伴奏音频相关联的录音音频,所述目标标识为所述伴奏列表中显示的多个伴奏音频的标识中的任一个标识;When detecting a deletion operation for a target identifier in the accompaniment list, it is detected whether there is a recording audio associated with the target accompaniment audio identified by the target identifier, and the target identifier is the multiple displayed in the accompaniment list. Any one of the identifications of the accompaniment audio;
若存在与所述目标伴奏音频相关联的录音音频,则从所述伴奏列表中删除所述目标标识;If there is a recording audio associated with the target accompaniment audio, then delete the target identifier from the accompaniment list;
若不存在与所述目标伴奏音频相关联的录音音频,则从所述伴奏列表中删除所述目标标识,并删除所述目标伴奏音频。If there is no recorded audio associated with the target accompaniment audio, delete the target identifier from the accompaniment list, and delete the target accompaniment audio.
可选地,所述方法还包括:Optionally, the method also includes:
当检测到针对目标录音音频的删除操作时,检测与所述目标录音音频相关联的目标伴奏音频的标识是否存在于伴奏列表中,以及检测是否存在与所述目标伴奏音频相关联的其他录音音频,所述伴奏列表中显示有多个伴奏音频的标识;When detecting a delete operation for the target audio recording, detect whether the target accompaniment audio identifier associated with the target audio recording exists in the accompaniment list, and detect whether there are other audio recordings associated with the target accompaniment audio , there are multiple accompaniment audio identifiers displayed in the accompaniment list;
若所述目标伴奏音频的标识不存在于所述伴奏列表中,且不存在与所述目标伴奏音频相关联的其他录音音频,则删除所述目标录音音频以及所述目标伴奏音频。If the identifier of the target accompaniment audio does not exist in the accompaniment list, and there is no other recording audio associated with the target accompaniment audio, then delete the target recording audio and the target accompaniment audio.
可选地,所述方法还包括:Optionally, the method also includes:
若所述目标伴奏音频的标识存在于所述伴奏列表或存在与所述目标伴奏音频相关联的其他录音音频,则删除所述目标录音音频。If the identifier of the target accompaniment audio exists in the accompaniment list or there is other recorded audio associated with the target accompaniment audio, then delete the target recorded audio.
第二方面,提供了一种音频处理装置,所述装置包括:In a second aspect, an audio processing device is provided, the device comprising:
第一获取模块,用于获取待处理的录音音频的标识,所述录音音频的标识用于唯一标识所述录音音频;The first obtaining module is used to obtain the identification of the audio recording to be processed, and the identification of the audio recording is used to uniquely identify the audio recording;
第二获取模块,用于基于所述录音音频的标识,获取所述录音音频的存储路径、与所述录音音频相关联的伴奏音频的标识以及所述伴奏音频的存储路径;The second acquiring module is configured to acquire, based on the identifier of the recorded audio, the storage path of the recorded audio, the identifier of the accompaniment audio associated with the recorded audio, and the storage path of the accompaniment audio;
查找模块,用于基于所述录音音频的标识、所述录音音频的存储路径、与所述录音音频相关联的伴奏音频的标识以及所述伴奏音频的存储路径分别查找所述录音音频和所述伴奏音频;A search module, configured to search for the recording audio and the storage path of the recording audio based on the identification of the recording audio, the storage path of the recording audio, the identification of the accompaniment audio associated with the recording audio, and the storage path of the accompaniment audio Accompaniment audio;
处理模块,用于对查找到的所述录音音频和所述伴奏音频进行处理。A processing module, configured to process the found audio recording and accompaniment audio.
可选地,所述第二获取模块具体用于:Optionally, the second acquiring module is specifically configured to:
基于所述录音音频的标识,从映射关系表中获取与所述录音音频的标识相对应的所述录音音频的存储路径、所述伴奏音频的标识和所述伴奏音频的存储路径;Based on the identification of the recording audio, obtaining the storage path of the recording audio corresponding to the identification of the recording audio, the identification of the accompaniment audio, and the storage path of the accompaniment audio from a mapping relationship table;
其中,所述映射关系表存储有多个录音音频的标识、所述多个录音音频的标识中每个录音音频的标识对应的录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径。Wherein, the mapping relationship table stores a plurality of recording audio identifiers, a storage path of the recording audio corresponding to each recording audio identifier in the plurality of recording audio identifiers, an accompaniment audio identifier, and a storage path of the accompaniment audio.
可选地,所述装置还包括:Optionally, the device also includes:
第一存储模块,用于当录音结束生成所述录音音频时,存储所述录音音频,并获取所述录音音频的存储路径;The first storage module is configured to store the recorded audio when the recorded audio is generated at the end of the recording, and acquire the storage path of the recorded audio;
确定模块,用于确定所述录音音频的哈希值,并将所述录音音频的哈希值作为所述录音音频的标识;A determining module, configured to determine the hash value of the recorded audio, and use the hash value of the recorded audio as the identifier of the recorded audio;
所述确定模块,还用于确定与所述录音音频相关联的伴奏音频的哈希值以及存储路径,并将所述伴奏音频的哈希值作为所述伴奏音频的标识;The determination module is also used to determine the hash value and storage path of the accompaniment audio associated with the recorded audio, and use the hash value of the accompaniment audio as the identifier of the accompaniment audio;
第二存储模块,用于将所述录音音频的哈希值、所述录音音频的存储路径、所述伴奏音频的标识和所述伴奏音频的存储路径对应存储在所述映射关系表中。The second storage module is configured to correspondingly store the hash value of the recording audio, the storage path of the recording audio, the identifier of the accompaniment audio, and the storage path of the accompaniment audio in the mapping relationship table.
可选地,所述伴奏音频为加密音频;Optionally, the accompaniment audio is encrypted audio;
所述装置还包括:The device also includes:
解密模块,用于对所述伴奏音频进行解密;A decryption module, configured to decrypt the accompaniment audio;
发送模块,用于若解密失败,则向服务器发送下载请求,所述下载请求携带所述伴奏音频的标识;The sending module is used to send a download request to the server if the decryption fails, and the download request carries the identification of the accompaniment audio;
接收模块,用于接收服务器基于所述伴奏音频的标识返回的音频,并将所述伴奏音频更新为所述服务器返回的音频。The receiving module is configured to receive the audio returned by the server based on the identification of the accompaniment audio, and update the accompaniment audio to the audio returned by the server.
可选地,所述装置还用于:Optionally, the device is also used for:
若未查找到所述伴奏音频,则向服务器发送下载请求,所述下载请求携带所述伴奏音频的标识;If the accompaniment audio is not found, a download request is sent to the server, and the download request carries the identifier of the accompaniment audio;
接收所述服务器基于所述伴奏音频的标识返回的所述伴奏音频,并将接收到的所述伴奏音频作为查找到的伴奏音频。receiving the accompaniment audio returned by the server based on the identifier of the accompaniment audio, and using the received accompaniment audio as the found accompaniment audio.
可选地,所述装置还包括:Optionally, the device also includes:
显示模块,用于显示伴奏列表,所述伴奏列表中显示有多个伴奏音频的标识;A display module, configured to display an accompaniment list, where multiple accompaniment audio identifiers are displayed in the accompaniment list;
第一检测模块,用于当检测到针对所述伴奏列表中的目标标识的删除操作时,检测是否存在与所述目标标识所标识的目标伴奏音频相关联的录音音频,所述目标标识为所述伴奏列表中显示的多个伴奏音频的标识中的任一个标识;The first detection module is configured to detect whether there is a recording audio associated with the target accompaniment audio identified by the target identifier when detecting a deletion operation for the target identifier in the accompaniment list, and the target identifier is the any one of the multiple accompaniment audio identifiers displayed in the accompaniment list;
第一删除模块,用于若存在与所述目标伴奏音频相关联的录音音频,则从所述伴奏列表中删除所述目标标识;A first deletion module, configured to delete the target identifier from the accompaniment list if there is recorded audio associated with the target accompaniment audio;
第二删除模块,用于若不存在与所述目标伴奏音频相关联的录音音频,则从所述伴奏列表中删除所述目标标识,并删除所述目标伴奏音频。The second deletion module is configured to delete the target identifier from the accompaniment list and delete the target accompaniment audio if there is no recorded audio associated with the target accompaniment audio.
可选地,所述装置还包括:Optionally, the device also includes:
第二检测模块,用于当检测到针对目标录音音频的删除操作时,检测与所述目标录音音频相关联的目标伴奏音频的标识是否存在于伴奏列表中,以及检测是否存在与所述目标伴奏音频相关联的其他录音音频,所述伴奏列表中显示有多个伴奏音频的标识;The second detection module is used to detect whether the target accompaniment audio identification associated with the target recording audio exists in the accompaniment list when detecting a deletion operation for the target audio recording, and detect whether there is a target accompaniment associated with the target accompaniment Other audio recordings associated with the audio, and multiple accompaniment audio identifiers are displayed in the accompaniment list;
第三删除模块,用于若所述目标伴奏音频的标识不存在于所述伴奏列表中,且不存在与所述目标伴奏音频相关联的其他录音音频,则删除所述目标录音音频以及所述目标伴奏音频。A third deletion module, configured to delete the target audio recording and the Target accompaniment audio.
可选地,所述装置还包括:Optionally, the device also includes:
第四删除模块,用于若所述目标伴奏音频的标识存在于所述伴奏列表或存在与所述目标伴奏音频相关联的其他录音音频,则删除所述目标录音音频。A fourth deletion module, configured to delete the target audio recording if the target accompaniment audio identifier exists in the accompaniment list or there are other audio recordings associated with the target accompaniment audio.
第三方面,提供了一种音频处理装置,所述装置包括:In a third aspect, an audio processing device is provided, the device comprising:
处理器;processor;
用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
其中,所述处理器被配置为上述第一方面所述的任一项方法的步骤。Wherein, the processor is configured as a step in any one of the methods described in the first aspect above.
第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述第一方面所述的任一项方法的步骤。In a fourth aspect, a computer-readable storage medium is provided, where instructions are stored on the computer-readable storage medium, and when the instructions are executed by a processor, the steps of any one of the methods described in the above-mentioned first aspect are implemented.
本发明实施例提供的技术方案带来的有益效果是:获取待处理的录音音频的标识,基于该录音音频的标识,获取该录音音频的存储路径、与该录音音频相关联的伴奏音频的标识以及该伴奏音频的存储路径;基于该录音音频的标识、该录音音频的存储路径、该伴奏音频的标识以及该伴奏音频的存储路径分别获取该录音音频和该伴奏音频;对录音音频和伴奏音频进行处理。由于在本发明实施例中,录音音频和伴奏音频可以分别单独进行存储,而无需进行合成,因此,在对录音音频和伴奏音频进行处理时,可以分别获取该录音音频和伴奏音频进行处理,处理方式更加灵活多样。The beneficial effect brought by the technical solution provided by the embodiment of the present invention is: obtain the identification of the recording audio to be processed, and based on the identification of the recording audio, obtain the storage path of the recording audio and the identification of the accompaniment audio associated with the recording audio and the storage path of the accompaniment audio; obtain the recording audio and the accompaniment audio respectively based on the identification of the recording audio, the storage path of the recording audio, the identification of the accompaniment audio and the storage path of the accompaniment audio; for the recording audio and the accompaniment audio to process. Since in the embodiment of the present invention, the recording audio and the accompaniment audio can be stored separately without synthesis, therefore, when the recording audio and the accompaniment audio are processed, the recording audio and the accompaniment audio can be respectively obtained for processing, and the processing The method is more flexible and diverse.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.
图1是本发明实施例提供的一种音频处理方法的实施环境图;FIG. 1 is an implementation environment diagram of an audio processing method provided by an embodiment of the present invention;
图2是本发明实施例提供的一种音频处理方法的流程图;Fig. 2 is a flow chart of an audio processing method provided by an embodiment of the present invention;
图3是本发明实施例提供的一种音频处理方法的流程图;Fig. 3 is a flowchart of an audio processing method provided by an embodiment of the present invention;
图4是本发明实施例提供的一种音频处理方法的流程图;Fig. 4 is a flowchart of an audio processing method provided by an embodiment of the present invention;
图5是本发明实施例提供的一种音频处理方法的流程图;Fig. 5 is a flowchart of an audio processing method provided by an embodiment of the present invention;
图6是本发明实施例提供的一种音频处理装置的结构示意图;FIG. 6 is a schematic structural diagram of an audio processing device provided by an embodiment of the present invention;
图7是本发明实施例提供的一种用于处理音频的终端的结构示意图。Fig. 7 is a schematic structural diagram of a terminal for processing audio provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.
在对本发明实施例进行详细的解释说明之前,先对本发明实施例的应用场景予以介绍。Before explaining and describing the embodiments of the present invention in detail, the application scenarios of the embodiments of the present invention are firstly introduced.
当前,终端上可以安装有音乐应用,以丰富用户生活。为了提高用户使用音乐应用的用户体验,服务商在音乐应用中可以添加各种附加项目和功能。例如,某些音乐应用中包括有k歌项目,终端可以从该音乐应用的应用服务器中下载多首歌曲的伴奏音频,并显示包括有多个伴奏音频的标识的伴奏列表,用户可以从该伴奏列表中选择一个伴奏音频进行播放。之后,当终端播放该伴奏音频时,用户可以跟随该伴奏音频进行演唱,终端可以采集用户演唱时的声音,生成录音音频。之后,当用户想要播放该录音音频和伴奏音频,或者是删除该录音音频和伴奏音频时,终端均可以基于用户操作,通过本申请提供的方法对该录音音频和伴奏音频进行处理。Currently, a music application may be installed on a terminal to enrich the user's life. In order to improve the user experience of the user using the music application, the service provider may add various additional items and functions in the music application. For example, some music applications include karaoke items, and the terminal can download the accompaniment audios of multiple songs from the application server of the music application, and display an accompaniment list including the identification of a plurality of accompaniment audios, and the user can select from the accompaniment Select an accompaniment audio from the list to play. Afterwards, when the terminal plays the accompaniment audio, the user can sing along with the accompaniment audio, and the terminal can collect the user's voice when singing to generate a recording audio. Afterwards, when the user wants to play the recording audio and accompaniment audio, or delete the recording audio and accompaniment audio, the terminal can process the recording audio and accompaniment audio based on the user operation through the method provided in this application.
接下来对本发明实施例提供的音频处理方法所涉及的实施环境进行介绍。如图1所示,该实施环境中可以包括服务器101和终端102,其中,服务器101和终端102可以进行通信。Next, the implementation environment involved in the audio processing method provided by the embodiment of the present invention will be introduced. As shown in FIG. 1 , the implementation environment may include a server 101 and a terminal 102, where the server 101 and the terminal 102 may communicate.
需要说明的是,服务器101可以是终端上安装的音乐应用对应的应用服务器,也可以为其他可以与该终端进行通信的服务器。其中,服务器101中可以存储有多首歌曲的音频,其中,每首歌曲的音频可以包括多种类型的音频,例如,可以包括伴奏音频、纯人声音频以及同时原曲音频。可选地,其中,每种类型的音频还可以包括多个不同版本的音频。例如,一首歌曲的伴奏音频可以包括演唱会版本的音频和录音专辑版本的音频等等。可选地,该服务器中还可以存储有每首歌曲对应的歌词信息。It should be noted that the server 101 may be an application server corresponding to a music application installed on the terminal, or may be other servers capable of communicating with the terminal. Wherein, the server 101 may store the audio of multiple songs, wherein the audio of each song may include multiple types of audio, for example, may include accompaniment audio, pure human voice audio and simultaneous original song audio. Optionally, each type of audio may also include multiple different versions of audio. For example, the accompaniment audio of a song may include the audio of the concert version, the audio of the recording album version, and so on. Optionally, the server may also store lyrics information corresponding to each song.
终端102可以为诸如智能手机、平板电脑、台式电脑等终端设备。其中,终端102可以从服务器101中获取多首歌曲的伴奏音频,并向用户显示多首歌曲的伴奏音频的标识。之后,终端102可以基于用户操作播放伴奏音频,并采集用户声音生成与该伴奏音频相关联的录音音频,进而根据本申请实施例提供的音频处理方法对该录音音频和伴奏音频进行处理。The terminal 102 may be a terminal device such as a smart phone, a tablet computer, or a desktop computer. Wherein, the terminal 102 may acquire the accompaniment audios of multiple songs from the server 101, and display the identifiers of the accompaniment audios of the multiple songs to the user. Afterwards, the terminal 102 can play the accompaniment audio based on the user operation, collect the user's voice to generate the recording audio associated with the accompaniment audio, and then process the recording audio and accompaniment audio according to the audio processing method provided in the embodiment of the present application.
接下来对本申请实施例提供的音频处理方法进行详细的解释说明。Next, the audio processing method provided by the embodiment of the present application will be explained in detail.
图2是本发明实施例提供的一种音频处理方法的流程图。该方法可以应用于终端中,参见图2,该方法包括以下步骤:Fig. 2 is a flowchart of an audio processing method provided by an embodiment of the present invention. The method can be applied to a terminal, as shown in Figure 2, the method includes the following steps:
步骤201:获取待处理的录音音频的标识,该录音音频的标识用于唯一标识该录音音频。Step 201: Obtain an identifier of the audio recording to be processed, and the identifier of the audio recording is used to uniquely identify the audio recording.
其中,待处理的录音音频可以是用户选择的录音音频。录音音频的标识可以是根据录音音频的内容确定得到的录音音频的哈希值。Wherein, the recorded audio to be processed may be the recorded audio selected by the user. The identifier of the recorded audio may be a hash value of the recorded audio determined according to the content of the recorded audio.
步骤202:基于录音音频的标识,获取录音音频的存储路径、与录音音频相关联的伴奏音频的标识以及伴奏音频的存储路径。Step 202: Based on the identifier of the recorded audio, acquire the storage path of the recorded audio, the identifier of the accompaniment audio associated with the recorded audio, and the storage path of the accompaniment audio.
在本申请实施例中,终端对录音音频与伴奏音频分别进行存储,因此,录音音频对应有自身的存储路径,伴奏音频也对应有自身的存储路径。与录音音频相关联的伴奏音频是指该录制该录音音频时所播放的伴奏音频,且该伴奏音频的标识可以是根据该伴奏音频的内容确定得到的该伴奏音频的哈希值。In the embodiment of the present application, the terminal stores the recording audio and the accompaniment audio separately. Therefore, the recording audio corresponds to its own storage path, and the accompaniment audio also corresponds to its own storage path. The accompaniment audio associated with the recording audio refers to the accompaniment audio played when the recording audio is recorded, and the identifier of the accompaniment audio may be a hash value of the accompaniment audio determined according to the content of the accompaniment audio.
步骤203:基于录音音频的标识、录音音频的存储路径、与录音音频相关联的伴奏音频的标识以及伴奏音频的存储路径分别查找录音音频和伴奏音频。Step 203: Search for the recording audio and the accompaniment audio based on the identifier of the recording audio, the storage path of the recording audio, the identifier of the accompaniment audio associated with the recording audio, and the storage path of the accompaniment audio.
步骤204:对查找到的录音音频和伴奏音频进行处理。Step 204: Process the found recording audio and accompaniment audio.
其中,对查找到的录音音频和伴奏音频进行处理可以是指将录音音频和伴奏音频进行播放,还可以是指将录音音频和伴奏音频进行合成,或者还可以是其他处理方式。Wherein, processing the found recording audio and accompaniment audio may refer to playing the recording audio and accompaniment audio, or may refer to synthesizing the recording audio and accompaniment audio, or other processing methods.
在本发明实施例中,获取待处理的录音音频的标识,基于该录音音频的标识,获取该录音音频的存储路径、与该录音音频相关联的伴奏音频的标识以及该伴奏音频的存储路径;基于该录音音频的标识、该录音音频的存储路径、该伴奏音频的标识以及该伴奏音频的存储路径分别获取该录音音频和该伴奏音频;对录音音频和伴奏音频进行处理。由于在本发明实施例中,录音音频和伴奏音频可以分别单独进行存储,而无需进行合成,因此,在对录音音频和伴奏音频进行处理时,可以分别获取该录音音频和伴奏音频进行处理,处理方式更加灵活多样。In the embodiment of the present invention, the identification of the audio recording to be processed is acquired, and based on the identification of the audio recording, the storage path of the audio recording, the identification of the accompaniment audio associated with the audio recording, and the storage path of the audio accompaniment are acquired; Obtain the recording audio and the accompaniment audio respectively based on the recording audio identifier, the storage path of the recording audio, the identifier of the accompaniment audio and the storage path of the accompaniment audio; and process the recording audio and the accompaniment audio. Since in the embodiment of the present invention, the recording audio and the accompaniment audio can be stored separately without synthesis, therefore, when the recording audio and the accompaniment audio are processed, the recording audio and the accompaniment audio can be respectively obtained for processing, and the processing The method is more flexible and diverse.
图3是本发明实施例提供的一种音频处理方法的流程图,该方法可以应用于终端中,如图3所示,该方法包括以下步骤:FIG. 3 is a flowchart of an audio processing method provided by an embodiment of the present invention. The method can be applied to a terminal. As shown in FIG. 3 , the method includes the following steps:
步骤301:获取待处理的录音音频的标识,该录音音频的标识用于唯一标识该录音音频。Step 301: Obtain an identifier of the audio recording to be processed, and the identifier of the audio recording is used to uniquely identify the audio recording.
其中,录音音频是指用户跟随伴奏音频进行演唱时,终端对用户演唱的声音进行采集生成的音频。Wherein, the recorded audio refers to the audio generated by the terminal collecting the voice sung by the user when the user sings along with the accompaniment audio.
在本申请实施例中,当录音完成之后,终端可以显示录音音频列表,其中,该录音音频列表中包括多个录音音频的标识。之后,终端可以实时检测用户的选择操作,若检测到用户针对该录音音频列表中的某个录音音频的标识的选择操作时,则可以将该录音音频的标识作为待处理的录音音频的标识,并获取该待处理的录音音频的标识,以便后续根据该录音音频的标识获取待处理的录音音频。In this embodiment of the present application, after the recording is completed, the terminal may display a recorded audio list, where the recorded audio list includes identifiers of multiple recorded audios. Afterwards, the terminal can detect the user's selection operation in real time, and if it detects the user's selection operation on a certain recording audio identifier in the recording audio list, the recording audio identifier can be used as the identifier of the recording audio to be processed, And obtain the identifier of the audio recording to be processed, so that the audio recording to be processed can be obtained subsequently according to the identifier of the audio recording.
需要说明的是,对于同一首歌曲,用户可能会根据该歌曲的伴奏音频重复录制得到多个录音音频,若将该多个录音音频均采用相应地歌曲的名称进行标识,则可能会导致无法区分该多个录音音频。基于此,为了更好的区分不同的录音音频,终端可以根据每个录音音频的内容确定每个录音音频的哈希值,并采用每个录音音频的哈希值对每个录音音频进行标识。由于不同的文件包括的内容数据是不一样的,因此,即使是同一首歌曲对应的多个录音音频,由于多个录音音频是不同的文件,因此最终确定的多个录音音频分别对应的哈希值也是不一样的。在此基础上,通过每个录音音频的哈希值对每个录音音频进行标识可以更好的区分各个录音音频。It should be noted that for the same song, the user may repeatedly record multiple audio recordings based on the accompaniment audio of the song. If the multiple audio recordings are identified by the corresponding song name, it may be impossible to distinguish The multiple audio recordings. Based on this, in order to better distinguish different recorded audios, the terminal may determine the hash value of each recorded audio according to the content of each recorded audio, and use the hash value of each recorded audio to identify each recorded audio. Since the content data included in different files is different, even if there are multiple recorded audios corresponding to the same song, since the multiple recorded audios are different files, the hashes corresponding to the finalized multiple recorded audios are respectively The values are also different. On this basis, identifying each recorded audio through the hash value of each recorded audio can better distinguish each recorded audio.
可选地,终端也可以采用其他方式来对录音音频进行区分。示例性的,对于用户根据同一个伴奏音频录制得到的多个录音音频,终端可以通过该伴奏音频所对应的歌曲的名称以及多个录音音频的录制时间的先后顺序,对多个录音音频进行标识。例如,假设该伴奏音频所对应的歌曲名称为A,则可以将根据该伴奏音频最先录制得到的录音音频的标识确定为A-1,在该最先录制得到的录音音频的下一个录制得到的录音音频的标识则可以为A-2,以此类推。Optionally, the terminal may also use other methods to distinguish the recorded audio. Exemplarily, for multiple recorded audios recorded by the user according to the same accompaniment audio, the terminal can identify the multiple recorded audios through the name of the song corresponding to the accompaniment audio and the sequence of recording time of the multiple recorded audios . For example, assuming that the title of the song corresponding to the accompaniment audio is A, the identification of the audio recording obtained first according to the accompaniment audio can be determined as A-1, and the next recording of the audio recording obtained first can be The identification of the audio recording of the audio recording can be A-2, and so on.
另外,还需要说明的是,终端在获取待处理的录音音频的标识之前,当终端录音结束生成录音音频时,可以存储该录音音频,并获取该录音音频的存储路径,确定录音音频的哈希值,并将录音音频的哈希值作为录音音频的标识;确定与录音音频相关联的伴奏音频的哈希值以及存储路径,并将伴奏音频的哈希值作为伴奏音频的标识;将录音音频的哈希值、录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径对应存储在映射关系表中。其中,映射关系表中存储有多个录音音频的标识、该多个录音音频的标识中每个录音音频的标识对应的录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径。In addition, it should also be noted that before the terminal obtains the identification of the audio recording to be processed, when the recording audio is generated by the terminal recording, it can store the audio recording, obtain the storage path of the audio recording, and determine the hash of the audio recording Value, and use the hash value of the recording audio as the identification of the recording audio; determine the hash value and storage path of the accompaniment audio associated with the recording audio, and use the hash value of the accompaniment audio as the identification of the accompaniment audio; use the recording audio The hash value of , the storage path of the recorded audio, the identification of the accompaniment audio and the storage path of the accompaniment audio are correspondingly stored in the mapping relationship table. Wherein, the mapping relationship table stores a plurality of recording audio identifiers, a recording audio storage path corresponding to each recording audio identifier in the plurality of recording audio identifiers, an accompaniment audio identifier and a storage path of the accompaniment audio.
也即,在本申请实施例中,每当终端生成一个录音音频时,可以将该录音音频与录制该录音音频时播放的伴奏音频分开存储,之后,终端可以获取该录音音频的存储路径、根据该录音音频的内容计算的该录音音频的哈希值、录制该录音音频时所播放的伴奏音频的哈希值和存储路径对应存储在映射关系表中,以便后续在使用该录音音频和伴奏音频时,可以根据该映射关系表获取该录音音频和伴奏音频。其中,录制录音音频时播放的伴奏音频即为与该录音音频相关联的伴奏音频。That is to say, in this embodiment of the application, whenever the terminal generates a recorded audio, the recorded audio can be stored separately from the accompaniment audio played when the recorded audio is recorded, and then the terminal can obtain the storage path of the recorded audio, according to The hash value of the recording audio calculated from the content of the recording audio, the hash value of the accompaniment audio played when recording the recording audio, and the storage path are correspondingly stored in the mapping relationship table, so that the recording audio and accompaniment audio can be used later , the recording audio and accompaniment audio can be obtained according to the mapping table. Wherein, the accompaniment audio played when the recording audio is recorded is the accompaniment audio associated with the recording audio.
示例性的,表1示出了一种映射关系表。其中,第一列为录音音频的标识,第二列为对应的录音音频的存储路径,第三列为与录音音频相关联的伴奏音频的标识,第四列为该伴奏音频对应的存储路径。Exemplarily, Table 1 shows a mapping relationship table. Among them, the first column is the identification of the recording audio, the second column is the storage path of the corresponding recording audio, the third column is the identification of the accompaniment audio associated with the recording audio, and the fourth column is the storage path corresponding to the accompaniment audio.
表1Table 1
可选地,在一种可能的情况中,用户可能会使用同一个伴奏音频重复演唱多次,从而使得终端录制得到多个录音音频,也即,同一个伴奏音频可能会对应有多个录音音频,在这种情况下,终端在生成一个录音音频之后,可以从存储的映射关系表中查找是否存在与该录音音频相关联的伴奏音频的标识和存储路径,若存在,则终端可以增加该伴奏音频的标识和存储路径的对应表项,从而将该录音音频的标识和存储路径存储在增加的对应表项中。表2示出了一种基于该种实现方式进行存储时的映射关系表。如表2所示,其中,录音音频LID1和LID2均与伴奏音频BID1相关联,因此,可以按照表2所示对其进行存储。Optionally, in a possible situation, the user may use the same accompaniment audio to sing multiple times, so that the terminal records multiple audio recordings, that is, the same accompaniment audio may correspond to multiple recording audios , in this case, after the terminal generates a recording audio, it can search from the stored mapping table whether there is an identification and storage path of the accompaniment audio associated with the recording audio, and if it exists, the terminal can add the accompaniment The identification of the audio and the corresponding entry of the storage path, so that the identification and storage path of the recording audio are stored in the corresponding entry. Table 2 shows a mapping relationship table when storing based on this implementation. As shown in Table 2, the recording audio LID1 and LID2 are both associated with the accompaniment audio BID1, so they can be stored as shown in Table 2.
表2Table 2
步骤302:基于录音音频的标识,从映射关系表中获取录音音频的存储路径、与录音音频相关联的伴奏音频的标识以及伴奏音频的存储路径。Step 302: Based on the identifier of the recorded audio, obtain the storage path of the recorded audio, the identifier of the accompaniment audio associated with the recorded audio, and the storage path of the accompaniment audio from the mapping relationship table.
由于终端在生成录音音频时,即将录音音频的标识、录音音频的存储路径、与录音音频相关联的伴奏音频的标识和存储路径对应存储在了映射关系表中,因此,在获取到待处理的录音音频的标识之后,终端可以从该映射关系表中查找该录音音频的标识,在查找到该录音音频的标识之后,终端可以获取该录音音频的标识所对应的该录音音频的存储路径、与该录音音频标识对应的伴奏音频的标识和存储路径。When the terminal generates the recorded audio, it stores the identifier of the recorded audio, the storage path of the recorded audio, and the identifier and storage path of the accompaniment audio associated with the recorded audio in the mapping relationship table. After the identification of the recorded audio, the terminal can search the identification of the recorded audio from the mapping relationship table, and after finding the identification of the recorded audio, the terminal can obtain the storage path of the recorded audio corresponding to the identification of the recorded audio, and The identification and storage path of the accompaniment audio corresponding to the recorded audio identification.
步骤303:基于录音音频的标识和录音音频的存储路径,查找录音音频,基于伴奏音频的标识和伴奏音频的存储路径,查找伴奏音频。Step 303: Search for the recording audio based on the identification of the recording audio and the storage path of the recording audio, and search for the accompaniment audio based on the identification of the accompaniment audio and the storage path of the accompaniment audio.
在获取到该录音音频的标识所对应的录音音频的存储路径之后,终端可以按照该录音音频的存储路径到相应地存储位置上获取该录音音频的标识所标识的录音音频。同样的,对于与该录音音频相关联的伴奏音频,终端可以按照获取的该伴奏音频的存储路径到相应地存储位置上获取该伴奏音频的标识所标识的伴奏音频。After acquiring the storage path of the recorded audio corresponding to the recorded audio identifier, the terminal may acquire the recorded audio identified by the recorded audio identifier from a corresponding storage location according to the recorded audio stored path. Similarly, for the accompaniment audio associated with the recorded audio, the terminal may acquire the accompaniment audio identified by the identifier of the accompaniment audio at a corresponding storage location according to the acquired storage path of the accompaniment audio.
可选地,对于某些音乐,服务商出于版权考虑,可能会将这些音乐的伴奏音频设置为加密音频。在这种情况下,终端在获取到伴奏音频之后,还可以对该伴奏音频进行解密,若解密成功,则终端可以执行步骤304,若解密失败,则终端可以向服务器发送下载请求,该下载请求携带伴奏音频的标识;接收服务器基于伴奏音频的标识返回的音频,并将伴奏音频更新为服务器返回的音频。也即,若解密失败,则终端可以重新从服务器中下载伴奏音频,并将当前存储的伴奏音频更新为重新下载的伴奏音频。其中,该服务器可以是终端上安装的音乐应用的应用服务器,或者也可以是其他存储有各类音频文件的服务器。本申请实施例对此不做具体限定。Optionally, for some music, the service provider may set the accompaniment audio of these music as encrypted audio due to copyright considerations. In this case, after the terminal obtains the accompaniment audio, it can also decrypt the accompaniment audio. If the decryption is successful, the terminal can perform step 304. If the decryption fails, the terminal can send a download request to the server. The download request carrying the identifier of the accompaniment audio; receiving the audio returned by the server based on the identifier of the accompaniment audio, and updating the accompaniment audio to the audio returned by the server. That is, if the decryption fails, the terminal may re-download the accompaniment audio from the server, and update the currently stored accompaniment audio to the re-downloaded accompaniment audio. Wherein, the server may be an application server of a music application installed on the terminal, or may be other servers storing various audio files. This embodiment of the present application does not specifically limit it.
可选地,在一种可能的情况中,当终端按照获取的伴奏音频的存储路径到相应地存储位置上获取该伴奏音频的标识所标识的伴奏音频时,可能会找不到该伴奏音频,在这种情况下,终端可以按照前述介绍的方法,通过向服务器发送携带有伴奏音频的标识的下载请求来从服务器中重新下载该伴奏音频。Optionally, in a possible situation, when the terminal acquires the accompaniment audio identified by the identifier of the accompaniment audio at the corresponding storage location according to the acquired accompaniment audio storage path, the accompaniment audio may not be found, In this case, the terminal may re-download the accompaniment audio from the server by sending a download request carrying the identification of the accompaniment audio to the server according to the method described above.
步骤304:对查找到的录音音频和伴奏音频进行处理。Step 304: Process the found recording audio and accompaniment audio.
在获取到录音音频和伴奏音频之后,终端可以将该伴奏音频和该录音音频进行处理。After acquiring the recording audio and the accompaniment audio, the terminal may process the accompaniment audio and the recording audio.
其中,根据用户选择的处理事项的不同,终端可以执行不同的处理操作。示例性的,若用户选择的处理事项是播放该录音音频,则终端可以将该录音音频和伴奏音频进行同步播放。如果用户选择的处理事项是对该录音音频和伴奏音频进行合成,则终端可以对该伴奏音频和该录音音频进行合成。Wherein, according to different processing items selected by the user, the terminal may perform different processing operations. Exemplarily, if the processing item selected by the user is to play the recorded audio, the terminal may play the recorded audio and the accompaniment audio synchronously. If the processing item selected by the user is to synthesize the recording audio and the accompaniment audio, the terminal may synthesize the accompaniment audio and the recording audio.
可选地,在一种可能的实现方式中,若用户选择的处理事项为合成合唱音频,则终端可以在获取到该录音音频和伴奏音频之后,基于该伴奏音频的标识获取与该伴奏音频相关联的其他录音音频,之后,终端可以根据将该伴奏音频和与该伴奏音频相关联的多个录音音频进行合成,从而得到合唱音频,并对该合唱音频进行播放。或者,终端也可以直接同步播放该伴奏音频和与该伴奏音频相关联的多个录音音频。Optionally, in a possible implementation, if the processing item selected by the user is synthesizing chorus audio, the terminal may obtain the information related to the accompaniment audio based on the identifier of the accompaniment audio after acquiring the recording audio and the accompaniment audio. After that, the terminal can synthesize the accompaniment audio and multiple audio recordings associated with the accompaniment audio to obtain chorus audio, and play the chorus audio. Alternatively, the terminal may also directly and synchronously play the accompaniment audio and multiple audio recordings associated with the accompaniment audio.
在本申请实施例中,终端可以获取待处理的录音音频的标识,基于该录音音频的标识,获取该录音音频的存储路径、与该录音音频相关联的伴奏音频的标识以及该伴奏音频的存储路径;基于该录音音频的标识、该录音音频的存储路径、该伴奏音频的标识以及该伴奏音频的存储路径分别获取该录音音频和该伴奏音频;对录音音频和伴奏音频进行处理。由于在本申请实施例中,录音音频和伴奏音频可以分别单独进行存储,而无需进行合成,因此,在对录音音频和伴奏音频进行处理时,可以分别获取该录音音频和伴奏音频进行处理,处理方式更加灵活多样,局限性较小。尤其是当后续需要单独对录音音频进行处理时,如果采用相关技术中的方法对录音音频和伴奏音频进行合成之后存储,则终端需要从合成音频中分离该录音音频之后再处理,耗时且操作复杂,而由于本申请实施例中录音音频和伴奏音频是分开存储的,并未合成,因此,若终端要对录音音频进行处理,则可以直接获取并处理,操作方便且灵活。In this embodiment of the present application, the terminal may acquire the identifier of the recorded audio to be processed, and based on the identifier of the recorded audio, obtain the storage path of the recorded audio, the identifier of the accompaniment audio associated with the recorded audio, and the storage path of the accompaniment audio. path; obtain the recording audio and the accompaniment audio respectively based on the identification of the recording audio, the storage path of the recording audio, the identification of the accompaniment audio and the storage path of the accompaniment audio; process the recording audio and the accompaniment audio. Since in the embodiment of the present application, the recording audio and the accompaniment audio can be stored separately without synthesis, therefore, when the recording audio and the accompaniment audio are processed, the recording audio and the accompaniment audio can be respectively obtained for processing, and the processing The method is more flexible and diverse, with less limitations. Especially when the recorded audio needs to be processed separately, if the method in the related art is used to synthesize the recorded audio and the accompaniment audio and then store it, the terminal needs to separate the recorded audio from the synthesized audio before processing, which is time-consuming and labor-intensive. Complicated, but because the recording audio and accompaniment audio are stored separately and not synthesized in the embodiment of the present application, if the terminal wants to process the recording audio, it can directly obtain and process it, which is convenient and flexible to operate.
上述实施例主要介绍了终端可以通过获取分别存储的录音音频和伴奏音频来对该录音音频和伴奏音频进行播放、合成等处理操作。除此之外,终端在分别存储录音音频和伴奏音频,并将录音音频的标识和存储路径、伴奏音频的标识和存储路径对应存储在映射关系表中之后,还可以对该录音音频和/或伴奏音频进行删除,其中,终端可以通过不同的方式对录音音频和/或伴奏音频进行删除,接下来将结合附图4介绍本申请实施例提供的第一种对音频进行删除处理的方法。如图4所示,该方法包括以下步骤:The above embodiment mainly introduces that the terminal can perform processing operations such as playing and synthesizing the recording audio and the accompaniment audio by acquiring the respectively stored recording audio and the accompaniment audio. In addition, after the terminal respectively stores the recording audio and the accompaniment audio, and stores the identification and storage path of the recording audio, and the identification and storage path of the accompaniment audio in the mapping relationship table, the terminal can also store the recording audio and/or Deleting the accompaniment audio, where the terminal can delete the recorded audio and/or the accompaniment audio in different ways. Next, the first method for deleting audio provided by the embodiment of the present application will be introduced with reference to FIG. 4 . As shown in Figure 4, the method includes the following steps:
步骤401:显示伴奏列表,伴奏列表中显示有多个伴奏音频的标识。Step 401: Display the accompaniment list, where multiple accompaniment audio identifiers are displayed.
在本申请实施例中,终端可以显示包括有当前存储的全部伴奏音频的标识的伴奏列表,以供用户选择感兴趣的伴奏音频。In this embodiment of the present application, the terminal may display an accompaniment list including identifiers of all currently stored accompaniment audios, for the user to select an accompaniment audio of interest.
步骤402:当检测到针对伴奏列表中的目标标识的删除操作时,检测是否存在与目标标识所标识的目标伴奏音频相关联的录音音频,若是,则执行步骤403,若否,则执行步骤404。Step 402: When the deletion operation for the target identifier in the accompaniment list is detected, detect whether there is a recorded audio associated with the target accompaniment audio identified by the target identifier, if yes, execute step 403, if not, execute step 404 .
当用户对伴奏列表中的某个标识所标识的伴奏音频不再感兴趣时,用户可以对该标识执行删除操作。终端可以实时检测用户针对伴奏列表中的标识的删除操作,当检测到针对某个标识的删除操作时,可以将该标识作为目标标识,并检测是否存在与目标标识所标识的目标伴奏音频相关联的录音音频。When the user is no longer interested in the accompaniment audio identified by an identifier in the accompaniment list, the user can perform a delete operation on the identifier. The terminal can detect in real time the user's deletion operation on the identifier in the accompaniment list. When detecting the deletion operation on a certain identifier, it can use the identifier as the target identifier, and detect whether there is a target accompaniment audio associated with the target identifier. audio recording.
其中,终端可以从存储的映射关系表中查找该目标标识,若未查找到该目标标识,则说明不存在与该目标标识所标识的目标伴奏音频相关联的录音音频。若查找到该目标标识,则可以判断该目标标识是否对应有录音音频的标识和/或存储路径,若该目标标识未对应有录音音频的标识和/或存储路径,则说明不存在与该目标标识所标识的目标伴奏音频相关联的录音音频。若该目标标识对应有录音音频的标识和/或存储路径,则说明存在与该目标标识所标识的目标伴奏音频相关联的录音音频。Wherein, the terminal may search the target identifier from the stored mapping relationship table, if the target identifier is not found, it means that there is no recorded audio associated with the target accompaniment audio identified by the target identifier. If the target identification is found, it can be judged whether the target identification corresponds to the identification and/or storage path of the recorded audio, if the target identification does not correspond to the identification and/or storage path of the recorded audio, then it means that there is no connection with the target. Identifies the recorded audio associated with the identified target accompaniment audio. If the target identifier corresponds to the identifier and/or storage path of the recorded audio, it means that there is a recorded audio associated with the target accompaniment audio identified by the target identifier.
步骤403:从伴奏列表中删除所述目标标识。Step 403: Delete the target identifier from the accompaniment list.
由于目标标识所标识的目标伴奏音频还对应有录音音频,也即,在播放该录音音频时有可能还会用到该目标伴奏音频,因此,终端可以只将该目标标识从伴奏列表中删除,而不对存储的目标伴奏音频进行删除。Since the target accompaniment audio identified by the target identifier also corresponds to the recorded audio, that is, the target accompaniment audio may be used when playing the recorded audio, therefore, the terminal may only delete the target identifier from the accompaniment list, The stored target accompaniment audio is not deleted.
步骤404:从伴奏列表中删除所述目标标识,并删除目标伴奏音频。Step 404: Delete the target identifier from the accompaniment list, and delete the target accompaniment audio.
由于已经不存在与该目标标识所标识的目标伴奏音频相关联的录音音频,并且,用户对该目标标识执行删除操作说明用户也对该目标标识所标识的目标伴奏音频不再感兴趣,此时,为了避免不必要的存储空间的浪费,终端不仅可以从伴奏列表中删除目标标识,还可以将存储的目标伴奏音频也一起进行删除。Since there is no recorded audio associated with the target accompaniment audio identified by the target identifier, and the user performs a delete operation on the target identifier, it indicates that the user is no longer interested in the target accompaniment audio identified by the target identifier. , in order to avoid unnecessary waste of storage space, the terminal can not only delete the target identifier from the accompaniment list, but also delete the stored target accompaniment audio together.
其中,终端可以根据该目标标识从存储的映射关系表中获取该目标标识对应的目标伴奏音频的存储路径,并按照获取的存储路径到相应存储位置上删除该目标标识所标识的目标伴奏音频。Wherein, the terminal can obtain the storage path of the target accompaniment audio corresponding to the target identifier from the stored mapping relationship table according to the target identifier, and delete the target accompaniment audio identified by the target identifier on the corresponding storage location according to the obtained storage path.
在本申请实施例中,终端在检测到用户针对伴奏列表中的目标标识的删除操作时,可以通过检测该目标标识所标识的目标伴奏文件是否存储相关联的录音文件,决定是删除目标标识还是删除目标标识和目标伴奏文件,这样,既可以为用户提供删除功能,同时又能避免在录音音频还存在的情况下,对伴奏音频的误删除。In this embodiment of the application, when the terminal detects the user's deletion operation on the target identifier in the accompaniment list, it can determine whether to delete the target identifier or Delete the target identification and the target accompaniment file. In this way, the delete function can be provided for the user, and at the same time, the accidental deletion of the accompaniment audio can be avoided when the recording audio still exists.
接下来,将结合附图5对本申请实施例提供的第二种对音频进行删除处理的方法进行介绍。如图5所示,该方法包括以下步骤:Next, the second method for deleting audio provided by the embodiment of the present application will be introduced with reference to FIG. 5 . As shown in Figure 5, the method includes the following steps:
步骤501:当检测到针对目标录音音频的删除操作时,检测与目标录音音频相关联的目标伴奏音频的标识是否存在于伴奏列表中,以及检测是否存在与目标伴奏音频相关联的其他录音音频。Step 501: When a delete operation on the target audio recording is detected, detect whether the identifier of the target accompaniment audio associated with the target audio recording exists in the accompaniment list, and detect whether there are other audio recordings associated with the target accompaniment audio.
在本申请实施例中,终端可以显示有录音列表的选项,当终端检测到用户针对录音列表的选项的选择操作时,可以显示包括有当前存储的全部录音音频标识的录音列表。In this embodiment of the present application, the terminal may display the option of the recording list, and when the terminal detects the user's selection operation on the option of the recording list, it may display the recording list including the audio identifiers of all the recordings currently stored.
当用户对某个录音音频不满意,想对其进行删除时,用户可以对该录音列表中该录音音频的标识执行删除操作。终端在检测到用户的删除操作之后,可以将用户选择的标识所标识的录音音频作为目标录音音频,并根据该目标录音音频的标识,从存储的映射关系表中获取该目标录音音频的标识对应的目标伴奏音频的标识。之后,终端可以从伴奏列表中查找该目标伴奏音频的标识,并在映射关系表中查找该目标伴奏音频的标识是否还对应有除目标录音音频之外的其他录音音频。其中,伴奏列表包括有终端中当前存储的全部伴奏音频的标识。When the user is dissatisfied with a certain audio recording and wants to delete it, the user can perform a deletion operation on the identification of the audio recording in the recording list. After the terminal detects the user's deletion operation, it can use the audio recording identified by the identifier selected by the user as the target audio recording, and obtain the identifier corresponding to the target audio recording from the stored mapping table according to the identifier of the target audio recording. An identifier for the target accompaniment audio. Afterwards, the terminal can search the identifier of the target accompaniment audio from the accompaniment list, and check in the mapping relationship table whether the identifier of the target accompaniment audio corresponds to other recorded audio besides the target recorded audio. Wherein, the accompaniment list includes identifiers of all accompaniment audios currently stored in the terminal.
可选地,在本申请实施例中,终端也可以不显示录音列表,在这种情况下,用户可以直接对存储的录音音频执行删除操作。终端在检测到用户针对目标录音音频的删除操作时,可以获取该目标录音音频的标识,进而根据该目标录音音频的标识,参照上述相关方法来检测与目标录音音频相关联的目标伴奏音频的标识是否存在于伴奏列表中,以及检测是否存在与目标伴奏音频相关联的其他录音音频。Optionally, in this embodiment of the present application, the terminal may not display the recording list. In this case, the user may directly perform a deletion operation on the stored audio recording. When the terminal detects the user's deletion operation on the target audio recording, it can obtain the identification of the target audio recording, and then according to the identification of the target audio recording, refer to the above related methods to detect the identification of the target accompaniment audio associated with the target audio recording Whether it exists in the comp list, and detects whether there are other recorded audios associated with the target comp audio.
步骤502:若目标伴奏音频的标识不存在于伴奏列表中,且不存在与目标伴奏音频相关联的其他录音音频,则删除目标录音音频以及目标伴奏音频。Step 502: If the identifier of the target accompaniment audio does not exist in the accompaniment list, and there is no other recorded audio associated with the target accompaniment audio, delete the target recorded audio and the target accompaniment audio.
若终端从伴奏列表中未查找到该目标伴奏音频的标识,则说明用户已经想要删除该目标伴奏音频;若从映射关系表中未查找到该目标伴奏音频对应有其他的录音音频,则说明该目标伴奏音频也不可能被其他录音音频用到。因此,若终端既未在伴奏列表中检测到该目标伴奏音频,也未检测到与该目标伴奏音频相关联的其他录音音频,则可以在删除目标录音音频的同时,将该目标伴奏音频也一起进行删除。If the terminal does not find the identification of the target accompaniment audio from the accompaniment list, it means that the user has already wanted to delete the target accompaniment audio; It is also impossible for the target accompaniment audio to be used by other recorded audio. Therefore, if the terminal neither detects the target accompaniment audio in the accompaniment list nor detects other recording audio associated with the target accompaniment audio, it can delete the target accompaniment audio while deleting the target accompaniment audio. to delete.
可选地,在将该目标录音音频和目标伴奏音频进行删除之后,终端可以将映射关系表中存储有该目标录音音频和该目标伴奏音频的对应关系的表项也进行删除。Optionally, after deleting the target recording audio and the target accompaniment audio, the terminal may also delete the entry in the mapping relationship table that stores the correspondence between the target recording audio and the target accompaniment audio.
步骤503:若目标伴奏音频的标识存在于伴奏列表或存在与目标伴奏音频相关联的其他录音音频,则删除目标录音音频。Step 503: If the identifier of the target accompaniment audio exists in the accompaniment list or there are other audio recordings associated with the target accompaniment audio, delete the target audio recording.
若从伴奏列表中查找到该目标伴奏音频的标识,则说明用户并未想删除该目标伴奏音频;若从映射关系表中查找到该目标伴奏音频还对应有其他的录音音频,则说明该目标伴奏音频还可能被其他录音音频用到,此时不可对该目标伴奏音频进行删除。基于此,当终端在伴奏列表中查找到目标伴奏音频的标识,或者,终端在映射关系表中查找到该目标伴奏音频的标识对应有其他录音音频,或者,终端检测到上述两种情况均符合,则终端可以只删除该目标录音音频,而不对该目标伴奏音频进行删除。If the identification of the target accompaniment audio is found from the accompaniment list, it means that the user does not want to delete the target accompaniment audio; Accompaniment audio may also be used by other recorded audio, and the target accompaniment audio cannot be deleted at this time. Based on this, when the terminal finds the identifier of the target accompaniment audio in the accompaniment list, or the terminal finds that the identifier of the target accompaniment audio corresponds to other recorded audio in the mapping relationship table, or the terminal detects that both of the above situations meet , the terminal may only delete the target recording audio, but not the target accompaniment audio.
在本申请实施例中,终端在检测到针对目标录音音频的删除操作时,可以检测与目标录音音频相关联的目标伴奏音频的标识是否存在于伴奏列表中,以及检测是否存在与所述目标伴奏音频相关联的其他录音音频,以此来决定是只删除目标录音音频还是将该目标录音音频和与之关联的目标伴奏音频一起进行删除,这样,在删除目标录音音频时,既可以保证将用户不感兴趣且不存在关联的其他录音音频的目标伴奏音频及时进行删除,避免了不必要的存储空间的浪费,同时又能避免在还存在其他录音音频或用户还感兴趣的情况下,对伴奏音频的误删除。In this embodiment of the present application, when the terminal detects a deletion operation on the target audio recording, it can detect whether the target accompaniment audio identification associated with the target audio recording exists in the accompaniment list, and detect whether there is an audio accompaniment associated with the target accompaniment. Other audio recordings associated with the audio, so as to determine whether to delete only the target recording audio or to delete the target recording audio and the target accompaniment audio associated with it. In this way, when deleting the target recording audio, it can ensure that the user The target accompaniment audio of other recorded audio that is not interested and has no association is deleted in time, avoiding unnecessary waste of storage space, and at the same time avoiding the accompaniment audio when there are other recorded audio or the user is still interested mistakenly deleted.
参见图6,本申请实施例提供了一种音频处理装置600,该装置600包括:Referring to FIG. 6, an embodiment of the present application provides an audio processing device 600, which includes:
第一获取模块601,用于获取待处理的录音音频的标识,录音音频的标识用于唯一标识录音音频;The first obtaining module 601 is used to obtain the identification of the audio recording to be processed, and the identification of the audio recording is used to uniquely identify the audio recording;
第二获取模块602,用于基于录音音频的标识,获取录音音频的存储路径、与录音音频相关联的伴奏音频的标识以及伴奏音频的存储路径;The second acquiring module 602 is configured to acquire, based on the identification of the recording audio, the storage path of the recording audio, the identification of the accompaniment audio associated with the recording audio, and the storage path of the accompaniment audio;
查找模块603,用于基于录音音频的标识、录音音频的存储路径、与录音音频相关联的伴奏音频的标识以及伴奏音频的存储路径分别查找录音音频和伴奏音频;The search module 603 is used to search for the recording audio and the accompaniment audio based on the identification of the recording audio, the storage path of the recording audio, the identification of the accompaniment audio associated with the recording audio, and the storage path of the accompaniment audio;
处理模块604,用于对查找到的录音音频和伴奏音频进行处理。The processing module 604 is configured to process the found recording audio and accompaniment audio.
可选地,第二获取模块602具体用于:Optionally, the second acquiring module 602 is specifically configured to:
基于录音音频的标识,从映射关系表中获取与录音音频的标识相对应的录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径;Based on the identification of the recording audio, the storage path of the recording audio corresponding to the identification of the recording audio, the identification of the accompaniment audio and the storage path of the accompaniment audio are obtained from the mapping relationship table;
其中,映射关系表存储有多个录音音频的标识、多个录音音频的标识中每个录音音频的标识对应的录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径。Wherein, the mapping relationship table stores a plurality of recording audio identifiers, a recording audio storage path corresponding to each recording audio identifier in the plurality of recording audio identifiers, an accompaniment audio identifier, and a storage path of the accompaniment audio.
可选地,该装置还包括:Optionally, the device also includes:
第一存储模块,用于当录音结束生成录音音频时,存储录音音频,并获取录音音频的存储路径;The first storage module is used to store the recorded audio and obtain the storage path of the recorded audio when the recorded audio is generated after recording;
确定模块,用于确定录音音频的哈希值,并将录音音频的哈希值作为录音音频的标识;A determining module, configured to determine the hash value of the recording audio, and use the hash value of the recording audio as the identification of the recording audio;
确定模块,还用于确定与录音音频相关联的伴奏音频的哈希值以及存储路径,并将伴奏音频的哈希值作为伴奏音频的标识;The determination module is also used to determine the hash value and storage path of the accompaniment audio associated with the recording audio, and use the hash value of the accompaniment audio as the identification of the accompaniment audio;
第二存储模块,用于将录音音频的哈希值、录音音频的存储路径、伴奏音频的标识和伴奏音频的存储路径对应存储在映射关系表中。The second storage module is used for correspondingly storing the hash value of the recording audio, the storage path of the recording audio, the identification of the accompaniment audio, and the storage path of the accompaniment audio in the mapping relationship table.
可选地,伴奏音频为加密音频;Optionally, the accompaniment audio is encrypted audio;
该装置还包括:The unit also includes:
解密模块,用于对伴奏音频进行解密;The decryption module is used to decrypt the accompaniment audio;
发送模块,用于若解密失败,则向服务器发送下载请求,下载请求携带伴奏音频的标识;The sending module is used to send a download request to the server if the decryption fails, and the download request carries the identification of the accompaniment audio;
接收模块,用于接收服务器基于伴奏音频的标识返回的音频,并将伴奏音频更新为服务器返回的音频。The receiving module is configured to receive the audio returned by the server based on the identifier of the accompaniment audio, and update the accompaniment audio to the audio returned by the server.
可选地,该装置还用于:Optionally, the device is also used for:
若未查找到伴奏音频,则向服务器发送下载请求,下载请求携带伴奏音频的标识;If the accompaniment audio is not found, a download request is sent to the server, and the download request carries the identification of the accompaniment audio;
接收服务器基于伴奏音频的标识返回的伴奏音频,并将接收到的伴奏音频作为查找到的伴奏音频。The accompaniment audio returned by the server based on the identifier of the accompaniment audio is received, and the received accompaniment audio is used as the found accompaniment audio.
可选地,该装置还包括:Optionally, the device also includes:
显示模块,用于显示伴奏列表,伴奏列表中显示有多个伴奏音频的标识;The display module is used to display the accompaniment list, and there are multiple accompaniment audio identifiers displayed in the accompaniment list;
第一检测模块,用于当检测到针对伴奏列表中的目标标识的删除操作时,检测是否存在与目标标识所标识的目标伴奏音频相关联的录音音频,目标标识为伴奏列表中显示的多个伴奏音频的标识中的任一个标识;The first detection module is used to detect whether there is a recording audio associated with the target accompaniment audio identified by the target identifier when detecting a deletion operation for the target identifier in the accompaniment list. any of the identifiers for the accompanying audio;
第一删除模块,用于若存在与目标伴奏音频相关联的录音音频,则从伴奏列表中删除目标标识;The first deletion module is used to delete the target identifier from the accompaniment list if there is a recording audio associated with the target accompaniment audio;
第二删除模块,用于若不存在与目标伴奏音频相关联的录音音频,则从伴奏列表中删除目标标识,并删除目标伴奏音频。The second deletion module is configured to delete the target identifier from the accompaniment list and delete the target accompaniment audio if there is no recorded audio associated with the target accompaniment audio.
可选地,该装置还包括:Optionally, the device also includes:
第二检测模块,用于当检测到针对目标录音音频的删除操作时,检测与目标录音音频相关联的目标伴奏音频的标识是否存在于伴奏列表中,以及检测是否存在与目标伴奏音频相关联的其他录音音频,伴奏列表中显示有多个伴奏音频的标识;The second detection module is used to detect whether the target accompaniment audio identification associated with the target audio recording exists in the accompaniment list when detecting a deletion operation for the target audio recording, and detect whether there is an accompaniment associated with the target accompaniment audio. For other audio recordings, multiple accompaniment audio identifiers are displayed in the accompaniment list;
第三删除模块,用于若目标伴奏音频的标识不存在于伴奏列表中,且不存在与目标伴奏音频相关联的其他录音音频,则删除目标录音音频以及目标伴奏音频。The third deletion module is configured to delete the target audio recording and the target audio accompaniment if the target accompaniment audio identifier does not exist in the accompaniment list and there is no other audio recording associated with the target accompaniment audio.
可选地,该装置还包括:Optionally, the device also includes:
第四删除模块,用于若目标伴奏音频的标识存在于伴奏列表或存在与目标伴奏音频相关联的其他录音音频,则删除目标录音音频。The fourth deletion module is used to delete the target audio recording if the target accompaniment audio identifier exists in the accompaniment list or there are other audio recordings associated with the target accompaniment audio.
综上所述,在本发明实施例中,录音音频和伴奏音频可以分别单独进行存储,而无需进行合成,因此,在对录音音频和伴奏音频进行处理时,可以分别获取该录音音频和伴奏音频进行处理,处理方式更加灵活多样,局限性较小。尤其是当后续需要单独对录音音频进行处理时,如果采用相关技术中的方法对录音音频和伴奏音频进行合成之后存储,则终端需要从合成音频中分离该录音音频之后再处理,耗时且操作复杂,而由于本申请实施例中录音音频和伴奏音频是分开存储的,并未合成,因此,若终端要对录音音频进行处理,则可以直接获取并处理,操作方便且灵活。To sum up, in the embodiment of the present invention, the recording audio and the accompaniment audio can be stored separately without synthesis. Therefore, when the recording audio and the accompaniment audio are processed, the recording audio and the accompaniment audio can be respectively obtained The processing method is more flexible and diverse, with less limitations. Especially when the recorded audio needs to be processed separately, if the method in the related art is used to synthesize the recorded audio and the accompaniment audio and then store it, the terminal needs to separate the recorded audio from the synthesized audio before processing, which is time-consuming and labor-intensive. Complicated, but because the recording audio and accompaniment audio are stored separately and not synthesized in the embodiment of the present application, if the terminal wants to process the recording audio, it can directly obtain and process it, which is convenient and flexible to operate.
需要说明的是:上述实施例提供的音频处理装置在处理音频时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的音频处理装置与音频处理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that: when the audio processing device provided in the above-mentioned embodiment processes audio, it only uses the division of the above-mentioned functional modules as an example. In practical applications, the above-mentioned function allocation can be completed by different functional modules according to needs. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the audio processing device and the audio processing method embodiments provided in the above embodiments belong to the same idea, and the specific implementation process thereof is detailed in the method embodiments, and will not be repeated here.
图7示出了本发明一个示例性实施例提供的用于处理音频的终端700的结构框图。其中,该终端700可以是:工业电脑、工控机、笔记本电脑、台式电脑、智能手机或平板电脑等。终端700还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。Fig. 7 shows a structural block diagram of a terminal 700 for processing audio provided by an exemplary embodiment of the present invention. Wherein, the terminal 700 may be: an industrial computer, an industrial computer, a notebook computer, a desktop computer, a smart phone or a tablet computer, and the like. The terminal 700 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
通常,终端700包括有:处理器701和存储器702。Generally, the terminal 700 includes: a processor 701 and a memory 702 .
处理器701可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器701可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器701也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central ProcessingUnit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器701可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器701还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 701 can adopt at least one hardware form in DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish. The processor 701 may also include a main processor and a coprocessor, the main processor is a processor for processing data in the wake-up state, and is also called a CPU (Central Processing Unit, central processing unit); the coprocessor is used to Low-power processor for processing data in standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing content that needs to be displayed on the display screen. In some embodiments, the processor 701 may further include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is configured to process computing operations related to machine learning.
存储器702可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器702还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器702中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器701所执行以实现本申请中方法实施例提供的音频处理方法。Memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include high-speed random access memory, and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 701 to implement the audio processing provided by the method embodiments in this application method.
在一些实施例中,终端700还可选包括有:外围设备接口703和至少一个外围设备。处理器701、存储器702和外围设备接口703之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口703相连。具体地,外围设备包括:射频电路704、触摸显示屏705、摄像头706、音频电路707、定位组件708和电源709中的至少一种。In some embodiments, the terminal 700 may optionally further include: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702, and the peripheral device interface 703 may be connected through buses or signal lines. Each peripheral device can be connected to the peripheral device interface 703 through a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704 , a touch screen 705 , a camera 706 , an audio circuit 707 , a positioning component 708 and a power supply 709 .
外围设备接口703可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器701和存储器702。在一些实施例中,处理器701、存储器702和外围设备接口703被集成在同一芯片或电路板上;在一些其他实施例中,处理器701、存储器702和外围设备接口703中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。The peripheral device interface 703 may be used to connect at least one peripheral device related to I/O (Input/Output, input/output) to the processor 701 and the memory 702 . In some embodiments, the processor 701, memory 702 and peripheral device interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 701, memory 702 and peripheral device interface 703 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
射频电路704用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路704通过电磁信号与通信网络以及其他通信设备进行通信。射频电路704将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路704包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路704可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路704还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。The radio frequency circuit 704 is configured to receive and transmit RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals. The radio frequency circuit 704 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 704 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: World Wide Web, Metropolitan Area Network, Intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), wireless local area network and/or WiFi (Wireless Fidelity, Wireless Fidelity) network. In some embodiments, the radio frequency circuit 704 may also include circuits related to NFC (Near Field Communication, short-range wireless communication), which is not limited in this application.
显示屏705用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏705是触摸显示屏时,显示屏705还具有采集在显示屏705的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器701进行处理。此时,显示屏705还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏705可以为一个,设置终端700的前面板;在另一些实施例中,显示屏705可以为至少两个,分别设置在终端700的不同表面或呈折叠设计;在再一些实施例中,显示屏705可以是柔性显示屏,设置在终端700的弯曲表面上或折叠面上。甚至,显示屏705还可以设置成非矩形的不规则图形,也即异形屏。显示屏705可以采用LCD(LiquidCrystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。The display screen 705 is used to display a UI (User Interface, user interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to collect touch signals on or above the surface of the display screen 705 . The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 705 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards. In some embodiments, there may be one display screen 705, which is set on the front panel of the terminal 700; in other embodiments, there may be at least two display screens 705, which are respectively arranged on different surfaces of the terminal 700 or in a folding design; In some other embodiments, the display screen 705 may be a flexible display screen, which is arranged on a curved surface or a folded surface of the terminal 700 . Even, the display screen 705 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen. The display screen 705 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.
摄像头组件706用于采集图像或视频。可选地,摄像头组件706包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件706还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。The camera assembly 706 is used to capture images or videos. Optionally, the camera component 706 includes a front camera and a rear camera. Usually, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of the main camera, depth-of-field camera, wide-angle camera, and telephoto camera, so as to realize the fusion of the main camera and the depth-of-field camera to realize the background blur function. Combined with the wide-angle camera to realize panoramic shooting and VR (Virtual Reality, virtual reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 706 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
音频电路707可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器701进行处理,或者输入至射频电路704以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分别设置在终端700的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器701或射频电路704的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路707还可以包括耳机插孔。Audio circuitry 707 may include a microphone and speakers. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 701 for processing, or input them to the radio frequency circuit 704 to realize voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 700 . The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 701 or the radio frequency circuit 704 into sound waves. The loudspeaker can be a conventional membrane loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, it is possible not only to convert electrical signals into sound waves audible to humans, but also to convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 707 may also include a headphone jack.
定位组件708用于定位终端700的当前地理位置,以实现导航或LBS(LocationBased Service,基于位置的服务)。定位组件708可以是基于美国的GPS(GlobalPositioning System,全球定位系统)、中国的北斗系统或欧盟的伽利略系统的定位组件。The positioning component 708 is used to locate the current geographic location of the terminal 700 to implement navigation or LBS (Location Based Service, location-based service). The positioning component 708 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, or the Galileo system of the European Union.
电源709用于为终端700中的各个组件进行供电。电源709可以是交流电、直流电、一次性电池或可充电电池。当电源709包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。The power supply 709 is used to supply power to various components in the terminal 700 . Power source 709 may be AC, DC, disposable or rechargeable batteries. When the power source 709 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
在一些实施例中,终端700还包括有一个或多个传感器710。该一个或多个传感器710包括但不限于:加速度传感器711、陀螺仪传感器712、压力传感器713、指纹传感器714、光学传感器715以及接近传感器716。In some embodiments, the terminal 700 further includes one or more sensors 710 . The one or more sensors 710 include, but are not limited to: an acceleration sensor 711 , a gyro sensor 712 , a pressure sensor 713 , a fingerprint sensor 714 , an optical sensor 715 and a proximity sensor 716 .
加速度传感器711可以检测以终端700建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器711可以用于检测重力加速度在三个坐标轴上的分量。处理器701可以根据加速度传感器711采集的重力加速度信号,控制触摸显示屏705以横向视图或纵向视图进行用户界面的显示。加速度传感器711还可以用于游戏或者用户的运动数据的采集。The acceleration sensor 711 can detect the acceleration on the three coordinate axes of the coordinate system established by the terminal 700 . For example, the acceleration sensor 711 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 701 may control the touch display screen 705 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 711 . The acceleration sensor 711 can also be used for collecting game or user's motion data.
陀螺仪传感器712可以检测终端700的机体方向及转动角度,陀螺仪传感器712可以与加速度传感器711协同采集用户对终端700的3D动作。处理器701根据陀螺仪传感器712采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。The gyro sensor 712 can detect the body direction and rotation angle of the terminal 700 , and the gyro sensor 712 can cooperate with the acceleration sensor 711 to collect 3D actions of the user on the terminal 700 . According to the data collected by the gyroscope sensor 712, the processor 701 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control and inertial navigation.
压力传感器713可以设置在终端700的侧边框和/或触摸显示屏705的下层。当压力传感器713设置在终端700的侧边框时,可以检测用户对终端700的握持信号,由处理器701根据压力传感器713采集的握持信号进行左右手识别或快捷操作。当压力传感器713设置在触摸显示屏705的下层时,由处理器701根据用户对触摸显示屏705的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。The pressure sensor 713 may be disposed on a side frame of the terminal 700 and/or a lower layer of the touch display screen 705 . When the pressure sensor 713 is installed on the side frame of the terminal 700 , it can detect the user's grip signal on the terminal 700 , and the processor 701 performs left and right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 713 . When the pressure sensor 713 is arranged on the lower layer of the touch screen 705, the processor 701 controls the operable controls on the UI interface according to the user's pressure operation on the touch screen 705. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
指纹传感器714用于采集用户的指纹,由处理器701根据指纹传感器714采集到的指纹识别用户的身份,或者,由指纹传感器714根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器701授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器714可以被设置终端700的正面、背面或侧面。当终端700上设置有物理按键或厂商Logo时,指纹传感器714可以与物理按键或厂商Logo集成在一起。The fingerprint sensor 714 is used to collect the user's fingerprint, and the processor 701 recognizes the identity of the user according to the fingerprint collected by the fingerprint sensor 714, or, the fingerprint sensor 714 recognizes the user's identity according to the collected fingerprint. When the identity of the user is recognized as a trusted identity, the processor 701 authorizes the user to perform related sensitive operations, such sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payment, and changing settings. The fingerprint sensor 714 may be provided on the front, back or side of the terminal 700 . When the terminal 700 is provided with a physical button or a manufacturer's Logo, the fingerprint sensor 714 may be integrated with the physical button or the manufacturer's Logo.
光学传感器715用于采集环境光强度。在一个实施例中,处理器701可以根据光学传感器715采集的环境光强度,控制触摸显示屏705的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏705的显示亮度;当环境光强度较低时,调低触摸显示屏705的显示亮度。在另一个实施例中,处理器701还可以根据光学传感器715采集的环境光强度,动态调整摄像头组件706的拍摄参数。The optical sensor 715 is used to collect ambient light intensity. In one embodiment, the processor 701 can control the display brightness of the touch screen 705 according to the ambient light intensity collected by the optical sensor 715 . Specifically, when the ambient light intensity is high, the display brightness of the touch screen 705 is increased; when the ambient light intensity is low, the display brightness of the touch screen 705 is decreased. In another embodiment, the processor 701 may also dynamically adjust shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 715 .
接近传感器716,也称距离传感器,通常设置在终端700的前面板。接近传感器716用于采集用户与终端700的正面之间的距离。在一个实施例中,当接近传感器716检测到用户与终端700的正面之间的距离逐渐变小时,由处理器701控制触摸显示屏705从亮屏状态切换为息屏状态;当接近传感器716检测到用户与终端700的正面之间的距离逐渐变大时,由处理器701控制触摸显示屏705从息屏状态切换为亮屏状态。The proximity sensor 716 , also called a distance sensor, is usually arranged on the front panel of the terminal 700 . The proximity sensor 716 is used to collect the distance between the user and the front of the terminal 700 . In one embodiment, when the proximity sensor 716 detects that the distance between the user and the front of the terminal 700 gradually decreases, the processor 701 controls the touch display screen 705 to switch from the bright screen state to the off screen state; when the proximity sensor 716 detects When the distance between the user and the front of the terminal 700 gradually increases, the processor 701 controls the touch display screen 705 to switch from the off-screen state to the on-screen state.
也即是,本发明实施例不仅提供了一种体绘制装置,该装置可以应用于上述终端700中,包括处理器和用于存储处理器可执行指令的存储器,其中,处理器被配置为执行图2-5所示的实施例中音频处理方法,而且,本发明实施例还提供了一种计算机可读存储介质,该存储介质内存储有计算机程序,该计算机程序被处理器执行时可以实现图2-5所示的实施例中音频处理方法。That is, the embodiment of the present invention not only provides a volume rendering apparatus, which can be applied to the above-mentioned terminal 700, and includes a processor and a memory for storing instructions executable by the processor, wherein the processor is configured to execute The audio processing method in the embodiment shown in Fig. 2-5, moreover, the embodiment of the present invention also provides a kind of computer-readable storage medium, and the computer program is stored in this storage medium, when this computer program is executed by processor, can realize The audio processing method in the embodiment shown in Fig. 2-5.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within range.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810694463.0ACN108806730B (en) | 2018-06-29 | 2018-06-29 | Audio processing method, apparatus and computer-readable storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810694463.0ACN108806730B (en) | 2018-06-29 | 2018-06-29 | Audio processing method, apparatus and computer-readable storage medium |
| Publication Number | Publication Date |
|---|---|
| CN108806730Atrue CN108806730A (en) | 2018-11-13 |
| CN108806730B CN108806730B (en) | 2020-11-24 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810694463.0AActiveCN108806730B (en) | 2018-06-29 | 2018-06-29 | Audio processing method, apparatus and computer-readable storage medium |
| Country | Link |
|---|---|
| CN (1) | CN108806730B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110244599A (en)* | 2019-05-14 | 2019-09-17 | 广州小鸡快跑网络科技有限公司 | Game console control method, electronic equipment and medium based on linear motor |
| CN113077772A (en)* | 2021-03-25 | 2021-07-06 | 维沃移动通信有限公司 | Audio file playback method and device and storage medium |
| CN115544296A (en)* | 2021-06-30 | 2022-12-30 | 华为技术有限公司 | Audio data storage method and related equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1381055A (en)* | 2000-04-05 | 2002-11-20 | 索尼英国有限公司 | Identifying and processing audio and/or video material |
| CN101621594A (en)* | 2009-07-20 | 2010-01-06 | 中兴通讯股份有限公司 | Method and device for playing background sound of voice message |
| CN103246730A (en)* | 2013-05-08 | 2013-08-14 | 网易(杭州)网络有限公司 | File storage method and device and file sensing method and device |
| CN103632692A (en)* | 2012-08-24 | 2014-03-12 | 蒂雅克股份有限公司 | Multitrack recorder |
| CN104392712A (en)* | 2014-08-27 | 2015-03-04 | 贵阳朗玛信息技术股份有限公司 | Method and device for realizing karaoke function |
| CN105047185A (en)* | 2015-05-26 | 2015-11-11 | 广州酷狗计算机科技有限公司 | Method, device and system for obtaining audio frequency of accompaniment |
| CN106445964A (en)* | 2015-08-11 | 2017-02-22 | 腾讯科技(深圳)有限公司 | Audio information processing method and apparatus |
| CN107391711A (en)* | 2017-07-28 | 2017-11-24 | 广州酷狗计算机科技有限公司 | The method and apparatus for obtaining accompanying song |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1381055A (en)* | 2000-04-05 | 2002-11-20 | 索尼英国有限公司 | Identifying and processing audio and/or video material |
| CN101621594A (en)* | 2009-07-20 | 2010-01-06 | 中兴通讯股份有限公司 | Method and device for playing background sound of voice message |
| CN103632692A (en)* | 2012-08-24 | 2014-03-12 | 蒂雅克股份有限公司 | Multitrack recorder |
| CN103246730A (en)* | 2013-05-08 | 2013-08-14 | 网易(杭州)网络有限公司 | File storage method and device and file sensing method and device |
| CN104392712A (en)* | 2014-08-27 | 2015-03-04 | 贵阳朗玛信息技术股份有限公司 | Method and device for realizing karaoke function |
| CN105047185A (en)* | 2015-05-26 | 2015-11-11 | 广州酷狗计算机科技有限公司 | Method, device and system for obtaining audio frequency of accompaniment |
| CN106445964A (en)* | 2015-08-11 | 2017-02-22 | 腾讯科技(深圳)有限公司 | Audio information processing method and apparatus |
| CN107391711A (en)* | 2017-07-28 | 2017-11-24 | 广州酷狗计算机科技有限公司 | The method and apparatus for obtaining accompanying song |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110244599A (en)* | 2019-05-14 | 2019-09-17 | 广州小鸡快跑网络科技有限公司 | Game console control method, electronic equipment and medium based on linear motor |
| CN113077772A (en)* | 2021-03-25 | 2021-07-06 | 维沃移动通信有限公司 | Audio file playback method and device and storage medium |
| CN113077772B (en)* | 2021-03-25 | 2024-08-23 | 维沃移动通信有限公司 | Audio file playback method, device and storage medium |
| CN115544296A (en)* | 2021-06-30 | 2022-12-30 | 华为技术有限公司 | Audio data storage method and related equipment |
| Publication number | Publication date |
|---|---|
| CN108806730B (en) | 2020-11-24 |
| Publication | Publication Date | Title |
|---|---|---|
| CN107908929B (en) | Method and device for playing audio data | |
| CN110267055A (en) | Method, device and system for recommending a live broadcast room | |
| CN109168073B (en) | Method and device for displaying cover of live broadcast room | |
| CN109068160B (en) | Method, device and system for linking videos | |
| CN110688082A (en) | Method, device, device and storage medium for determining volume adjustment ratio information | |
| CN111061405B (en) | Method, device and equipment for recording song audio and storage medium | |
| CN108881286B (en) | Multimedia playing control method, terminal, sound box equipment and system | |
| CN110248236B (en) | Video playing method, device, terminal and storage medium | |
| CN111402844B (en) | Song chorus method, device and system | |
| CN108831425B (en) | Sound mixing method, device and storage medium | |
| CN108922506A (en) | Song audio generation method, device and computer readable storage medium | |
| CN108831423A (en) | Extract method, apparatus, terminal and the storage medium of theme track in audio data | |
| WO2020253129A1 (en) | Song display method, apparatus and device, and storage medium | |
| CN110266982B (en) | Method and system for providing songs while recording video | |
| CN108922562A (en) | Sing evaluation result display methods and device | |
| CN108806730B (en) | Audio processing method, apparatus and computer-readable storage medium | |
| CN112069350A (en) | Song recommendation method, apparatus, device, and computer storage medium | |
| CN109547847B (en) | Method and device for adding video information and computer readable storage medium | |
| CN111008298A (en) | Method, device, system, equipment and storage medium for searching song accompaniment | |
| CN111081277A (en) | Audio evaluation method, device, equipment and storage medium | |
| CN110234036A (en) | A kind of method, apparatus and system playing multimedia file | |
| CN108495183B (en) | Method and device for displaying album information | |
| WO2022227589A1 (en) | Audio processing method and apparatus | |
| CN112738624B (en) | Method and device for special effect rendering of video | |
| CN111399796B (en) | Voice message aggregation method and device, electronic equipment and storage medium |
| 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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right | Effective date of registration:20220331 Address after:4119, 41st floor, building 1, No.500, middle section of Tianfu Avenue, Chengdu hi tech Zone, China (Sichuan) pilot Free Trade Zone, Chengdu, Sichuan 610000 Patentee after:Chengdu kugou business incubator management Co.,Ltd. Address before:No. 315, Huangpu Avenue middle, Tianhe District, Guangzhou City, Guangdong Province Patentee before:GUANGZHOU KUGOU COMPUTER TECHNOLOGY Co.,Ltd. | |
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right | Effective date of registration:20241203 Address after:No. 315, Huangpu Avenue middle, Tianhe District, Guangzhou City, Guangdong Province Patentee after:GUANGZHOU KUGOU COMPUTER TECHNOLOGY Co.,Ltd. Country or region after:China Address before:4119, 41st floor, building 1, No.500, middle section of Tianfu Avenue, Chengdu hi tech Zone, China (Sichuan) pilot Free Trade Zone, Chengdu, Sichuan 610000 Patentee before:Chengdu kugou business incubator management Co.,Ltd. Country or region before:China |