Audio output method and device, electronic equipment, storage medium and program product
By extracting audio flow feature information based on the PAL -layer interface in the audio processing system, determining the type of scene type and obtaining control strategies, solving the problem of not accurate adjustment of audio parameters in existing technology, and realizing the reliability and accuracy improvement of audio parameters , Enhance the audio playback effect.
Patent Information
- Application Number
- CN202411469886.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art can easily overwrite or modify the audio parameters of the previous audio scene during the audio adjustment process, making it difficult to accurately adjust the audio parameters of different audio scenes, affecting the audio playback effect.
By obtaining the current audio stream sent by the application software and determining that the output device is a speaker, the PAL layer-based interface extracts the characteristic information of the audio stream, determines the scene type based on the characteristic information, obtains the control strategy through the corresponding scene mode, and updates the audio parameters to Output audio stream.
A effective separation of audio parameters of different audio scenarios is achieved, enhance the reliability and accuracy of audio parameters, and enhance the audio playback effect.
Smart Images

Figure CN119342394A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to multimedia output technology, and in particular to an audio output method, device, electronic device, storage medium and program product. Background Art
[0002] Currently, users have specific requirements for audio parameters in each audio scenario. For example, music playback may require rich bass and clear treble, while voice calls need to highlight the mid-range to enhance voice clarity.
[0003] The prior art continuously adjusts the audio parameters of different audio scenes through tuning software, and when it is determined that the adjustment is completed, generates an audio parameter state corresponding to the audio scene, so that when the user plays audio in the audio scene, it can be played based on the generated audio parameter state.
[0004] However, during the audio adjustment process, adjusting the parameters of an audio scene through tuning software can easily overwrite or modify the audio parameters of a previous audio scene. Therefore, it is difficult to accurately adjust the audio parameters of different audio scenes, thereby affecting the audio playback effect. Summary of the invention
[0005] The embodiments of the present application provide an audio output method, device, electronic device, storage medium and program product to improve the reliability and accuracy of audio parameters and enhance the audio playback effect.
[0006] In a first aspect, an embodiment of the present application provides an audio adjustment method, comprising:
[0007] Get the current audio stream sent by the application software and determine the output device of the current audio stream;
[0008] When it is determined that the output device is a speaker, characteristic information of the current audio stream is determined based on an interface of the PAL layer, and the scene type is determined according to the characteristic information;
[0009] The corresponding scene interface is determined by the scene mode corresponding to the scene type, the control strategy is obtained based on the scene interface, and the current audio stream is output according to the control strategy.
[0010] Optionally, the scenario type includes a test play type, an application play type, and a speaker cleaning type;
[0011] Determine the corresponding scene interface through the scene mode corresponding to the scene type, obtain the control strategy based on the scene interface, and output the current audio stream according to the control strategy, including:
[0012] When the scene type of the current audio stream is a test play type, determining a test play mode based on the test play type, and determining a test play interface according to the test play mode;
[0013] Obtain the control strategy corresponding to the test playback mode through the test playback interface;
[0014] The protection parameters and the sound effect parameters of the current audio stream are disabled based on the control strategy, and the current audio stream is output based on the disabled protection parameters and the sound effect parameters.
[0015] Optionally, when the scene type corresponding to the current audio stream is an application play type, determining an application play mode corresponding to the application play type, the application play mode including: telephone voice mode, network voice mode, music play mode, radio play mode and ringtone play mode;
[0016] Determine the application playback interface according to the application playback mode, and obtain the control strategy corresponding to the application playback mode through the application playback interface;
[0017] The protection parameters and sound effect parameters of the current audio stream are updated based on the control strategy, and the current audio stream is output based on the updated protection parameters and sound effect parameters.
[0018] Optionally, when the scene type corresponding to the current audio stream is a speaker cleaning type, a speaker cleaning mode is determined according to the speaker cleaning type, and a speaker cleaning interface is determined according to the speaker cleaning mode;
[0019] Obtain the control strategy corresponding to the speaker cleaning mode through the speaker cleaning interface;
[0020] Based on the control strategy, the speaker cleaning protection parameters of the current audio stream are updated, and the current audio stream is output according to the updated speaker cleaning protection parameters; wherein the updated speaker cleaning protection parameters include single-frequency audio protection parameters, low-battery power protection parameters and audio output power parameters.
[0021] Optionally, determining feature information of the current audio stream, and determining the scene type according to the feature information includes:
[0022] The characteristic information of the current audio stream is obtained by accessing the interface of the PAL layer, and the scene separation strategy is obtained, and the scene type corresponding to the characteristic information is determined based on the scene separation strategy.
[0023] Optionally, before getting the current audio stream, include:
[0024] Obtain an audio adjustment instruction, and determine the scene type to be adjusted corresponding to the audio adjustment instruction and the adjustment data of the audio parameter corresponding to the scene type to be adjusted by accessing the interface of the PAL layer;
[0025] Determine the scene mode corresponding to the scene type, obtain the control strategy corresponding to the scene mode based on the scene interface under the scene mode, and update the control strategy according to the adjustment data.
[0026] In a second aspect, an embodiment of the present application provides an audio adjustment device, comprising:
[0027] The acquisition module is used to acquire the current audio stream sent by the application software and determine the output device of the current audio stream;
[0028] A processing module, used for determining feature information of the current audio stream based on an interface of a PAL layer when determining that the output device is a speaker, and determining a scene type according to the feature information;
[0029] The processing module is also used to determine the corresponding scene interface through the scene mode corresponding to the scene type, obtain the control strategy based on the scene interface, and output the current audio stream according to the control strategy.
[0030] Optionally, the scene types include test playback type, application playback type, and speaker cleaning type; the processing module is also used to determine a test playback mode based on the test playback type when the scene type of the current audio stream is a test playback type, and determine a test playback interface based on the test playback mode; obtain a control strategy corresponding to the test playback mode through the test playback interface; deactivate protection parameters and sound effect parameters of the current audio stream based on the control strategy, and output the current audio stream based on the deactivated protection parameters and sound effect parameters.
[0031] Optionally, the processing module is also used to determine an application playback mode corresponding to the application playback type when the scene type corresponding to the current audio stream is an application playback type, the application playback modes including: telephone voice mode, network voice mode, music playback mode, radio playback mode and ringtone playback mode; determine an application playback interface according to the application playback mode, and obtain a control strategy corresponding to the application playback mode through the application playback interface; update the protection parameters and sound effect parameters of the current audio stream based on the control strategy, and output the current audio stream based on the updated protection parameters and sound effect parameters.
[0032] Optionally, the processing module is also used to determine the speaker cleaning mode according to the speaker cleaning type and determine the speaker cleaning interface according to the speaker cleaning mode when the scene type corresponding to the current audio stream is the speaker cleaning type; obtain the control strategy corresponding to the speaker cleaning mode through the speaker cleaning interface; update the speaker cleaning protection parameters of the current audio stream based on the control strategy, and output the current audio stream according to the updated speaker cleaning protection parameters; wherein the updated speaker cleaning protection parameters include single-frequency sound protection parameters, low-battery power protection parameters and audio output power parameters.
[0033] Optionally, the processing module is further used to obtain feature information of the current audio stream by accessing an interface of the PAL layer, and obtain a scene separation strategy, and determine a scene type corresponding to the feature information based on the scene separation strategy.
[0034] Optionally, the processing module is also used to obtain an audio adjustment instruction before obtaining the current audio stream, determine the scene type to be adjusted corresponding to the audio adjustment instruction and the adjustment data of the audio parameters corresponding to the scene type to be adjusted by accessing the interface of the PAL layer; determine the scene mode corresponding to the scene type, obtain the control strategy corresponding to the scene mode based on the scene interface under the scene mode, and update the control strategy according to the adjustment data.
[0035] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0036] Memory stores computer-executable instructions;
[0037] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0040] The audio output method, device, electronic device, storage medium and program product provided in the embodiments of the present application determine the output device of the current audio stream by acquiring the current audio stream sent by the application software. When it is determined that the output device is a speaker, feature extraction is performed on the current audio stream based on the interface of the PAL layer to obtain feature information of the current audio stream, and the corresponding scene type is determined according to the feature information. The corresponding scene interface is determined by the scene mode corresponding to the scene type, and the corresponding control strategy is obtained by accessing the scene interface, so as to output the current audio stream after updating the audio parameters of the current audio stream according to the control strategy, thereby improving the reliability and accuracy of the audio parameters and enhancing the audio playback effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] Figure 1 A schematic diagram of an application scenario of the audio output method provided in this application;
[0043] Figure 2 Schematic diagram of the process of the audio output method provided in this application Figure 1 ;
[0044] Figure 3 Schematic diagram of the process of the audio output method provided in this application Figure 2 ;
[0045] Figure 4 A schematic diagram of the structure of the audio output device provided by this application;
[0046] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.
[0047] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0048] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0050] Glossary:
[0051] PAL: Platform Audio Layer, a framework interface layer in the software architecture, is used to provide a higher-level audio-specific interface to access the underlying audio hardware to achieve richer audio functions.
[0052] Figure 1 A schematic diagram of an application scenario of the audio output method provided in this application, such as Figure 1As shown, the specific application scenario of the present application includes application software 101, audio processing system 102 and output device 103. Application software 101 includes application software 1, application software 2... application software n, where n is a positive integer. When any application software outputs an audio stream, the audio stream is processed by the audio processing system according to preset audio parameters, and the processed audio data is output through the output device.
[0053] In the prior art, the tuning software based on the Qualcomm architecture adjusts the audio parameters of the audio scene at the software level, generates the audio parameter state corresponding to the audio scene, and determines the audio parameter state as the preset audio parameter. However, in the process of adjusting the audio parameters, the prior art easily overwrites or modifies the audio parameter state of the previous audio scene, which reduces the accuracy and stability of the audio parameter state and further affects the audio playback effect. In addition, since the audio parameter state of the previous audio scene is overwritten or modified, it is also necessary to repeatedly adjust the audio parameters in the same audio scene, reducing the efficiency of audio adjustment.
[0054] The audio output method provided by the present application determines the output device of the current audio stream by acquiring the current audio stream sent by the application software, and when determining that the output device is a speaker, obtains the characteristic information of the current audio stream, determines the corresponding scene type according to the characteristic information, and determines the scene mode corresponding to the scene type, and independently obtains the above-mentioned scene mode control strategy through the scene interface corresponding to the scene mode, so as to output the current audio stream according to the audio parameters indicated by the control strategy. By independently obtaining the corresponding control strategy by determining the scene interface corresponding to the audio stream in real time, the effective separation of audio parameters of different scenes is realized, the accuracy and stability of audio parameters in different scenes are improved, and the audio playback effect is further enhanced.
[0055] The audio output method provided in this application is intended to solve the above technical problems in the prior art.
[0056] The audio output method of the present application is applied to the audio processing system of a terminal device of Qualcomm architecture, such as Figure 1 As shown, when the application software of the terminal device sends out an audio stream, the audio stream is processed by the audio processing system of the terminal device, and after the processing is completed, the audio stream is output through the output device of the terminal device.
[0057] The above-mentioned terminal equipment can be a wireless terminal or a wired terminal. The wireless terminal can be a device that provides voice and / or other business data connectivity to users, a handheld device with wireless connection function, or other processing equipment connected to a wireless modem. The wireless terminal can communicate with one or more core network devices via the Radio Access Network (RAN). The wireless terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal. For example, it can be a portable, pocket-sized, handheld, computer-built-in or vehicle-mounted mobile device that exchanges language and / or data with the wireless access network. For another example, the wireless terminal can also be a Personal Communication Service (PCS) phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) and other devices. Wireless terminals may also be referred to as systems, subscriber units, subscriber stations, mobile stations, mobile stations, remote stations, remote terminals, access terminals, user agents, user devices or user equipment, without limitation. Optionally, the above terminal devices may also be smart watches, tablet computers and other devices.
[0058] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0059] Figure 2 Schematic diagram of the process of the audio output method provided in this application Figure 1 ,like Figure 2 As shown, the method includes:
[0060] S201. Obtain the current audio stream sent by the application software, and determine the output device of the current audio stream.
[0061] More specifically, when a user opens any application software on the terminal device to play audio, the current audio stream sent by the application software is obtained through the audio processing system of the terminal device, and the output device selected for playback of the current audio stream is determined, where the output device includes but is not limited to speakers, receivers, 3.5mm headphones, Type-C headphones, and Bluetooth headphones.
[0062] S202: When it is determined that the output device is a speaker, characteristic information of the current audio stream is determined based on an interface of the PAL layer, and a scene type is determined according to the characteristic information.
[0063] More specifically, when the audio processing system determines that the output device is a speaker, it obtains the feature information of the current audio stream by accessing the interface of the PAL layer, obtains the scene separation strategy, and determines the scene type corresponding to the feature information based on the scene separation strategy. Among them, the interface of the PAL layer is an interface for compatibility with scene distinction processes in different operating systems or platforms, which improves the stability of scene separation and further improves the stability and accuracy of audio parameters corresponding to different scene types.
[0064] Optionally, the audio processing system generates an interface of a PAL layer before acquiring the audio stream. The method for generating an interface of a PAL layer in this embodiment is a prior art and will not be described in detail in this embodiment.
[0065] In a possible embodiment, when the audio processing system determines that the output device is a speaker, the characteristic information and scene separation strategy of the current audio stream are determined by accessing the interface of the PAL layer, and the scene type corresponding to the characteristic information is determined based on the scene separation strategy. The characteristic information refers to the attribute information and / or parameter information extracted from the signal of the audio stream, such as the audio stream type, the audio stream mode, etc. The scene separation strategy is the correspondence between the characteristic information and the scene type. The scene type refers to the type of application scenario of the current audio stream, and each scene type covers at least one application scenario.
[0066] In a possible embodiment, the specific step of determining the feature information of the current audio stream includes: accessing the PAL interface to call a feature extraction process, extracting features of the current audio stream based on the feature extraction process, and obtaining the audio stream type of the current audio stream. The method for extracting audio stream features in this embodiment is similar to the implementation principle of the prior art, and this embodiment will not be described in detail here.
[0067] This embodiment accesses the interface of the PAL layer to determine the scene type in the PAL layer, so that audio processing software from different suppliers can achieve effective audio scene separation under the Qualcomm architecture, improve audio adjustment efficiency, and reduce audio adjustment costs.
[0068] Exemplarily, the scene types include test playback type, application playback type and speaker cleaning type. The test playback type refers to the audio stream output by the device during factory testing. The application playback type refers to the audio stream output by the user during daily use of the terminal device. The speaker cleaning type is the audio stream output for cleaning dust from the speaker when the speaker hole is blocked.
[0069] Exemplarily, the application play type also includes: telephone voice type, network voice type, music play type, radio play type and ringtone play type. The telephone voice type refers to the scenario of making calls through operators, the network voice type refers to the scenario of transmitting voice through the Internet, the music play type refers to the scenario of multimedia audio and video playback, the radio play type refers to the scenario of playing radio stations, and the ringtone play type refers to the scenario of information notification.
[0070] Exemplarily, the network voice type includes a voice audio stream of a first communication software corresponding to an application scenario of the first communication software, and a voice audio stream of a second communication software corresponding to an application scenario of the second communication software, wherein the application scenario of the first communication software and the application scenario of the second communication software both belong to network calls, that is, the voice audio stream of the first communication software and the voice audio stream of the second communication software are both network voice types.
[0071] Exemplarily, the test audio stream corresponds to the application scenario of factory test, and the application scenario of factory test belongs to the test play type. The speaker cleaning audio stream corresponds to the application scenario of speaker cleaning, and the application scenario of speaker cleaning belongs to the speaker cleaning type.
[0072] S203: Determine a corresponding scene interface through a scene mode corresponding to the scene type, obtain a control strategy based on the scene interface, and output the current audio stream according to the control strategy.
[0073] More specifically, the scene mode corresponding to the scene type is determined, and the CKV (Calibration Key Vector) value corresponding to the scene mode is determined, and the CKV value is sent to the PA (Power Amplifier) module, so that the PA module determines the corresponding scene interface according to the CKV value, thereby obtaining the control strategy corresponding to the scene mode by accessing the scene interface, and outputting the current audio stream according to the audio parameters indicated by the control strategy. Each scene type corresponds to a unique scene mode, and the control strategy is an algorithm strategy applied to the PA module.
[0074] Optionally, in the process of processing audio streams of different scene types, the audio parameters used for processing the current audio stream are determined by the CKV value to improve the performance of the audio processing system.
[0075] Exemplarily, the PA module is a module in an ADSP (Audio Digital Signal Processor) and is used to drive a speaker and amplify the volume of an audio signal. The scene interface is an interface in the PA module, and different types of scene interfaces are used to obtain the driving control strategy of the power amplifier in the corresponding scene mode.
[0076] Exemplarily, the scene mode corresponding to the test playback type is the test playback mode, the scene mode corresponding to the speaker cleaning type is the speaker cleaning mode, the scene mode corresponding to the telephone voice type is the telephone voice mode, the scene mode corresponding to the network voice type is the network voice mode, the scene mode corresponding to the music playback type is the music playback mode, the scene mode corresponding to the radio playback type is the radio playback mode, and the scene mode corresponding to the ringtone playback type is the ringtone playback mode.
[0077] Optionally, when the scene mode of the current audio stream is the test play mode, a test play interface is determined according to the test play mode; a control strategy corresponding to the test play mode is obtained through the test play interface; protection parameters and sound effect parameters of the current audio stream are disabled based on the control strategy, and the current audio stream is output based on the disabled protection parameters and sound effect parameters. In this embodiment, when determining that the scene mode is the test play mode, an accurate control strategy is obtained through the test play interface corresponding to the test play mode, thereby improving the stability of the preset audio parameters of the current audio stream, ensuring that there is no effect of audio parameters during the factory test of audio devices, achieving accurate detection of audio devices, and further improving the consistency and stability of the detection results.
[0078] Optionally, when the scene mode corresponding to the current audio stream is an application playback mode, an application playback interface is determined according to the application playback mode; the application playback modes include: telephone voice scene, network voice scene, music playback scene, radio playback scene and ringtone playback scene; the control strategy corresponding to the application playback mode is obtained through the application playback interface; the protection parameters and sound effect parameters of the current audio stream are updated based on the control strategy, and the current audio stream is output based on the updated protection parameters and sound effect parameters.
[0079] Exemplarily, the protection parameter is a parameter used to protect a speaker, and the sound effect parameter is a parameter used to enhance the sound quality of an audio output.
[0080] When determining that the scene mode is the application playback mode, this embodiment obtains a precise control strategy through the application playback interface corresponding to the application playback mode, thereby improving the stability of the preset audio parameters of the current audio stream, ensuring stable output power and audio quality during application playback, and enhancing the user experience.
[0081] Optionally, when the scene mode corresponding to the current audio stream is the speaker cleaning mode, a speaker cleaning interface is determined according to the speaker cleaning mode; a control strategy corresponding to the speaker cleaning mode is obtained through the speaker cleaning interface; the speaker cleaning protection parameters of the current audio stream are updated based on the control strategy, and the current audio stream is output according to the updated speaker cleaning protection parameters; wherein the updated speaker cleaning protection parameters include single-frequency sound protection parameters, low-battery power protection parameters and audio output power parameters.
[0082] Exemplarily, the speaker cleaning protection parameters refer to the parameters involved in protecting the speakers in the speaker cleaning mode. The single-frequency tone protection parameters are parameters used to prevent the audio signal from being too strong and damaging the device or affecting the sound quality, including but not limited to frequency response range, impedance, and sensitivity. Low-battery power protection parameters include but are not limited to rated voltage, current detection, and protection signal transmission. The audio output power parameter refers to an important indicator of the maximum electrical power that an audio device (such as a power amplifier, sound system) can provide to a speaker, including but not limited to rated output power, peak output power, etc.
[0083] When this embodiment determines that the scene mode is the speaker cleaning mode, a precise control strategy is obtained through the speaker cleaning interface corresponding to the speaker cleaning mode, which improves the stability of the preset audio parameters of the current audio stream, further enhances the speaker cleaning effect, and enhances the user experience.
[0084] Optionally, before obtaining the current audio stream, obtain an audio adjustment instruction, determine the scene type to be adjusted corresponding to the audio adjustment instruction and the adjustment data of the audio parameters corresponding to the scene type to be adjusted by accessing the interface of the PAL layer; determine the scene mode corresponding to the scene type, obtain the control strategy corresponding to the scene mode based on the scene interface under the scene mode, and update the control strategy according to the adjustment data.
[0085] In a possible embodiment, before obtaining the current audio stream, obtain the audio adjustment instruction initiated by the user, obtain the scene separation strategy by accessing the interface of the PAL layer, determine the scene type to be adjusted indicated by the audio adjustment instruction based on the scene separation strategy, and the adjustment data corresponding to the audio parameter to be adjusted, determine the scene mode corresponding to the scene type to be adjusted, determine the corresponding CKV value according to the scene mode and send the CKV value to the PA module, so that the PA module determines the scene interface corresponding to the CKV value. The control strategy corresponding to the scene mode is obtained by accessing the scene interface, the data of each audio parameter indicated by the control strategy is obtained, the corresponding audio parameters are updated according to the adjustment data, the updated audio parameters are obtained, and the above control strategy is updated according to the updated audio parameters. When receiving the audio adjustment instruction for adjusting the audio parameters in any scene, the present embodiment obtains the scene mode to be adjusted indicated by the audio adjustment instruction, and accurately obtains the corresponding control strategy by accessing the scene interface corresponding to the scene mode, thereby updating the control strategy to avoid overwriting or modifying the audio parameters in other scene modes, improving the reliability and accuracy of the audio parameters corresponding to different scenes, and improving the efficiency of audio adjustment.
[0086] Optionally, before obtaining the current audio stream, a mode addition instruction is obtained, and a new scene type and a corresponding CKV value corresponding to the mode addition instruction are determined by accessing an interface of the PAL layer, as well as audio parameters and audio parameter data related to the scene type, to establish a scene mode and a scene interface corresponding to the new scene type. A control strategy corresponding to the scene mode is generated based on the obtained audio parameters and audio parameter data related to the scene type, and the above-mentioned CKV value identifier is added to the control strategy to determine the scene interface corresponding to the scene mode through the CKV value.
[0087] In a possible embodiment, the mode addition instruction and mode adjustment instruction acquired by the audio processing system are sent by tuning software, and the tuning software is software of the prior art. This embodiment does not limit the above tuning software.
[0088] The audio output method provided in the embodiment of the present application determines the scene type corresponding to each audio stream by accessing the interface of the PAL layer, thereby achieving the compatibility of audio scene separation, determines the scene mode by the scene type, determines the corresponding scene interface according to the scene mode, effectively obtains the audio stream control strategy by accessing the scene interface, and outputs the audio stream based on the obtained control strategy, thereby improving the accuracy and reliability of the output audio quality and enhancing the user experience.
[0089] Figure 3 Schematic diagram of the process of the audio output method provided in this application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, the audio output method is described in detail, and the method includes:
[0090] S301: Determine an output device for an audio stream.
[0091] More specifically, the audio processing system obtains the audio stream output by the application software and determines the output device to which the audio stream indicates transmission.
[0092] Exemplarily, the audio processing system in this embodiment includes a framework layer (Framework Layer), a media service layer (Media Service Layer), a hardware abstraction layer (Hardware Abstraction Layer), a signal processing framework layer (Signal Processing Framework Layer) and a kernel driver space (Kernel Driver Space).
[0093] S302: When the output device is a speaker, determine the scene type of the audio stream.
[0094] More specifically, when it is determined that the output device is a speaker, feature extraction is performed on the audio stream by accessing the interface of the PAL layer to obtain feature information of the audio stream (such as audio stream type, audio stream mode), and the scene separation strategy is obtained by accessing the interface of the PAL layer, and the scene type corresponding to the above audio stream type is determined based on the scene separation strategy.
[0095] Optionally, the PAL layer in this embodiment is located in the hardware abstraction layer of the audio processing system.
[0096] S303: Determine a scene mode corresponding to the scene type, and determine a scene interface according to the scene mode.
[0097] More specifically, when the scene type is determined to be a test playback type, the scene mode is determined to be a test playback mode, and a test playback CKV value corresponding to the test playback mode is determined, and the test playback CKV value is sent to the PA module in the ADSP, so that the PA module determines the corresponding test playback scene interface according to the test playback CKV value, thereby obtaining the test playback control strategy corresponding to the test playback mode by accessing the test playback scene interface.
[0098] Optionally, the ADSP in this embodiment is located in the signal processing framework layer of the audio processing system.
[0099] Optionally, when the scene type is determined to be the telephone voice type, the scene mode is determined to be the telephone voice mode, and the telephone voice CKV value corresponding to the telephone voice mode is determined, and the telephone voice CKV value is sent to the PA module, so that the PA module determines the corresponding telephone voice scene interface according to the telephone voice CKV value, thereby obtaining the telephone voice control strategy corresponding to the telephone voice mode by accessing the telephone voice scene interface.
[0100] Optionally, when it is determined that the scene type is a network voice type, the scene mode is determined to be a network voice mode, and a network voice CKV value corresponding to the network voice mode is determined, and the network voice CKV value is sent to the PA module, so that the PA module determines the corresponding network voice scene interface according to the network voice CKV value, thereby obtaining the network voice control policy corresponding to the network voice mode by accessing the network voice scene interface.
[0101] Optionally, when the scene type is determined to be a music playback type, the scene mode is determined to be a music playback mode, and a music playback CKV value corresponding to the music playback mode is determined, and the music playback CKV value is sent to the PA module, so that the PA module determines the corresponding music playback scene interface according to the music playback CKV value, thereby obtaining the music playback control strategy corresponding to the music playback mode by accessing the music playback scene interface.
[0102] Optionally, when the scene type is determined to be a radio playback type, the scene mode is determined to be a radio playback mode, and a radio playback CKV value corresponding to the radio playback mode is determined, and the radio playback CKV value is sent to the PA module, so that the PA module determines the corresponding radio playback scene interface according to the radio playback CKV value, thereby obtaining the radio playback control strategy corresponding to the radio playback mode by accessing the radio playback scene interface.
[0103] Optionally, when the scene type is determined to be a ringtone playback type, the scene mode is determined to be a ringtone playback mode, and a ringtone playback CKV value corresponding to the ringtone playback mode is determined, and the ringtone playback CKV value is sent to the PA module, so that the PA module determines the corresponding ringtone playback scene interface according to the ringtone playback CKV value, thereby obtaining the ringtone playback control strategy corresponding to the ringtone playback mode by accessing the ringtone playback scene interface.
[0104] Optionally, when it is determined that the scene type is a speaker cleaning type, the scene mode is determined to be a speaker cleaning mode, and a speaker cleaning CKV value corresponding to the speaker cleaning mode is determined, and the speaker cleaning CKV value is sent to the PA module, so that the PA module determines the corresponding speaker cleaning scene interface according to the speaker cleaning CKV value, thereby obtaining the speaker cleaning control strategy corresponding to the speaker cleaning mode by accessing the speaker cleaning scene interface.
[0105] S304: Determine a control strategy based on the scenario interface, and output an audio stream based on the control strategy.
[0106] More specifically, a control strategy is determined based on the scene interface, and the protection parameters and sound effect parameters of the audio stream are updated based on the control strategy before the audio stream output is performed. The protection parameters include multiple parameters for protecting the speaker, and the sound effect parameters include multiple parameters for adjusting the sound quality.
[0107] Optionally, based on the test playback interface, a test playback control policy corresponding to the test playback mode is obtained by accessing the test playback interface, and protection parameters and sound effect parameters of the audio stream are closed according to the test playback control policy, thereby outputting the audio stream.
[0108] Optionally, based on the telephone voice interface, the telephone voice control strategy corresponding to the telephone voice mode is obtained by accessing the telephone voice interface, the speaker power protection parameters and low-battery power protection parameters of the audio stream are turned on according to the telephone voice control strategy, and the upper limit value of the audio output power parameter corresponding to the telephone voice mode is updated to a first preset value to limit the audio output power during a call to ensure that the speaker is not burned, and the audio stream is output after the update is completed.
[0109] Optionally, based on the network voice interface, the network voice control policy corresponding to the network voice mode is obtained by accessing the network voice interface, the speaker power protection parameters and low-battery power protection parameters of the audio stream are turned on according to the network voice control policy, and the upper limit value of the audio output power parameter corresponding to the network voice mode is updated to a second preset value to limit the audio output power during Internet voice calls to ensure that the speaker is not burned, and the audio stream is output after the update is completed.
[0110] Optionally, based on the music playback interface, the music playback control strategy corresponding to the music playback mode is obtained by accessing the music playback interface, the speaker power protection parameter and the low-battery power protection parameter of the audio stream are enabled according to the music playback control strategy, and the upper limit value of the audio output power parameter corresponding to the music playback mode is updated to a third preset value, so as to limit the audio output power when the multimedia application is played, and ensure that the speaker is not burned; the gain parameter is enabled according to the music playback control strategy to adjust the sound loudness; the equalizer parameter is enabled according to the music playback control strategy to optimize the fullness, softness and clarity of the sound; the sibilance suppression parameter is enabled according to the music playback control strategy to suppress the volume of sibilance and reduce the harsh human voice; the piano noise suppression parameter is enabled according to the music playback control strategy to reduce the noise of the piano; the virtual bass parameter is enabled according to the music playback control strategy to improve the low-frequency performance of the speaker to achieve full music audio. After the update of each parameter is completed, the audio stream is output.
[0111] Optionally, based on the radio playback interface, the radio playback control strategy corresponding to the radio playback mode is obtained by accessing the radio playback interface, the speaker power protection parameter and the low-battery power protection parameter of the audio stream are enabled according to the radio playback control strategy, and the upper limit value of the audio output power parameter corresponding to the radio playback mode is updated to a fourth preset value to limit the audio output power when the radio station is played externally to ensure that the speaker is not burned; the gain parameter is enabled according to the radio playback control strategy to adjust the sound loudness; the equalizer parameter is enabled according to the music playback control strategy to optimize the fullness, softness and clarity of the sound. After the update is completed, the audio stream is output.
[0112] Optionally, based on the ringtone playback interface, the ringtone playback control strategy corresponding to the ringtone playback mode is obtained by accessing the ringtone playback interface, the speaker power protection parameter and the low-battery power protection parameter of the audio stream are enabled according to the ringtone playback control strategy, and the upper limit value of the audio output power parameter corresponding to the ringtone playback mode is updated to the fifth preset value to limit the audio output power when the prompt tone is played to ensure that the speaker is not burned; the gain parameter is enabled according to the ringtone playback control strategy to adjust the sound loudness; the equalizer parameter is enabled according to the music playback control strategy to optimize the fullness, softness and clarity of the sound. After the update is completed, the audio stream is output.
[0113] Optionally, based on the speaker cleaning interface, the speaker cleaning control strategy corresponding to the speaker cleaning mode is obtained by accessing the speaker cleaning interface, the single-frequency sound protection parameters and low-battery power protection parameters of the audio stream are enabled according to the speaker cleaning control strategy, and the upper limit value of the audio output power parameter corresponding to the speaker cleaning mode is updated to the fifth preset value, such as 1W, to limit the audio output power of the speaker when playing 1KHz single-frequency sound to ensure that the speaker is not burned, and the audio stream is output after the update is completed.
[0114] The audio output method provided in the embodiment of the present application improves the stability and reliability of audio parameters in different application scenarios. By using precise control strategies to adjust the audio parameters of the audio stream, the audio quality is improved while protecting the speakers from being burned.
[0115] Figure 4 A schematic diagram of the structure of the audio output device provided in this application, such as Figure 4 As shown, the audio output device 40 provided in this embodiment includes:
[0116] The acquisition module is used to acquire the current audio stream sent by the application software and determine the output device of the current audio stream;
[0117] A processing module, used for determining feature information of the current audio stream based on an interface of a PAL layer when determining that the output device is a speaker, and determining a scene type according to the feature information;
[0118] The processing module is also used to determine the corresponding scene interface through the scene mode corresponding to the scene type, obtain the control strategy based on the scene interface, and output the current audio stream according to the control strategy.
[0119] Optionally, the scene types include test playback type, application playback type, and speaker cleaning type; the processing module is also used to determine a test playback mode based on the test playback type when the scene type of the current audio stream is a test playback type, and determine a test playback interface based on the test playback mode; obtain a control strategy corresponding to the test playback mode through the test playback interface; deactivate protection parameters and sound effect parameters of the current audio stream based on the control strategy, and output the current audio stream based on the deactivated protection parameters and sound effect parameters.
[0120] Optionally, the processing module is also used to determine an application playback mode corresponding to the application playback type when the scene type corresponding to the current audio stream is an application playback type, the application playback modes including: telephone voice mode, network voice mode, music playback mode, radio playback mode and ringtone playback mode; determine an application playback interface according to the application playback mode, and obtain a control strategy corresponding to the application playback mode through the application playback interface; update the protection parameters and sound effect parameters of the current audio stream based on the control strategy, and output the current audio stream based on the updated protection parameters and sound effect parameters.
[0121] Optionally, the processing module is also used to determine the speaker cleaning mode according to the speaker cleaning type and determine the speaker cleaning interface according to the speaker cleaning mode when the scene type corresponding to the current audio stream is the speaker cleaning type; obtain the control strategy corresponding to the speaker cleaning mode through the speaker cleaning interface; update the speaker cleaning protection parameters of the current audio stream based on the control strategy, and output the current audio stream according to the updated speaker cleaning protection parameters; wherein the updated speaker cleaning protection parameters include single-frequency sound protection parameters, low-battery power protection parameters and audio output power parameters.
[0122] Optionally, the processing module is further used to obtain feature information of the current audio stream by accessing an interface of the PAL layer, and obtain a scene separation strategy, and determine a scene type corresponding to the feature information based on the scene separation strategy.
[0123] Optionally, the processing module is also used to obtain an audio adjustment instruction before obtaining the current audio stream, determine the scene type to be adjusted corresponding to the audio adjustment instruction and the adjustment data of the audio parameters corresponding to the scene type to be adjusted by accessing the interface of the PAL layer; determine the scene mode corresponding to the scene type, obtain the control strategy corresponding to the scene mode based on the scene interface under the scene mode, and update the control strategy according to the adjustment data.
[0124] The audio output device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0125] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0126] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0127] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0128] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.
[0129] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.
[0130] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0131] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0132] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0133] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0134] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0135] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0138] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0139] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0140] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0141] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. An audio output method, characterized in that: include: Obtaining the current audio stream sent by the application software, and determining the output device of the current audio stream; When it is determined that the output device is a speaker, determining feature information of the current audio stream based on an interface of a PAL layer, and determining a scene type according to the feature information; The corresponding scene interface is determined by the scene mode corresponding to the scene type, a control strategy is acquired based on the scene interface, and the current audio stream is output according to the control strategy.
2. The method according to claim 1, characterized in that The scenario types include test play type, application play type, and speaker cleanup type; Determining a corresponding scene interface through a scene mode corresponding to the scene type, acquiring a control strategy based on the scene interface, and outputting the current audio stream according to the control strategy, including: When the scene type of the current audio stream is a test play type, determining a test play mode based on the test play type, and determining a test play interface according to the test play mode; Acquire the control strategy corresponding to the test play mode through the test play interface; The protection parameters and the sound effect parameters of the current audio stream are disabled based on the control strategy, and the current audio stream is output based on the disabled protection parameters and the sound effect parameters.
3. The method according to claim 2, characterized in that Also includes: When the scene type corresponding to the current audio stream is an application play type, determining an application play mode corresponding to the application play type, the application play mode including: telephone voice mode, network voice mode, music play mode, radio play mode and ringtone play mode; Determine an application play interface according to the application play mode, and obtain a control strategy corresponding to the application play mode through the application play interface; The protection parameters and sound effect parameters of the current audio stream are updated based on the control strategy, and the current audio stream is output based on the updated protection parameters and sound effect parameters.
4. The method according to claim 2, characterized in that: Also includes: When the scene type corresponding to the current audio stream is a speaker cleaning type, determining a speaker cleaning mode according to the speaker cleaning type, and determining a speaker cleaning interface according to the speaker cleaning mode; Acquire a control strategy corresponding to the speaker cleaning mode through the speaker cleaning interface; Based on the control strategy, the speaker cleaning protection parameters of the current audio stream are updated, and the current audio stream is output according to the updated speaker cleaning protection parameters; wherein the updated speaker cleaning protection parameters include single-frequency audio protection parameters, low-battery power protection parameters and audio output power parameters.
5. The method according to claim 1, characterized in that: Determining feature information of the current audio stream based on an interface of a PAL layer, and determining a scene type according to the feature information, including: The characteristic information of the current audio stream is obtained by accessing the interface of the PAL layer, and the scene separation strategy is obtained, and the scene type corresponding to the characteristic information is determined based on the scene separation strategy.
6. The method according to claim 1, characterized in that Before getting the current audio stream, include: Acquire an audio adjustment instruction, and determine the scene type to be adjusted corresponding to the audio adjustment instruction and the adjustment data of the audio parameter corresponding to the scene type to be adjusted by accessing an interface of the PAL layer; Determine a scene mode corresponding to the scene type, obtain a control strategy corresponding to the scene mode based on a scene interface under the scene mode, and update the control strategy according to the adjustment data.
7. An audio output device, characterized in that: include: An acquisition module, used to acquire the current audio stream sent by the application software and determine the output device of the current audio stream; A processing module, configured to determine feature information of the current audio stream based on an interface of a PAL layer when it is determined that the output device is a speaker, and determine a scene type according to the feature information; The processing module is further used to determine a corresponding scene interface through a scene mode corresponding to the scene type, obtain a control strategy based on the scene interface, and output the current audio stream according to the control strategy.
8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.
Citation Information
Cited By
Multi-scene sound denoising method based on operating system
CN120653219A