Audio data acquisition method and device
By detecting and extracting the multi -output device in the Mac OSX system, the automated audio data collection is realized, the problem of cumbersome and low efficiency in the existing technology has improved, and the efficiency and convenience of audio data collection have been improved. sex.
Patent Information
- Application Number
- CN202411498378.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, collecting audio data generated by speakers in Mac osx systems requires manual download and installation of screen recording plug-ins and configuring relevant parameters. The operation is cumbersome and difficult to achieve automation, especially for non-professional personnel, there are difficulties and risks of misoperation.
By detecting whether the virtual audio driver is installed, and retrieved multi -output devices created based on the virtual audio driver in the target system to achieve automatic configuration and audio data collection. This method includes running virtual audio drivers, creating multiple output equipment, configuration acquisition objects, and adjusting audio parameters to achieve automated audio data collection.
Achieve automated audio data collection, avoid the tediousness and risk of man -operated operations, improve the efficiency and effectiveness of audio data collection, and provide users with convenient audio data recording functions.
Smart Images

Figure CN119376680A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a method and device for collecting audio data. Background Art
[0002] Due to the research and development monopoly of mobile terminal operating systems, when it is necessary to implement specific functions in a specific operating system, special steps or special manual operations need to be taken. Sometimes, it is even impossible to obtain data from a specific device. For example, the audio data generated by the speaker cannot be directly collected in the Mac osx system.
[0003] Currently, if you want to collect audio data generated by speakers in a Mac osx system, you need to manually download and install a screen recording plug-in, manually configure the relevant parameters of the screen recording plug-in corresponding to the output device in the Mac osx system, and then manually open the recording software to record the audio data. However, manual operation of audio recording is extremely difficult for non-professionals, and it is difficult to find the cause after an error occurs, which affects the collection effect of audio data. Summary of the invention
[0004] In view of this, the present invention provides a method and device for collecting audio data, the main purpose of which is to solve the problem that the existing audio data collection operation is complicated and inefficient.
[0005] According to one aspect of the present invention, there is provided a method for collecting audio data, comprising:
[0006] In response to a startup instruction of the application program, detecting whether the virtual audio driver has been installed;
[0007] If the virtual audio driver is installed, calling multiple output devices created in the target system based on the virtual audio driver;
[0008] When the audio collection instruction is obtained through the application program, the selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device.
[0009] Furthermore, the method further comprises:
[0010] When the multi-output device is not retrieved, running the virtual audio driver in the application;
[0011] The application programming interface of the target system is called, and the multi-output device is created based on the application programming interface.
[0012] Furthermore, before detecting whether the virtual audio driver has been installed, the method further includes:
[0013] Retrieve the execution script of the application and insert the downloaded driver file into the execution script;
[0014] Running the execution script through the execution interface of the target system to complete the installation of the virtual audio driver;
[0015] After detecting whether the virtual audio driver has been installed, the method further includes:
[0016] If the virtual audio driver has not been installed, the execution script is retrieved and run through the execution interface of the target system to install the virtual audio driver.
[0017] Furthermore, before detecting whether the virtual audio driver has been installed in response to the startup instruction of the application, the method further includes:
[0018] In response to a download instruction of the application, download a driver file of the virtual audio driver so as to retrieve the driver file for installation; or,
[0019] When it is detected that the installation of the virtual audio driver fails, the step of downloading the driver file of the virtual audio driver is re-executed to re-download and install it.
[0020] Furthermore, before configuring the selected acquisition object as the multi-output device, the method further includes:
[0021] All acquisition objects in the target system are acquired and output through the application program for selection of the acquisition objects.
[0022] Furthermore, after calling the multiple output devices created in the target system based on the virtual audio driver, the method further includes:
[0023] When an audio collection instruction is obtained through a third-party application, configuring a collection object selected in the third-party application as the multi-output device;
[0024] Audio data is collected from the collection object through the multi-output device.
[0025] Furthermore, the method further comprises:
[0026] Obtaining basic audio parameters and audio collection requirements of the target system, wherein the basic audio parameters include volume parameters and mute parameters, and the audio collection requirements include target audio volume and target mute state;
[0027] The basic audio parameters are adjusted based on the audio collection requirements, and the multi-output device is configured according to the adjusted audio parameters to collect the audio data according to the audio parameters.
[0028] According to another aspect of the present invention, there is provided an audio data collection device, comprising:
[0029] A detection module, used for detecting whether the virtual audio driver has been installed in response to a startup instruction of the application program;
[0030] A calling module, used for calling multiple output devices created in a target system based on the virtual audio driver if the virtual audio driver is installed;
[0031] The acquisition module is used to configure the selected acquisition object as the multi-output device when an audio acquisition instruction is obtained through the application program, and to acquire audio data from the acquisition object through the multi-output device.
[0032] Furthermore, the device further comprises: a creation module,
[0033] A calling module, used for running the virtual audio driver in the application program when the multi-output device is not called;
[0034] The creation module is used to call the application programming interface of the target system and create the multi-output device based on the application programming interface.
[0035] Furthermore, the device also includes:
[0036] An insertion module, used to call the execution script of the application and insert the downloaded driver file into the execution script;
[0037] An execution module, used for running the execution script through the execution interface of the target system to complete the installation of the virtual audio driver;
[0038] The running module is used to call the execution script if the virtual audio driver has not been installed, and run the execution script through the execution interface of the target system to install the virtual audio driver.
[0039] Furthermore, the device further comprises: a download module,
[0040] The download module is used to download the driver file of the virtual audio driver in response to the download instruction of the application program, so as to retrieve the driver file for installation; or
[0041] The execution module is used to re-execute the step of downloading the driver file of the virtual audio driver when it is detected that the installation of the virtual audio driver fails, so as to re-download and install it.
[0042] Furthermore, the device also includes:
[0043] The acquisition module is used to acquire all acquisition objects in the target system and output them through the application program for selection of the acquisition objects.
[0044] Furthermore, the acquisition module is also used to configure the acquisition object selected in the third-party application as the multi-output device when an audio acquisition instruction is obtained through the third-party application; and to perform audio data acquisition on the acquisition object through the multi-output device.
[0045] Further, the adjustment module,
[0046] The acquisition module is further used to acquire basic audio parameters of the target system and audio acquisition requirements, wherein the basic audio parameters include volume parameters and mute parameters, and the audio acquisition requirements include target audio volume and target mute state;
[0047] The adjustment module is used to adjust the basic audio parameters based on the audio collection requirements, and configure the multi-output device according to the adjusted audio parameters to collect the audio data according to the audio parameters.
[0048] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute an operation corresponding to the above-mentioned audio data acquisition method.
[0049] According to another aspect of the present invention, there is provided a terminal, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0050] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned audio data collection method.
[0051] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0052] The present invention provides an audio data collection method and device. Compared with the prior art, the embodiment of the present invention detects whether a virtual audio driver has been installed in response to a startup instruction of an application program; if the virtual audio driver has been installed, a multi-output device created in a target system based on the virtual audio driver is called; when an audio collection instruction is obtained through the application program, a selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device, thereby realizing automatic audio data collection, avoiding the tediousness of manual operation, and providing users with a convenient audio data recording function, thereby improving the effectiveness of audio data collection.
[0053] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0055] Figure 1 A flow chart of a method for collecting audio data provided by an embodiment of the present invention is shown;
[0056] Figure 2 A flow chart of another method for collecting audio data provided by an embodiment of the present invention is shown;
[0057] Figure 3 A block diagram of a device provided by an embodiment of the present invention is shown;
[0058] Figure 4 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0059] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0060] The embodiment of the present invention provides a method for collecting audio data, such as Figure 1 As shown, the method includes:
[0061] 101. In response to a startup instruction of an application program, detect whether the virtual audio driver has been installed.
[0062] In an embodiment of the present invention, the current execution end, as the execution end of the application program for executing the audio data acquisition method, can be a terminal device, such as a mobile phone terminal, a tablet terminal or a computer terminal, which is not specifically limited in the embodiment of the present invention. Among them, the virtual audio driver is a virtual audio driver program, which is used to allow an application (such as a speaker) to pass audio to other applications (output devices), including but not limited to blackhodle, soundflower iShowU AudioCapture and other virtual audio drivers, which are not specifically limited in the embodiment of the present invention. The user first installs the application on the terminal device and triggers the startup instruction of the application program, so that after the current execution end responds to the startup instruction of the application program, it detects whether the virtual audio driver has been installed, so as to determine that after the installation is completed, the step of creating the output device is executed using the installed virtual device.
[0063] It should be noted that the driver in the embodiment of the present invention refers to a software program that drives the computer hardware to run. In this case, the driver is a device driver, which is a special program added to the operating system, which contains information about the hardware device. This information enables the computer to communicate with the corresponding device.
[0064] 102. If the virtual audio driver is installed, call a multi-output device created in the target system based on the virtual audio driver.
[0065] In the embodiment of the present invention, after the current execution end installs the virtual audio driver, a multi-output device is created through the virtual device obtained by installing the virtual audio driver. At this time, the installation process of the virtual audio driver can be before step 101, or it can be installed in real time after detecting that the virtual audio driver is not installed, so that it can be called by the application after completion. Among them, the multi-output device is used to represent the device that plays audio data in the terminal system, including but not limited to speakers, sound cards, Bluetooth headsets, etc., which are not specifically limited in the embodiment of the present invention.
[0066] It should be noted that when a multi-output device is created in a target system based on a virtual audio driver, the target system is an operating system of the current terminal device, such as a max osx system, and the embodiment of the present invention does not make any specific limitation.
[0067] 103. When an audio collection instruction is obtained through the application, the selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device.
[0068] In an embodiment of the present invention, when a user needs to record audio data in a target system, the user selects the acquisition object to be recorded through the application program, and triggers the audio acquisition instruction. The current execution end configures the acquisition object with the created multi-output device through the application program, thereby performing audio data acquisition through the created multi-output device. At the same time, the current execution end also sets a callback function. After the acquisition is performed through the multi-output device, the collected audio data will be called back to the set callback function so that it can be retrieved in the application program at any time. When configuring the acquisition object as a multi-output device, specifically, the virtual device output device of the multi-output device is set to the real output device speaker of the system through CFDictionaryAddValue. Finally, the ID of the created multi-output virtual device is obtained through AudioDeviceGetProperty, and the device is set to the system default output device through AudioHardwareSetProperty., thereby realizing the synchronous recording of audio data based on multi-output devices.
[0069] In another embodiment of the present invention, for further definition and description, the method further includes:
[0070] When the multi-output device is not retrieved, running the virtual audio driver in the application;
[0071] The application programming interface of the target system is called, and the multi-output device is created based on the application programming interface.
[0072] In order to meet the purpose of multi-channel output of audio data to achieve the purpose of parallel collection of audio data and realize the purpose of unmanned audio recording, when the current execution end calls the multi-output device, if the current execution end does not detect the created multi-output device, it means that the multi-output device has not been created. Therefore, the virtual audio driver is called to run, and the application programming interface of the target system is called through the application, such as the compilation interface executeAndReturnError to run the driver, and then the system API is called, such as the AudioDeviceGetProperty compilation interface. At the same time, this AudioDeviceGetProperty is called to obtain the speaker device ID to be created. Through the system API, such as the AudioHardwareCreateAggregateDevice compilation interface, the speaker ID as the collection object and the virtual device ID of the running driver are associated, thereby creating a virtual device with multiple output devices, which is not specifically limited in the embodiment of the present invention.
[0073] In a specific implementation scenario, the method further includes:
[0074] The multiple output device is configured as a default output device.
[0075] In order to meet the requirement of synchronous audio recording when the speaker plays audio data in the target system and avoid the tediousness of manual operation, the current execution end configures the multi-output device as the default output device after creating the multi-output device, such as obtaining the created multi-output virtual device ID through the AudioDeviceGetProperty compilation interface, and then setting the multi-output device as the system default output device through the AudioHardwareSetProperty compilation interface, so that the audio data generated by the speaker can be collected in real time.
[0076] It should be noted that the API in the embodiment of the present invention is an application programming interface (Application Programming Interface), which is a predefined function. Its purpose is to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the internal working mechanism.
[0077] In another embodiment of the present invention, for further definition and explanation, before the step of detecting whether the virtual audio driver has been installed, the method further includes:
[0078] Retrieve the execution script of the application and insert the downloaded driver file into the execution script;
[0079] Running the execution script through the execution interface of the target system to complete the installation of the virtual audio driver;
[0080] After detecting whether the virtual audio driver has been installed, the method further includes:
[0081] If the virtual audio driver has not been installed, the execution script is retrieved and run through the execution interface of the target system to install the virtual audio driver.
[0082] In order to realize the automatic installation of the virtual audio driver, the application automatically calls the execution script and inserts the driver file of the virtual audio driver downloaded in advance into the execution script, so that the virtual audio driver can be automatically run when the application is executed. In the embodiment of the present invention, when installing the virtual audio driver, the application runs the execution script through the execution interface of the target system, thereby automatically completing the installation of the virtual audio driver. For example, the script is run through the API of the target system (such as executeAndReturnError) to install it. Figure 2 In the process of installing a driver and creating a multi-output device shown, the virtual audio driver may be a blackhodle driver, which is not specifically limited in the embodiment of the present invention.
[0083] In another embodiment of the present invention, for further definition and explanation, before the step responds to the startup instruction of the application program and detects whether the virtual audio driver has been installed, the method further includes:
[0084] In response to a download instruction of the application, download a driver file of the virtual audio driver so as to retrieve the driver file for installation; or,
[0085] When it is detected that the installation of the virtual audio driver fails, the step of downloading the driver file of the virtual audio driver is re-executed to re-download and install it.
[0086] In order to effectively execute the audio data collection, the current execution end also detects in real time whether there is a virtual audio driver that has been downloaded but not installed in the current execution end, that is, in response to the download instruction of the application, the driver file of the virtual audio driver is downloaded so that the driver file is retrieved for installation, such as Figure 2 When downloading the driver file of the virtual audio driver, a virtual audio driver loading request can be sent to the server connected to the application program to download the driver file of the virtual audio driver, so that the driver file of the virtual audio driver is retrieved for automatic installation. When it is detected that the installation of the virtual audio driver fails, the step of downloading the driver file of the virtual audio driver can be re-executed to re-download and install.
[0087] In another embodiment of the present invention, for further definition and explanation, before the step of configuring the selected acquisition object as the multi-output device, the method further includes:
[0088] All acquisition objects in the target system are acquired and output through the application program for selection of the acquisition objects.
[0089] In order to meet the user's purposeful recording needs for audio data, thereby improving the effectiveness of audio data collection, all collection objects in the target application are obtained through the application. At this time, the collection object is the object in the target system that needs to record audio data, such as a player port, a video port, etc., which is not specifically limited in the embodiment of the present invention. Furthermore, all collection objects are output in the application, and the user can select the collection object that needs to be recorded to trigger the audio collection instruction for the selected collection object in the application. The embodiment of the present invention does not specifically limit the output form of the collection object.
[0090] In another embodiment of the present invention, for further definition and explanation, after the step of calling the multiple output devices created in the target system based on the virtual audio driver, the method further includes:
[0091] When an audio collection instruction is obtained through a third-party application, configuring a collection object selected in the third-party application as the multi-output device;
[0092] Audio data is collected from the collection object through the multi-output device.
[0093] In order to meet the diverse needs of applications for automatic audio recording, users can also enter collection objects that need to collect audio data through third-party applications. Therefore, the collection objects selected in the third-party applications are configured as multi-output devices to collect audio data for the collection objects through the multi-output devices.
[0094] It should be noted that the application in the embodiment of the present invention can be an application developed by the user, that is, the multi-output device configuration is included in the business execution file during the application development process, and there is no need to call the speaker step. The third-party application can be all applications other than self-developed applications, and the embodiment of the present invention does not make specific limitations. In addition, for different applications in the current execution end, the generated audio files can be stored in the download file corresponding to the application so that the user can call it in real time, which is not specifically limited in the embodiment of the present invention.
[0095] In another embodiment of the present invention, for further definition and description, the steps further include:
[0096] Obtaining basic audio parameters and audio collection requirements of the target system;
[0097] The basic audio parameters are adjusted based on the audio collection requirements, and the multi-output device is configured according to the adjusted audio parameters to collect the audio data according to the audio parameters.
[0098] In order to meet the needs of flexible recording, the current execution end can also automatically configure the audio data played by the speaker and the audio effects recorded. Specifically, first obtain the basic audio parameters of the target system and the audio collection requirements for recording audio data, so as to configure multiple output devices according to the adjusted audio parameters, thereby collecting audio data according to the audio parameters. Among them, the basic audio parameters include volume parameters and mute parameters, and the audio collection requirements include target audio size and target mute state. At this time, the volume parameters and mute parameters in the basic audio parameters are adjusted according to the target audio size and target mute state in the audio collection requirements. For example, call the AudioObjectSetPropertyData compilation interface to adjust the volume of the speaker to the maximum, unmute, and ensure that the recorded sound is maximized, thereby achieving the purpose of flexible collection of audio data.
[0099] The present invention provides an audio data collection method. Compared with the prior art, the embodiment of the present invention detects whether a virtual audio driver has been installed in response to a startup instruction of an application program; if the virtual audio driver has been installed, a multi-output device created in a target system based on the virtual audio driver is called; when an audio collection instruction is obtained through the application program, a selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device, thereby realizing automatic audio data collection, avoiding the tediousness of manual operation, and providing users with a convenient audio data recording function, thereby improving the effectiveness of audio data collection.
[0100] Furthermore, as a response to the above Figure 1 To implement the method shown in the figure, the embodiment of the present invention provides an audio data collection device, such as Figure 3 As shown, the device comprises:
[0101] The detection module 21 is used to detect whether the virtual audio driver has been installed in response to the startup instruction of the application program;
[0102] A calling module 22, configured to call multiple output devices created in a target system based on the virtual audio driver if the virtual audio driver is installed;
[0103] The acquisition module 23 is used for, when an audio acquisition instruction is acquired through the application, configuring the selected acquisition object as the multi-output device, and performing audio data acquisition on the acquisition object through the multi-output device.
[0104] Furthermore, the device further comprises: a creation module,
[0105] A calling module, used for running the virtual audio driver in the application program when the multi-output device is not called;
[0106] The creation module is used to call the application programming interface of the target system and create the multi-output device based on the application programming interface.
[0107] Furthermore, the device also includes:
[0108] An insertion module, used to call the execution script of the application and insert the downloaded driver file into the execution script;
[0109] An execution module, used for running the execution script through the execution interface of the target system to complete the installation of the virtual audio driver;
[0110] The running module is used to call the execution script if the virtual audio driver has not been installed, and run the execution script through the execution interface of the target system to install the virtual audio driver.
[0111] Furthermore, the device further comprises: a download module,
[0112] The download module is used to download the driver file of the virtual audio driver in response to the download instruction of the application program, so as to retrieve the driver file for installation; or
[0113] The execution module is used to re-execute the step of downloading the driver file of the virtual audio driver when it is detected that the installation of the virtual audio driver fails, so as to re-download and install it.
[0114] Furthermore, the device also includes:
[0115] The acquisition module is used to acquire all acquisition objects in the target system and output them through the application program for selection of the acquisition objects.
[0116] Furthermore, the acquisition module is also used to configure the acquisition object selected in the third-party application as the multi-output device when an audio acquisition instruction is obtained through the third-party application; and to perform audio data acquisition on the acquisition object through the multi-output device.
[0117] Further, the adjustment module,
[0118] The acquisition module is further used to acquire basic audio parameters of the target system and audio acquisition requirements, wherein the basic audio parameters include volume parameters and mute parameters, and the audio acquisition requirements include target audio volume and target mute state;
[0119] The adjustment module is used to adjust the basic audio parameters based on the audio collection requirements, and configure the multi-output device according to the adjusted audio parameters to collect the audio data according to the audio parameters.
[0120] An embodiment of the present invention provides an audio data collection device. Compared with the prior art, the embodiment of the present invention detects whether a virtual audio driver has been installed in response to a startup instruction of an application program; if the virtual audio driver has been installed, a multi-output device created in a target system based on the virtual audio driver is called; when an audio collection instruction is obtained through the application program, a selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device, thereby realizing automatic audio data collection, avoiding the tediousness of manual operation, and providing users with a convenient audio data recording function, thereby improving the effectiveness of audio data collection.
[0121] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the audio data collection method in any of the above method embodiments.
[0122] Figure 4 A schematic diagram of the structure of a terminal provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the terminal.
[0123] like Figure 4 As shown, the terminal may include: a processor (processor) 302, a communication interface (Communications Interface) 304, a memory (memory) 306, and a communication bus 308.
[0124] The processor 302 , the communication interface 304 , and the memory 306 communicate with each other via the communication bus 308 .
[0125] The communication interface 304 is used to communicate with other devices such as clients or other servers.
[0126] The processor 302 is used to execute the program 310, and specifically can execute the relevant steps in the above-mentioned audio data collection method embodiment.
[0127] Specifically, the program 310 may include program codes, which include computer operation instructions.
[0128] The processor 302 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the terminal may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0129] The memory 306 is used to store the program 310. The memory 306 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory.
[0130] The program 310 may be specifically configured to enable the processor 302 to perform the following operations:
[0131] In response to a startup instruction of the application program, detecting whether the virtual audio driver has been installed;
[0132] If the virtual audio driver is installed, calling multiple output devices created in the target system based on the virtual audio driver;
[0133] When the audio collection instruction is obtained through the application program, the selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device.
[0134] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for collecting audio data, characterized in that: include: In response to a startup instruction of the application program, detecting whether the virtual audio driver has been installed; If the virtual audio driver is installed, calling multiple output devices created in the target system based on the virtual audio driver; When the audio collection instruction is obtained through the application program, the selected collection object is configured as the multi-output device, and audio data is collected from the collection object through the multi-output device.
2. The method according to claim 1, characterized in that: The method further comprises: When the multi-output device is not retrieved, running the virtual audio driver in the application; The application programming interface of the target system is called, and the multi-output device is created based on the application programming interface.
3. The method according to claim 1, characterized in that Before detecting whether the virtual audio driver has been installed, the method further includes: Retrieve the execution script of the application and insert the downloaded driver file into the execution script; Running the execution script through the execution interface of the target system to complete the installation of the virtual audio driver; After detecting whether the virtual audio driver has been installed, the method further includes: If the virtual audio driver has not been installed, the execution script is retrieved and run through the execution interface of the target system to install the virtual audio driver.
4. The method according to claim 1, characterized in that Before detecting whether the virtual audio driver has been installed in response to the startup instruction of the application, the method further includes: In response to a download instruction of the application, download a driver file of the virtual audio driver so as to retrieve the driver file for installation; or, When it is detected that the installation of the virtual audio driver fails, the step of downloading the driver file of the virtual audio driver is re-executed to re-download and install it.
5. The method according to claim 1, characterized in that: Before configuring the selected acquisition object as the multi-output device, the method further includes: All acquisition objects in the target system are acquired and output through the application program for selection of the acquisition objects.
6. The method according to claim 1, characterized in that After calling the multiple output devices created in the target system based on the virtual audio driver, the method further includes: When an audio collection instruction is obtained through a third-party application, configuring a collection object selected in the third-party application as the multi-output device; Audio data is collected from the collection object through the multi-output device.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Obtaining basic audio parameters and audio collection requirements of the target system, wherein the basic audio parameters include volume parameters and mute parameters, and the audio collection requirements include target audio volume and target mute state; The basic audio parameters are adjusted based on the audio collection requirements, and the multi-output device is configured according to the adjusted audio parameters to collect the audio data according to the audio parameters.
8. An audio data collection device, characterized in that: include: A detection module, used for detecting whether the virtual audio driver has been installed in response to a startup instruction of the application program; A calling module, used for calling multiple output devices created in a target system based on the virtual audio driver if the virtual audio driver is installed; The acquisition module is used to configure the selected acquisition object as the multi-output device when an audio acquisition instruction is obtained through the application program, and to acquire audio data from the acquisition object through the multi-output device.
9. A storage medium storing at least one executable instruction, wherein the executable instruction enables a processor to execute an operation corresponding to the audio data collection method according to any one of claims 1 to 7.
10. A terminal, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the audio data collection method according to any one of claims 1-7.