Method, apparatus and terminal for acquiring audio data, and storage medium
By determining the target recording device and data channel in the Android APP interface configuration, and using the conversion chip to acquire audio data from multiple recording devices, the problem of low audio data acquisition efficiency is solved, and synchronous operation and efficient recording of multiple recording devices are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI QUECTEL TECH CO LTD
- Filing Date
- 2022-09-30
- Publication Date
- 2026-04-28
AI Technical Summary
In existing technologies, audio data acquisition efficiency is low, and it is impossible to achieve synchronous operation of multiple audio data channels.
By configuring the Android APP interface and the target application scenario, the parameters corresponding to the target recording device are determined. Based on the target application scenario and the recording device parameters, the target data channel is determined, and the audio data of multiple recording devices is acquired using a conversion chip.
It enables the simultaneous operation of multiple recording devices, improves the efficiency of audio data acquisition, and meets the needs of various application scenarios.
Smart Images

Figure CN115576518B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Android device technology, and more specifically, to a method, apparatus, terminal, and storage medium for acquiring audio data. Background Technology
[0002] Aftermarket in-vehicle devices typically require recording functionality (with audio), usually consisting of 4 or 8 AHD cameras, each with a microphone, connected to different locations inside and outside the vehicle. They also need phone call or voice recognition capabilities. When users have multiple needs, it's necessary to match the application scenario, recording equipment, and audio data channel.
[0003] Currently, a single audio data channel configured on the platform (based on Qualcomm MSM8953 debugging) is typically used to connect to a recording device (such as a microphone) to meet the needs of multiple application scenarios.
[0004] However, the above method can only configure one audio data channel, and cannot achieve simultaneous operation of multiple channels, which reduces the efficiency of audio data acquisition. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, terminal, and storage medium for acquiring audio data, so as to solve the problem of low efficiency in acquiring audio data in related technologies.
[0006] To achieve the above objectives, firstly, this application provides a method for acquiring audio data, comprising:
[0007] Based on the Android APP interface configuration and the target application scenario, determine the parameters corresponding to the target recording device;
[0008] The target data channel is determined based on the target application scenario and the parameters corresponding to the target recording device;
[0009] The audio data of the target recording device is acquired through the target data channel.
[0010] In one possible implementation, the Android APP interface configuration includes the target APP interface and the parameters corresponding to the target APP interface;
[0011] Based on the Android APP interface configuration and the target application scenario, determine the parameters corresponding to the target recording device, including:
[0012] In the Android APP interface configuration, select the target APP interface and the corresponding parameters that match the target application scenario;
[0013] Based on the target APP interface and the parameters corresponding to the target APP interface, determine the parameters corresponding to the target recording device.
[0014] In one possible implementation, audio data from the target recording device is acquired via the target data channel, including:
[0015] If there is only one target recording device, retrieve the target recording device corresponding to the target data channel from the configuration list;
[0016] Obtain audio data from the target recording device.
[0017] In one possible implementation, audio data from the target recording device is acquired via the target data channel, including:
[0018] When the target recording device includes multiple sub-recording devices, multiple audio data corresponding to the multiple sub-recording devices are obtained through a conversion chip connected to the target data channel, wherein the multiple sub-recording devices correspond one-to-one with the multiple audio data.
[0019] In one possible implementation, after determining the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario, the following steps are also included:
[0020] Get the route configuration;
[0021] Select the target route in the routing configuration;
[0022] The parameters corresponding to the target application scenario and the target recording device are forwarded through the target route.
[0023] In one possible implementation, before determining the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario, the following steps are also included:
[0024] Identify the target application scenario;
[0025] Select the Android APP interface configuration based on the target application scenario.
[0026] Secondly, embodiments of the present invention provide an audio data acquisition device, comprising:
[0027] The recording device determination module is used to determine the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario;
[0028] The data channel determination module is used to determine the target data channel based on the target application scenario and the parameters corresponding to the target recording device;
[0029] The recording data acquisition module is used to acquire audio data from the target recording device through the target data channel.
[0030] In one possible implementation, the APP interface configuration includes the target APP interface and the parameters corresponding to the target APP interface;
[0031] The recording device determination module includes:
[0032] The APP interface matching submodule is used to select the target APP interface and the corresponding parameters of the target APP interface that match the target application scenario in the APP interface configuration.
[0033] The recording device determination submodule is used to determine the parameters of the target recording device based on the target APP interface and the parameters corresponding to the target APP interface.
[0034] Thirdly, embodiments of the present invention provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the above-described audio data acquisition methods.
[0035] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described audio data acquisition methods.
[0036] This invention provides a method, apparatus, terminal, and storage medium for acquiring audio data, comprising: first, determining the parameters corresponding to a target recording device based on Android APP interface configuration and a target application scenario; then, determining a target data channel (i.e., a recording data channel) based on the target application scenario and the parameters corresponding to the target recording device, so as to acquire audio data from the target recording device through the target data channel. This invention configures a corresponding recording data channel and parameters corresponding to the recording device for each application scenario to enable multiple functions to be performed simultaneously, thereby improving recording efficiency. Furthermore, this invention enables one recording data channel to correspond to multiple recording devices by configuring an adapter chip for the recording data channel. Attached Figure Description
[0037] The accompanying drawings, which form part of this application, are used to provide a further understanding of the application and to make other features, objects, and advantages of the application more apparent. The illustrative embodiments and descriptions of this application are used to explain the application and do not constitute an undue limitation of the application. In the drawings:
[0038] Figure 1 This is a flowchart illustrating the implementation of an audio data acquisition method according to an embodiment of the present invention;
[0039] Figure 2 This is a flowchart illustrating the implementation of an audio data acquisition method according to another embodiment of the present invention;
[0040] Figure 3 This is a flowchart illustrating the implementation of an audio data acquisition method according to another embodiment of the present invention;
[0041] Figure 4 This is a flowchart illustrating the implementation of acquiring audio data from multiple sub-recording devices through a single data bus, as provided in an embodiment of the present invention.
[0042] Figure 5 This is a schematic diagram of the structure of an audio data acquisition device provided in an embodiment of the present invention;
[0043] Figure 6 This is a schematic diagram of the terminal provided in an embodiment of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0046] It should be understood that in the various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0047] It should be understood that in this invention, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0048] It should be understood that in this invention, "multiple" refers to two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, "and / or B" can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "Contains A, B, and C", "Contains A, B, and C" means that all three A, B, and C are contained; "Contains A, B, or C" means that one of A, B, and C is contained; "Contains A, B, and / or C" means that any one, two, or three of A, B, and C are contained.
[0049] It should be understood that in this invention, "B corresponding to A", "B corresponding to A", "A and B correspond", or "B and A correspond" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information. Matching A and B is defined as a similarity between A and B that is greater than or equal to a preset threshold.
[0050] Depending on the context, "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection."
[0051] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0052] To make the objectives, technical solutions, and advantages of the present invention clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0053] In one embodiment, such as Figure 1 As shown, the present invention provides a method for acquiring audio data, comprising the following steps:
[0054] Step S101: Based on the Android APP interface configuration and the target application scenario, determine the parameters corresponding to the target recording device.
[0055] The recording device configuration includes parameters for various types of recording devices. The target application scenario (Usecase) refers to the usage scenario of the recording device; for example, the microphone can be used for making phone calls, voice recognition, recording, and other different scenarios.
[0056] In addition, the Android APP interface configuration includes the target APP interface and the parameters corresponding to the target APP interface. That is, the Android APP interface configuration contains multiple different types of APP interfaces and their corresponding parameters. When a certain APP interface is selected, this APP interface is used as the target APP interface.
[0057] Furthermore, if the Android APP interface configuration includes the target APP interface and its corresponding parameters, the parameters corresponding to the target recording device are determined based on the Android APP interface configuration and the target application scenario. This includes the following steps: selecting the target APP interface and its corresponding parameters that match the target application scenario in the Android APP interface configuration; and then determining the parameters corresponding to the target recording device based on the target APP interface and its corresponding parameters. In other words, there is a one-to-one correspondence between the target APP interface and its corresponding parameters, the target application scenario, and the parameters corresponding to the target recording device.
[0058] Step S102: Determine the target data channel based on the parameters corresponding to the target application scenario and the target recording device.
[0059] After determining the target application scenario and the parameters corresponding to the target recording device, existing technologies only set up one target data channel to achieve the target application scenario corresponding to the parameters of the target recording device through a single target data channel. Combined with... Figure 2 This section describes the implementation of existing technologies that use a single target data channel to achieve the target recording device in a corresponding target application scenario. Figure 2As shown, the entire solution is divided into two parts based on the Hardware Abstraction Layer (HAL): the part above the HAL layer and the part below the HAL layer. The HAL is the hardware adaptation layer in the Android code framework, and this code is highly platform-dependent, with different implementations for different platforms. The specific implementation steps are as follows: The parameters corresponding to the Android APP API (interface) are sent to the Framework. The Framework receives the interface and parameter configuration, determines the corresponding Usecase and the parameters corresponding to the recording device, and selects the appropriate route based on the routing configuration, finally sending the data to the HAL layer. Note that by default, regardless of the number of apps, only one set of parameters will be sent. That is, if one set of parameters has already been sent, subsequent apps will only copy the already reported data and will not send parameters to request the device again. The part below the HAL layer is closely related to the platform. Based on the Usecase issued by the Framework, the parameters and routes corresponding to the recording device, and the parameters corresponding to the recording device already configured on the platform, the appropriate data bus is selected. Determining the data bus determines the hardware recording device (i.e., the recording device). The data on the data channel will be processed by the ADSP's audio effects.
[0060] This invention targets specific application scenarios and recording devices, matching them with corresponding target data channels. That is, the target data channels in this invention can be one or multiple. The following explanation uses two target data channels as an example. Figure 3 As shown, the parameters for the Android APP1 API (interface) and Android APP2 API (interface) correspond to different target application scenarios and target recording devices. Specifically, the Android APP1 API (interface) corresponds to the first target scenario (use scenario 1) and the parameters for the first target recording device, while the Android APP2 API (interface) corresponds to the second target scenario (use scenario 2) and the parameters for the second target recording device. When the first and second target recording devices need to be used synchronously, corresponding target data channels can be configured for each device. That is, the first target recording device is configured with a first target data channel, and the second target recording device is configured with a second target data channel. Figure 3 (Data bus in the middle).
[0061] Taking the synchronous use of the first and second target recording devices as an example, the steps for determining the first and second target data channels are explained as follows: The parameters corresponding to the Android APP1 API (interface) are sent to the Framework. When the Framework receives the parameters corresponding to the Android APP1 API (interface), it can determine the parameters corresponding to the first target application scenario and the first target recording device through these parameters. Then, according to the routing configuration, it selects a route matching the first target application scenario and sends the parameters corresponding to the first target application scenario and the first target recording device to the HAL layer through the route. The parts below the HAL layer, based on the first target application scenario, the parameters corresponding to the first target recording device, and the route sent by the Framework, and according to the parameters corresponding to the first target recording device already configured on the platform, select the appropriate first target data channel. Figure 3 (The data bus on the left side of the middle). The principle for determining the second target data channel is similar to that for determining the first target data channel, and will not be repeated here.
[0062] Step S103: Obtain audio data from the target recording device through the target data channel.
[0063] Once the target data channel is determined, the hardware recording device (i.e., the target recording device) can be identified, and audio data can be directly obtained from the hardware recording device through the target data channel. Figure 2 and Figure 3 The proposed method involves one target recording device corresponding to one target data channel. In other words, when there is only one target recording device, the target recording device corresponding to the target data channel is obtained from the configuration list, and the audio data of the target recording device is obtained from the target recording device. The configuration list records the matching relationship between different data channels and recording devices. By searching the configuration list, the recording device corresponding to a certain data channel can be directly obtained.
[0064] This invention also provides a scenario where multiple target recording devices correspond to one target data channel. Specifically, when the target recording device includes multiple sub-recording devices, multiple audio data corresponding to the multiple sub-recording devices are acquired through a conversion chip connected to the target data channel. Each sub-recording device corresponds one-to-one with a specific set of audio data. For example... Figure 4 As shown, an adapter chip is connected to the data bus, and multiple sub-recording devices can be connected to the adapter chip, up to four, such as... Figure 4The MIC1, MIC2, MIC3 and MIC4 shown are shown.
[0065] Based on the above embodiments, after determining the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario, the method further includes: obtaining the routing configuration, selecting the target route in the routing configuration, and forwarding the parameters corresponding to the target application scenario and the target recording device through the target route.
[0066] The routing configuration includes different types of routes, which need to be matched according to the user's selected target application scenario. Figure 2 and Figure 3 Once the target application scenario and recording device configuration are determined, a target route matching the target application scenario needs to be selected in the routing configuration, and the parameters corresponding to the target application scenario and the target recording device are forwarded through the target route.
[0067] In one possible implementation, before determining the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario, the method further includes: obtaining the target application scenario and selecting the Android APP interface configuration according to the target application scenario.
[0068] Since the required Android APP interface configuration varies depending on the application scenario of the recording device, it is necessary to select the appropriate Android APP interface configuration based on the application scenario. For example, when the recording device is used in an audiobook recording scenario, it is necessary to accurately reflect the narrator's voice quality and ensure the volume is appropriate. Therefore, a condenser microphone becomes the optimal choice. By connecting the condenser microphone to the Android system, the corresponding Android APP interface configuration can be obtained.
[0069] This invention provides a method for acquiring audio data, comprising: first, determining the parameters corresponding to a target recording device based on Android APP interface configuration and target application scenario; then, determining a target data channel (i.e., a recording data channel) based on the target application scenario and the parameters corresponding to the target recording device, so as to acquire audio data from the target recording device through the target data channel. This invention configures a corresponding recording data channel and parameters corresponding to the recording device for each application scenario to enable multiple functions to run simultaneously, thereby improving recording efficiency. Furthermore, this invention enables one recording data channel to correspond to multiple recording devices by configuring an adapter chip for the recording data channel.
[0070] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0071] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0072] Figure 5 The diagram illustrates the structure of an audio data acquisition device according to an embodiment of the present invention. For ease of explanation, only the parts relevant to the embodiment of the present invention are shown. The audio data acquisition device includes a recording device determination module 51, a data channel determination module 52, and a recording data acquisition module 53, as detailed below:
[0073] The recording device determination module 51 is used to determine the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario;
[0074] The data channel determination module 52 is used to determine the target data channel based on the target application scenario and the parameters corresponding to the target recording device;
[0075] The recording data acquisition module 53 is used to acquire audio data of the target recording device through the target data channel.
[0076] In one possible implementation, the APP interface configuration includes the target APP interface and the parameters corresponding to the target APP interface;
[0077] Recording device determination module 51 includes:
[0078] The APP interface matching submodule is used to select the target APP interface and the corresponding parameters of the target APP interface that match the target application scenario in the APP interface configuration.
[0079] The recording device determination submodule is used to determine the parameters of the target recording device based on the target APP interface and the parameters corresponding to the target APP interface.
[0080] In one possible implementation, the recording data acquisition module 53 includes:
[0081] The first recording data acquisition submodule is used to obtain the target recording device corresponding to the target data channel from the configuration list when there is only one target recording device.
[0082] Obtain audio data from the target recording device.
[0083] In one possible implementation, the recording data acquisition module 53 includes:
[0084] The second recording data acquisition submodule is used to acquire multiple audio data corresponding to multiple sub-recording devices through a conversion chip connected to the target data channel when the target recording device includes multiple sub-recording devices. The multiple sub-recording devices correspond one-to-one with the multiple audio data.
[0085] In one possible implementation, after the recording device determining module 51, the following is also included:
[0086] The route configuration retrieval module is used to retrieve route configurations.
[0087] The route acquisition module is used to select the target route in the route configuration;
[0088] The parameter forwarding module is used to forward parameters corresponding to the target application scenario and the target recording device through the target route.
[0089] In one possible implementation, before determining the target application scenario and recording device configuration based on the Android APP interface configuration, the following steps are also included:
[0090] The application scenario acquisition module is used to acquire the target application scenario;
[0091] The interface configuration acquisition module is used to select the Android APP interface configuration based on the target application scenario.
[0092] Figure 6 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 6 As shown, the terminal 6 in this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When the processor 61 executes the computer program 63, it implements the steps in the various audio data acquisition method embodiments described above, for example... Figure 1 Steps 101 to 103 are shown. Alternatively, when processor 61 executes computer program 63, it implements the functions of each module / unit in the above-described audio data acquisition device embodiments, for example... Figure 5 The functions of modules / units 51 to 53 shown.
[0093] The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, is used to implement the audio data acquisition method provided in the various embodiments described above.
[0094] The readable storage medium can be a computer storage medium or a communication medium. A communication medium includes any medium that facilitates the transfer of computer programs from one location to another. A computer storage medium can be any available medium accessible to a general-purpose or special-purpose computer. For example, a 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 ASIC can be located in a user equipment. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0095] The present invention also provides a program product including executable instructions stored in a readable storage medium. At least one processor of the device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the device to implement the audio data acquisition methods provided in the various embodiments described above.
[0096] In the embodiments of the above-described device, 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 manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0097] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for acquiring audio data, characterized in that, include: Based on the Android APP interface configuration and the target application scenario, determine the parameters corresponding to the target recording device; Based on the target application scenario and the parameters corresponding to the target recording device, the target data channel is determined; Audio data of the target recording device is acquired through the target data channel; The step of acquiring audio data from the target recording device through the target data channel includes: When the target recording device includes multiple sub-recording devices, multiple audio data corresponding to the multiple sub-recording devices are obtained through a conversion chip connected to the target data channel, wherein the multiple sub-recording devices correspond one-to-one with the multiple audio data. The Android APP interface configuration includes the target APP interface and the parameters corresponding to the target APP interface; The parameters for determining the target recording device based on the Android APP interface configuration and the target application scenario include: In the Android APP interface configuration, select the target APP interface and the parameters corresponding to the target APP interface that match the target application scenario; Based on the target APP interface and the parameters corresponding to the target APP interface, determine the parameters corresponding to the target recording device; After determining the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario, the process also includes: Get the route configuration; Select the target route in the routing configuration; The parameters corresponding to the target recording device are forwarded through the target route.
2. The method for acquiring audio data as described in claim 1, characterized in that, The step of acquiring audio data from the target recording device through the target data channel includes: If there is only one target recording device, retrieve the target recording device corresponding to the target data channel from the configuration list; Obtain the audio data of the target recording device.
3. The method for acquiring audio data as described in claim 1, characterized in that, Before determining the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario, the process also includes: Obtain the target application scenario; Select the Android APP interface configuration based on the target application scenario.
4. An audio data acquisition device, characterized in that, The steps for implementing the audio data acquisition method as described in any one of claims 1 to 3 include: The recording device determination module is used to determine the parameters corresponding to the target recording device based on the Android APP interface configuration and the target application scenario; The data channel determination module is used to determine the target data channel based on the target application scenario and the parameters corresponding to the target recording device; The recording data acquisition module is used to acquire audio data of the target recording device through the target data channel.
5. The audio data acquisition device as described in claim 4, characterized in that, The APP interface configuration includes the target APP interface and the parameters corresponding to the target APP interface; The recording device determination module includes: The APP interface matching submodule is used to select, in the APP interface configuration, the target APP interface that matches the target application scenario and the parameters corresponding to the target APP interface; The recording device determination submodule is used to determine the parameters corresponding to the target recording device based on the target APP interface and the parameters corresponding to the target APP interface.
6. A terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the audio data acquisition method as described in any one of claims 1 to 3.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the audio data acquisition method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Microphone multi-scene recording method and device, electronic equipment and storage medium
CN111757214A
Data processing method and device, equipment, storage medium and computer program product
CN114496007A