WO2020048175A1 - Sound effect processing method, device, electronic device and storage medium - Google Patents

Sound effect processing method, device, electronic device and storage medium Download PDF

Info

Publication number
WO2020048175A1
WO2020048175A1 PCT/CN2019/090441 CN2019090441W WO2020048175A1 WO 2020048175 A1 WO2020048175 A1 WO 2020048175A1 CN 2019090441 W CN2019090441 W CN 2019090441W WO 2020048175 A1 WO2020048175 A1 WO 2020048175A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
audio output
type
scene
sound effect
Prior art date
Application number
PCT/CN2019/090441
Other languages
French (fr)
Chinese (zh)
Inventor
李亚军
冷文华
许钊铵
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2020048175A1 publication Critical patent/WO2020048175A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/02Means for controlling the tone frequencies, e.g. attack or decay; Means for producing special musical effects, e.g. vibratos or glissandos

Definitions

  • the present application relates to the technical field of electronic devices, and more particularly, to a sound effect processing method, device, electronic device, and storage medium.
  • this application proposes a sound effect processing method, device, electronic device, and storage medium to improve the above problems.
  • the present application provides a sound effect processing method applied to an electronic device.
  • the method includes: detecting a type of an audio stream included in a current audio output scene; and if a set type of audio stream is detected, A corresponding audio output path is configured for a set type of audio stream, and the audio output path of the set type of audio stream configuration is different from the audio output path of other types of audio stream configuration; each of the audio output paths is configured to correspond Audio processing algorithm, so as to process the audio output by each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
  • the present application provides a sound effect processing device running on an electronic device.
  • the device includes: an audio stream detection unit for detecting a type of an audio stream included in a current audio output scene; and a path management unit for A set type audio stream is detected, a corresponding audio output path is configured for the set type audio stream, the set type audio stream configuration audio output path and other types of audio stream configuration audio output are configured
  • the channels are different; the sound effect processing unit is configured to configure a corresponding audio processing algorithm for each of the audio output channels, so that based on the audio processing algorithm corresponding to each of the audio output channels, the output of each of the audio output channels is Audio is processed.
  • the present application provides an electronic device including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, The one or more programs are configured to perform the method described above.
  • a computer-readable storage medium provided by the present application, wherein the computer-readable storage medium stores program code, and the foregoing method is executed when the program code runs.
  • FIG. 1 shows a flowchart of a sound effect processing method provided by the present application.
  • FIG. 2 shows a flowchart of another sound effect processing method provided by the present application.
  • FIG. 3 shows a schematic diagram of an interface proposed by the present application.
  • FIG. 4 shows a flowchart of another sound effect processing method provided by the present application.
  • FIG. 5 shows a structural block diagram of a sound effect processing device proposed in the present application.
  • FIG. 6 shows a structural block diagram of another sound effect processing device provided by the present application.
  • FIG. 7 shows a structural block diagram of yet another sound effect processing device proposed by the present application.
  • FIG. 8 shows a structural block diagram of an electronic device proposed by the present application.
  • FIG. 9 is a storage unit for saving or carrying a program code for implementing a sound effect processing method according to an embodiment of the present application.
  • Sound effects can be a ubiquitous sound in our lives. Sound effects such as footsteps when walking, squeaking when opening a door, and door opening and closing of an elevator penetrate into every corner of our lives.
  • sound effects are everywhere in electronic devices. For example, when the electronic device is started, it may be accompanied by a startup sound effect, when the electronic device is turned off, it may be accompanied by a shutdown sound effect, and when the power of the electronic device is insufficient, the electronic device may also emit an alarm sound effect.
  • Game sound effects refer to effect music played when a specific behavior or specific operation occurs in a video game. Such as the sound of a bullet when it is launched, the scream of a monster when it dies, and the "click" sound when a button is clicked. It is precisely because of the existence of game sound effects that users can have a more realistic experience when playing games.
  • the inventors have found that in audio output scenes, there are usually multiple audio types of audio streams, such as audio streams of background effects, audio streams of background music, audio streams of key presses, and audio streams of other media types.
  • audio streams of background effects such as audio streams of background effects, audio streams of background music, audio streams of key presses, and audio streams of other media types.
  • electronic devices usually use the same sound processing algorithm to process them, so that some audio types of audio streams cannot reflect their unique effects when they are played. Therefore, the inventor proposes that the flexibility of sound effect adjustment can be improved in this application, and the audio stream of each audio type can reflect the characteristics of the audio stream of each audio type when being played, and can further improve the user experience. Sound effect processing method, device, electronic equipment and storage medium.
  • a sound effect processing method provided in this application is applied to an electronic device, and the method includes:
  • Step S110 Detect the type of the audio stream included in the current audio output scene.
  • audio output may exist in various scenarios.
  • a game interface scene is displayed.
  • audio outputs such as game sound effects, game background music, or button sounds.
  • the game sound effects include the sound effects of game characters, the sound effects of the voice of the game characters, and the sound effects of other NPC (Non Player and Character) characters.
  • an audio playback scene is displayed, and an environmental sound effect exists in the audio playback scene.
  • a video screen playing scene is displayed, and in the video screen playing scene, there are sound effects such as human voices and environmental sound effects.
  • audio output scenario is only exemplary and does not limit the present application.
  • the application may also include audio output scenes other than the audio output scenes of the above examples.
  • the electronic device can determine the current audio output scene in multiple ways.
  • the electronic device may determine a current audio output scene by querying a currently running application program.
  • the electronic device is an Android operating system
  • the name of the application currently running in the foreground can be obtained by executing the getRunningTasks method of the ActivityManager.
  • the electronic device can also obtain a list of programs used by the user through UsageStatsManager, and identify the most recently used application recorded in the list as the current foreground application.
  • the electronic device After the electronic device obtains the currently running application program, it can determine the current audio output scene according to the type of the currently running application program. For example, if the application is a game application, it may be determined that the current audio output scene is a game interface scene. If the application is a music playback application, it can be determined that the current audio output scene is a music playback scene. If the application is a video application, it can be determined that the current audio output scene is a video playback scene.
  • the audio output scene usually includes one or more audio streams that need to be output.
  • audio streams such as sound effects, background music, and key sounds.
  • different audio output channels can be configured for audio of different audio types, so that the audio output scene corresponds to multiple audio output channels, and each of the audio output channels is used to transmit audio. Different types.
  • the electronic device may configure an audio output scene of an audio output channel for each type of audio stream, by directly detecting the audio The identifier of the output path to determine the type of audio stream included in the current audio output scene.
  • the electronic device can be configured to configure the audio output channel identified as b to be a background music type audio stream, and the audio output channel identified as c to be configured as a key sound type audio stream, then the electronic device is identifying the current audio output In the case where the scene is an audio output scene in which an audio output channel is assigned to each audio stream separately, by further identifying whether there are audio output channels identified as b and c, the type of audio stream existing in the current audio output scene can be obtained .
  • an audio stream of this type of sound effect is mixed in an audio output path where other types of audio streams are located.
  • the electronic device may also directly determine the type of the included audio stream according to the type of the current audio output scene. For example, if the current audio output scene is a game interface scene, the electronic device may determine that the current audio output scene includes an audio stream of a sound effect type, a background music type, and a key sound type. If the current audio output scene is a music playback scene, the electronic device can recognize that the current audio output scene includes a background music type audio stream. Or, if the electronic device recognizes that the current audio output scene is a video playback scene, the electronic device may determine that the current audio output scene includes an audio stream of a sound effect type and a background music type.
  • the quantity of audio included in the current audio output scene may also be determined to determine the type of audio stream. Specifically, for different audios, corresponding identifiers can be set. When the audio identifiers correspond to the types of audio streams, the electronic device can identify the audios included in the current audio output scene by identifying which audio identifiers are. The type of stream.
  • Step S120 If a set type audio stream is detected, a corresponding audio output path is configured for the set type audio stream, and the set type audio stream is configured with an audio output path and other types of audio streams.
  • the configured audio output channels are different.
  • the setting type may be a sound effect type, a background music type, a key sound type, or other media types.
  • an audio output path is configured for each of the other types of audio streams.
  • Step S130 Configure a corresponding audio processing algorithm for each of the audio output channels, so as to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
  • each sound processing algorithm has its own characteristics. For the same type of audio, the sound effects obtained after processing by different sound processing algorithms will be different. Then, in the case where a corresponding sound effect processing algorithm is independently configured for each audio output channel, the playback effect of each audio stream can be reflected as much as possible.
  • a sound effect processing method provided by the present application is to detect a type of an audio stream included in a current audio output scene, and after detecting a set type of audio stream, configure the set type of audio stream to be different from other audio streams.
  • the audio output channel of the audio output channel configured by the type of audio stream configuration, and each audio output channel is configured with a corresponding audio processing algorithm, so that each of the audio output channels is based on the audio processing algorithm corresponding to each audio output channel.
  • the audio output from the audio output channel is processed, so that an independent audio output channel can be assigned to a set type of audio stream, and an independent audio processing algorithm can be configured for the independent audio output channel, thereby allowing flexibility in audio adjustment. It has been improved, and the audio processing effect on electronic devices has been enhanced in a targeted manner to improve the user experience.
  • a sound effect processing method provided in this application is applied to an electronic device, and the method includes:
  • Step S210 Detect the type of the audio stream included in the current audio output scene.
  • Step S220 If an audio stream with a sound effect type is detected, a corresponding audio output path is configured for the audio stream of the audio effect type, and an audio output path configured with the audio stream of the audio effect type and audio configured with other types of audio streams The output path is different.
  • the type of detecting the audio stream in this application may be detected at the beginning of the audio output scene, or may be started after the audio output scene is displayed for a period of time.
  • the electronic device if the detection is started at the beginning of the current audio output scene, that is, the detection is started at the moment the audio stream included in the current audio output scene starts to play, then in this case, the electronic device also Assignment of audio output paths to the various types of audio streams detected is not performed. Then, the electronic device may configure a corresponding audio output channel for the audio stream of the audio effect type when an audio stream of the audio effect type is detected before the audio stream is played, and the audio configured by the audio stream of the audio effect type is configured.
  • the output path is different from the audio output path of other types of audio stream configurations.
  • the type of the audio stream included in the current audio output scene can be detected.
  • the current audio output scene includes types of audio streams such as sound effects, background music, and button sounds
  • the audio stream of the audio effect type is mixed with other types of audio streams in one audio output path
  • an audio stream of an audio effect type mixed in an audio output path corresponding to an audio stream of another audio type may be separated, and then a corresponding audio output path is configured for the audio stream of the audio effect type separately. Therefore, even in the case that the audio stream of the audio effect type is not separately assigned to the audio output path in the initial stage, the audio output path of the audio stream of the audio effect type can be assigned to the audio output path in the later stage.
  • action sound effects such as the sound effect of a game character walking.
  • the user of the electronic device can discern what actions the other user is doing or what position the other user is relative to the user of the electronic device by listening to the other user's motion sound effects. For example, when the user walks in the game, there will be a sound of " ⁇ ", and when the user hears the sound of " ⁇ ", it can be determined that other game users are walking. And the phase information corresponding to the sound of the “ ⁇ ” can enable the user of the electronic device not only to judge that other users are walking, but also to further determine the direction in which the other users are walking and the distance from themselves.
  • FIG. 3 in the game interface scene 99 shown in FIG. 3, there are a game character 98, other user characters 97, and a wall 96 corresponding to a user account. Then, in this case, the user can listen to the walking sound effects of other user characters 97 and thus can still recognize other user characters 97 behind the wall 96 without seeing other user characters 97 in the field of vision. This is helpful for users to take measures in advance.
  • the audio stream of the audio effect type is mixed in the audio output channel corresponding to the audio stream of the other audio type, so that the audio stream of the audio effect type and the audio stream of other audio types are both It is processed based on the same sound effect processing algorithm, so it may not be able to achieve a good audiovisual effect for the audio stream of the sound effect type, and it is not conducive to the meaning of the user to identify the sound effect.
  • the audio stream of the audio effect type is removed from The original mixed audio output channels are separated, and the audio output channels are allocated separately for transmission, which can facilitate the processing by a sound effect processing algorithm specially adapted to enhance sound effects, so as to improve the audiovisual effect when the audio stream of the sound effect type is played.
  • Step S230 Configure a corresponding audio processing algorithm for each of the audio output channels, so as to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
  • the audio output channel corresponding to the audio stream of the audio effect type is configured to correspond to the type of audio effect in the audio stream of the audio effect type. Audio processing algorithm.
  • the audio stream of the sound effect type is still output by the same audio output channel. If different types of sound effects are still processed by the same sound effect processing method, it may cause The enhancement effect is not good. Then, as a way, the electronic device may determine the corresponding sound effect processing method in real time according to the type of sound effect transmitted in the audio output path currently used to transmit the audio effect type audio stream.
  • the electronic device detects that a person's action sound effect is transmitted in the audio output path, it can be enhanced based on a sound effect processing algorithm corresponding to the person's action sound effect. , Then it can be enhanced based on the sound effect processing algorithm corresponding to the sound effect of the character's voice.
  • the step of configuring a corresponding audio processing algorithm for an audio output path corresponding to the audio effect type audio stream according to the type of audio effect in the audio effect type audio stream includes: obtaining the multiple Among the sound effects, the sound effect that has the highest degree of matching with the current audio output scene; an audio processing algorithm corresponding to the sound effect that has the highest degree of matching is configured for an audio output path corresponding to the audio stream of the audio type.
  • the mechanism of the human ear to discern the direction can be simply understood as the coordinated action of the left and right ears, just like we can recognize the distance by looking at the object with both eyes.
  • the sounds received by both ears have “intensity difference” and “time difference”, and there is also a “phase difference” in sounds containing more low-frequency components.
  • the human head still has a certain masking effect on the sound to produce "tone color difference”.
  • it can be understood as “intensity difference”, “time difference”, or “tone color difference” of the action sound.
  • the user is more expected to enhance the "intensity difference", “time difference” or “tone color difference”.
  • users expect the sound effects of background music to be enhanced to achieve a better audiovisual experience.
  • the step of obtaining the sound effect with the highest matching degree among the plurality of sound effects and the current audio output scene includes: if the current audio output scene is a game scene, the highest matching degree The sound effect is a person's action sound effect; if the current audio output scene is a music playing scene, the highest matching sound effect is a human voice effect; if the current audio output scene is a video playing scene, the most matching sound effect is an environment Sound effects.
  • the electronic device may also obtain the number of types of audio effects in the audio stream; if the number is greater than the set number value, the audio output channel corresponding to the audio stream of the audio type is configured with the most compatible audio processing algorithm.
  • an electronic device assigns an audio output channel to each audio stream and configures an audio processing algorithm for each audio output channel, it may increase the power consumption and processing of the electronic device. Workload. Then, as a method, if it is detected that the type of the audio stream exceeds a set threshold, then a highly compatible audio processing algorithm may be determined from multiple alternative audio processing algorithms to transmit audio of all types of audio streams. The output path is processed.
  • an audio stream with the highest matching audio type corresponding to the current audio output scene may also be determined according to the foregoing method. Configure the audio stream with the highest matching audio type separately as an audio output channel, and configure all other types of audio output channels with the same audio output channel, and then configure one audio output channel for all other audio types. Highly compatible sound processing algorithm.
  • the audio stream of the sound effect type can be determined to be the audio stream with the highest match, so that in the audio output scene of the game interface scene type, an audio output is assigned to the audio stream of the sound effect type separately. path.
  • the audio stream of the background music type can be determined to be the audio stream of the highest matching type, so in the audio output scene type of the music playback scene, an audio output is separately assigned to the audio stream of the background music type path.
  • a sound effect processing method provided by this application is to detect a type of an audio stream included in a current audio output scene, and after detecting an audio stream of an audio effect type, configure the audio stream of the audio effect type to be different from other types of audio streams.
  • An audio output channel of an audio output channel configured by an audio stream, and a corresponding audio processing algorithm is configured for each of the audio output channels, so that each of the audio outputs is based on an audio processing algorithm corresponding to each of the audio output channels.
  • the audio output from the channel is processed, so that an independent audio output channel can be assigned to a set type of audio stream, and an independent audio processing algorithm can be configured for the independent audio output channel, thereby improving the flexibility of audio adjustment.
  • the audio processing effects for electronic devices have been specifically enhanced to enhance the user experience.
  • a sound effect processing method provided in this application is applied to an electronic device, and the method includes:
  • Step S310 Detect the type of the audio stream included in the current audio output scene.
  • Step S320 Determine whether the application program to which the current audio output scene belongs is a preset application program.
  • the electronic device can determine the application program to which the current audio output scene belongs in various ways.
  • the electronic device may determine the application program to which the current audio output scene belongs by querying the currently running application program.
  • the electronic device is an Android operating system
  • the name of the application currently running in the foreground can be obtained by executing the getRunningTasks method of the ActivityManager.
  • the electronic device can also obtain a list of programs used by the user through UsageStatsManager, and identify the most recently used application recorded in the list as the current foreground application.
  • the preset application program can be implemented through a white list.
  • Step S330 if it is not a preset application program, configure the same audio output path for all detected audio streams.
  • Step S340 If it is a preset application program, when a set type audio stream is detected, a corresponding audio output channel is configured for the set type audio stream, and the set type audio stream is configured for audio output.
  • the channels are different from the audio output channels of other types of audio stream configurations.
  • Step S350 Configure a corresponding audio processing algorithm for each of the audio output channels, so as to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
  • a sound effect processing method provided by this application is to detect a type of an audio stream included in a current audio output scene, after detecting a set type of audio stream, and after detecting that an application program to which the current audio output scene belongs is set After a certain type of application is configured, an audio output channel different from the audio output channel configured by other types of audio streams is configured for the audio stream of the set type, and a corresponding audio processing algorithm is configured for each of the audio output channels.
  • Independent audio output channels can also be configured with independent audio processing algorithms, which improves the flexibility of audio adjustment, and enhances the audio processing effects of electronic devices in a targeted manner to improve the user experience.
  • a sound effect processing device 400 provided in the present application runs on an electronic device.
  • the device 400 includes: an audio stream detection unit 410, a path management unit 420, and a sound effect processing unit 430.
  • the audio stream detection unit 410 is configured to detect a type of an audio stream included in a current audio output scene.
  • the path management unit 420 is configured to configure a corresponding audio output path to the audio stream of the set type if an audio stream of the set type is detected, and the audio output path configured by the audio stream of the set type and other The type of audio stream configuration has different audio output paths.
  • the path management unit 420 is further configured to, after the audio stream detection unit 410 detects that there are a plurality of other types of audio streams, configure an audio output path for each of the other types of audio streams.
  • a sound effect processing unit 430 is configured to configure a corresponding audio processing algorithm for each of the audio output channels, so as to perform audio output on each of the audio output channels based on an audio processing algorithm corresponding to each of the audio output channels. deal with.
  • a sound effect processing device 500 provided in the present application runs on an electronic device.
  • the device 500 includes: an audio stream detection unit 510, a path management unit 520, a sound effect type detection unit 530, and a sound effect processing unit 540.
  • the audio stream detection unit 510 is configured to detect a type of an audio stream included in a current audio output scene.
  • the path management unit 520 configures a corresponding audio output path for the audio effect type audio stream if an audio type audio stream is detected, and the audio output path configured by the audio effect type audio stream is configured with other types of audio stream configurations.
  • the audio output path is different.
  • a sound effect type detection unit 530 configured to detect an audio stream type of the sound effect type
  • the sound effect processing unit 540 is configured to: if the sound effect type detecting unit 530 detects that the audio stream of the sound effect type includes multiple sound effects, and corresponding to the audio stream of the sound effect type according to the type of the sound effect in the audio stream of the sound effect type
  • the audio output path is configured with the corresponding audio processing algorithm.
  • the sound effect processing unit 540 is specifically configured to obtain a sound effect that has the highest matching degree with the current audio output scene among the multiple sound effects, and configure an audio output path corresponding to the audio stream of the audio type to be configured with An audio processing algorithm corresponding to the sound effect with the highest matching degree.
  • the step of obtaining the sound effect with the highest matching degree among the plurality of sound effects and the current audio output scene includes: if the current audio output scene is a game scene, the sound effect with the highest matching degree Is a human action sound effect; if the current audio output scene is a music playback scene, the highest matching sound effect is a human voice effect; if the current audio output scene is a video playback scene, the highest matching sound effect is an environmental sound effect .
  • the sound effect processing unit 540 is specifically configured to obtain the number of types of sound effects in the audio stream; if the number is greater than a set number value, configure an audio output path corresponding to the audio stream of the audio type The most compatible audio processing algorithm. If the number is not greater than a set number value, a corresponding audio processing algorithm is configured for each of the audio output channels.
  • a sound effect processing device 600 provided in the present application runs on an electronic device.
  • the device 600 includes: an audio stream detection unit 610, a program authentication unit 620, a path management unit 630, and a sound effect processing unit 640.
  • the audio stream detection unit 610 is configured to detect a type of an audio stream included in a current audio output scene.
  • the program authentication unit 620 is configured to determine whether an application program to which the current audio output scene belongs is a preset application program.
  • the path management unit 630 is configured to, if a set type audio stream is detected, and the program authentication unit 620 determines that the application program to which the current audio output scene belongs is a preset application program, and configures the set type audio stream. A corresponding audio output path.
  • the audio output path of the set type of audio stream configuration is different from the audio output path of other types of audio stream configuration.
  • a sound effect processing unit 640 is configured to configure a corresponding audio processing algorithm for each of the audio output channels, so as to perform audio output on each of the audio output channels based on an audio processing algorithm corresponding to each of the audio output channels. deal with.
  • 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.
  • a sound effect processing method, device, electronic device and storage medium detect the type of audio stream included in the current audio output scene, and after detecting a set type of audio stream, give
  • the set type of audio stream configuration is an audio output channel different from the audio output channels of other types of audio stream configuration, and a corresponding audio processing algorithm is configured for each of the audio output channels so as to be based on each of the audio
  • the audio processing algorithm corresponding to the output channel processes the audio output from each of the audio output channels, so that an independent audio output channel can be assigned to a set type of audio stream, and an independent audio output channel can also be configured Independent audio processing algorithm, so that the flexibility of audio adjustment is improved, and the audio processing effect of electronic devices has been specifically enhanced to improve the user experience.
  • another embodiment of the present application further provides an electronic device 100 that can execute the foregoing terminal control method.
  • the electronic device 100 includes one or more processors (only one is shown in the figure), a memory 104, a wireless module 106, and an audio module 108 that are coupled to each other.
  • the memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
  • the processor 102 may include one or more processing cores.
  • the processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes or executes instructions, programs, code sets, or instruction sets stored in the memory 104 by calling or executing data stored in the memory 104 to execute Various functions and processing data of the electronic device 100.
  • the processor 102 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 102 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 target applications; 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 102, and may be implemented by a communication chip alone.
  • the memory 104 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory).
  • the memory 104 may be used to store instructions, programs, codes, code sets, or instruction sets.
  • the memory 104 may include a storage program area and a storage data area.
  • the memory 104 may store a sound effect processing device.
  • the sound effect processing device may be the foregoing device 400, device 500, or device 600.
  • the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), and instructions for implementing the following method embodiments. Wait.
  • the storage data area may also store data (such as phonebook, audio and video data, and chat history data) created by the terminal 100 during use.
  • the wireless module 106 is used to receive and send electromagnetic waves, and realize the mutual conversion of electromagnetic waves and electrical signals, so as to communicate with a communication network or other equipment, such as communicating with audio playback equipment.
  • the wireless module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, and the like .
  • SIM subscriber identity module
  • the wireless module 106 can communicate with various networks, such as the Internet, an intranet, and a wireless network, or communicate with other electronic devices through a wireless network.
  • the wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network.
  • the above wireless network can use various communication standards, protocols and technologies, including but not limited to the IEEE 802 protocol to Bluetooth protocols can even include those that have not yet been developed.
  • the audio module 108 can be used to process audio output by an application program running in the electronic device 100.
  • the audio module 108 may receive audio processing parameters obtained by the wireless module 106 from other electronic devices, and then adjust the audio processing parameters of the audio module 108.
  • the processor 102 executes the program stored in the memory 104 to determine an audio processing algorithm for each audio output path, the audio stream transmitted by each audio output path is processed based on the determined audio processing algorithm.
  • FIG. 9 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 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 800 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 800 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 800 has a storage space for program code 810 that performs any of the method steps in the above-described methods. These program codes can be read from or written into one or more computer program products.
  • the program code 810 may be compressed, for example, in a suitable form.
  • a "computer-readable medium” may be any device that can contain, store, communicate, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) with one or more wirings, portable computer disk enclosures (magnetic devices), random access memory (RAM), Read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disk read-only memory (CDROM).
  • the computer-readable medium may even be paper or other suitable medium on which the program can be printed, because, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable Processing to obtain the program electronically and then store it in computer memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stereophonic System (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

Disclosed by embodiments of the present application are a sound effect processing method, device, electronic device and storage medium. The method comprises: detecting the type of an audio stream comprised in a current audio output scenario; if a set type of audio stream is detected, configuring a corresponding audio output channel for the set type of audio stream, the audio output channel configured for the set type of the audio stream being different from an audio output channel configured for other types of audio stream; configuring a corresponding audio processing algorithm for each audio output channel so as to process the audio outputted by each audio output channel on the basis of the audio processing algorithm corresponding to each audio output channel. By means of the present method, an independent audio output channel may be allocated for a set type of audio stream, and an independent audio processing algorithm may be configured for the independent audio output channel, so as to improve the flexibility of audio adjustment, enhance the audio processing effect of electronic equipment in a targeted manner, and improve the user experience.

Description

音效处理方法、装置、电子设备及存储介质Sound effect processing method, device, electronic equipment and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2018年9月4日提交的申请号为CN201811027459.5的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。This application claims priority from a Chinese application with an application number of CN201811027459.5, filed on September 4, 2018, which is hereby incorporated by reference herein in its entirety for all purposes.
技术领域Technical field
本申请涉及电子设备技术领域,更具体地,涉及一种音效处理方法、装置、电子设备及存储介质。The present application relates to the technical field of electronic devices, and more particularly, to a sound effect processing method, device, electronic device, and storage medium.
背景技术Background technique
随着终端技术的迅速发展,诸如手机、平板等电子设备已成为人们生活不可或缺的组成部分。人们不仅可以利用电子设备进行日常的打电话、发短信等功能,还可以利用电子设备运行各类的应用程序,如游戏类的应用程序、网页浏览类的应用程序、音视频播类的应用程序等等。但是在应用程序的运行过程中,对于应用程序输出音频的音效调节的灵活性以及用户体验方面还有待提升。With the rapid development of terminal technology, electronic devices such as mobile phones and tablets have become an integral part of people's lives. People can not only use electronic devices for daily phone calls, text messages, and other functions, but also use electronic devices to run various applications, such as game applications, web browsing applications, and audio and video broadcast applications. and many more. However, during the running of the application, the flexibility of adjusting the sound effects of the output audio of the application and the user experience need to be improved.
发明内容Summary of the Invention
鉴于上述问题,本申请提出了一种音效处理方法、装置、电子设备及存储介质,以改善上述问题。In view of the above problems, this application proposes a sound effect processing method, device, electronic device, and storage medium to improve the above problems.
第一方面,本申请提供了一种音效处理方法,应用于电子设备,所述方法包括:检测当前音频输出场景包括的音频流的类型;若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同;给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音 频进行处理。In a first aspect, the present application provides a sound effect processing method applied to an electronic device. The method includes: detecting a type of an audio stream included in a current audio output scene; and if a set type of audio stream is detected, A corresponding audio output path is configured for a set type of audio stream, and the audio output path of the set type of audio stream configuration is different from the audio output path of other types of audio stream configuration; each of the audio output paths is configured to correspond Audio processing algorithm, so as to process the audio output by each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
第二方面,本申请提供了一种音效处理装置,运行于电子设备,所述装置包括:音频流检测单元,用于检测当前音频输出场景包括的音频流的类型;通路管理单元,用于若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同;音效处理单元,用于给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。In a second aspect, the present application provides a sound effect processing device running on an electronic device. The device includes: an audio stream detection unit for detecting a type of an audio stream included in a current audio output scene; and a path management unit for A set type audio stream is detected, a corresponding audio output path is configured for the set type audio stream, the set type audio stream configuration audio output path and other types of audio stream configuration audio output are configured The channels are different; the sound effect processing unit is configured to configure a corresponding audio processing algorithm for each of the audio output channels, so that based on the audio processing algorithm corresponding to each of the audio output channels, the output of each of the audio output channels is Audio is processed.
第三方面,本申请提供了一种电子设备,包括一个或多个处理器以及存储器;一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的方法。In a third aspect, the present application provides an electronic device including one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, The one or more programs are configured to perform the method described above.
第四方面,本申请提供的一种计算机可读存储介质,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码运行时执行上述的方法。According to a fourth aspect, a computer-readable storage medium provided by the present application, wherein the computer-readable storage medium stores program code, and the foregoing method is executed when the program code runs.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application more clearly, the drawings used in the description of the embodiments are briefly introduced below. Obviously, the drawings in the following description are just some embodiments of the application. For those skilled in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1示出了本申请提出的一种音效处理方法的流程图。FIG. 1 shows a flowchart of a sound effect processing method provided by the present application.
图2示出了本申请提出的另一种音效处理方法的流程图。FIG. 2 shows a flowchart of another sound effect processing method provided by the present application.
图3示出了本申请提出的一种界面的示意图。FIG. 3 shows a schematic diagram of an interface proposed by the present application.
图4示出了本申请提出的再一种音效处理方法的流程图。FIG. 4 shows a flowchart of another sound effect processing method provided by the present application.
图5示出了本申请提出的一种音效处理装置的结构框图。FIG. 5 shows a structural block diagram of a sound effect processing device proposed in the present application.
图6示出了本申请提出的另一种音效处理装置的结构框图。FIG. 6 shows a structural block diagram of another sound effect processing device provided by the present application.
图7示出了本申请提出的再一种音效处理装置的结构框图。FIG. 7 shows a structural block diagram of yet another sound effect processing device proposed by the present application.
图8示出了本申请提出的一种电子设备的结构框图。FIG. 8 shows a structural block diagram of an electronic device proposed by the present application.
图9是本申请实施例的用于保存或者携带实现根据本申请实施例的音效处理方法的程序代码的存储单元。FIG. 9 is a storage unit for saving or carrying a program code for implementing a sound effect processing method according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
音效可以是我们生活中无处不在的一种声音。比如走路时的脚步声、开门时的吱吱声、电梯的开关门等音效渗透在我们生活的每个角落。Sound effects can be a ubiquitous sound in our lives. Sound effects such as footsteps when walking, squeaking when opening a door, and door opening and closing of an elevator penetrate into every corner of our lives.
而在电子设备中音效也是无处不在。例如,当电子设备启动时,可以伴随有启动音效,而当电子设备关闭时,会伴随有关闭音效,而当电子设备的电量不足时,电子设备也会发出报警音效等。And sound effects are everywhere in electronic devices. For example, when the electronic device is started, it may be accompanied by a startup sound effect, when the electronic device is turned off, it may be accompanied by a shutdown sound effect, and when the power of the electronic device is insufficient, the electronic device may also emit an alarm sound effect.
而对于电子设备中所运行的应用程序也是如此。例如,对于游戏类的应用程序在运行过程中就可以产生游戏音效。游戏音效指的是电子游戏中发生特定行为或进行特定操作时播放的效果音乐。如子弹发射时的声音、怪物死亡时的惨叫、点击按钮时的“咔嚓”声音等。正是因为游戏音效的存在使得用户在玩游戏时,可以有更加真实的体验。The same is true for applications running on electronic devices. For example, a game application can generate game sound effects during running. Game sound effects refer to effect music played when a specific behavior or specific operation occurs in a video game. Such as the sound of a bullet when it is launched, the scream of a monster when it dies, and the "click" sound when a button is clicked. It is precisely because of the existence of game sound effects that users can have a more realistic experience when playing games.
可以理解的是,除了前述的游戏类型的应用程序存在音效外,其他类型的应用程序也存在音效。例如,音视频播放类的应用程序在播放音视频过程中的音视频音效,以及网页浏览类的的应用程序在加载网页内容的过程中的音效等。It can be understood that, in addition to the aforementioned game type applications, there are also sound effects. For example, the audio and video sound effects of audio and video playback applications during the playback of audio and video, and the sound effects of web browsing applications during the loading of web content.
但是,发明人发现,在音频输出场景中通常会存在多种音频类型的音频流,例如音效类型的音频流、背景音乐类型的音频流、按键音类型的音频流以及其他媒体类型的音频流等,对于这些不同类型的音频流,电子设备通常是采用的相同的音效处理算法进行处理,从而使得有的音频类型的音频流在被播放时无法体现出其独特的效果。因此,发明人提出了本申请中可以提升音效调节的灵活性,并且可以让每种音频类型的音频流在被播放时,能体现每种音频类型的音频流的特色,再者可以提升用户体验的音效处理方法、装置、电子设备及存储介质。However, the inventors have found that in audio output scenes, there are usually multiple audio types of audio streams, such as audio streams of background effects, audio streams of background music, audio streams of key presses, and audio streams of other media types. For these different types of audio streams, electronic devices usually use the same sound processing algorithm to process them, so that some audio types of audio streams cannot reflect their unique effects when they are played. Therefore, the inventor proposes that the flexibility of sound effect adjustment can be improved in this application, and the audio stream of each audio type can reflect the characteristics of the audio stream of each audio type when being played, and can further improve the user experience. Sound effect processing method, device, electronic equipment and storage medium.
下面将结合附图具体描述本申请的各实施例。The embodiments of the present application will be described in detail below with reference to the drawings.
请参阅图1,本申请提供的一种音效处理方法,应用于电子设备,所述方法包括:Please refer to FIG. 1, a sound effect processing method provided in this application is applied to an electronic device, and the method includes:
步骤S110:检测当前音频输出场景包括的音频流的类型。Step S110: Detect the type of the audio stream included in the current audio output scene.
其中,在电子设备的运行过程中,会有多种场景存在音频输出。例如,当电子设备在运行游戏类的应用程序时,会显示游戏界面场景,在游戏界面场景 中可以存在游戏音效、游戏背景音乐或者按键音等音频输出。其中,该游戏音效包括游戏人物动作音效、游戏人物说话声音的音效以及其他NPC(Non Player Character)人物发出的音效。Among them, during the operation of the electronic device, audio output may exist in various scenarios. For example, when an electronic device is running a game application, a game interface scene is displayed. In the game interface scene, there may be audio outputs such as game sound effects, game background music, or button sounds. Among them, the game sound effects include the sound effects of game characters, the sound effects of the voice of the game characters, and the sound effects of other NPC (Non Player and Character) characters.
再例如,当电子设备在运行音频类的应用程序时,会显示音频播放场景,在该音频播放场景中存在环境音效。当电子设备在运行视频类的应用程序时,会显示视频画面播放场景,在该视频画面播放场景中会存在人物说话声的音效以及环境音效等。As another example, when an electronic device is running an audio application, an audio playback scene is displayed, and an environmental sound effect exists in the audio playback scene. When the electronic device is running a video-type application, a video screen playing scene is displayed, and in the video screen playing scene, there are sound effects such as human voices and environmental sound effects.
需要说明的是,上述的音频输出场景只是示例性的,并不对本申请作出限定。本申请还可以包括除上述实例的音频输出场景以外的音频输出场景。It should be noted that the foregoing audio output scenario is only exemplary and does not limit the present application. The application may also include audio output scenes other than the audio output scenes of the above examples.
那么基于上述情况,电子设备可以通过多种方式来确定当前的音频输出场景。可选的,电子设备可以通过查询当前正在运行的应用程序来确定当前的音频输出场景。其中,作为一种方式,若电子设备为Android操作***,可以通过执行ActivityManager的getRunningTasks方法来获取到当前在前台运行的应用程序的名称。此外,电子设备还可以通过UsageStatsManager来获取用户使用的程序列表,将该列表中记录的最近使用的应用程序识别为当前的前台应用。再者,还可以通过Android自带无障碍功能,监控窗口焦点的变化,拿到焦点窗口对应包名作为当前在前台运行的应用程序。Based on the above situation, the electronic device can determine the current audio output scene in multiple ways. Optionally, the electronic device may determine a current audio output scene by querying a currently running application program. Among them, if the electronic device is an Android operating system, the name of the application currently running in the foreground can be obtained by executing the getRunningTasks method of the ActivityManager. In addition, the electronic device can also obtain a list of programs used by the user through UsageStatsManager, and identify the most recently used application recorded in the list as the current foreground application. In addition, you can also use Android's built-in accessibility function to monitor the focus change of the window and get the package name corresponding to the focus window as the application currently running in the foreground.
当电子设备获取到当前正在运行的应用程序后,可以根据当前正在运行的应用程序的类型来确定当前的音频输出场景。例如,若应用程序为游戏类的应用程序,那么可以确定当前的音频输出场景为游戏界面场景。若应用程序为音乐播放类的应用程序,那么可以确定当前的音频输出场景为音乐播放场景。若应用程序为视频类的应用程序,那么可以确定当前的音频输出场景为视频播放场景。After the electronic device obtains the currently running application program, it can determine the current audio output scene according to the type of the currently running application program. For example, if the application is a game application, it may be determined that the current audio output scene is a game interface scene. If the application is a music playback application, it can be determined that the current audio output scene is a music playback scene. If the application is a video application, it can be determined that the current audio output scene is a video playback scene.
在音频输出场景中通常包括一种或者多种需要输出的音频流。例如,在游戏界面场景这种音频输出场景中,可以包括音效、背景音乐以及按键音等几种类型的音频流。而为了能够提升音频输出的效果,可以给不同音频类型的音频配置不同的音频输出通路,从而使得所述音频输出场景对应有多个音频输出通路,每个所述音频输出通路用于传输的音频类型不同。The audio output scene usually includes one or more audio streams that need to be output. For example, in an audio output scene such as a game interface scene, there may be several types of audio streams such as sound effects, background music, and key sounds. In order to improve the effect of audio output, different audio output channels can be configured for audio of different audio types, so that the audio output scene corresponds to multiple audio output channels, and each of the audio output channels is used to transmit audio. Different types.
下面再以Android***为例,对上述内容进行说明。在Android操作***的电子设备中,定义有11种stream_type(音频类型),也可以看做为音频流的类型。而对于其中定义的11种stream_type的音频流在进入到Attribute后,电子 设备会将其整理成几种类型,然后进行输出,那么这几种类型各自对应有一个音频输出通路。The following uses Android system as an example to explain the above content. In the electronic device of the Android operating system, there are 11 stream_types (audio types) defined, which can also be regarded as types of audio streams. After the 11 types of stream_type audio streams defined therein enter the Attribute, the electronic device will sort them into several types and then output them. Then each of these types corresponds to an audio output channel.
那么作为一种方式,若检测到当前的音频输出场景为设定类型的音频流,电子设备会为不同类型的音频流各自配置一个音频输出通路的音频输出场景的情况下,可以通过直接检测音频输出通路的标识来确定当前音频输出场景包括的音频流类型。例如,电子设备可以设定将标识为b的音频输出通路配置给背景音乐类型的音频流,而将标识为c的音频输出通路配置给按键音类型的音频流,那么电子设备在识别当前音频输出场景为给每种音频流单独分配音频输出通路的音频输出场景的情况下,再进一步通过识别是否存在标识为b以及c的音频输出通路,就可以获取到当前音频输出场景存在的音频流的类型。Then, as a method, if it is detected that the current audio output scene is a set type of audio stream, the electronic device may configure an audio output scene of an audio output channel for each type of audio stream, by directly detecting the audio The identifier of the output path to determine the type of audio stream included in the current audio output scene. For example, the electronic device can be configured to configure the audio output channel identified as b to be a background music type audio stream, and the audio output channel identified as c to be configured as a key sound type audio stream, then the electronic device is identifying the current audio output In the case where the scene is an audio output scene in which an audio output channel is assigned to each audio stream separately, by further identifying whether there are audio output channels identified as b and c, the type of audio stream existing in the current audio output scene can be obtained .
可以理解的是,对于前述这种方式,音效这种类型的音频流是混合在其他类型音频流所在的音频输出通路中的。It can be understood that, for the foregoing method, an audio stream of this type of sound effect is mixed in an audio output path where other types of audio streams are located.
再者,作为另外一种方式,电子设备还可以直接根据当前音频输出场景的类型来确定包括的音频流的类型。例如,若当前的音频输出场景为游戏界面场景,那么电子设备可以判断当前的音频输出场景包括音效类型、背景音乐类型以及按键音类型的音频流。而若当前的音频输出场景为音乐播放场景,那么电子设备可以识别当前的音频输出场景包括背景音乐类型的音频流。再或者若电子设备识别当前的音频输出场景为视频播放场景,那么电子设备可以判断当前的音频输出场景包括音效类型以及背景音乐类型的音频流。Furthermore, as another way, the electronic device may also directly determine the type of the included audio stream according to the type of the current audio output scene. For example, if the current audio output scene is a game interface scene, the electronic device may determine that the current audio output scene includes an audio stream of a sound effect type, a background music type, and a key sound type. If the current audio output scene is a music playback scene, the electronic device can recognize that the current audio output scene includes a background music type audio stream. Or, if the electronic device recognizes that the current audio output scene is a video playback scene, the electronic device may determine that the current audio output scene includes an audio stream of a sound effect type and a background music type.
此外,在包括的不同音频用于传输不同类型的音频流的情况下,还可以判断当前的音频输出场景所包括的音频的数量来确定音频流的类型。具体的,对于不同的音频可以设定其对应的标识,在音频的标识与音频流的类型对应的情况下,电子设备通过识别音频的标识有哪些,即可识别出当前音频输出场景包括的音频流的类型。In addition, in a case where different types of audio included are used to transmit different types of audio streams, the quantity of audio included in the current audio output scene may also be determined to determine the type of audio stream. Specifically, for different audios, corresponding identifiers can be set. When the audio identifiers correspond to the types of audio streams, the electronic device can identify the audios included in the current audio output scene by identifying which audio identifiers are. The type of stream.
步骤S120:若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。Step S120: If a set type audio stream is detected, a corresponding audio output path is configured for the set type audio stream, and the set type audio stream is configured with an audio output path and other types of audio streams. The configured audio output channels are different.
其中,设定类型可以为音效类型、背景音乐类型、按键音类型或者其他媒体类型。The setting type may be a sound effect type, a background music type, a key sound type, or other media types.
作为一种方式,为了能够进一步的增强最终的音频输出效果,若电子设备检测到所述其他类型的音频流有多个,给多个所述其他类型的音频流分别配置 一个音频输出通路。As a way, in order to further enhance the final audio output effect, if the electronic device detects that there are multiple other types of audio streams, an audio output path is configured for each of the other types of audio streams.
步骤S130:给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。Step S130: Configure a corresponding audio processing algorithm for each of the audio output channels, so as to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
可以理解的是,对于每种音效处理算法都具有各自的特点。对于同一种音频,在经过不同的音效处理算法进行处理后,所得到的音效效果会有区别。那么对于每一个音频输出通路都独立配置一种对应的音效处理算法的情况下,可以尽可能的体现每种音频流的播放效果。It can be understood that each sound processing algorithm has its own characteristics. For the same type of audio, the sound effects obtained after processing by different sound processing algorithms will be different. Then, in the case where a corresponding sound effect processing algorithm is independently configured for each audio output channel, the playback effect of each audio stream can be reflected as much as possible.
本申请提供的一种音效处理方法,通过检测当前音频输出场景包括的音频流的类型,在当检测到有设定类型的音频流后,给所述设定类型的音频流配置一不同于其他类型的音频流配置的音频输出通路的音频输出通路,再给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理,进而使得对于设定类型的音频流可以分配独立的音频输出通路,并且对于独立的音频输出通路还可以配置独立的音频处理算法,从而使得音频调节的灵活性得到提升,而对于电子设备的音频处理效果得到了针对性的增强,提升了用户体验。A sound effect processing method provided by the present application is to detect a type of an audio stream included in a current audio output scene, and after detecting a set type of audio stream, configure the set type of audio stream to be different from other audio streams. The audio output channel of the audio output channel configured by the type of audio stream configuration, and each audio output channel is configured with a corresponding audio processing algorithm, so that each of the audio output channels is based on the audio processing algorithm corresponding to each audio output channel. The audio output from the audio output channel is processed, so that an independent audio output channel can be assigned to a set type of audio stream, and an independent audio processing algorithm can be configured for the independent audio output channel, thereby allowing flexibility in audio adjustment. It has been improved, and the audio processing effect on electronic devices has been enhanced in a targeted manner to improve the user experience.
请参阅图2,本申请提供的一种音效处理方法,应用于电子设备,所述方法包括:Please refer to FIG. 2, a sound effect processing method provided in this application is applied to an electronic device, and the method includes:
步骤S210:检测当前音频输出场景包括的音频流的类型。Step S210: Detect the type of the audio stream included in the current audio output scene.
步骤S220:若检测到有音效类型的音频流,给所述音效类型的音频流配置一对应的音频输出通路,所述音效类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。Step S220: If an audio stream with a sound effect type is detected, a corresponding audio output path is configured for the audio stream of the audio effect type, and an audio output path configured with the audio stream of the audio effect type and audio configured with other types of audio streams The output path is different.
其中,作为一种方式,本申请中对于检测音频流的类型可以在音频输出场景一开始就开始检测,也可以在音频输出场景显示一段时间后再开始。Among them, as a method, the type of detecting the audio stream in this application may be detected at the beginning of the audio output scene, or may be started after the audio output scene is displayed for a period of time.
其中,作为一种方式,若在当前音频输出场景一开始就开始检测,也就是在当前音频输出场景所包括的音频流一开始播放的时刻即开始检测,那么在这种情况下,电子设备还未执行给检测到的各类音频流分配音频输出通路。那么电子设备可以在有音频流被播放之前检测到有音效类型的音频流的情况下,给所述音效类型的音频流配置一对应的音频输出通路,且所述音效类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。Among them, as a method, if the detection is started at the beginning of the current audio output scene, that is, the detection is started at the moment the audio stream included in the current audio output scene starts to play, then in this case, the electronic device also Assignment of audio output paths to the various types of audio streams detected is not performed. Then, the electronic device may configure a corresponding audio output channel for the audio stream of the audio effect type when an audio stream of the audio effect type is detected before the audio stream is played, and the audio configured by the audio stream of the audio effect type is configured. The output path is different from the audio output path of other types of audio stream configurations.
再者,可以在当前音频输出场景显示一段时间后,再开始检测当前音频输 出场景包括的音频流的类型。那么在这种情况下,在当前音频输出场景包括音效、背景音乐以及按键音等类型的音频流的情况下,若检测到音效类型的音频流与其他类型的音频流混合在一个音频输出通路中进行输出的情况下,可以将混合在其他音频类型的音频流对应的音频输出通路中的音效类型的音频流分离出来,进而再单独给给所述音效类型的音频流配置一对应的音频输出通路,从而实现即使在初始阶段音效类型的音频流没有单独分配音频输出通路的情况下,依然可以实现后期的对于音效类型的音频流单独分配音频输出通路。Furthermore, after the current audio output scene is displayed for a period of time, the type of the audio stream included in the current audio output scene can be detected. Then in this case, in the case where the current audio output scene includes types of audio streams such as sound effects, background music, and button sounds, if it is detected that the audio stream of the audio effect type is mixed with other types of audio streams in one audio output path In the case of outputting, an audio stream of an audio effect type mixed in an audio output path corresponding to an audio stream of another audio type may be separated, and then a corresponding audio output path is configured for the audio stream of the audio effect type separately. Therefore, even in the case that the audio stream of the audio effect type is not separately assigned to the audio output path in the initial stage, the audio output path of the audio stream of the audio effect type can be assigned to the audio output path in the later stage.
例如,对于一些游戏类型的音频输出场景中存在动作音效,例如,游戏人物走路的音效等。电子设备的用户可以通过听所播放的其他的用户的动作音效来辨别其他用户正在做什么动作或者其他用户相对于电子设备的用户而言在什么方位。例如,对于游戏中用户走路时会对应都有“咚咚咚”的声音,当用户听到有“咚咚咚”的声音可以判断出有其他游戏用户在走路。而对于该“咚咚咚”的声音对应的相位信息可以使得电子设备的用户不仅能够判断有其他用户在走路,而且可以进一步的判断其他用户走路的方向以及离自己的远近。For example, for some game-type audio output scenes, there are action sound effects, such as the sound effect of a game character walking. The user of the electronic device can discern what actions the other user is doing or what position the other user is relative to the user of the electronic device by listening to the other user's motion sound effects. For example, when the user walks in the game, there will be a sound of "咚咚咚", and when the user hears the sound of "咚咚咚", it can be determined that other game users are walking. And the phase information corresponding to the sound of the “咚咚咚” can enable the user of the electronic device not only to judge that other users are walking, but also to further determine the direction in which the other users are walking and the distance from themselves.
比如,在图3中所示,在图3所示的游戏界面场景99中,存在用户帐户对应的游戏人物98、其他用户人物97以及墙体96。那么在这种情况下,用户可以听取其他用户人物97对应的走路的音效从而在没有在视野内看到其他用户人物97的情况下,依然可以识别出其他用户人物97在墙体96的背后,从而有利于用户提前做好应付的措施。For example, as shown in FIG. 3, in the game interface scene 99 shown in FIG. 3, there are a game character 98, other user characters 97, and a wall 96 corresponding to a user account. Then, in this case, the user can listen to the walking sound effects of other user characters 97 and thus can still recognize other user characters 97 behind the wall 96 without seeing other user characters 97 in the field of vision. This is helpful for users to take measures in advance.
那么在一些音频输出场景中,为了节约电量,会将音效类型的音频流混合在其他音频类型的音频流对应的音频输出通路中,从而使得对于音效类型的音频流以及其他音频类型的音频流都是基于相同的音效处理算法处理的,那么对于音效类型的音频流而言可能无法达到较为良好的视听效果,也不利于用户识别音效所代表的意义。Then in some audio output scenarios, in order to save power, the audio stream of the audio effect type is mixed in the audio output channel corresponding to the audio stream of the other audio type, so that the audio stream of the audio effect type and the audio stream of other audio types are both It is processed based on the same sound effect processing algorithm, so it may not be able to achieve a good audiovisual effect for the audio stream of the sound effect type, and it is not conducive to the meaning of the user to identify the sound effect.
那么在这种情况下,基于上述的音频通路分配方式,可以在检测到将音效类型的音频流混合在其他音频类型的音频流对应的音频输出通路中的情况下,将音效类型的音频流从原本混合的音频输出通路中分离出来,单独分配音频输出通路进行传输,从而可以有利于采用专门适配音效增强的音效处理算法来处理,以提升音效类型的音频流被播放时的视听效果。Then, in this case, based on the above-mentioned audio path allocation method, when it is detected that the audio stream of the audio effect type is mixed in the audio output path corresponding to the audio stream of the other audio type, the audio stream of the audio effect type is removed from The original mixed audio output channels are separated, and the audio output channels are allocated separately for transmission, which can facilitate the processing by a sound effect processing algorithm specially adapted to enhance sound effects, so as to improve the audiovisual effect when the audio stream of the sound effect type is played.
步骤S230:给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出 的音频进行处理。Step S230: Configure a corresponding audio processing algorithm for each of the audio output channels, so as to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
其中,作为一种方式,若检测到所述音效类型的音频流包括多种音效;根据所述音效类型的音频流中音效的种类,给所述音效类型的音频流对应的音频输出通路配置对应的音频处理算法。Wherein, as a method, if it is detected that the audio stream of the audio effect type includes multiple audio effects, the audio output channel corresponding to the audio stream of the audio effect type is configured to correspond to the type of audio effect in the audio stream of the audio effect type. Audio processing algorithm.
可以理解的是,在一些音频输出场景中存在多种类型的音效。例如,在游戏界面场景中,可能包括人物动作音效、人物说话声的音效以及环境音效等。其中环境音效可以包括风吹过的声音以及物体掉落的声音等。那么在包括多种类型的音效的情况下,音效类型的音频流依然是由同一个音频输出通路进行输出的,那么若对于不同的类型的音效依然采用相同的音效处理方法进行处理,可能会造成增强效果不佳。那么作为一种方式,电子设备可以实时根据当前用于传输音效类型的音频流的音频输出通路中所传输的音效的种类,来确定与之对应的音效处理方法。It can be understood that there are multiple types of sound effects in some audio output scenes. For example, in a game interface scene, it may include character action sound effects, character speaking sound effects, and environmental sound effects. The environmental sound effects may include sounds of wind blowing and sounds of objects falling. In the case of including multiple types of sound effects, the audio stream of the sound effect type is still output by the same audio output channel. If different types of sound effects are still processed by the same sound effect processing method, it may cause The enhancement effect is not good. Then, as a way, the electronic device may determine the corresponding sound effect processing method in real time according to the type of sound effect transmitted in the audio output path currently used to transmit the audio effect type audio stream.
例如,若电子设备检测到音频输出通路中传输的为人物动作音效,那么可以基于人物动作音效对应的音效处理算法来进行增强,若电子设备检测到音频输出通路中传输的为人物说话声的音效,那么可以基于人物说话声的音效对应的音效处理算法来进行增强。For example, if the electronic device detects that a person's action sound effect is transmitted in the audio output path, it can be enhanced based on a sound effect processing algorithm corresponding to the person's action sound effect. , Then it can be enhanced based on the sound effect processing algorithm corresponding to the sound effect of the character's voice.
可选的,基于上述内容,所述根据所述音效类型的音频流中音效的种类,给所述音效类型的音频流对应的音频输出通路配置对应的音频处理算法的步骤包括:获取所述多种音效中与所述当前音频输出场景的匹配度最高的音效;给所述音频类型的音频流对应的音频输出通路,配置与所述匹配度最高的音效对应的音频处理算法。Optionally, based on the foregoing content, the step of configuring a corresponding audio processing algorithm for an audio output path corresponding to the audio effect type audio stream according to the type of audio effect in the audio effect type audio stream includes: obtaining the multiple Among the sound effects, the sound effect that has the highest degree of matching with the current audio output scene; an audio processing algorithm corresponding to the sound effect that has the highest degree of matching is configured for an audio output path corresponding to the audio stream of the audio type.
可以理解的是,在不同的音频输出场景中,对于音频输出的效果,用户可能会有不同的期望。例如,在战斗类型的游戏场景中,用户更期望能够对人物动作音效进行增强,以便可以更加快速的识别“敌人”的方向。It can be understood that in different audio output scenarios, users may have different expectations for the effect of audio output. For example, in battle-type game scenes, users are more likely to enhance the sound effects of character actions so that the direction of "enemy" can be identified more quickly.
其中,需要说明的是,人耳辨别方向的机制可以简单理解为是由左右耳协同作用所产生的,这就像我们用双眼看物体才可以辨认距离一样。双耳接受的声音存在着“强度差”和“时间差”,在包含更多低频分量的声音中还存在着“相位差”,同时人头对声音还有一定的遮蔽效应从而产生“音色差”。那么对于前述的人物动作音效可以理解为动作声音的“强度差”、“时间差”或者“音色差”。那么在这种场景下,用户更期望增强“强度差”、“时间差”或者“音色差”。再或者在视频播放场景中,用户更期望背景音乐的音效能够增强,从 而达到较好的视听体验。Among them, it should be noted that the mechanism of the human ear to discern the direction can be simply understood as the coordinated action of the left and right ears, just like we can recognize the distance by looking at the object with both eyes. The sounds received by both ears have "intensity difference" and "time difference", and there is also a "phase difference" in sounds containing more low-frequency components. At the same time, the human head still has a certain masking effect on the sound to produce "tone color difference". Then, for the aforementioned character motion sound effect, it can be understood as "intensity difference", "time difference", or "tone color difference" of the action sound. Then in this scenario, the user is more expected to enhance the "intensity difference", "time difference" or "tone color difference". Or in the video playback scene, users expect the sound effects of background music to be enhanced to achieve a better audiovisual experience.
那么,作为一种方式,所述获取所述多种音效中与所述当前音频输出场景的匹配度最高的音效的步骤包括:若所述当前音频输出场景为游戏场景,所述匹配度最高的音效为人物动作音效;若所述当前音频输出场景为音乐播放场景,所述匹配度最高的音效为人声音效;若所述当前音频输出场景为视频播放场景,所述匹配度最高的音效为环境音效。Then, as a way, the step of obtaining the sound effect with the highest matching degree among the plurality of sound effects and the current audio output scene includes: if the current audio output scene is a game scene, the highest matching degree The sound effect is a person's action sound effect; if the current audio output scene is a music playing scene, the highest matching sound effect is a human voice effect; if the current audio output scene is a video playing scene, the most matching sound effect is an environment Sound effects.
除了上述的根据所述音频类型的音频流中音效的种类,给所述音频类型的音频流对应的音频输出通路配置对应的音频处理算法的方式外,在本申请中,作为另外一种方式,电子设备还可以获取所述音频流中音效的种类数量;若所述数量大于设定的数量值,给所述音频类型的音频流对应的音频输出通路配置兼容度最高的音频处理算法。In addition to the foregoing method of configuring a corresponding audio processing algorithm for an audio output path corresponding to the audio type audio stream according to the type of audio effect in the audio type audio stream, in this application, as another method, The electronic device may also obtain the number of types of audio effects in the audio stream; if the number is greater than the set number value, the audio output channel corresponding to the audio stream of the audio type is configured with the most compatible audio processing algorithm.
可以理解的是,若电子设备给每种音频流均各自分配一个音频输出通路,并且对于每个音频输出通路再各自配置一种音频处理算法,可能会增大电子设备的电量消耗以及增大处理器的工作负荷。那么作为一种方式,若检测到音频流的类型超过了设定阈值,那么可以从多个备选的音频处理算法中确定一个兼容性高的音频处理算法来对传输所有类型的音频流的音频输出通路进行处理。It can be understood that if an electronic device assigns an audio output channel to each audio stream and configures an audio processing algorithm for each audio output channel, it may increase the power consumption and processing of the electronic device. Workload. Then, as a method, if it is detected that the type of the audio stream exceeds a set threshold, then a highly compatible audio processing algorithm may be determined from multiple alternative audio processing algorithms to transmit audio of all types of audio streams. The output path is processed.
再者,作为另外一种方式,也可以根据前述的方式确定当前音频输出场景对应的匹配度最高的音频类型的音频流。将匹配度最高的音频类型的音频流单独配置一个音频输出通路,而将所有其他类型的音频输出通路配置同一个音频输出通路,然后再给传输所有其他音频类型的音频流的音频输出通路配置一个兼容性高的音效处理算法。Furthermore, as another method, an audio stream with the highest matching audio type corresponding to the current audio output scene may also be determined according to the foregoing method. Configure the audio stream with the highest matching audio type separately as an audio output channel, and configure all other types of audio output channels with the same audio output channel, and then configure one audio output channel for all other audio types. Highly compatible sound processing algorithm.
例如,对于在游戏界面场景中,可以确定音效类型的音频流为匹配度最高的音频类型的音频流,从而在游戏界面场景类型的音频输出场景中,给音效类型的音频流单独分配一音频输出通路。对于在音乐播放场景中,可以确定背景音乐类型的音频流为匹配度最高的音频类型的音频流,从而在音乐播放场景类型的音频输出场景中,给背景音乐类型的音频流单独分配一音频输出通路。For example, in a game interface scene, the audio stream of the sound effect type can be determined to be the audio stream with the highest match, so that in the audio output scene of the game interface scene type, an audio output is assigned to the audio stream of the sound effect type separately. path. For a music playback scene, the audio stream of the background music type can be determined to be the audio stream of the highest matching type, so in the audio output scene type of the music playback scene, an audio output is separately assigned to the audio stream of the background music type path.
本申请提供的一种音效处理方法,通过检测当前音频输出场景包括的音频流的类型,在当检测到有音效类型的音频流后,给所述音效类型的音频流配置一不同于其他类型的音频流配置的音频输出通路的音频输出通路,再给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理,进而使 得对于设定类型的音频流可以分配独立的音频输出通路,并且对于独立的音频输出通路还可以配置独立的音频处理算法,从而使得音频调节的灵活性得到提升,而对于电子设备的音频处理效果得到了针对性的增强,提升了用户体验。A sound effect processing method provided by this application is to detect a type of an audio stream included in a current audio output scene, and after detecting an audio stream of an audio effect type, configure the audio stream of the audio effect type to be different from other types of audio streams. An audio output channel of an audio output channel configured by an audio stream, and a corresponding audio processing algorithm is configured for each of the audio output channels, so that each of the audio outputs is based on an audio processing algorithm corresponding to each of the audio output channels. The audio output from the channel is processed, so that an independent audio output channel can be assigned to a set type of audio stream, and an independent audio processing algorithm can be configured for the independent audio output channel, thereby improving the flexibility of audio adjustment. , And the audio processing effects for electronic devices have been specifically enhanced to enhance the user experience.
请参阅图4,本申请提供的一种音效处理方法,应用于电子设备,所述方法包括:Please refer to FIG. 4, a sound effect processing method provided in this application is applied to an electronic device, and the method includes:
步骤S310:检测当前音频输出场景包括的音频流的类型。Step S310: Detect the type of the audio stream included in the current audio output scene.
步骤S320:判断当前音频输出场景所属的应用程序是否为预设的应用程序。Step S320: Determine whether the application program to which the current audio output scene belongs is a preset application program.
电子设备可以通过多种方式来确定当前的音频输出场景所属的应用程序。可选的,电子设备可以通过查询当前正在运行的应用程序来确定当前的音频输出场景所属的应用程序。其中,作为一种方式,若电子设备为Android操作***,可以通过执行ActivityManager的getRunningTasks方法来获取到当前在前台运行的应用程序的名称。此外,电子设备还可以通过UsageStatsManager来获取用户使用的程序的列表,将该列表中记录的最近使用的应用程序识别为当前的前台应用。再者,还可以通过Android自带无障碍功能,监控窗口焦点的变化,拿到焦点窗口对应包名作为当前在前台运行的应用程序。那么在确定当前前台所运行的应用程序后,即可将当前前台所运行的且有音频输出的应用程序识别为当前音频输出场景所属的应用程序。The electronic device can determine the application program to which the current audio output scene belongs in various ways. Optionally, the electronic device may determine the application program to which the current audio output scene belongs by querying the currently running application program. Among them, if the electronic device is an Android operating system, the name of the application currently running in the foreground can be obtained by executing the getRunningTasks method of the ActivityManager. In addition, the electronic device can also obtain a list of programs used by the user through UsageStatsManager, and identify the most recently used application recorded in the list as the current foreground application. In addition, you can also use Android's built-in accessibility function to monitor the focus change of the window and get the package name corresponding to the focus window as the application currently running in the foreground. Then after determining the application running in the current foreground, the application running in the current foreground and having audio output can be identified as the application to which the current audio output scene belongs.
作为一种方式,对于预设的应用程序可以通过白名单的方式来实现。As a way, the preset application program can be implemented through a white list.
步骤S330:若不是预设的应用程序,给所有检测到的音频流配置同一音频输出通路。Step S330: if it is not a preset application program, configure the same audio output path for all detected audio streams.
步骤S340:若是预设的应用程序,在检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。Step S340: If it is a preset application program, when a set type audio stream is detected, a corresponding audio output channel is configured for the set type audio stream, and the set type audio stream is configured for audio output. The channels are different from the audio output channels of other types of audio stream configurations.
步骤S350:给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。Step S350: Configure a corresponding audio processing algorithm for each of the audio output channels, so as to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels.
本申请提供的一种音效处理方法,通过检测当前音频输出场景包括的音频流的类型,在当检测到有设定类型的音频流后,且在检测到当前音频输出场景所属的应用程序为设定类型的应用程序后,给所述设定类型的音频流配置一不同于其他类型的音频流配置的音频输出通路的音频输出通路,再给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的 音频处理算法,对每个所述音频输出通路所输出的音频进行处理,进而使得对于设定类型的音频流可以分配独立的音频输出通路,并且对于独立的音频输出通路还可以配置独立的音频处理算法,从而使得音频调节的灵活性得到提升,而对于电子设备的音频处理效果得到了针对性的增强,提升了用户体验。A sound effect processing method provided by this application is to detect a type of an audio stream included in a current audio output scene, after detecting a set type of audio stream, and after detecting that an application program to which the current audio output scene belongs is set After a certain type of application is configured, an audio output channel different from the audio output channel configured by other types of audio streams is configured for the audio stream of the set type, and a corresponding audio processing algorithm is configured for each of the audio output channels. In order to process the audio output from each of the audio output channels based on the audio processing algorithm corresponding to each of the audio output channels, so that an independent audio output channel can be assigned to a set type of audio stream, and for Independent audio output channels can also be configured with independent audio processing algorithms, which improves the flexibility of audio adjustment, and enhances the audio processing effects of electronic devices in a targeted manner to improve the user experience.
请参阅图5,本申请提供的一种音效处理装置400,运行于电子设备,所述装置400包括:音频流检测单元410、通路管理单元420以及音效处理单元430。Referring to FIG. 5, a sound effect processing device 400 provided in the present application runs on an electronic device. The device 400 includes: an audio stream detection unit 410, a path management unit 420, and a sound effect processing unit 430.
音频流检测单元410,用于检测当前音频输出场景包括的音频流的类型。The audio stream detection unit 410 is configured to detect a type of an audio stream included in a current audio output scene.
通路管理单元420,用于若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。The path management unit 420 is configured to configure a corresponding audio output path to the audio stream of the set type if an audio stream of the set type is detected, and the audio output path configured by the audio stream of the set type and other The type of audio stream configuration has different audio output paths.
通路管理单元420,还用于音频流检测单元410检测到所述其他类型的音频流有多个后,给多个所述其他类型的音频流分别配置一个音频输出通路。The path management unit 420 is further configured to, after the audio stream detection unit 410 detects that there are a plurality of other types of audio streams, configure an audio output path for each of the other types of audio streams.
音效处理单元430,用于给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。A sound effect processing unit 430 is configured to configure a corresponding audio processing algorithm for each of the audio output channels, so as to perform audio output on each of the audio output channels based on an audio processing algorithm corresponding to each of the audio output channels. deal with.
请参阅图6,本申请提供的一种音效处理装置500,运行于电子设备,所述装置500包括:音频流检测单元510、通路管理单元520、音效种类检测单元530以及音效处理单元540。Referring to FIG. 6, a sound effect processing device 500 provided in the present application runs on an electronic device. The device 500 includes: an audio stream detection unit 510, a path management unit 520, a sound effect type detection unit 530, and a sound effect processing unit 540.
音频流检测单元510,用于检测当前音频输出场景包括的音频流的类型。The audio stream detection unit 510 is configured to detect a type of an audio stream included in a current audio output scene.
通路管理单元520,若检测到有音效类型的音频流,给所述音效类型的音频流配置一对应的音频输出通路,所述音效类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。The path management unit 520 configures a corresponding audio output path for the audio effect type audio stream if an audio type audio stream is detected, and the audio output path configured by the audio effect type audio stream is configured with other types of audio stream configurations. The audio output path is different.
音效种类检测单元530,用于检测到所述音效类型的音频流种类;A sound effect type detection unit 530, configured to detect an audio stream type of the sound effect type;
音效处理单元540,用于若音效种类检测单元530检测到所述音效类型的音频流中包括多种音效;根据所述音效类型的音频流中音效的种类,给所述音效类型的音频流对应的音频输出通路配置对应的音频处理算法。The sound effect processing unit 540 is configured to: if the sound effect type detecting unit 530 detects that the audio stream of the sound effect type includes multiple sound effects, and corresponding to the audio stream of the sound effect type according to the type of the sound effect in the audio stream of the sound effect type The audio output path is configured with the corresponding audio processing algorithm.
作为一种方式,音效处理单元540,具体用于获取所述多种音效中与所述当前音频输出场景的匹配度最高的音效;给所述音频类型的音频流对应的音频输出通路,配置与所述匹配度最高的音效对应的音频处理算法。As a method, the sound effect processing unit 540 is specifically configured to obtain a sound effect that has the highest matching degree with the current audio output scene among the multiple sound effects, and configure an audio output path corresponding to the audio stream of the audio type to be configured with An audio processing algorithm corresponding to the sound effect with the highest matching degree.
其中,可选的,所述获取所述多种音效中与所述当前音频输出场景的匹配度最高的音效的步骤包括:若所述当前音频输出场景为游戏场景,所述匹配度 最高的音效为人物动作音效;若所述当前音频输出场景为音乐播放场景,所述匹配度最高的音效为人声音效;若所述当前音频输出场景为视频播放场景,所述匹配度最高的音效为环境音效。Wherein, optionally, the step of obtaining the sound effect with the highest matching degree among the plurality of sound effects and the current audio output scene includes: if the current audio output scene is a game scene, the sound effect with the highest matching degree Is a human action sound effect; if the current audio output scene is a music playback scene, the highest matching sound effect is a human voice effect; if the current audio output scene is a video playback scene, the highest matching sound effect is an environmental sound effect .
作为另外一种方式,音效处理单元540,具体用于获取所述音频流中音效的种类数量;若所述数量大于设定的数量值,给所述音频类型的音频流对应的音频输出通路配置兼容度最高的音频处理算法。若所述数量不大于设定的数量值,给每个所述音频输出通路配置对应的音频处理算法。As another way, the sound effect processing unit 540 is specifically configured to obtain the number of types of sound effects in the audio stream; if the number is greater than a set number value, configure an audio output path corresponding to the audio stream of the audio type The most compatible audio processing algorithm. If the number is not greater than a set number value, a corresponding audio processing algorithm is configured for each of the audio output channels.
请参阅图7,本申请提供的一种音效处理装置600,运行于电子设备,所述装置600包括:音频流检测单元610、程序鉴权单元620、通路管理单元630以及音效处理单元640。Referring to FIG. 7, a sound effect processing device 600 provided in the present application runs on an electronic device. The device 600 includes: an audio stream detection unit 610, a program authentication unit 620, a path management unit 630, and a sound effect processing unit 640.
音频流检测单元610,用于检测当前音频输出场景包括的音频流的类型。The audio stream detection unit 610 is configured to detect a type of an audio stream included in a current audio output scene.
程序鉴权单元620,用于判断当前音频输出场景所属的应用程序是否为预设的应用程序。The program authentication unit 620 is configured to determine whether an application program to which the current audio output scene belongs is a preset application program.
通路管理单元630,用于若检测到有设定类型的音频流,且程序鉴权单元620判断当前音频输出场景所属的应用程序为预设的应用程序,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同。The path management unit 630 is configured to, if a set type audio stream is detected, and the program authentication unit 620 determines that the application program to which the current audio output scene belongs is a preset application program, and configures the set type audio stream. A corresponding audio output path. The audio output path of the set type of audio stream configuration is different from the audio output path of other types of audio stream configuration.
音效处理单元640,用于给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。A sound effect processing unit 640 is configured to configure a corresponding audio processing algorithm for each of the audio output channels, so as to perform audio output on each of the audio output channels based on an audio processing algorithm corresponding to each of the audio output channels. deal with.
需要说明的是,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the devices and units described above can refer to the corresponding processes in the foregoing method embodiments, and are not repeated here. . In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical, or other forms of coupling. In addition, 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.
需要说明的是,本申请中具体如何根据音频编码类型对音频数据进行编码是可以采用现有的技术,本申请就不再细述。It should be noted that, in the present application, specifically how to encode audio data according to the type of audio encoding can use existing technology, which will not be described in detail in this application.
综上所述,本申请提供的一种音效处理方法、装置、电子设备及存储介质,通过检测当前音频输出场景包括的音频流的类型,在当检测到有设定类型的音 频流后,给所述设定类型的音频流配置一不同于其他类型的音频流配置的音频输出通路的音频输出通路,再给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理,进而使得对于设定类型的音频流可以分配独立的音频输出通路,并且对于独立的音频输出通路还可以配置独立的音频处理算法,从而使得音频调节的灵活性得到提升,而对于电子设备的音频处理效果得到了针对性的增强,提升了用户体验。In summary, a sound effect processing method, device, electronic device and storage medium provided by the present application detect the type of audio stream included in the current audio output scene, and after detecting a set type of audio stream, give The set type of audio stream configuration is an audio output channel different from the audio output channels of other types of audio stream configuration, and a corresponding audio processing algorithm is configured for each of the audio output channels so as to be based on each of the audio The audio processing algorithm corresponding to the output channel processes the audio output from each of the audio output channels, so that an independent audio output channel can be assigned to a set type of audio stream, and an independent audio output channel can also be configured Independent audio processing algorithm, so that the flexibility of audio adjustment is improved, and the audio processing effect of electronic devices has been specifically enhanced to improve the user experience.
下面将结合图8对本申请提供的一种电子设备进行说明。An electronic device provided in the present application will be described below with reference to FIG. 8.
请参阅图8,基于上述的音效处理方法、装置,本申请实施例还提供的另一种可以执行前述终端控制方法的电子设备100。电子设备100包括相互耦合的一个或多个(图中仅示出一个)处理器102、存储器104、无线模块106以及音频模块108。其中,该存储器104中存储有可以执行前述实施例中内容的程序,而处理器102可以执行该存储器104中存储的程序。Referring to FIG. 8, based on the foregoing sound effect processing method and device, another embodiment of the present application further provides an electronic device 100 that can execute the foregoing terminal control method. The electronic device 100 includes one or more processors (only one is shown in the figure), a memory 104, a wireless module 106, and an audio module 108 that are coupled to each other. The memory 104 stores a program that can execute the content in the foregoing embodiment, and the processor 102 can execute the program stored in the memory 104.
其中,处理器102可以包括一个或者多个处理核。处理器102利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器104内的指令、程序、代码集或指令集,以及调用存储在存储器104内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器102可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器102可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作***、用户界面和目标应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器102中,单独通过一块通信芯片进行实现。The processor 102 may include one or more processing cores. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes or executes instructions, programs, code sets, or instruction sets stored in the memory 104 by calling or executing data stored in the memory 104 to execute Various functions and processing data of the electronic device 100. Optionally, the processor 102 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 102 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. Among them, the CPU mainly handles the operating system, user interface, and target applications; 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 102, and may be implemented by a communication chip alone.
存储器104可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器104可用于存储指令、程序、代码、代码集或指令集。存储器104可包括存储程序区和存储数据区,例如,存储器104中可以存储有音效处理装置。该音效处理装置可以为前述的装置400、装置500或者装置600。其中,存储程序区可存储用于实现操作***的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、 用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 104 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 104 may include a storage program area and a storage data area. For example, the memory 104 may store a sound effect processing device. The sound effect processing device may be the foregoing device 400, device 500, or device 600. The storage program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), and instructions for implementing the following method embodiments. Wait. The storage data area may also store data (such as phonebook, audio and video data, and chat history data) created by the terminal 100 during use.
所述无线模块106用于接收以及发送电磁波,实现电磁波与电信号的相互转换,从而与通讯网络或者其他设备进行通讯,例如和音频播放设备进行通讯。所述无线模块106可包括各种现有的用于执行这些功能的电路元件,例如,天线、射频收发器、数字信号处理器、加密/解密芯片、用户身份模块(SIM)卡、存储器等等。所述无线模块106可与各种网络如互联网、企业内部网、无线网络进行通讯或者通过无线网络与其他电子设备进行通讯。上述的无线网络可包括蜂窝式电话网、无线局域网或者城域网。上述的无线网络可以使用各种通信标准、协议及技术,包括但并不限于IEEE 802协议以
Figure PCTCN2019090441-appb-000001
蓝牙协议,甚至可包括那些当前仍未被开发出来的协议。
The wireless module 106 is used to receive and send electromagnetic waves, and realize the mutual conversion of electromagnetic waves and electrical signals, so as to communicate with a communication network or other equipment, such as communicating with audio playback equipment. The wireless module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption / decryption chip, a subscriber identity module (SIM) card, a memory, and the like . The wireless module 106 can communicate with various networks, such as the Internet, an intranet, and a wireless network, or communicate with other electronic devices through a wireless network. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. The above wireless network can use various communication standards, protocols and technologies, including but not limited to the IEEE 802 protocol to
Figure PCTCN2019090441-appb-000001
Bluetooth protocols can even include those that have not yet been developed.
再者,该音频模块108可以用于处理电子设备100中所运行的应用程序输出的音频。例如,该音频模块108可以接收无线模块106从其他电子设备获取的音频处理参数,然后调节音频模块108的音频处理参数。再者,可以根据处理器102执行存储器104中存储的程序给每个音频输出通路确定好音频处理算法后,基于确定的音频处理算法处理每个音频输出通路所传输的音频流。Furthermore, the audio module 108 can be used to process audio output by an application program running in the electronic device 100. For example, the audio module 108 may receive audio processing parameters obtained by the wireless module 106 from other electronic devices, and then adjust the audio processing parameters of the audio module 108. Furthermore, after the processor 102 executes the program stored in the memory 104 to determine an audio processing algorithm for each audio output path, the audio stream transmitted by each audio output path is processed based on the determined audio processing algorithm.
请参考图9,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 9, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 800 stores program code, and the program code can be called by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer-readable storage medium 800 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. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has a storage space for program code 810 that performs any of the method steps in the above-described methods. These program codes can be read from or written into one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行***、装置或设备或结合这些指令执行***、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子设备),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM 或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) with one or more wirings, portable computer disk enclosures (magnetic devices), random access memory (RAM), Read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, because, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or other suitable Processing to obtain the program electronically and then store it in computer memory.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to describe the technical solution of the present application, rather than limiting it. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still Modifications to the technical solutions described in the foregoing embodiments, or equivalent replacements of some of the technical features thereof; and these modifications or replacements do not drive the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种音效处理方法,其特征在于,应用于电子设备,所述方法包括:A sound effect processing method, which is characterized in that the method is applied to an electronic device, and the method includes:
    检测当前音频输出场景包括的音频流的类型;Detect the type of audio stream included in the current audio output scene;
    若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同;If a set type audio stream is detected, a corresponding audio output path is configured for the set type audio stream, and the audio output path configured by the set type audio stream and audio configured by other types of audio streams are configured. Different output paths
    给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。A corresponding audio processing algorithm is configured for each of the audio output channels, so that the audio output by each of the audio output channels is processed based on the audio processing algorithm corresponding to each of the audio output channels.
  2. 根据权利要求1所述的方法,其特征在于,所述给每个所述音频输出通路配置对应的音频处理算法的步骤之前还包括:The method according to claim 1, wherein before the step of configuring a corresponding audio processing algorithm for each of the audio output channels, further comprising:
    若检测到所述其他类型的音频流有多个;If multiple other types of audio streams are detected;
    给多个所述其他类型的音频流分别配置一个音频输出通路。An audio output path is assigned to each of the plurality of other types of audio streams.
  3. 根据权利要求2所述的方法,其特征在于,所述设定类型包括音效类型,所述方法还包括:The method according to claim 2, wherein the setting type comprises a sound effect type, and the method further comprises:
    若检测到所述音效类型的音频流混合在其他音频类型的音频流对应的音频输出通路中,将所述音效类型的音频流从混合的音频输出通路中分离出来,单独分配音频输出通路进行传输。If it is detected that the audio stream of the audio effect type is mixed in the audio output path corresponding to the audio stream of the other audio type, the audio stream of the audio effect type is separated from the mixed audio output path, and the audio output path is separately allocated for transmission .
  4. 根据权利要求2所述的方法,其特征在于,所述给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理的步骤包括:The method according to claim 2, characterized in that the corresponding audio processing algorithm is configured for each of the audio output channels, so that each of the audio output channels is based on an audio processing algorithm corresponding to each of the audio output channels. The processing steps of the audio output from the audio output path include:
    若检测到所述音频流的类型超过了设定阈值,从多个备选的音频处理算法中确定一个兼容性高的音频处理算法来对传输所有类型的音频流的音频输出通路进行处理。If it is detected that the type of the audio stream exceeds a set threshold, an audio processing algorithm with high compatibility is determined from a plurality of candidate audio processing algorithms to process an audio output path transmitting all types of audio streams.
  5. 根据权利要求1所述的方法,其特征在于,所述设定类型包括音效类型;所述给每个所述音频输出通路配置对应的音频处理算法的步骤包括:The method according to claim 1, wherein the setting type includes a sound effect type; and the step of configuring a corresponding audio processing algorithm for each of the audio output channels includes:
    若检测到所述音效类型的音频流包括多种音效;If it is detected that the audio stream of the audio effect type includes multiple audio effects;
    根据所述音效类型的音频流中音效的种类,给所述音效类型的音频流对应的音频输出通路配置对应的音频处理算法。According to the type of audio effect in the audio stream of the audio effect type, a corresponding audio processing algorithm is configured for an audio output path corresponding to the audio stream of the audio effect type.
  6. 根据权利要求5所述的方法,其特征在于,所述根据所述音效类型的音 频流中音效的种类,给所述音效类型的音频流对应的音频输出通路配置对应的音频处理算法的步骤包括:The method according to claim 5, wherein the step of configuring a corresponding audio processing algorithm for an audio output path corresponding to the audio stream of the audio effect type according to the type of audio effect in the audio stream of the audio effect type comprises: :
    获取所述多种音效中与所述当前音频输出场景的匹配度最高的音效;Obtaining a sound effect that has the highest matching degree with the current audio output scene among the multiple sound effects;
    给所述音频类型的音频流对应的音频输出通路,配置与所述匹配度最高的音效对应的音频处理算法。The audio output channel corresponding to the audio stream of the audio type is configured with an audio processing algorithm corresponding to the sound effect with the highest matching degree.
  7. 根据权利要求6所述的方法,其特征在于,所述获取所述多种音效中与所述当前音频输出场景的匹配度最高的音效的步骤包括:The method according to claim 6, wherein the step of obtaining the sound effect with the highest matching degree with the current audio output scene among the plurality of sound effects comprises:
    若所述当前音频输出场景为游戏场景,所述匹配度最高的音效为人物动作音效;If the current audio output scene is a game scene, the most matched sound effect is a character action sound effect;
    若所述当前音频输出场景为音乐播放场景,所述匹配度最高的音效为人声音效;If the current audio output scene is a music playback scene, the most matched sound effect is a human voice effect;
    若所述当前音频输出场景为视频播放场景,所述匹配度最高的音效为环境音效。If the current audio output scene is a video playback scene, the most matched sound effect is an ambient sound effect.
  8. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, further comprising:
    根据所述所传输的音效的种类确定对应的音频处理算法对所述音效进行处理;Determining a corresponding audio processing algorithm to process the sound effect according to the type of the transmitted sound effect;
    若音频输出通路中所传输的为人物动作音效,基于所述人物动作音效对应的音效处理算法对所述音效进行增强,若音频输出通路中所传输的为人物说话声的音效,基于所述人物说话声的音效对应的音效处理算法对所述音效进行增强。If the character output sound effect is transmitted in the audio output path, the sound effect is enhanced based on the sound effect processing algorithm corresponding to the character action sound effect. If the character output sound effect is transmitted in the audio output path, the character is based on the character The sound effect processing algorithm corresponding to the sound effect of the speaking sound enhances the sound effect.
  9. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, further comprising:
    将所述匹配度最高的音频类型的音频流单独配置一个音频输出通路,将所有其他类型的音频输出通路配置同一个音频输出通路,对传输所述所有其他音频类型的音频流的音频输出通路配置一个兼容性高的音效处理算法。The audio streams of the highest matching audio type are configured with an audio output channel separately, all other types of audio output channels are configured with the same audio output channel, and the audio output channels that transmit the audio streams of all other audio types are configured A highly compatible sound processing algorithm.
  10. 根据权利要求5所述的方法,其特征在于,所述根据所述音频类型的音频流中音效的种类,给所述音频类型的音频流对应的音频输出通路配置对应的音频处理算法的步骤包括:The method according to claim 5, wherein the step of configuring a corresponding audio processing algorithm for an audio output path corresponding to the audio stream of the audio type according to the type of sound effect in the audio stream of the audio type comprises: :
    获取所述音频流中音效的种类数量;Acquiring the number of types of sound effects in the audio stream;
    若所述数量大于设定的数量值,给所述音频类型的音频流对应的音频输出通路配置兼容度最高的音频处理算法。If the number is greater than a set number value, an audio processing algorithm with the highest compatibility is assigned to an audio output path corresponding to the audio stream of the audio type.
  11. 根据权利要求1-10任一所述的方法,其特征在于,所述若检测到有设 定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路的步骤之前还包括:The method according to any one of claims 1 to 10, wherein before the step of configuring a corresponding audio output path to the set type audio stream if a set type audio stream is detected, include:
    判断当前音频输出场景所属的应用程序是否为预设的应用程序;Determine whether the application to which the current audio output scene belongs is a preset application;
    若是预设的应用程序,执行所述若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路。If it is a preset application program, if a set type audio stream is detected, a corresponding audio output channel is configured for the set type audio stream.
  12. 根据权利要求1所述的方法,其特征在于,所述检测当前音频输出场景包括的音频流的类型的步骤包括:The method according to claim 1, wherein the step of detecting a type of an audio stream included in a current audio output scene comprises:
    根据当前音频输出场景的类型确定包括的音频流的类型;Determining the type of the included audio stream according to the type of the current audio output scene;
    若当前的音频输出场景为游戏界面场景,判定包括音效类型、背景音乐类型以及按键音类型的音频流;若当前的音频输出场景为音乐播放场景,判定包括背景音乐类型的音频流;若当前的音频输出场景为视频播放场景,判定包括音效类型以及背景音乐类型的音频流。If the current audio output scene is a game interface scene, it is determined that the audio stream includes the sound effect type, background music type, and button sound type. If the current audio output scene is a music playback scene, it is determined that the audio stream includes background music type The audio output scene is a video playback scene, and it is determined that the audio stream includes a sound effect type and a background music type.
  13. 根据权利要求1所述的方法,其特征在于,所述检测当前音频输出场景包括的音频流的类型的步骤包括:The method according to claim 1, wherein the step of detecting a type of an audio stream included in a current audio output scene comprises:
    通过检测音频输出通路的标识来确定当前音频输出场景包括的音频流类型。The type of audio stream included in the current audio output scene is determined by detecting the identifier of the audio output path.
  14. 根据权利要求1所述的方法,其特征在于,所述检测当前音频输出场景包括的音频流的类型的步骤之前还包括:The method according to claim 1, wherein before the step of detecting a type of an audio stream included in the current audio output scene, the method further comprises:
    获取当前的音频输出场景。Get the current audio output scene.
  15. 根据权利要求14所述的方法,其特征在于,所述获取当前的音频输出场景的步骤包括:The method according to claim 14, wherein the step of obtaining a current audio output scene comprises:
    获取当前正在运行的应用程序;Get the currently running application;
    根据所述当前正在运行的应用程序的类型确定当前的音频输出场景。Determine the current audio output scene according to the type of the currently running application.
  16. 根据权利要求15所述的方法,其特征在于,所述根据所述当前正在运行的应用程序的类型确定当前的音频输出场景的步骤包括:The method according to claim 15, wherein the step of determining a current audio output scene according to a type of the currently running application program comprises:
    若所述应用程序为游戏类的应用程序,判定当前的音频输出场景为游戏界面场景,若所述应用程序为音乐播放类的应用程序,判定当前的音频输出场景为音乐播放场景,若所述应用程序为视频类的应用程序,判定当前的音频输出场景为视频播放场景。If the application is a game application, determine that the current audio output scene is a game interface scene, if the application is a music playback application, determine that the current audio output scene is a music playback scene, if the The application is a video application, and determines that the current audio output scene is a video playback scene.
  17. 一种音效处理装置,其特征在于,运行于电子设备,所述装置包括:A sound effect processing device, characterized in that it runs on electronic equipment, and the device includes:
    音频流检测单元,用于检测当前音频输出场景包括的音频流的类型;An audio stream detection unit, configured to detect the type of audio stream included in the current audio output scene;
    通路管理单元,用于若检测到有设定类型的音频流,给所述设定类型的音频流配置一对应的音频输出通路,所述设定类型的音频流配置的音频输出通路与其他类型的音频流配置的音频输出通路不同;A path management unit, configured to configure a corresponding audio output path to the audio stream of the set type if the audio stream of the set type is detected, and the audio output path configured by the audio stream of the set type and other types The audio output channels of different audio stream configurations are different;
    音效处理单元,用于给每个所述音频输出通路配置对应的音频处理算法,以便基于每个所述音频输出通路对应的音频处理算法,对每个所述音频输出通路所输出的音频进行处理。A sound effect processing unit, configured to configure a corresponding audio processing algorithm for each of the audio output channels, so as to process audio output by each of the audio output channels based on an audio processing algorithm corresponding to each of the audio output channels .
  18. 根据权利要求8所述的装置,其特征在于,所述音效处理单元还用于所述音频流检测单元若检测到所述其他类型的音频流有多个后,给多个所述其他类型的音频流分别配置一个音频输出通路。The device according to claim 8, wherein the sound effect processing unit is further configured to, if the audio stream detection unit detects that the other types of audio streams are multiple, give the multiple other types of audio streams Each audio stream is configured with an audio output channel.
  19. 一种电子设备,其特征在于,包括一个或多个处理器以及存储器;An electronic device, comprising one or more processors and a memory;
    一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行权利要求1-16任一所述的方法。One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the method of any one of claims 1-16.
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有程序代码,其中,在所述程序代码被处理器运行时执行权利要求1-16任一所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium stores program code, wherein when the program code is run by a processor, the method according to any one of claims 1-16 is performed.
PCT/CN2019/090441 2018-09-04 2019-06-06 Sound effect processing method, device, electronic device and storage medium WO2020048175A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811027459.5A CN109218528B (en) 2018-09-04 2018-09-04 Sound effect processing method and device and electronic equipment
CN201811027459.5 2018-09-04

Publications (1)

Publication Number Publication Date
WO2020048175A1 true WO2020048175A1 (en) 2020-03-12

Family

ID=64986154

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/090441 WO2020048175A1 (en) 2018-09-04 2019-06-06 Sound effect processing method, device, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN109218528B (en)
WO (1) WO2020048175A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218528B (en) * 2018-09-04 2021-03-02 Oppo广东移动通信有限公司 Sound effect processing method and device and electronic equipment
CN109165005B (en) * 2018-09-04 2020-08-25 Oppo广东移动通信有限公司 Sound effect enhancement method and device, electronic equipment and storage medium
US11533560B2 (en) * 2019-11-15 2022-12-20 Boomcloud 360 Inc. Dynamic rendering device metadata-informed audio enhancement system
CN113709906B (en) * 2020-05-22 2023-12-08 华为技术有限公司 Wireless audio system, wireless communication method and equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096981A (en) * 2015-09-25 2015-11-25 福州瑞芯微电子股份有限公司 Multipath sound playing method, multipath sound playing device and multipath sound playing system
CN106126165A (en) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 A kind of audio stream processing method and mobile terminal
US20170148438A1 (en) * 2015-11-20 2017-05-25 Conexant Systems, Inc. Input/output mode control for audio processing
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal
CN109107158A (en) * 2018-09-04 2019-01-01 Oppo广东移动通信有限公司 Sound effect treatment method, device and electronic equipment
CN109218528A (en) * 2018-09-04 2019-01-15 Oppo广东移动通信有限公司 Sound effect treatment method, device and electronic equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552010B (en) * 2009-04-30 2011-09-14 华为技术有限公司 Audio treating method and audio treating device
CN103782342B (en) * 2011-07-26 2016-08-31 布克查克控股有限公司 The sound channel of e-text
CN104020979B (en) * 2014-06-20 2019-04-05 努比亚技术有限公司 A kind of mobile terminal and method of adaptive desktop selection audio
CN106095387B (en) * 2016-06-16 2019-06-25 Oppo广东移动通信有限公司 A kind of the audio setting method and terminal of terminal
CN105959482B (en) * 2016-06-16 2019-07-02 Oppo广东移动通信有限公司 A kind of control method and electronic equipment of scene audio
CN106293599A (en) * 2016-07-29 2017-01-04 联想(北京)有限公司 A kind of output control method, electronic equipment and output system
CN108391196B (en) * 2018-03-19 2021-05-07 深圳市冠旭电子股份有限公司 Audio signal processing device and sound box

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105096981A (en) * 2015-09-25 2015-11-25 福州瑞芯微电子股份有限公司 Multipath sound playing method, multipath sound playing device and multipath sound playing system
US20170148438A1 (en) * 2015-11-20 2017-05-25 Conexant Systems, Inc. Input/output mode control for audio processing
CN106126165A (en) * 2016-06-16 2016-11-16 广东欧珀移动通信有限公司 A kind of audio stream processing method and mobile terminal
CN107562405A (en) * 2017-08-18 2018-01-09 广东欧珀移动通信有限公司 Audio play control method, device and storage medium and mobile terminal
CN109107158A (en) * 2018-09-04 2019-01-01 Oppo广东移动通信有限公司 Sound effect treatment method, device and electronic equipment
CN109218528A (en) * 2018-09-04 2019-01-15 Oppo广东移动通信有限公司 Sound effect treatment method, device and electronic equipment

Also Published As

Publication number Publication date
CN109218528B (en) 2021-03-02
CN109218528A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
WO2020048175A1 (en) Sound effect processing method, device, electronic device and storage medium
CN109445740B (en) Audio playing method and device, electronic equipment and storage medium
WO2020048209A1 (en) Sound effect processing method and apparatus, and electronic device and storage medium
CN109388367B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN109257500B (en) Audio playing method and device, electronic equipment and storage medium
CN109284080B (en) Sound effect adjusting method and device, electronic equipment and storage medium
CN109165005B (en) Sound effect enhancement method and device, electronic equipment and storage medium
EP3846020A1 (en) Sound effect adjusting method and apparatus, electronic device, and storage medium
CN109151212B (en) Equipment control method and device and electronic equipment
CN109151211B (en) Voice processing method and device and electronic equipment
CN109413555B (en) Audio output method and device, earphone and electronic equipment
CN109275129B (en) Communication processing method, communication processing device, electronic equipment and storage medium
CN109410900B (en) Sound effect processing method and device and electronic equipment
CN114327179B (en) Application starting method, electronic equipment and readable storage medium
CN109379490B (en) Audio playing method and device, electronic equipment and computer readable medium
CN110808041B (en) Voice recognition method, intelligent projector and related product
CN109257732B (en) Equipment control method and device and electronic equipment
US20230364513A1 (en) Audio processing method and apparatus
US20210339132A1 (en) Method and System for Visual Display of Audio Cues in Video Games
WO2020048217A1 (en) Sound effect adjustment method, apparatus, electronic device, and storage medium
CN113411725B (en) Audio playing method and device, mobile terminal and storage medium
CN113284500B (en) Audio processing method, device, electronic equipment and storage medium
US20240013789A1 (en) Voice control method and apparatus
CN111552452A (en) Method, apparatus and storage medium for matching audio output parameters
CN109524024B (en) Audio playing method, medium, device and computing equipment

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: 19858498

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: 19858498

Country of ref document: EP

Kind code of ref document: A1