Parameter configuration method and apparatus for audio service, and electronic device
By comprehensively acquiring multi-dimensional information to generate scene description tags and using a mapping table for parameter configuration, the problem of inaccurate parameter matching in vehicle audio systems is solved, enabling precise management and efficient configuration of audio parameters, and improving the adaptability of audio scenarios and the stability of telecommunications standardization testing.
Patent Information
- Application Number
- CN202611299055.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, the parameter configuration of in-vehicle audio systems cannot accurately match actual usage conditions, resulting in poor parameter matching accuracy, inability to meet the needs of complex audio scenarios, lack of a unified multi-service scenario management mechanism, lack of priority mechanism when services such as call and voice recognition coexist, complex parameter management, maintenance relying on hard coding and project customization, and poor stability in telecommunications standardization testing.
By integrating multi-dimensional information such as interconnection protocol status, service type, voice bandwidth level, and physical connection method, a unified scenario description label is generated. Parameters are configured using a preset parameter configuration file mapping table, and a priority sequence is established to handle multiple service scenarios, thereby achieving accurate and unified parameter management.
It improves the accuracy and efficiency of audio parameter configuration, reduces the complexity of parameter debugging and maintenance, and enhances the adaptability of audio scenarios and the stability of telecommunications standardization testing.
Smart Images

Figure CN123185076A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio processing technology, and in particular to a parameter configuration method, apparatus and electronic device for audio services. Background Technology
[0002] In modern intelligent vehicle systems, users need to use various interconnection protocols to achieve audio interaction functions. While driving, users can connect their mobile phones via Bluetooth to answer calls or activate voice assistants for voice command recognition.
[0003] Currently, common voice parameter configurations generally involve selecting the corresponding echo cancellation and noise suppression parameters based on the Pulse-Code Modulation (PCM) sampling rate (e.g., 8kHz, 16kHz) of the audio acquisition.
[0004] However, while the above solutions can achieve basic functions, they suffer from poor parameter matching accuracy, fail to fit actual usage scenarios, and thus struggle to meet the complex needs of audio scenarios. Summary of the Invention
[0005] This application provides a parameter configuration method, apparatus, and electronic device for audio services, which can meet the technical requirements of complex audio scenarios.
[0006] In a first aspect, embodiments of this application provide a parameter configuration method for an audio service, including:
[0007] Obtain the current audio scene corresponding to the current audio service. The current audio scene is determined by the interconnection protocol status, service type, voice bandwidth level and / or physical connection method corresponding to the current audio service.
[0008] Based on the current audio scene, the current parameter configuration data is determined in the mapping table, which contains multiple preset audio scenes and parameter configuration data corresponding to each audio scene;
[0009] Based on the current parameter configuration data, configure the parameters for the current audio service.
[0010] In one or more embodiments, before obtaining the current audio scene corresponding to the current audio service, the method further includes:
[0011] In response to a new audio service trigger, the priority relationship between the new audio service and the current audio service is determined in a priority sequence, which contains multiple audio services arranged in order of priority.
[0012] If the size relationship indicates that the priority of the new audio service is greater than the priority of the current audio service, the new audio service is identified as the current audio service.
[0013] In one or more embodiments, obtaining the current audio scene corresponding to the current audio service includes:
[0014] Obtain the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method;
[0015] The current audio scenario is determined based on the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method.
[0016] In one or more embodiments, obtaining the service type of the current audio service includes:
[0017] Obtain the creation request for the audio acquisition channel corresponding to the current audio service;
[0018] The service type of the current audio service is determined based on the channel type identifier carried in the creation request.
[0019] In one or more embodiments, configuring the parameters of the current audio service based on the current parameter configuration data includes:
[0020] At least one audio parameter is parsed from the current parameter configuration data;
[0021] The at least one audio parameter is applied to the audio processing link of the current audio service.
[0022] In one or more embodiments, each parameter configuration data includes at least one of the following audio parameters: echo cancellation intensity, noise reduction level, equalizer tuning, and gain value.
[0023] In one or more embodiments, the service types include: telephone, voice, recording, and third-party VoIP applications;
[0024] Voice bandwidth levels include: narrowband, wideband, ultra-wideband, and full-band.
[0025] Physical connection methods include wired and wireless.
[0026] Secondly, embodiments of this application provide a parameter configuration device for an audio service, comprising:
[0027] The acquisition module is used to acquire the current audio scene corresponding to the current audio service. The current audio scene is determined by the interconnection protocol status, service type, voice bandwidth level and / or physical connection method corresponding to the current audio service.
[0028] The determination module is used to determine the current parameter configuration data in the mapping table according to the current audio scene. The mapping table records multiple preset audio scenes and parameter configuration data corresponding to each audio scene.
[0029] The processing module is used to configure the parameters of the current audio service based on the current parameter configuration data.
[0030] In one or more embodiments, before obtaining the current audio scene corresponding to the current audio service, the obtaining module is further configured to:
[0031] In response to a new audio service trigger, the priority relationship between the new audio service and the current audio service is determined in a priority sequence, which contains multiple audio services arranged in order of priority.
[0032] If the size relationship indicates that the priority of the new audio service is greater than the priority of the current audio service, the new audio service is identified as the current audio service.
[0033] In one or more embodiments, the acquisition module acquires the current audio scene corresponding to the current audio service, specifically for:
[0034] Obtain the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method;
[0035] The current audio scenario is determined based on the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method.
[0036] In one or more embodiments, the acquisition module acquires the service type of the current audio service, specifically for:
[0037] Obtain the creation request for the audio acquisition channel corresponding to the current audio service;
[0038] The service type of the current audio service is determined based on the channel type identifier carried in the creation request.
[0039] In one or more embodiments, the processing module configures parameters for the current audio service based on the current parameter configuration data, specifically for:
[0040] At least one audio parameter is parsed from the current parameter configuration data;
[0041] The at least one audio parameter is applied to the audio processing link of the current audio service.
[0042] In one or more embodiments, each parameter configuration data includes at least one of the following audio parameters: echo cancellation intensity, noise reduction level, equalizer tuning, and gain value.
[0043] In one or more embodiments, the service types include: telephone, voice, recording, and third-party VoIP applications;
[0044] Voice bandwidth levels include: narrowband, wideband, ultra-wideband, and full-band.
[0045] Physical connection methods include wired and wireless.
[0046] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0047] The memory stores computer-executed instructions;
[0048] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0049] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0050] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0051] The audio service parameter configuration method, apparatus, and electronic device provided in this application embodiment obtain the current audio scene corresponding to the current audio service. The current audio scene is jointly determined by the interconnection protocol status, service type, voice bandwidth level, and / or physical connection method corresponding to the current audio service. Based on the current audio scene, the current parameter configuration data is determined in a mapping table. The mapping table records multiple preset audio scenes and the parameter configuration data corresponding to each audio scene. Based on the current parameter configuration data, the parameters of the current audio service are configured. This technical solution determines the current audio scene by comprehensively obtaining multi-dimensional information such as interconnection protocol status, service type, voice bandwidth level, and physical connection method, and automatically matches the corresponding parameter configuration data according to the preset mapping table. This achieves accurate and unified management of audio parameters under different protocols and bandwidth conditions, avoiding parameter selection bias caused by relying on a single information source. At the same time, by centrally maintaining the parameter configuration in the mapping table, the complexity of parameter debugging and maintenance in actual applications is effectively reduced, and the accuracy and efficiency of audio parameter configuration are improved. Attached Figure Description
[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0053] Figure 1 A schematic diagram of the structure of the audio service parameter configuration system provided in the embodiments of this application;
[0054] Figure 2 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 1 ;
[0055] Figure 3 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 2 ;
[0056] Figure 4 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 3 ;
[0057] Figure 5 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 4 ;
[0058] Figure 6 A schematic diagram of the structure of the parameter configuration device for audio services provided in the embodiments of this application;
[0059] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0060] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0061] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0062] In modern intelligent vehicle systems, users need to use various interconnection protocols (such as Bluetooth phone, local phone, voice recognition system, etc.) to achieve audio interaction functions.
[0063] For example, while driving, a user may simultaneously use software A and software B to make calls, connect to a mobile phone via Bluetooth to answer calls, or activate a voice assistant for voice command recognition. These audio service scenarios place differentiated demands on the audio processing system: software A calls need to meet the audio parameter standards certified by the corresponding manufacturer of software A, software B calls need to meet the certification requirements of the corresponding manufacturer of software B, while Bluetooth calls rely on the audio transmission specifications of the Bluetooth protocol.
[0064] In addition, voice recognition VR services require highly sensitive noise reduction parameters to ensure the clarity of voice commands, while ordinary recording services need to balance sound quality and power consumption.
[0065] In existing technologies, in-vehicle audio systems typically employ a parameter selection scheme based on the PCM sampling rate.
[0066] Choose the appropriate Echo Cancellation and Noise Reduction (ECNR) parameter configuration based on the PCM sampling rate of the audio acquisition (e.g., 8kHz, 16kHz). However, at the same sampling rate, the actual voice bandwidth of different interconnection protocols (e.g., A software narrowband call and Bluetooth broadband call) may differ significantly, leading to parameter matching errors.
[0067] For example, in a mobile phone interconnection call scenario, the PCM audio transmitted between the mobile phone and the vehicle's infotainment system may undergo sampling rate conversion on the mobile phone side. The PCM sampling rate obtained by the vehicle's infotainment system may not accurately reflect the actual vocoder bandwidth used in the cellular call. For instance, an actual cellular call may use narrowband (NB) voice coding, while the audio transmission link between the mobile phone and the vehicle's infotainment system may still use a sampling rate such as 16kHz. If the vehicle's infotainment system selects audio processing parameters solely based on the PCM sampling rate, it may incorrectly match an NB call to wideband (WB) parameters.
[0068] In other words, the existing technology has the following technical problems:
[0069] 1) Selecting parameters solely based on the PCM sampling rate cannot accurately reflect the actual speech bandwidth;
[0070] 2) Lack of a unified multi-service scenario management mechanism;
[0071] 3) Lack of a priority mechanism when call (CALL) and VR services coexist;
[0072] 4) Parameter management is complex in multi-protocol and multi-authentication scenarios;
[0073] 5) Parameter maintenance relies heavily on hard coding and project customization;
[0074] 6) The stability of telecommunications standardization testing is poor under different certification scenarios.
[0075] To address the technical problems existing in the prior art, the inventors of this application propose the following concept: In a real-world in-vehicle multi-protocol interconnection environment, sampling rate or service type alone cannot truly reflect the full picture of a call scenario. Therefore, it is conceived to integrate the state information (i.e., interconnection protocol status, service type, voice bandwidth level (which can be determined by combining the vocoder information obtained from the protocol layer), and physical connection method) scattered in multiple modules such as the protocol stack, audio recording interface, codec, and physical layer, to form a unified scenario description label. This label is then used as an index and linked to a preset parameter configuration file mapping table. This simplifies the complex multi-condition decision problem into a table lookup problem, ensuring the accuracy of parameter selection and allowing the addition of new protocols or scenarios by simply expanding the mapping table entries. This improves the adaptability and configuration accuracy for complex audio scenario requirements.
[0076] Based on the above technical concept, Figure 1 A schematic diagram of the structure of the audio service parameter configuration system provided in the embodiments of this application is shown below. Figure 1As shown, the parameter configuration system for this audio service includes: a protocol status management module, a service scenario recognition module, a voice bandwidth acquisition module, a scene ID generation module, a service priority management module, a parameter selection module, and a parameter configuration module.
[0077] In one possible implementation, the protocol state management module monitors the connection status and connection method of the current interconnection protocol in real time; at the same time, the service scenario identification module automatically determines whether the current service type is a telephone call, speech recognition, or ordinary recording by listening to the underlying recording channel; the voice bandwidth acquisition module obtains the actual codec sampling rate from the protocol layer to determine the voice bandwidth; the information obtained by the above three modules is uniformly collected into the Scene ID generation module, which integrates the four dimensions of protocol, service, bandwidth, and connection method to generate the corresponding audio scene (Scene ID), that is, a unique scene identifier.
[0078] Furthermore, when multiple services exist simultaneously, the service priority management module determines the final effective Scene ID based on a fixed priority sequence; then, the parameter selection module searches the preset mapping table based on the Scene ID to match the corresponding parameter configuration data (Profile); finally, the parameter configuration module loads the file and sends it to the Audio Hardware Abstraction Layer (Audio HAL) and the Digital Signal Processor (DSP) to complete the parameter switching of audio algorithms such as ECNR.
[0079] The above description is merely a brief illustration of the embodiments of this application. The following detailed description uses specific embodiments to illustrate the technical solution of this application and how it solves the aforementioned technical problems. The subject of this technical solution is an electronic device, such as a vehicle or robot.
[0080] The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0081] Figure 2 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the method includes:
[0082] Step 21: Obtain the current audio scene corresponding to the current audio service;
[0083] The current audio scenario is determined by the interconnection protocol status, service type, voice bandwidth level, and / or physical connection method corresponding to the current audio service.
[0084] In this step, the audio processing system, especially the Audio HAL layer of the in-vehicle audio system, can obtain the current audio scene corresponding to the audio service currently being processed.
[0085] The current audio scene is a comprehensive status identifier used to uniquely identify the environment in which the current audio processing service is located. It is not a single parameter, but is generated after a comprehensive judgment based on one or more status information such as the interconnection protocol status, service type, voice bandwidth level, and physical connection method corresponding to the current audio service.
[0086] Optional service types include: telephone, voice, recording, and third-party VoIP applications; voice bandwidth levels include: narrowband (NB), wideband (WB), ultra-wideband (SWB), and full-band (FB); physical connection methods include: wired and wireless.
[0087] In this implementation, the service types include, but are not limited to, telephone (CALL), voice recognition (VR), ordinary recording (MIC), and call services generated by third-party VoIP applications. The identification of service types does not rely on the application to actively report, but is automatically identified by listening to the audio source type when the AudioRecord is created through the Audio HAL layer.
[0088] Specifically, a Source type of VOICE_COMMUNICATION corresponds to telephone service, VOICE_RECOGNITION corresponds to voice recognition service, and MIC corresponds to ordinary recording service. This mechanism allows third-party VoIP applications to be correctly identified as telephone services even if they are not adapted to the active reporting interface, because they use the standard VOICE_COMMUNICATION Source when creating the AudioRecord.
[0089] In this implementation, voice bandwidth levels include narrowband, wideband, ultra-wideband, and full-band. For interconnection protocols that support vocoder information, the SetVocoderSampleRate key value can be obtained through the setParameters interface, and the bandwidth is determined according to the correspondence between sampling rate and bandwidth: 8k corresponds to NB, 16k to WB, 32k to SWB, and 48k to FB. For protocols that do not support vocoder information, the default configuration of the protocol is used.
[0090] In this implementation, the physical connection methods include wired and wireless. The SetConnectionType key value can be obtained through the setParameters interface. The value 1 indicates wired and 2 indicates wireless. This information is used to distinguish the parameter configuration requirements under different authentication scenarios.
[0091] Step 22: Determine the current parameter configuration data in the mapping table based on the current audio scene;
[0092] The mapping table contains multiple preset audio scenes and parameter configuration data corresponding to each audio scene;
[0093] In this step, once the current audio scene is determined, the Scene ID is used as an index to search and match in a preset mapping table, thereby determining the current parameter configuration data (Profile) that uniquely corresponds to the current audio scene.
[0094] For example, the mapping table is a two-dimensional correspondence table that is pre-maintained in the electronic device. It records the mapping relationship between multiple preset audio scenes and the parameter configuration data file corresponding to each audio scene. Each Profile can actually be a set of preset audio parameters, and the specific audio parameter types it contains are limited by the following optional content.
[0095] Optionally, each parameter configuration data includes at least one of the following audio parameters: echo cancellation intensity, noise reduction level, equalizer tuning, and gain value.
[0096] In this implementation, these parameters are pre-tuned and optimized for specific scenarios, directly corresponding to the control variables of the underlying audio processing algorithms (such as echo cancellation, noise reduction, equalizer, etc.), and together determine the specific behavior of the audio processing link to meet the requirements of sound quality and telecommunications standardization testing and certification in specific scenarios.
[0097] For example, Table 1 shows a possible mapping representation provided by an embodiment of this application:
[0098] Table 1
[0099]
[0100] Specifically, as shown in the mapping example, when Scene is CP_CALL_WIRELESS_NB (representing wireless A software narrowband calling), the corresponding Profile is cpnb_wireless.
[0101] This Profile is a configuration file that contains preset values for the various audio parameters mentioned above (e.g., preset_profile_cpnb_wireless.c).
[0102] Step 23: Configure the parameters for the current audio service based on the current parameter configuration data.
[0103] In this step, after determining the current parameter configuration data that matches the current audio scenario, specific parameter configurations can be made for the audio processing link of the current audio service based on the current parameter configuration data.
[0104] Optionally, step 23 can be implemented as follows:
[0105] Step 1: Parse at least one audio parameter from the current parameter configuration data;
[0106] In this implementation, one or more predefined specific audio parameters, such as echo cancellation intensity value, noise reduction level value, and gain value of each frequency band of the equalizer, are parsed from the current parameter configuration data (e.g., preset_profile_cpnb_wireless.c).
[0107] Step 2: Apply at least one audio parameter to the audio processing link of the current audio service.
[0108] In this implementation, the parsed audio parameters are loaded and applied to the relevant modules in the audio processing chain.
[0109] In one possible implementation, Audio HAL sends the selected parameters to the digital signal processor (DSP) and configures its internal echo cancellation, noise reduction, equalizer, and other algorithm modules.
[0110] For example, after loading the preset_profile_cpnb_wireless.c parameter file for narrowband calling in Wireless A application (Scene is CP_CALL_WIRELESS_NB), the ECNR module will be started, and specific echo cancellation intensity and noise reduction level will be set according to the parameters. At the same time, the equalizer's tuning curve and gain value will be adjusted according to the settings in the Profile, thereby completing the configuration of the entire audio link, so that the current call can obtain the best sound quality and the stability of telecommunications standard test certification.
[0111] The audio service parameter configuration method provided in this application involves obtaining the current audio scene corresponding to the current audio service. The current audio scene is determined by the interconnection protocol status, service type, voice bandwidth level, and / or physical connection method corresponding to the current audio service. Based on the current audio scene, the current parameter configuration data is determined in a mapping table, which records multiple preset audio scenes and the parameter configuration data corresponding to each audio scene. The current audio service is then configured according to the current parameter configuration data. This technical solution determines the current audio scene by comprehensively obtaining multi-dimensional information such as interconnection protocol status, service type, voice bandwidth level, and physical connection method, and automatically matches the corresponding parameter configuration data according to the preset mapping table. This achieves accurate and unified management of audio parameters under different protocols and bandwidth conditions, avoiding parameter selection bias caused by relying on a single information source. Furthermore, by centrally maintaining parameter configurations in the mapping table, the complexity of parameter debugging and maintenance in practical applications is effectively reduced, improving the accuracy and efficiency of audio parameter configuration.
[0112] Based on the above embodiments, Figure 3 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 2 ,like Figure 3 As shown, prior to step 21, the method further includes:
[0113] Step 31: In response to a new audio service trigger, determine the priority relationship between the new audio service and the current audio service in the priority sequence;
[0114] The priority sequence contains multiple audio services arranged in order of priority.
[0115] In this step, before obtaining the current audio scene in step 21, the status changes of audio services can be continuously monitored. When a new audio service is triggered, a priority decision mechanism can be activated.
[0116] The core of this mechanism is to determine the priority relationship between a newly triggered audio service and the currently running audio service based on a predefined priority sequence.
[0117] In one possible implementation, the priority order is set as follows: telephone service has a higher priority than voice recognition service, and VR service has a higher priority than ordinary recording service, i.e., CALL>VR>MIC.
[0118] Therefore, when a new audio service is detected, for example, if a user answers an incoming call (VOICE_COMMUNICATION) while a VR service (VOICE_RECOGNITION) is in progress, the system will determine that the call service has a higher priority than the current VR service based on this priority sequence.
[0119] Step 32: If the size relationship indicates that the priority of the new audio service is greater than the priority of the current audio service, then the new audio service is identified as the current audio service.
[0120] In this step, if the new audio service has a higher priority than the current audio service, the new audio service with higher priority is identified as the audio service that needs to be processed, and the final audio scenario is determined accordingly.
[0121] For example, in a scenario where CP (Contact Person) phone calls and voice assistant H coexist, both VOICE_COMMUNICATION (phone call) and VOICE_RECOGNITION (VR, such as voice assistant H) services can be detected simultaneously. According to the priority rule of CALL>VR, since the phone call service has a higher priority than the VR service, the phone call service will be identified as the current audio service.
[0122] It should be understood that in this embodiment of the application, the new audio service is identified as the current audio service only so that the parameter configuration data corresponding to the new audio service can be directly applied to the relevant parameters of the audio system in order to adapt to the use of higher priority audio services, rather than the switching of audio services.
[0123] The audio service parameter configuration method provided in this application determines the priority relationship between the new audio service and the current audio service in a priority sequence in response to the triggering of a new audio service. The priority sequence records multiple audio services arranged in order of priority. If the priority relationship indicates that the priority of the new audio service is greater than that of the current audio service, the new audio service is identified as the current audio service. This technical solution establishes an audio service sequence arranged in order of priority and automatically compares its priority relationship with that of the current audio service when a new audio service is triggered. Configuration switching is only performed when the priority is higher, thereby ensuring that the audio configuration corresponding to the high-priority service can be set in a timely manner. This achieves automation, regularization, and stability of the switching of audio configuration focus in multi-service coexistence scenarios, without relying on external application active reporting or manual intervention, thus improving the scheduling decision efficiency for concurrent audio services.
[0124] Based on the above embodiments, Figure 4 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 3,like Figure 4 As shown, step 21 may include:
[0125] Step 41: Obtain the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method;
[0126] In this step, multi-dimensional status information used to generate the current audio scene is collected, which may include: the interconnection protocol status of the current audio service, service type, voice bandwidth level and / or physical connection method;
[0127] Optionally, this information can be obtained in parallel through different interfaces and modules.
[0128] I. Regarding the status of interconnection protocols and physical connection methods:
[0129] The module listens for `setParameters` calls from the upper-layer application. The protocol state management module retrieves the current protocol using the key `SetAppType`. For example, a key of `A software` indicates the A software protocol, `C software` indicates the C software protocol, `bt` indicates the Bluetooth protocol, and 0 indicates no protocol connection. The protocol state is automatically registered when a connection is established and automatically cleared (set to None) when disconnected. The connection method state is retrieved using the key `SetConnectionType`, where 0 indicates none, 1 indicates wired, and 2 indicates wireless.
[0130] In addition, when a key value of 0 or outside the predefined range is detected, the default connection method of the protocol (e.g., wireless) can be used by default, and an exception log can be recorded for subsequent debugging.
[0131] II. Regarding voice bandwidth levels:
[0132] 1) Supports the interconnection protocol for vocoder information. It listens to the SetVocoderSampleRate key value through the setParameters interface and determines the voice bandwidth level based on the correspondence between sampling rate and bandwidth. For example, a sampling rate of 8kHz corresponds to narrowband, 16kHz to wideband, 32kHz to ultra-wideband, and 48kHz to full-band.
[0133] 2) For protocols or business scenarios where vocoder information cannot be directly obtained, the corresponding voice bandwidth or parameter profile can be determined based on the protocol type, codec type, protocol negotiation results, audio link attributes, or default configuration. For scenarios where vocoder information, codec information, or other information that can characterize the actual voice bandwidth can be obtained from the protocol layer, the voice bandwidth should be determined based on the above information first, so as to avoid misjudgment caused by judging solely based on the PCM sampling rate on the audio acquisition side.
[0134] For example, Table 2 illustrates one possible service type provided in the embodiments of this application, as shown in Table 2:
[0135] Table 2
[0136]
[0137] For example, Table 3 illustrates a possible voice bandwidth provided in an embodiment of this application, as shown in Table 3:
[0138] Table 3
[0139]
[0140] Optionally, obtaining the service type of the current audio service in step 41 may include:
[0141] Step 1: Obtain the creation request for the audio acquisition channel corresponding to the current audio service;
[0142] In this implementation, a creation request for the audio acquisition channel (i.e., AudioRecord) corresponding to the current audio service is obtained. When any application or service (including system applications and third-party applications) needs to acquire audio, it requests the creation of an AudioRecord instance from the audio management service. This creation action and the parameters it carries are considered as a creation request.
[0143] Step 2: Determine the service type of the current audio service based on the channel type identifier carried in the creation request.
[0144] In this implementation, after receiving the AudioRecord creation request, the channel type identifier, i.e., the audio source type, carried in the creation request is parsed. This identifier is set by the application that initiated the request according to its business purpose. Based on this identifier, the type of the current audio service can be accurately determined, thus eliminating the need for the application to actively call setParameters to report.
[0145] Specifically, Audio HAL automatically identifies the business scenario by examining the Source parameter specified when the AudioRecord is created:
[0146] When the Source type is VOICE_COMMUNICATION, it is identified as a telephone service; when the Source type is VOICE_RECOGNITION, it is identified as a voice recognition service; when the Source type is MIC, it is identified as a regular recording service.
[0147] Step 42: Determine the current audio scenario based on the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method.
[0148] In this step, after obtaining the required status information such as interconnection protocol status, service type, voice bandwidth level, and / or physical connection method through step 41, the final scene fusion decision is executed. Audio HAL will take these status information from different sources and representing different dimensions as input, and calculate a unique Scene ID representing the current complete audio scene according to the preset Scene generation rules, which is recorded as the current audio scene.
[0149] For example, the Audio HAL combines the protocol status, service status, connection method, and voice bandwidth to generate the final SceneID. In a specific instance, for example, the status obtained in step 41 is: the interconnection protocol status is software A (from SetAppType=A software), the service type is CALL (from the recognition result of Source=VOICE_COMMUNICATION in step 41-2), the physical connection method is Wireless (from SetConnectionType=wireless, value 2), and the voice bandwidth is NB (from the SetVocoderSampleRate value corresponding to a sampling rate of 8kHz). This information is then combined according to a predetermined format to finally determine and generate the current audio scene as CP_CALL_WIRELESS_NB.
[0150] The audio service parameter configuration method provided in this application obtains the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method; and determines the current audio scenario based on the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method. This technical solution comprehensively obtains status information of the audio service across multiple dimensions, such as interconnection protocol status, service type, voice bandwidth level, and / or physical connection method, and uses this information to jointly determine the current audio scenario. This allows for a more comprehensive and accurate reflection of the current call environment, avoiding scenario misjudgment caused by relying on a single information source, and providing a more accurate scenario basis for subsequent parameter configuration. Furthermore, this fusion judgment mechanism does not rely on the reporting behavior of specific applications, is compatible with different protocols and third-party applications, and unifies the recognition logic for multiple service scenarios, reducing the complexity of adaptation and maintenance.
[0151] Based on the above embodiments, Figure 5 A flowchart illustrating the parameter configuration method for audio services provided in this application embodiment. Figure 4 ,like Figure 5 As shown, taking wireless A software NB-IoT calling as an example, one possible implementation could be:
[0152] Step 51: A software wireless connection is established;
[0153] In the A software settings: SetAppType=A software; SetConnectionType=wireless.
[0154] Step 52: AudioRecord creation;
[0155] Among them, Source=VOICE_COMMUNICATION is identified as a CALL scenario.
[0156] Step 53: Obtain vocoder information;
[0157] Among them, vocoder=8k is identified as NB.
[0158] Step 54: Generate Scene: CP_CALL_WIRELESS_NB.
[0159] Step 55: Look up the mapping table;
[0160] Among them, CP_CALL_WIRELESS_NB→cpnb_wireless.
[0161] Step 56: Load the parameter file;
[0162] Among them, preset_profile_cpnb_wireless.c.
[0163] Step 57: Start ECNR.
[0164] The parameter configuration method for audio services provided in this application has the following technical effects:
[0165] Technical effect 1) Enables unified parameter management for different communication software, Bluetooth phones, and third-party VoIP;
[0166] Technical effect 2) Enables automatic matching of different voice bandwidth parameters for NB, WB, and SWB;
[0167] Technical effect 3) solves the problem of incorrect parameter selection caused by the PCM sampling rate not being able to accurately reflect the real speech bandwidth;
[0168] Technical effect 4) Enables automatic parameter decision-making in scenarios where telephone and VR coexist;
[0169] Technical effect 5) Reduces the complexity of project parameter maintenance and improves certification tuning efficiency;
[0170] Technical effect 6) Improves the accuracy of parameter switching and the stability of telecommunications standardization testing and certification in different audio-related software and Bluetooth phone authentication scenarios.
[0171] Based on the above embodiments, Figure 6 A schematic diagram of the structure of the parameter configuration device for audio services provided in the embodiments of this application is shown below. Figure 6 As shown, the device includes:
[0172] The acquisition module 61 is used to acquire the current audio scene corresponding to the current audio service. The current audio scene is determined by the interconnection protocol status, service type, voice bandwidth level and / or physical connection method corresponding to the current audio service.
[0173] The determination module 62 is used to determine the current parameter configuration data in the mapping table according to the current audio scene. The mapping table contains multiple preset audio scenes and the parameter configuration data corresponding to each audio scene.
[0174] Processing module 63 is used to configure parameters for the current audio service based on the current parameter configuration data.
[0175] In one or more embodiments, before obtaining the current audio scene corresponding to the current audio service, the acquisition module 61 is further configured to:
[0176] In response to a new audio service trigger, the priority relationship between the new audio service and the current audio service is determined in the priority sequence, which contains multiple audio services arranged in order of priority.
[0177] If the priority of the new audio service is greater than that of the current audio service, the new audio service will be designated as the current audio service.
[0178] In one or more embodiments, the acquisition module 61 acquires the current audio scene corresponding to the current audio service, specifically for:
[0179] Obtain the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method;
[0180] The current audio scenario is determined based on the current interconnection protocol status, service type, voice bandwidth level, and / or physical connection method of the audio service.
[0181] In one or more embodiments, the acquisition module 61 acquires the service type of the current audio service, specifically for:
[0182] Get the creation request for the audio acquisition channel corresponding to the current audio service;
[0183] The service type of the current audio service is determined based on the channel type identifier carried in the creation request.
[0184] In one or more embodiments, the processing module 63 configures parameters for the current audio service based on the current parameter configuration data, specifically for:
[0185] Extract at least one audio parameter from the current parameter configuration data;
[0186] Apply at least one audio parameter to the audio processing link of the current audio service.
[0187] In one or more embodiments, each parameter configuration data includes at least one of the following audio parameters: echo cancellation intensity, noise reduction level, equalizer tuning, and gain value.
[0188] In one or more embodiments, the service types include: telephone, voice, recording, and third-party VoIP applications;
[0189] Voice bandwidth levels include: narrowband, wideband, ultra-wideband, and full-band.
[0190] Physical connection methods include wired and wireless.
[0191] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical element, or they can be physically separated. Furthermore, these modules can be implemented entirely in software through processing element calls, or entirely in hardware. Alternatively, some modules can be implemented through processing element calls in software, while others can be implemented in hardware. Moreover, these modules can be integrated together or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0192] As can be seen from the above, the audio service parameter configuration device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0193] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device provided in this embodiment includes at least one processor 71 and a memory 72.
[0194] Optionally, the electronic device also includes a communication component 73.
[0195] The processor 71, memory 72, and communication component 73 are connected via bus 74.
[0196] In a specific implementation, at least one processor 71 executes computer execution instructions stored in memory 72, causing at least one processor 71 to perform the above-described method.
[0197] The specific implementation process of processor 71 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0198] 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 (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0199] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0200] 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. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0201] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0202] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0203] The aforementioned 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 storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0204] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from 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 reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0205] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0206] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0207] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0208] If a function is implemented as 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0209] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0210] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A parameter configuration method for an audio service, characterized in that, include: Obtain the current audio scene corresponding to the current audio service. The current audio scene is determined by the interconnection protocol status, service type, voice bandwidth level and / or physical connection method corresponding to the current audio service. Based on the current audio scene, the current parameter configuration data is determined in the mapping table, which contains multiple preset audio scenes and parameter configuration data corresponding to each audio scene; Based on the current parameter configuration data, configure the parameters for the current audio service.
2. The method according to claim 1, characterized in that, Before obtaining the current audio scene corresponding to the current audio service, the method further includes: In response to a new audio service trigger, the priority relationship between the new audio service and the current audio service is determined in a priority sequence, which contains multiple audio services arranged in order of priority. If the size relationship indicates that the priority of the new audio service is greater than the priority of the current audio service, the new audio service is identified as the current audio service.
3. The method according to claim 1 or 2, characterized in that, The step of obtaining the current audio scene corresponding to the current audio service includes: Obtain the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method; The current audio scenario is determined based on the current audio service's interconnection protocol status, service type, voice bandwidth level, and / or physical connection method.
4. The method according to claim 3, characterized in that, Obtain the service type of the current audio service, including: Obtain the creation request for the audio acquisition channel corresponding to the current audio service; The service type of the current audio service is determined based on the channel type identifier carried in the creation request.
5. The method according to claim 1, characterized in that, The step of configuring parameters for the current audio service based on the current parameter configuration data includes: At least one audio parameter is parsed from the current parameter configuration data; The at least one audio parameter is applied to the audio processing link of the current audio service.
6. The method according to claim 1 or 5, characterized in that, Each parameter configuration data includes at least one of the following audio parameters: echo cancellation intensity, noise reduction level, equalizer tuning, and gain value.
7. The method according to claim 1 or 2, characterized in that, The types of services include: telephone, voice, recording, and third-party VoIP applications; Voice bandwidth levels include: narrowband, wideband, ultra-wideband, and full-band. Physical connection methods include wired and wireless.
8. A parameter configuration device for an audio service, characterized in that, include: The acquisition module is used to acquire the current audio scene corresponding to the current audio service. The current audio scene is determined by the interconnection protocol status, service type, voice bandwidth level and / or physical connection method corresponding to the current audio service. The determination module is used to determine the current parameter configuration data in the mapping table according to the current audio scene. The mapping table records multiple preset audio scenes and parameter configuration data corresponding to each audio scene. The processing module is used to configure the parameters of the current audio service based on the current parameter configuration data.
9. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium / computer program product, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-7; The computer program product includes a computer program that, when executed by a processor, is used to implement the method as described in any one of claims 1-7.
