WO2020048221A1 - 音效增强方法、装置、电子设备及存储介质 - Google Patents
音效增强方法、装置、电子设备及存储介质 Download PDFInfo
- Publication number
- WO2020048221A1 WO2020048221A1 PCT/CN2019/095140 CN2019095140W WO2020048221A1 WO 2020048221 A1 WO2020048221 A1 WO 2020048221A1 CN 2019095140 W CN2019095140 W CN 2019095140W WO 2020048221 A1 WO2020048221 A1 WO 2020048221A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- audio
- target
- sound
- path
- type
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/54—Controlling the output signals based on the game progress involving acoustic signals, e.g. for simulating revolutions per minute [RPM] dependent engine sounds in a driving game or reverberation against a virtual wall
Definitions
- the present application relates to the technical field of electronic devices, and more particularly, to a method, device, electronic device, and storage medium for enhancing sound effects.
- audio playback is one of the basic functions of electronic devices.
- the audio data played by the electronic device is electronic data sampled and stored according to the real sound.
- a sound effect can be added to the played audio.
- the settings of sound effects are usually fixed and single, which affects the user experience.
- this application proposes a sound effect enhancement method, device, electronic device, and storage medium to solve the above problems.
- an embodiment of the present application provides a sound effect enhancement method applied to an electronic device.
- the method includes: determining a target audio path corresponding to a current audio output scene in an audio path of the electronic device; and determining the A target sound type of the audio transmitted by the target audio path; and enhancing the audio transmitted by the target audio path by a target sound effect algorithm corresponding to the target sound type.
- an embodiment of the present application provides a sound effect enhancement device applied to an electronic device.
- the device includes: a path determination module, configured to determine a target corresponding to a current audio output scene in an audio path of the electronic device. An audio path; a type determination module configured to determine a target sound type of audio transmitted by the target audio path; a sound effect enhancement module configured to use a target sound effect algorithm corresponding to the target sound type to transmit the target audio path Audio is enhanced.
- an embodiment of the present application provides an electronic device including: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured For execution by the one or more processors, the one or more programs are configured to perform the method described above.
- an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores program code, and the program code can be called by a processor to execute the foregoing method.
- FIG. 1 shows a flowchart of a sound enhancement method provided by an embodiment of the present application.
- FIG. 2 shows a flowchart of a sound enhancement method provided by another embodiment of the present application.
- FIG. 3 shows a functional module diagram of a sound effect enhancement device provided by an embodiment of the present application.
- FIG. 4 shows a structural block diagram of an electronic device according to an embodiment of the present application.
- FIG. 5 is a storage unit for storing or carrying a program code for implementing a sound effect enhancement method according to an embodiment of the present application.
- the electronic device can add a sound effect to the audio data that needs to be played, that is, after processing the audio data with a sound effect algorithm, then perform corresponding playback on the audio data to achieve sound effect enhancement.
- Electronic devices usually add a certain default sound effect, and the sound enhancement effect is not ideal.
- the reason why the audio effect enhancement effect is not ideal is that the enhancement of the audio effect does not have a differentiation for the audio itself.
- Different audio may require different enhancement methods, for example, the game audio of some indoor scenes needs to express sound. The sense of space needs to be enhanced; some live music and audio, such as concert audio, need to enhance the sense of presence of audio.
- the embodiments of the present application provide a sound effect enhancement method, device, electronic device, and storage medium, and perform sound effect enhancement according to the type of sound described in the audio in the audio path.
- an embodiment of the present application provides a sound effect enhancement method.
- a target sound type of audio transmitted by a target audio path is obtained, and a corresponding target sound effect algorithm is used to perform audio enhancement on the audio.
- the method includes:
- Step S110 Determine a target audio path corresponding to the current audio output scene in the audio path of the electronic device.
- the audio playback corresponding to each application can be used as an audio output scenario; or the music playback corresponding to each type of application can be used as an audio output scenario.
- the audio output corresponding to the music application is used as the music output scene
- the audio output corresponding to the video application is used as the video sound output scene
- the audio output corresponding to the game application is used as the game scene
- the audio output corresponding to the alarm clock is used as the alarm scene
- the ringtone corresponding to the call is The audio output is used as the ringtone scene.
- the audio output when the electronic device is making a voice call can be used as the call sound scene and the playback scene of the audio transmitted by other devices through wireless or wired connection methods such as Wi-Fi connection, Bluetooth connection, and data cable connection. Wait.
- each audio output scene may correspond to a scene parameter, and the audio data corresponding to each audio includes scene parameters, and the audio corresponding to the audio may be determined by the scene parameters included in the audio audio data.
- Output scene may correspond to a scene parameter, and the audio data corresponding to each audio includes scene parameters, and the audio corresponding to the audio may be determined by the scene parameters included in the audio audio data.
- each audio output scene may correspond to an audio path, and the audio output scenes in different paths do not interfere with each other, that is, the audio transmitted in each audio path does not interfere with each other.
- different audio output channels are respectively provided.
- the AudioManager.java class is defined as STREAM_MUSIC (media sound), STREAM_SYSTEM (system sound), STREAM_ALARM (alarm sound), STREAM_VOICE_CALL (talking sound), STREAM_RING (ringing sound) and other streamTypes.
- Each streamType corresponds to an audio channel .
- each audio output scene may correspond to an audio channel separately.
- multiple audio output scenes may correspond to one audio channel.
- the audio path corresponding to the media sound such as the audio output scene corresponding to the music application and the audio output scene corresponding to the video application
- the audio output scene corresponding to the alarm clock corresponds to the audio path corresponding to the alarm sound
- the audio corresponding to the ringtone The output scene corresponds to the audio path corresponding to the alarm ringtone
- the audio output scene when the electronic device performs a voice call may correspond to the audio path corresponding to the call sound.
- the specific number of audio channels is not limited, and the correspondence between audio output scenes and audio channels is also not limited.
- each audio channel may also be set with a corresponding channel parameter.
- each stream type such as STREAM_MUSIC, STREAM_SYSTEM, STREAM_ALARM, STREAM_VOICE_CALL, and STREAM_RING corresponds to different parameter values. Therefore, the correspondence between the audio output scene and the audio channel can be determined through the correspondence between the channel parameters and the scene parameters.
- the scene parameters included in the audio data of the audio can be obtained as the target scene parameters; according to the correspondence between the path parameters and the scene parameters, the path parameters corresponding to the target scene parameters are determined as the target path parameters; The audio path corresponding to the path parameter is used as the target audio path.
- the current audio output scene may be determined according to the currently output audio. According to the currently output audio scene, an audio path corresponding to the audio output scene in each audio path of the electronic device is determined. Use the audio path corresponding to the current audio output scene as the target audio path.
- the target audio path corresponding to the current audio output scene may be determined in real time.
- a target audio path corresponding to the changed audio output scene may also be determined.
- Step S120 Determine a target sound type of the audio transmitted by the target audio path.
- sounds can be classified into different types according to the characteristics of the sounds.
- the division of specific sound types is not limited in the embodiments of the present application. For example, in a limited space such as indoors, spatial sound needs to be expressed as a space type; the recording of a concert scene is used as a concert type; a human voice is used as a human voice. Type, etc.
- the electronic device may determine, from the target audio path, a target sound type to which the transmitted audio belongs.
- a type parameter may be set corresponding to each type of sound, and various types of parameters may be stored in the electronic device.
- type parameters of the type to which it belongs can be stored.
- the audio data of the audio played by the electronic device includes a type parameter indicating its type. Therefore, when audio is transmitted in the target audio path, the type of the audio can be obtained according to the type parameter of the audio, and the type is used as the target sound type. That is, the electronic device stores type parameters corresponding to various sound types, and when determining the target sound type of the audio transmitted by the target audio path, the type parameter in the audio data of the audio can be obtained as the target type parameter Taking the sound type corresponding to the target type parameter as the target sound type
- Step S130 The audio transmitted by the target audio path is enhanced by a target sound effect algorithm corresponding to the target sound type.
- various types of sounds can be enhanced with sound effects according to their characteristics to obtain good playback effects.
- sound effects for some sounds that have spatial characteristics and need to be expressed in space, enhance the sense of space; for human voices, increase the sound of the sound by increasing or attenuating part of the frequency; for live sounds such as concerts, improve their live performance Wait.
- a corresponding sound effect algorithm may be correspondingly used to perform audio enhancement on the audio in the audio path.
- the algorithm corresponding to the specific enhancement effect may be set according to an existing algorithm, which is not described in detail in the embodiment of the present application.
- a sound effect algorithm for sound effect enhancement of various types of sounds may be set correspondingly.
- a sound effect algorithm corresponding to the audio is obtained according to the type of sound to which the audio belongs.
- the sound effect algorithm corresponding to the target sound type is used as the target sound effect algorithm.
- the audio data corresponding to the audio belonging to the target sound type can be processed by the target sound effect algorithm corresponding to the target sound type, thereby realizing audio sound enhancement.
- each sound type may correspond to one sound effect algorithm, or may correspond to multiple sound effect algorithms. If the target sound type corresponds to a sound effect algorithm, the audio data corresponding to the target sound type is processed by the one sound effect algorithm to enhance the sound effect; if there are multiple sound effect algorithms corresponding to the target sound type, the multiple sound effect algorithms are adopted. The audio data corresponding to the target sound type is processed for sound enhancement.
- the sound effect algorithms corresponding to different sound types may be different, that is, different sound effect algorithms are used for processing according to the characteristics of the sound.
- the specific correspondence between the sound type and the sound effect algorithm is not limited.
- a correspondence relationship between a sound type and a sound effect algorithm may be preset.
- the correspondence relationship is set and stored through a correspondence relationship table. Therefore, when obtaining the target sound type, the target sound effect algorithm corresponding to the target sound type may be obtained according to the preset correspondence between the sound type and the sound effect algorithm. Then, the target audio effect algorithm is used to enhance the audio transmitted by the target audio path.
- the same type of sound can be processed with different processing sound effects to meet actual needs.
- the voice of a person also needs to be clearer in a voice call; in a video application, it needs to be more pleasing.
- the audio path corresponding to the call sound the audio is processed by a sound effect algorithm that improves the sound clarity; in the audio path corresponding to the media sound, the audio is processed by a sound effect score that improves the soundness of the sound. Therefore, optionally, in this embodiment, the sound effect algorithms corresponding to the same sound type may be different, that is, the correspondence relationship between the sound type and the sound effect algorithm may be different in different audio channels.
- the target sound effect algorithm corresponding to the target sound type can be obtained according to the type parameter of the target sound type and the conversion function.
- the conversion functions corresponding to the same sound type may be different.
- the conversion function between the type parameter and the algorithm parameter can be different in different audio channels.
- the audio output by the current audio output scene may include one type of audio, and may also include multiple types of audio.
- the audio transmitted by the target audio path may include multiple sound types. If audio of multiple sound types is transmitted in the target audio path, the multiple sound types are all taken as the target sound type, that is, the target sound type includes multiple sound types. For example, when a game sound is played, including both human voices and footsteps in indoor spaces, the corresponding audio channels simultaneously transmit spatial type sounds and vocal type sounds. The human voice type is used as the target voice type.
- the corresponding sound effect algorithm is obtained for each of the multiple sound types, and the audio of the corresponding sound type is processed by the sound effect algorithm.
- the transmitted audio includes audio a of sound type A and audio b of sound type B.
- a sound effect algorithm A1 corresponding to sound type A and a sound effect score B1 corresponding to sound type B are obtained.
- the audio a is processed by the sound effect algorithm A1
- the audio B is processed by the sound type B1.
- the transmitted audio in the target audio path, may be changed at different times, and the types of audio may also be different. For example, for sounds in a game scene, different sounds may be produced when the game progresses to different stages, and different sounds may belong to different sound types. Therefore, during the process of transmitting audio in the target audio path for the same audio output scene, the electronic equipment can determine the corresponding sound type for the audio transmitted in the target audio path in real time as the target sound type. When the target sound type changes, a target sound effect algorithm corresponding to the latest target sound type may be determined, and audio corresponding to the target sound type may be processed.
- a current audio output scene may be determined as a corresponding audio path as a target audio path.
- the sound type of the audio transmitted in the target audio path may be determined as the target sound type.
- each sound type corresponds to a sound algorithm for performing audio effect enhancement processing on the audio. Therefore, a target sound effect algorithm corresponding to the target sound type can be obtained according to the target sound type, and the corresponding Audio enhancement processing. Therefore, when the processed audio is played, an audiovisual effect with enhanced sound effects is obtained. Therefore, in the embodiments of the present application, the audio of different sound types may have different sound effects enhancements to improve user experience.
- the target sound type may be a spatial type
- the target sound effect algorithm may be a sound effect algorithm that enhances a spatial sense of audio corresponding to the spatial type. That is, in the embodiment of the present application, it may further include performing a spatial effect-enhancing sound effect processing on audio whose type parameter corresponds to a spatial type. Specifically, see FIG. 2.
- the method includes:
- Step S210 Determine a target audio path corresponding to the current audio output scene in the audio path of the electronic device.
- the audio path corresponding to the current audio output scene is determined.
- the current audio output scene is a game scene. Since the sound of the game is a media sound, the audio path corresponding to the media sound of the electronic device may be used as the target audio path.
- each audio channel can be individually set to enhance the sound effect algorithm.
- an audio path created only for transmitting audio in the game scene is used as the target audio path. That is, you can create separate audio channels for game scenes for sound enhancement processing.
- Step S220 Determine a target sound type of the audio transmitted by the target audio path.
- Step S230 If the target sound type is a sound type with a spatial type parameter, use the phase information to enhance the spatial sense of the audio transmitted by the target audio path.
- the audio effect processing for enhancing the spatial sense of the audio may be determined according to the type parameter. Specifically, by using a target sound effect algorithm corresponding to the target sound type to enhance the audio transmitted by the target audio path, the spatial sense that the audio can express through the phase information may be enhanced.
- the sound reaches the human ear from different positions, giving a sense of space.
- part of the sound produced by a sound source reaches the human ear, and part of the sound reaches the human ear after being reflected by obstacles in the space.
- the direction and time of the sound are different, enabling the listener to hear The sense of space in the sound.
- the inventor found that for sounds reaching the human ear in different directions, the brain analyzes the direction and time delay of the received sound according to the phase of the received sound. Because sound propagates in the form of waves and causes the eardrum to vibrate, the sound reaches a certain phase when it is received by the human ear. The brain analyzes the sound that reaches the eardrum, and uses its phase to obtain information such as the direction and time of sound arrival. Therefore, for sounds with a phase difference reaching the human ear, the listener's brain analysis will give the listener a sense of spatiality of the sound and increase the sense of space.
- a phase difference may be set for the audio to achieve a spatially enhanced sound effect. Since it is necessary to have a phase difference, it should at least include an alignment between two different phases.
- the audio transmitted in the target audio may be copied to obtain an audio copy consistent with the original audio content.
- the audio copy is processed to have a phase difference from the original audio. Specifically, since sound propagates in the air in the form of waves, waves with the same period and amplitude have different phases at different times. Therefore, the audio copy can be delayed relative to the original audio for a preset time to achieve a phase difference between the audio copy and the original audio. This delay allows the original audio to correspond to the original audio when the processed audio is played and the sound reaches the eardrum. The phase of is different from that of the audio copy, enhancing the sense of space.
- the specific time length of the preset time length is not limited, and can be obtained according to information such as an angle and a distance between sounds to be listened to by a sound effect enhancement effect to be obtained.
- a specific calculation method reference may be made to an existing method, which is not repeatedly described in the embodiments of the present application.
- the preset duration may not be equal to the period corresponding to the audio or a multiple of the period.
- the preset duration is not equal to a half period of the sound wave corresponding to the audio or an integer multiple of the period plus a half period.
- the two sounds are considered to be the same sound in hearing.
- the directivity of the direct sound is retained, and it is regarded as the sole direction of the sound source.
- the phase difference between these two sounds it will also enhance the sense of space. Therefore, if you want the listener to treat the sound as the same sound but feel the spatial sense in the audio, you can set the preset time to less than 35ms.
- the number of audio copies that can be copied in the target audio path is not limited, and may be two or more, and different audio copies are different from the original audio. You can set a certain delay between them to achieve different phase differences, that is, different audio copies have different preset durations relative to the original audio delay, achieving multiple spatial feelings.
- phase information since phase information is carried in the audio data of some audio, phase information may not be carried in the audio data of some audio. Therefore, before the phase information is used to enhance the spatial sense of the audio transmitted by the target audio path, it may be determined whether the audio transmitted by the target audio path includes phase information.
- phase information is added to the audio data of the audio. Then the added phase information is processed to achieve the enhancement of the sound effect.
- the audio processed by the sound effect enhancement algorithm is played through an audio playback device such as a headset or a speaker.
- the left channel signal and the right channel signal may be respectively used to enter the user ’s left ear and the user ’s right ear.
- the left headset plays the left channel signal
- the headset plays the right channel signal to achieve a stronger stereo effect. Therefore, the original audio and the audio copy can be used as the left channel signal and the right channel signal, respectively, and played through the left and right channels to simulate different spaces. The sound of the position reaches the user, achieving better spatial enhancement.
- the phase information of the audio in the target audio path can be processed to enhance the audio's performance of spatial perception.
- a sound effect enhancement device 300 is also provided, which is applied to electronic equipment.
- the apparatus 300 includes: a path determining module 310, configured to determine a target audio path corresponding to a current audio output scene in the audio path of the electronic device.
- a type determining module 320 is configured to determine a target sound type of audio transmitted by the target audio path.
- the sound effect enhancement module 330 is configured to enhance audio transmitted by the target audio path through a target sound effect algorithm corresponding to the target sound type.
- various audio output scenarios may have corresponding audio output channels.
- the current audio output scenario is a game scenario
- the audio channel corresponding to the media sound of the electronic device is used as the target. Audio path.
- an audio channel may also be created specifically for some scenes.
- the current audio output scene is a game scene
- an audio path created only for transmitting audio in the game scene is used as the target audio path.
- the sound effect enhancement module may further include an algorithm determination unit for determining a sound effect algorithm corresponding to the target sound type.
- the algorithm determining unit is configured to obtain a target sound effect algorithm corresponding to the target sound type according to a preset correspondence between a sound type and a sound effect algorithm.
- the sound effect enhancement module 330 may further include a sound effect enhancement unit for enhancing audio transmitted by the target audio path by using the target sound effect algorithm.
- the sound effect enhancement module 330 may be used to enhance the spatial sense of the audio transmitted by the target audio path through the phase information if the target sound type is a sound type with a spatial type parameter.
- the sound effect enhancement module 330 may include: an audio copying unit, configured to use the audio transmitted by the target audio path as the original audio, and copy the original audio to obtain an audio copy.
- An enhancement unit is configured to delay the audio copy with respect to the original audio for a preset time period so that there is a phase difference between the audio copy and the original audio.
- the apparatus may include a determining module, configured to determine whether phase information is included in the audio transmitted by the target audio path. If included, the sound effect enhancement module 330 may enhance the spatial sense of the audio transmitted by the target audio path through the phase information. If phase information is not included in the audio, the apparatus provided in the embodiment of the present application may further include a phase adding module configured to add virtual phase information to the audio. After the phase adding module adds virtual phase information to the audio, the sound effect enhancing module is used to enhance the spatial sense of the audio transmitted by the target audio path through the phase information.
- the cooperative playback of the left channel signal and the right channel signal produces a better spatial stereo effect. Therefore, in the embodiment of the present application, the original audio can be used as the left channel signal and the audio copy can be used as the right channel. signal.
- the embodiment of the present application may further include a playback module for playing the original audio and the audio copy through the left channel and the right channel, respectively.
- the coupling between the modules may be electrical, mechanical, or other forms of coupling.
- each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist separately physically, or two or more modules may be integrated into one module.
- the above integrated modules may be implemented in the form of hardware or software functional modules.
- FIG. 4 is a structural block diagram of an electronic device 400 according to an embodiment of the present application.
- the electronic device 400 may be an electronic device capable of running an application program, such as a smart phone, a tablet computer, or a music player.
- the electronic device has one or more processors 410 (only one is shown in the figure), a memory 420 and one or more programs.
- the one or more programs are stored in the memory 420 and configured to be executed by the one or more processors 410.
- the one or more programs are configured to perform the method described in the foregoing embodiment.
- the processor 410 may include one or more processing cores.
- the processor 410 uses various interfaces and lines to connect various parts of the entire electronic device 400, and executes or executes instructions, programs, code sets, or instruction sets stored in the memory 420, and calls data stored in the memory 420 to execute Various functions and processing data of the electronic device 400.
- the processor 410 may use at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). To implement a hardware form.
- the processor 410 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem.
- CPU Central Processing Unit
- GPU Graphics Processing Unit
- modem modem
- the CPU mainly handles the operating system, user interface, and application programs; the GPU is responsible for rendering and rendering of the displayed content; the modem is used for wireless communication. It can be understood that the modem may not be integrated into the processor 410, and may be implemented by a single communication chip.
- the memory 420 may include Random Access Memory (RAM), and may also include Read-Only Memory.
- the memory 420 may be used to store instructions, programs, codes, code sets, or instruction sets.
- the memory 420 may include a storage program area and a storage data area, where the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the foregoing method embodiments, and the like.
- the storage data area can also contain data (such as phonebook, audio and video data, chat history data) created by the electronic device during use.
- FIG. 5 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
- the computer-readable storage medium 500 stores program code, and the program code can be called by a processor to execute the method described in the foregoing method embodiment.
- the computer-readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM.
- the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium.
- the computer-readable storage medium 500 has a storage space of a program code 510 for performing any of the method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
- the program code 510 may be compressed, for example, in a suitable form.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Stereophonic System (AREA)
Abstract
本申请实施例公开了一种音效增强方法、装置、电子设备及存储介质,涉及电子设备领域。其中,该方法包括:确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路;确定所述目标音频通路所传输的音频的目标声音类型;通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。该方案可以实现不同声音类型的音频以不同的目标音效算法进行增强,提高音效增强效果,从而提高用户体验。
Description
本申请要求于2018年9月04日提交的申请号为201811028127.9的中国专利申请的优先权,在此通过引用将其全部内容并入本文。
本申请涉及电子设备技术领域,更具体地,涉及一种音效增强方法、装置、电子设备及存储介质。
随着技术的发展,手机、电脑等智能电子设备的使用越来越普遍,功能也越来越完善。其中,音频播放即为电子设备的基础功能之一。电子设备播放的音频数据是根据真实声音进行采样存储的电子数据,为了使音频数据在播放时更具有真实感,可以给播放的音频添加音效。但是通常音效的设置固定单一,影响用户体验。
发明内容
鉴于上述问题,本申请提出了一种音效增强方法、装置、电子设备及存储介质,以解决上述问题。
第一方面,本申请实施例提供了一种音效增强方法,应用于电子设备,所述方法包括:确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路;确定所述目标音频通路所传输的音频的目标声音类型;通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。
第二方面,本申请实施例提供了一种音效增强装置,应用于电子设备,所述装置包括:通路确定模块,用于确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路;类型确定模块,用于确定所述目标音频通路所传输的音频的目标声音类型;音效增强模块,用于通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个程序,其中所述一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的方法。
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请一实施例提供的音效增强方法的流程图。
图2示出了本申请另一实施例提供的音效增强方法的流程图。
图3示出了本申请实施例提供的音效增强装置的功能模块图。
图4示出了本申请实施例提供的电子设备的结构框图。
图5是本申请实施例的用于保存或者携带实现根据本申请实施例的音效增强方法的程序代码的存储单元。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
电子设备可以对需要播放的音频数据添加音效,即以音效算法对音频数据进行处理之后,再对音频数据进行对应的播放,实现音效增强。通常电子设备添加的都为某种默认的音效,音效增强效果不够理想。
发明人经过研究发现,音频的音效增强效果不够理想的原因在于,音效的增强不具有针对音频本身的差异化,不同的音频可能需要不同的增强方式,例如某些室内场景的游戏音频需要表现声音的空间感,需要进行增强空间感;有些现场型的音乐音频,如演唱会的音频,需要增强音频的现场感等。
因此,本申请实施例提供了一种音效增强方法、装置、电子设备及存储介 质,根据音频通路中音频所述的声音类型,进行音效增强。
下面将通过具体实施例对本申请实施例提供的音效增强方法、装置、电子设备及存储介质进行详细说明。
请参阅图1,本申请实施例提供了一种音效增强方法,该方法中,目标音频通路所传输的音频的目标声音类型,获取相应的目标音效算法对音频进行音效增强。具体的,该方法包括:
步骤S110:确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路。
在电子设备中,可以有多种音频输出场景。其中,每种应用程序所对应的音频播放,可以作为一种音频输出场景;或者每一类应用程序所对应的音乐播放,可以作为一种音频输出场景。例如,音乐应用程序对应的音频输出作为音乐输出场景,视频应用程序对应的音频输出作为视频音输出场景,游戏应用程序对应的音频输出作为游戏场景,闹钟对应的音频输出作为闹钟场景,来电铃声对应的音频输出作为铃声场景,在电子设备进行语音通话时输出音频可以作为通话音场景以及其他设备通过Wi-Fi连接、蓝牙连接、数据线连接等无线或者有线的连接方式所传输的音频的播放场景等。
在电子设备进行音频播放时,可以获知播放的音频所对应的音频输出场景。例如,在电子设备中,每种音频输出场景可以对应一个场景参数,每种音频对应的音频数据中包括场景参数,则可以通过音频的音频数据中所包括的场景参数,确定该音频对应的音频输出场景。
在电子设备中,各音频输出场景可以对应有音频通路,不同通路下的音频输出场景之间互不干扰,即在各音频通路传输的音频之间互不干扰。例如,在安卓(Android)系统中,分别设置有不同的音频输出通路。如安卓系统中,包括媒体音、系统音、闹钟声、通话声、闹铃声等。AudioManager.java类中分别被定义为STREAM_MUSIC(媒体音),STREAM_SYSTEM(系统音),STREAM_ALARM(闹钟声),STREAM_VOICE_CALL(通话声),STREAM_RING(响铃声音)等streamType,每种streamType分别对应有音频通路。
为了不同的音频输出场景所输出的音频之间互不干扰,可以每个音频输出场景单独对应一个音频通路。
另外,也可以多个音频输出场景对应一个音频通路等。例如,如音乐应用 程序对应的音频输出场景、视频应用程序对应的音频输出场景等对应媒体音所对应的音频通路;闹钟对应的音频输出场景对应闹钟声所对应的音频通路;来电铃声对应的音频输出场景对应闹铃声所对应的音频通路;在电子设备进行语音通话时的音频输出场景可以对应通话声所对应的音频通路。在本申请实施例中,音频通路的具体数量并不限定,音频输出场景与音频通路之间的对应关系也并不限定。
具体的,每个音频通路也可以设置有相应的通路参数。如上述的安卓系统中,STREAM_MUSIC,STREAM_SYSTEM,STREAM_ALARM,STREAM_VOICE_CALL,STREAM_RING等每种streamType分别对应有不同的参数值。从而可以通过通路参数与场景参数的对应关系,确定音频输出场景与音频通路之间的对应关系。例如,可以获取音频的音频数据中所包括的场景参数,作为目标场景参数;根据通路参数与场景参数的对应关系,确定所述目标场景参数对应的通路参数,作为目标通路参数;以所述目标通路参数对应的音频通路,作为目标音频通路。
因此,在本申请实施例中,可以根据当前输出的音频确定当前的音频输出场景。再根据当前输出的音频场景,确定该音频输出场景在电子设备的各音频通路中所对应的音频通路。以当前音频输出场景所对应的音频通路作为目标音频通路。
作为一种实施方式,在本申请实施例中,可以实时确定当前的音频输出场景所对应的目标音频通路。
作为一种实施方式,在本申请实施例中,也可以在音频输出场景发生变化时,确定变化后的音频输出场景对应的目标音频通路。
步骤S120:确定所述目标音频通路所传输的音频的目标声音类型。
在本申请实施例中,可以根据声音的特性将声音分为不同的类型。具体声音类型的划分在本申请实施例中并不限定,如在室内等有限空间范围内、需要表现空间性的声音作为空间类型;演唱会现场的录音作为演唱会类型;人的声音作为人声类型等。电子设备可以从目标音频通路中确定所传输的音频所属的目标声音类型。
具体的,可以为每种类型的声音对应设置类型参数,并且将各种类型参数存储于电子设备中。在音频的音频数据中,可以存储其所属类型的类型参数。 则在该电子设备播放的音频的音频数据中,包括有表示其类型的类型参数。从而当目标音频通路中传输有音频时,可以根据该音频的类型参数获知该音频的类型,以该类型作为目标声音类型。也就是说,电子设备中存储各种声音类型对应的类型参数,确定所述目标音频通路所传输的音频的目标声音类型时,可以获取所述音频的音频数据中的类型参数,作为目标类型参数;以该目标类型参数对应的声音类型,作为所述目标声音类型
步骤S130:通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。
在本申请实施例中,各种类型的声音,可以根据其特性进行音效增强,以获得良好的播放效果。如对于某些具有空间特性、需要进行空间表现的声音,进行空间感的增强;对于人声,通过部分频率的提升或者衰减提高声音悦耳度;对于演唱会等现场型声音,提高其现场表现力等。具体的,在相应的音频通路中,可以对应有相应的音效算法用于对该音频通路中的音频进行音效增强。其中,具体增强效果所对应的算法可以根据现有算法设置,在本申请实施例中并不赘述。
具体的,在每个音频通路中,可以对应设置对各种类型的声音进行音效增强的音效算法。在音频通路中传输音频时,根据该音频所属的声音类型,获取该音频对应的音效算法。
其中,以目标声音类型所对应的音效算法,作为目标音效算法。在目标音频通路中传输目标声音类型的音频时,可以通过与该目标声音类型对应的目标音效算法,对属于该目标声音类型的音频所对应的音频数据进行处理,从而实现音频的音效增强。
其中,每种声音类型可以对应有一种音效算法,也可以对应有多种音效算法。若目标声音类型对应一种音效算法,则通过该一种音效算法对目标声音类型对应的音频数据进行处理实现音效增强;若目标声音类型对应的音效算法有多种,则通过该多种音效算法对目标声音类型对应的音频数据进行处理实现音效增强。
作为一种实施方式,不同的声音类型对应的音效算法可以不同,即根据声音的特性,以不同的音效算法进行处理。
作为一种实施方式,若有两个或者两个以上的声音类型具有某些共同的特性,如都需要进行空间感的增强,则也可以有两个或者两个以上的声音类型对 应相同的音效算法。
在本申请实施例中,声音类型与音效算法的具体对应方式并不限定。作为一种实施方式,可以是,可以预设有声音类型与音效算法的对应关系,如该对应关系通过对应关系表进行设置并存储。从而,在获得目标声音类型时,可以根据预设的声音类型与音效算法的对应关系,获取所述目标声音类型对应的目标音效算法。再以所述目标音效算法对目标音频通路传输的音频进行增强。
不同音频通路中,对相同类型的声音可以以不同的处理音效进行处理,以符合实际需求。例如,同样是人的声音,在语音通话中,需要声音更清晰;而在视频应用程序中,需要声音更悦耳。则在通话声所对应音频通路中,通过提高声音清晰度的音效算法对音频进行处理;在媒体音对应的音频通路中,通过提高声音的悦耳度的音效算分对音频进行处理。因此,可选的,在该实施方式中,相同的声音类型对应的音效算法可以有不同,也就是说,不同音频通路中,声音类型与音效算法的对应关系可以有不同。
作为另一种实施方式,也可以是,每种声音类型对应设置并存储类型参数,每种音效算法对应设置并存储有算法参数,并且,预先设置并存储有类型参数与算法参数之间的转换函数。类型参数通过转换函数进行计算,可以获得该类型参数对应的算法参数,从而根据音效算法与算法参数的对应,获得该类型参数对应的声音类型所对应的音效算法。因此,在获得目标音频通路中音频所对应的目标声音类型,可以根据该目标声音类型的类型参数以及转换函数,获得该目标声音类型所对应的目标音效算法。
可选的,在该实施方式中,不同音频通路中,相同的声音类型对应的转换函数可以有不同。也就是说,不同音频通路中,类型参数与算法参数之间的转换函数可以有不同。
另外,在本申请实施例中,当前音频输出场景所输出的音频,可能包括一种类型的音频,也可以包括多种类型的音频。
若当前音频输出场景输出的音频,包括多种类型的音频,则在目标音频通路传输的音频中,可以包括多种声音类型。若目标音频通路中传输多种声音类型的音频,则将该多个声音类型均作为目标声音类型,即目标声音类型包括多个声音类型。例如,在某游戏声音播放时,同时包括人的声音以及在室内空间中的脚步声等,则在相应的音频通路中,同时传输有空间类型的声音以及人声类型的声音,将空间类型以及人声类型作为目标声音类型。
当目标声音类型包括多个声音类型,对该多个声音类型分别获取其对应的音效算法,并且,通过音效算法对相应声音类型的音频进行处理。例如,目标音频通路中,传输的音频包括声音类型为A的音频a以及声音类型为B的音频b,则获取声音类型A对应的音效算法A1,以及声音类型B对应的音效算分B1。并且,通过音效算法A1对音频a进行处理,通过声音类型B1对音频B进行处理。
在本申请实施例中,在目标音频通路中,时间不同,所传输的音频可能产生变化,音频所属的类型也可能不同。例如,对于某游戏场景中的声音,游戏进行到不同阶段,可能产生不同的声音,不同的声音可能属于不同的声音类型。因此,对于相同音频输出场景在目标音频通路中传输音频的过程中,电子装备可以实时对目标音频通路中所传输的音频确定对应的声音类型,作为目标声音类型。在目标声音类型发生变化的情况下,可以确定最新的目标声音类型所对应的目标音效算法,对该目标声音类型对应的音频进行处理。
在本申请实施例中,可以对当前的音频输出场景,确定其对应的音频通路,作为目标音频通路。在当前音频输出场景对应的音频在目标音频通路传输时,可以确定该目标音频通路中传输的音频的声音类型作为目标声音类型。并且,在本申请实施例中,各声音类型对应有用于对音频进行音效增强处理的声音算法,因此,可以根据目标声音类型获得该目标声音类型对应的目标音效算法,再通过目标音效算法对相应的音频进行音效增强处理。从而,在对处理后的音频进行播放时,获得音效增强的视听效果。因此,在本申请实施例中,不同声音类型的音频,可以有不同的音效增强,提高用户体验。
本申请实施例中,目标声音类型可以是空间类型,目标音效算法可以是对空间类型对应的音频进行空间感增强的音效算法。也就是说,本申请实施例中,还可以包括对类型参数对应为空间类型的音频进行空间感增强的音效处理。具体的,请参见图2,该方法包括:
步骤S210:确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路。
在音频输出时,确定当前的音频输出场景所对应的音频通路。
可选的,当前的音频输出场景为游戏场景,由于游戏的声音是一种媒体音,因此,可以以所述电子设备的媒体音对应的音频通路作为所述目标音频通路。
可选的,由于不同的音频通路之间互不影响,并且,每个音频通路可以单 独设置音效算法进行增强。为了获得更好的游戏效果,若当前的音频输出场景为游戏场景,以创建的只用于传输游戏场景下的音频的音频通路作为所述目标音频通路。也就是说,可以为游戏场景创建单独的音频通路进行音效增强处理。
步骤S220:确定所述目标音频通路所传输的音频的目标声音类型。
步骤S230:若所述目标声音类型为带有空间类型参数的声音类型,通过相位信息增强所述目标音频通路传输的音频的空间感。
对于某些需要增强空间感的音频,可以对其添加空间类型对应的类型参数。因此,当目标音效通路中传输该具有空间类型对应类型参数的音频时,可以根据该类型参数确定对该音频进行空间感增强的音效处理。具体的,通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强,则可以是,通过相位信息对其该音频可以表现的空间感进行增强。
具体的,在实际环境中,声音由不同位置到达人耳,会给人空间感。例如,在较小的空间范围内,一个声源产生的声音,部分声音到达人耳,部分声音经空间内的障碍物反射后到达人耳,到达声音的方向和时间不同,使听者能听出声音中的空间感。
发明人经过研究发现,不同方向到达人耳的声音,大脑会根据接收到的声音的相位分析接收到的声音的方向以及时间延迟。由于声音是以波的形式进行传播并引起鼓膜振动,因此声音到达人耳被人耳接收到时对应一定的相位。大脑对到达鼓膜的声音进行分析,通过其相位获取声音到达的方向以及时间等信息。因此,对于具有相位差到达人耳的声音,经过听者大脑分析,会给听者以声音具有空间性的感觉,增加空间感。
因此,在本申请实施例中,可以为音频设置相位差,以实现空间感增强的音效。由于需要具有相位差,则至少应该具有包括两个不同相位之间的比对。而目标通路中的音频可能只具有相位信息,因此,对目标通路中的音频增强空间感的方法可以是:以所述目标音频通路传输的音频为原音频,复制所述原音频获得音频副本。将所述音频副本相对于所述原音频延时预设时长,使所述音频副本与所述原音频之间具有相位差。
为了使音频播放出的声音内容一致,在本申请实施例中,可以对目标音频中传输的音频进行复制,以获得和原音频内容一致的音频副本。
为了播获得具有相位差的音频,对该音频副本进行处理,使其与原音频之间具有相位差。具体的,由于声音以波的形式在空气中传播,对于周期以及振 幅相同的波,在不同的时间,相位不同。因此,可以将音频副本相对于所述原音频延时预设时长实现音频副本与原音频之间的相位差,该延时使处理后的音频播放时,产生的声音到达鼓膜时,原音频对应的相位与音频副本对应的相位不同,增强空间感。
在本申请实施例中,预设时长的具体时间长度并不限定,可以根据想要获得的音效增强效果,如使听音者听到的声音之间的角度以及距离等信息计算获得。具体计算方法可以参照现有方式,在本申请实施例中不再赘述。
由于声波具有周期性,在本申请实施例中,为了具有一定的相位差,预设时长可以不等于音频对应的周期或者周期的倍数。另外,为了避免相位差的完全相反导致声音抵消,预设时长也不等于音频对应的声波的二分之一周期或者周期的整数倍加二分之一周期。
可选的,由于到达听音者的时间差小于35ms,且声压差保持在10dB以内,两个声音在听觉上会被视为是同一个声音。此时,直达声的方向性会保留下来,被视为声源的唯一方向。但由于这两个声音相位差的存在,无形中也会额外增强空间感。因此,若想让听者将声音视为同一个声音却可以感受到音频中的空间感,可以将预设时长设置为小于35ms的时间。另外,也可以将原音频以及音频副本设置为声压差在10dB以内。若想让听音者将声音视为不同的声音导致的空间感,如同一个声音在房间中反射多次形成的声音,也可以将预设时间设置为大于35ms,或者将声压差设置在10dB以外。
可选的,在本申请实施例中,在进行音效增强时,目标音频通路中可以复制的音频副本数量并不限定,也可以是两个或者两个以上,并且,不同音频副本与原音频之间都可以设置一定的延时实现相位差的不同,即不同的音频副本相对原音频延时的预设时长不同,实现多重的空间感。
可选的,由于有些音频的音频数据中携带有相位信息,而有些音频的音频数据中可能未携带有相位信息。因此,在通过相位信息增强所述目标音频通路传输的音频的空间感之前,可以先判断所述目标音频通路传输的音频中是否包括相位信息。
而对于未携带有相位信息的音频,可以为该音频添加虚拟的相位信息,也就是说,在该音频的音频数据中加入相位信息。再通过加入的相位信息进行处理实现音效的增强。
在本申请实施例中,将通过音效增强算法处理的音频通过耳机、扬声器等 响应的音频播放设备进行播放。
可选的,由于音频播放时,可能分别对应有左声道信号以及右声道信号,分别用于进入用户左耳以及用户右耳,如通过耳机播放时,左耳机播放左声道信号,右耳机播放右声道信号,实现更强的立体声效果,因此,可以将原音频以及所述音频副本分别作为左声道信号以及右声道信号,通过左声道以及右声道播放,模拟不同空间位置的声音到达用户,实现更好的空间增强效果。
在本申请实施例中,对于声音类型为需要空间感增强的音频,可以通过对目标音频通路中音频的相位信息进行处理,增强音频对空间感的表现。
在本申请实施例中,还提供了一种音效增强装置300,应用于电子设备。具体的,请参见图3,所述装置300包括:通路确定模块310,用于确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路。类型确定模块320,用于确定所述目标音频通路所传输的音频的目标声音类型。音效增强模块330,用于通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。
可选的,在本申请实施例中,各种音频输出场景可以有对应的音频输出通路,如若当前的音频输出场景为游戏场景,以所述电子设备的媒体音对应的音频通路作为所述目标音频通路。
可选的,为了某些场景下音频播放不受其他场景的音频的影响,也可以为有些场景专门创建音频通路。例如,若当前的音频输出场景为游戏场景,以创建的只用于传输游戏场景下的音频的音频通路作为所述目标音频通路。
可选的,在本申请实施例中,在类型确定模块320确定目标声音类型后,音效增强模块还可以包括用于确定该目标声音类型所对应的音效算法的算法确定单元。具体的,该算法确定单元用于根据预设的声音类型与音效算法的对应关系,获取所述目标声音类型对应的目标音效算法。该音效增强模块330还可以包括音效增强单元,用于以所述目标音效算法对目标音频通路传输的音频进行增强。
可选的,在本申请实施例中,音效增强模块330可以用于若所述目标声音类型为带有空间类型参数的声音类型,通过相位信息增强所述目标音频通路传输的音频的空间感。
可选的,音效增强模块330可以包括:音频复制单元,用于以所述目标音频通路传输的音频为原音频,复制所述原音频获得音频副本。增强单元,用于 将所述音频副本相对于所述原音频延时预设时长,使所述音频副本与所述原音频之间具有相位差。
可选的,可能存在某些音频数据中存在相位信息,而另外一些音频数据中可能没有相位数据。因此,在本申请实施例中,该装置可以包括判断模块,用于判断所述目标音频通路传输的音频中是否包括相位信息。若包括,音效增强模块330可以通过相位信息增强所述目标音频通路传输的音频的空间感。若不音频中不包括相位信息,本申请实施例所提供的装置还可以包括:相位添加模块,用于为所述音频添加虚拟的相位信息。在相位添加模块为所述音频添加虚拟的相位信息后,音效增强模块用于通过相位信息增强所述目标音频通路传输的音频的空间感。
可选的,由于左声道信号以及右声道信号的配合播放产生更好的空间立体效果,因此,在本申请实施例中,可以将原音频作为左声道信号,音频副本作为右声道信号。本申请实施例还可以包括播放模块,用于将所述原音频以及所述音频副本分别通过左声道以及右声道播放。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
请参考图4,其示出了本申请实施例提供的一种电子设备400的结构框图。该电子设备400可以是智能手机、平板电脑、音乐播放设备等能够运行应用程序的电子设备。该电子设备一个或多个处理器410(图中仅示出一个),存储器420以及一个或多个程序。其中,所述一个或多个程序被存储在所述存储器420中,并被配置为由所述一个或多个处理器410执行。所述一个或多个程序配置用于执行前述实施例所描述的方法。
处理器410可以包括一个或者多个处理核。处理器410利用各种接口 和线路连接整个电子设备400内的各个部分,通过运行或执行存储在存储器420内的指令、程序、代码集或指令集,以及调用存储在存储器420内的数据,执行电子设备400的各种功能和处理数据。可选地,处理器410可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器410可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器410中,单独通过一块通信芯片进行实现。
存储器420可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器420可用于存储指令、程序、代码、代码集或指令集。存储器420可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令、用于实现上述各个方法实施例的指令等。存储数据区还可以电子设备在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。
请参考图5,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读存储介质500中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。
计算机可读存储介质500可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质500包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质500具有执行上述方法中的任何方法步骤的程序代码510的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码510可以例如以适当形式进行压缩。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员 当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。
Claims (20)
- 一种音效增强方法,其特征在于,应用于电子设备,所述方法包括:确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路;确定所述目标音频通路所传输的音频的目标声音类型;通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。
- 根据权利要求1所述的方法,其特征在于,所述通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强,包括:若所述目标声音类型为带有空间类型参数的声音类型,通过相位信息增强所述目标音频通路传输的音频的空间感。
- 根据权利要求2所述的方法,其特征在于,所述通过相位信息增强所述目标音频通路传输的声音的空间感,包括:以所述目标音频通路传输的音频为原音频,复制所述原音频获得音频副本;将所述音频副本相对于所述原音频延时预设时长,使所述音频副本与所述原音频之间具有相位差。
- 根据权利要求3所述的方法,其特征在于,所述将所述音频副本相对于所述原音频延时预设时长,使所述音频副本与所述原音频之间具有相位差之后,还包括:将所述原音频以及所述音频副本分别通过左声道以及右声道播放。
- 根据权利要求3或4所述的方法,其特征在于,所述复制所述原音频获得音频副本包括:复制所述原音频获得多个音频副本;所述将所述音频副本相对于所述原音频延时预设时长,使所述音频副本与所述原音频之间具有相位差包括:将不同的音频副本相对原音频延时不同的预设时长,使不同的音频副本所述原音频之间具有不同的相位差。
- 根据权利要求4或5所述的方法,其特征在于,所述预设时长不等于所述原音频的声波对应的周期、周期的倍数、二分之一周期以及周期的整数倍加二分之一周期。
- 根据权利要求3-6任一项所述的方法,其特征在于,所述预设时长小于 35毫秒。
- 根据权利要求2-7任一项所述的方法,其特征在于,所述通过相位信息增强所述目标音频通路传输的音频的空间感之前,还包括:判断所述目标音频通路传输的音频中是否包括相位信息,若是,执行所述通过相位信息增强所述目标音频通路传输的音频的空间感的步骤;若所述目标音频通路传输的音频不包括相位信息,为所述音频添加虚拟的相位信息后,执行所述通过相位信息增强所述目标音频通路传输的音频的空间感的步骤。
- 根据权利要求1-8任一项所述的方法,其特征在于,所述通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强,包括:根据预设的声音类型与音效算法的对应关系,获取所述目标声音类型对应的目标音效算法;以所述目标音效算法对目标音频通路传输的音频进行增强。
- 根据权利要求9所述的方法,其特征在于,所述电子设备中存储有每种声音类型对应的类型参数,每种音效算法对应的算法参数,以及类型参数与算法参数之间的转换函数,所述根据预设的声音类型与音效算法的对应关系,获取所述目标声音类型对应的目标音效算法包括:根据转换函数以及目标声音类型的类型参数,计算所述目标声音类型对应的算法参数;确定计算获得的算法参数对应的音效算法,作为所述目标音效算法。
- 根据权利要求1-10任一项所述的方法,其特征在于,每个音频通路设置有相应的通路参数,每种音频输出场景对应一个场景参数,每个音频对应的音频数据中包括场景参数,所述确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路,包括:获取音频的音频数据中所包括的场景参数,作为目标场景参数;根据通路参数与场景参数的对应关系,确定所述目标场景参数对应的通路参数,作为目标通路参数;以所述目标通路参数对应的音频通路,作为目标音频通路。
- 根据权利要求1-11任一项所述的方法,其特征在于,所述确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路,包括:实时确定当前的音频输出场景所对应的目标音频通路。
- 根据权利要求1-11任一项所述的方法,其特征在于,所述确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路,包括:在音频输出场景发生变化时,确定变化后的音频输出场景对应的目标音频通路。
- 根据权利要求1-13任一项所述的方法,其特征在于,所述电子设备中存储各种声音类型对应的类型参数,在音频的音频数据中包括其所属类型的类型参数,所述确定所述目标音频通路所传输的音频的目标声音类型,包括:获取所述音频的音频数据中的类型参数,作为目标类型参数;以所述目标类型参数对应的声音类型,作为所述目标声音类型。
- 根据权利要求1-14任一项所述的方法,其特征在于,所述方法包括:若当前的音频输出场景为游戏场景,以所述电子设备的媒体音对应的音频通路作为所述目标音频通路;或者若当前的音频输出场景为游戏场景,以创建的只用于传输游戏场景下的音频的音频通路作为所述目标音频通路。
- 一种音效增强装置,其特征在于,应用于电子设备,所述装置包括:通路确定模块,用于确定当前的音频输出场景在所述电子设备的音频通路中对应的目标音频通路;类型确定模块,用于确定所述目标音频通路所传输的音频的目标声音类型;音效增强模块,用于通过与所述目标声音类型对应的目标音效算法对所述目标音频通路传输的音频进行增强。
- 根据权利要求16所述的装置,其特征在于,所述音效增强模块用于若所述目标声音类型为带有空间类型参数的声音类型,通过相位信息增强所述目标音频通路传输的音频的空间感。
- 根据权利要求17所述的装置,其特征在于,所述音效增强模块包括:音频复制单元,用于以所述目标音频通路传输的音频为原音频,复制所述原音频获得音频副本;增强单元,用于将所述音频副本相对于所述原音频延时预设时长,使所述音频副本与所述原音频之间具有相位差。
- 一种电子设备,其特征在于,包括:一个或多个处理器;存储器;一个或多个程序,其中所述一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-15任一项所述的方法。
- 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-7任一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811028127.9A CN109165005B (zh) | 2018-09-04 | 2018-09-04 | 音效增强方法、装置、电子设备及存储介质 |
CN201811028127.9 | 2018-09-04 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020048221A1 true WO2020048221A1 (zh) | 2020-03-12 |
Family
ID=64893921
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/095140 WO2020048221A1 (zh) | 2018-09-04 | 2019-07-08 | 音效增强方法、装置、电子设备及存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109165005B (zh) |
WO (1) | WO2020048221A1 (zh) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110580914A (zh) * | 2019-07-24 | 2019-12-17 | 安克创新科技股份有限公司 | 一种音频处理方法、设备及具有存储功能的装置 |
CN111601157B (zh) * | 2020-05-11 | 2022-06-14 | 海信视像科技股份有限公司 | 一种音频输出方法及显示设备 |
CN115904303A (zh) * | 2021-05-21 | 2023-04-04 | 荣耀终端有限公司 | 一种播放声音的方法及设备 |
CN113241091B (zh) * | 2021-05-28 | 2022-07-12 | 思必驰科技股份有限公司 | 声音分离的增强方法及系统 |
CN113318432B (zh) * | 2021-06-07 | 2024-02-23 | 网易(杭州)网络有限公司 | 游戏中的音乐控制方法、非易失性存储介质及电子装置 |
CN114302295A (zh) * | 2021-12-17 | 2022-04-08 | 深圳市锐尔觅移动通信有限公司 | 参数配置方法、装置、电子设备及存储介质 |
CN114510290A (zh) * | 2022-01-26 | 2022-05-17 | 海宁奕斯伟集成电路设计有限公司 | 音效处理方法、装置、电子设备、存储介质及程序产品 |
CN115119110A (zh) * | 2022-07-29 | 2022-09-27 | 歌尔科技有限公司 | 音效调节方法、音频播放设备以及计算机可读存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104090766A (zh) * | 2014-07-17 | 2014-10-08 | 广东欧珀移动通信有限公司 | 一种移动终端的音效切换方法及系统 |
CN106095387A (zh) * | 2016-06-16 | 2016-11-09 | 广东欧珀移动通信有限公司 | 一种终端的音效设置方法及终端 |
CN109107158A (zh) * | 2018-09-04 | 2019-01-01 | Oppo广东移动通信有限公司 | 音效处理方法、装置以及电子设备 |
CN109218528A (zh) * | 2018-09-04 | 2019-01-15 | Oppo广东移动通信有限公司 | 音效处理方法、装置以及电子设备 |
CN109271128A (zh) * | 2018-09-04 | 2019-01-25 | Oppo广东移动通信有限公司 | 音效设置方法、装置、电子设备及存储介质 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20060003631A (ko) * | 2004-07-07 | 2006-01-11 | 주식회사 산돌커뮤니케이션 | 텍스트에서의 특정 문자 음향효과 구동 방법 및 장치 |
CN101808208B (zh) * | 2009-02-17 | 2013-06-26 | 深圳Tcl新技术有限公司 | 电视机音效模式设置的方法及电视机 |
CN104238990B (zh) * | 2013-06-14 | 2021-09-14 | 联想(北京)有限公司 | 一种电子设备及音频输出方法 |
CN103927146A (zh) * | 2014-04-30 | 2014-07-16 | 深圳市中兴移动通信有限公司 | 音效自适应方法和装置 |
CN105824598B (zh) * | 2016-02-29 | 2019-06-07 | 维沃移动通信有限公司 | 一种音效管理方法及移动终端 |
CN106126174B (zh) * | 2016-06-16 | 2019-02-22 | Oppo广东移动通信有限公司 | 一种场景音效的控制方法、及电子设备 |
CN106464939B (zh) * | 2016-07-28 | 2019-10-25 | 北京小米移动软件有限公司 | 播放音效的方法及装置 |
CN106775562A (zh) * | 2016-12-09 | 2017-05-31 | 奇酷互联网络科技(深圳)有限公司 | 音频参数处理的方法及装置 |
CN107910018A (zh) * | 2017-10-30 | 2018-04-13 | 广州视源电子科技股份有限公司 | 音效处理方法和系统、计算机存储介质及设备 |
-
2018
- 2018-09-04 CN CN201811028127.9A patent/CN109165005B/zh active Active
-
2019
- 2019-07-08 WO PCT/CN2019/095140 patent/WO2020048221A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104090766A (zh) * | 2014-07-17 | 2014-10-08 | 广东欧珀移动通信有限公司 | 一种移动终端的音效切换方法及系统 |
CN106095387A (zh) * | 2016-06-16 | 2016-11-09 | 广东欧珀移动通信有限公司 | 一种终端的音效设置方法及终端 |
CN109107158A (zh) * | 2018-09-04 | 2019-01-01 | Oppo广东移动通信有限公司 | 音效处理方法、装置以及电子设备 |
CN109218528A (zh) * | 2018-09-04 | 2019-01-15 | Oppo广东移动通信有限公司 | 音效处理方法、装置以及电子设备 |
CN109271128A (zh) * | 2018-09-04 | 2019-01-25 | Oppo广东移动通信有限公司 | 音效设置方法、装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN109165005B (zh) | 2020-08-25 |
CN109165005A (zh) | 2019-01-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020048221A1 (zh) | 音效增强方法、装置、电子设备及存储介质 | |
AU2018203165B2 (en) | Spatially ducking audio produced through a beamforming loudspeaker array | |
US10979842B2 (en) | Methods and systems for providing a composite audio stream for an extended reality world | |
CN109445740B (zh) | 音频播放方法、装置、电子设备及存储介质 | |
US9769589B2 (en) | Method of improving externalization of virtual surround sound | |
US9693170B2 (en) | Multidimensional virtual learning system and method | |
JP6251809B2 (ja) | サウンドステージ拡張用の装置及び方法 | |
US10757528B1 (en) | Methods and systems for simulating spatially-varying acoustics of an extended reality world | |
US11223920B2 (en) | Methods and systems for extended reality audio processing for near-field and far-field audio reproduction | |
US11395087B2 (en) | Level-based audio-object interactions | |
WO2020048209A1 (zh) | 音效处理方法、装置、电子设备及存储介质 | |
US20230364513A1 (en) | Audio processing method and apparatus | |
WO2023029829A1 (zh) | 音频处理方法、装置、用户终端及计算机可读介质 | |
CN113286161A (zh) | 一种直播方法、装置、设备及存储介质 | |
WO2020063027A1 (zh) | 3d音效处理方法及相关产品 | |
US20240214757A1 (en) | Method and device for controlling vibration motor, non-transitory computer-readable storage medium, and electronic device | |
CN113873421A (zh) | 一种基于投屏设备实现天空声音效的方法和系统 | |
US9794678B2 (en) | Psycho-acoustic noise suppression | |
WO2024103953A1 (zh) | 音频处理方法、音频处理装置、介质与电子设备 | |
CN116193196A (zh) | 虚拟环绕声渲染方法、装置、设备及存储介质 | |
CN115550831A (zh) | 通话音频的处理方法、装置、设备、介质及程序产品 | |
EP4406363A1 (en) | Conditionally adjusting light effect based on second audio channel content | |
CN116257789A (zh) | 音频处理方法、装置、终端及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19857959 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19857959 Country of ref document: EP Kind code of ref document: A1 |