CN109976698A - Method and device for acquiring audio data, equipment and computer-readable storage medium - Google Patents

Method and device for acquiring audio data, equipment and computer-readable storage medium Download PDF

Info

Publication number
CN109976698A
CN109976698A CN201711466381.2A CN201711466381A CN109976698A CN 109976698 A CN109976698 A CN 109976698A CN 201711466381 A CN201711466381 A CN 201711466381A CN 109976698 A CN109976698 A CN 109976698A
Authority
CN
China
Prior art keywords
audio data
application program
application
distribution interface
data distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711466381.2A
Other languages
Chinese (zh)
Other versions
CN109976698B (en
Inventor
熊友军
夏严辉
罗果
李利阳
李浩明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ubtech Technology Co ltd
Original Assignee
Shenzhen Ubtech Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ubtech Technology Co ltd filed Critical Shenzhen Ubtech Technology Co ltd
Priority to CN201711466381.2A priority Critical patent/CN109976698B/en
Publication of CN109976698A publication Critical patent/CN109976698A/en
Application granted granted Critical
Publication of CN109976698B publication Critical patent/CN109976698B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention is suitable for the technical field of audio, and provides a method, a device, equipment and a computer readable storage medium for acquiring audio data, wherein the method comprises the following steps: if detecting that at least two application programs trigger a first instruction for acquiring recording data, respectively configuring audio data distribution interfaces for the at least two application programs in a system layer; forming audio data according to the real-time collected voice information; and distributing the audio data to the at least two application programs through the audio data distribution interfaces corresponding to the at least two application programs respectively. According to the embodiment of the invention, the audio data distribution interfaces are respectively configured for the at least two application programs needing to acquire the audio data in the system layer, and the acquired audio data is respectively distributed to each application program through the audio data distribution interfaces respectively distributed to the at least two application programs, so that the at least two application programs can simultaneously acquire real-time audio data or recording data.

Description

Obtain method and device, the equipment, computer readable storage medium of audio data
Technical field
The invention belongs to Audiotechnica field more particularly to a kind of method and device, equipment, calculating for obtaining audio data Machine readable storage medium storing program for executing.
Background technique
With the development of artificial intelligence (Artificial Intelligence, AI) technology, artificial intelligence is widely used in Self-driving, personal assistant (for example, voice assistant, voice input on smart phone, family house keeper and robot of accompanying and attending to etc.), intelligence Can security protection (for example, intelligent monitoring, safety protection robot etc.), electric business retail (for example, warehouse logistics, intelligent shopping guide and customer service etc.), The fields such as education (for example, intelligence is tested and assessed, personalization is taught and children accompany etc.).
Currently, entrance one of of the speech recognition as human-computer interaction, speech-related technologies occupy very heavy in AI technology The status wanted.In actual AI product, often needs while obtaining there are multiple application programs (Application, App) The case where audio data.For example, speech recognition, which wakes up application, needs to obtain audio data, video surveillance applications are also required to obtain sound Frequency evidence, the application such as networking telephone are also required to obtain the audio datas such as voice.
However, within one device, generally only one is used to pick up and transmit the component of sound (for example, microphone Microphone), only an application program is allowed to use the component retrieval audio data, do not increased for picking up and transmitting sound In the case where the component of sound, it cannot achieve component of multiple application programs simultaneously using same for picking up and transmitting sound and obtain Take audio data.
Summary of the invention
In view of this, the embodiment of the invention provides it is a kind of obtain the method and device of audio data, equipment, computer can Storage medium is read, to solve in the prior art under the premise of not increasing the component for picking up and transmitting sound, Wu Fashi The problem of device of the existing multiple application programs simultaneously using same for picking up and transmitting sound is recorded.
The first aspect of the embodiment of the present invention provides a kind of method for obtaining audio data, comprising:
If detecting, at least two application triggers are institute in system layer for obtaining the first instruction of recording data It states at least two application programs and audio data distribution interface is respectively configured;
Audio data is formed according to the voice messaging acquired in real time;
By the corresponding audio data distribution interface of at least two application program respectively to it is described at least Two application programs distribute the audio data.
The second aspect of the embodiment of the present invention provides a kind of device for obtaining audio data, comprising:
Configuration unit, if being instructed for detecting at least two application triggers for obtaining the first of recording data, It is then that audio data distribution interface is respectively configured at least two application program in system layer;
Audio data generation unit, for forming audio data according to the voice messaging acquired in real time;
Audio data Dispatching Unit, for passing through the corresponding audio data of at least two application program point It sends out interface and distributes the audio data at least two application program respectively.
The third aspect of the embodiment of the present invention provides a kind of equipment for obtaining audio data, comprising: memory, processor And the computer program that can be run in the memory and on the processor is stored, the processor executes the meter The method of the acquisition audio data of above-mentioned first aspect is realized when calculation machine program.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer storage medium It is stored with computer program, the computer program includes program instruction, and described program instruction makes institute when being executed by a processor State the method that processor executes above-mentioned first aspect.
Existing beneficial effect is the embodiment of the present invention compared with prior art: by being at least two needs in system layer Audio data distribution interface is respectively configured in the application program for obtaining audio data, forms audio according to the voice messaging acquired in real time Data;By the corresponding audio data distribution interface of at least two application programs respectively to this at least two apply journey Sequence distributes audio data, to enable at least two application programs can be simultaneously under the premise of not increasing hardware component Obtain real-time audio data or recording data.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation process schematic diagram of the method provided in an embodiment of the present invention for obtaining audio data;
Fig. 2 be another embodiment of the present invention provides acquisition audio data method implementation process schematic diagram;
Fig. 3 is the schematic diagram of the device provided in an embodiment of the present invention for obtaining audio data;
Fig. 4 is the schematic diagram of the equipment provided in an embodiment of the present invention for obtaining audio data.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Referring to Fig. 1, Fig. 1 is the implementation process schematic diagram of the method provided in an embodiment of the present invention for obtaining audio data. The executing subject for obtaining the method for audio data in the present embodiment is the equipment for obtaining audio data, obtains setting for audio data It is standby to can be robot, it is also possible to the mobile terminals such as smart phone, tablet computer, PAD, wearable device, but be not limited to This, can also be and be built-in with the equipment that at least two application programs need while obtaining audio data, herein with no restrictions.Such as figure Shown in acquisition audio data method may include following steps:
S101: if detecting at least two application triggers for obtaining the first instruction of recording data, in system Layer is that audio data distribution interface is respectively configured at least two application program.
It obtains the equipment of audio data and needs to obtain at least two application programs of audio data for starting detecting Instruction when, be identified as at least two application triggers for request audio data first instruction.It needs to obtain Take the application program of audio data can include but is not limited to speech recognition application, the application program with video monitoring function or The Internet telephony application.
Alternatively, obtain the equipment of audio data detect built at least two application calls for managing audio When application programming interface (Application the Programming Interface, API) of the application program of data, know It Wei not first instruction of at least two application triggers for request audio data.
In order to realize at least two application programs while obtain audio data, obtain the equipment of audio data detect to It is triggering in the middle layer of operating system layer when few two application triggers are instructed for the first of request audio data Each application program of first instruction configures audio data distribution interface.Wherein, hardware is generally comprised in operating system framework Layer, driving layer, operating system layer and application layer.Audio data distribution interface is one and connects for transmitting the software of audio data Mouthful, for distributing audio data to corresponding application program.The corresponding audio data distribution interface of each application program is each It is not identical.
The equipment of audio data is obtained when an audio data distribution interface is respectively configured for each application program, it can be with Establish the binding relationship between the mark of audio data distribution interface and the mark of application program.One audio data distribution interface An application program can only be bound, two or more application programs cannot be bound simultaneously.The mark of each audio data distribution interface Knowledge is that uniquely, the mark of application program is also uniquely that the mark of application program can be the packet name of the application program.
S102: audio data is formed according to the voice messaging acquired in real time.
The equipment for obtaining audio data obtains the voice letter that the built-in component for picking up and transmitting sound acquires in real time Breath, each sound source of the voice messaging from current environment.
In order to improve the sound quality of audio, when getting the voice messaging acquired in real time, denoising can be carried out to it And echo cancellation process obtains sound after carrying out analog-to-digital conversion and signal enhanced processing to treated voice messaging later Frequency evidence or recording data.Denoising, which refers to, eliminates outside noise interference.Echo cancellor refers to elimination echo.
In terms of echo Producing reason, echo can be divided into acoustic echo (Acoustic Echo) and route echo (Line Echo), corresponding echo cancellation technology, which is just called, learns echo cancellor (Acoustic Echo Cancellation, AEC) and line Road echo cancellor (Line Echo Cancellation, LEC).Acoustic echo is due to raising in hands-free or conference applications The sound of sound device is repeatedly fed back caused by microphone;Route echo is since two or the four lines matchings coupling of physical electronic route is drawn It rises.
It is understood that the audio data that the equipment for obtaining audio data can will acquire is stored to preset caching Area.Preset buffer area is all from by the audio data that all audio data distribution interfaces are distributed.
It is understood that in order to reduce the occupied storage resource of audio data, preset buffer area can cache pre- If the audio data got in duration, or be successfully sent to need to obtain the application program of audio data in audio data When, delete the audio data being successfully sent in preset buffer area.Preset duration can be 1 second or 5 seconds, but be not limited to This, can specifically be configured, herein with no restrictions according to actual needs.The audio data of preset buffer area caching follows advanced The principle first gone out.When needing to clear up the audio data of preset buffer area caching, preferential cleaning apart from current time at most The audio data of moment caching, i.e., begin a clean up from the audio data cached earliest.
S103: by the corresponding audio data distribution interface of at least two application program respectively to described At least two application programs distribute the audio data.
The equipment of audio data is obtained according to the corresponding relationship between audio data distribution interface and application program, passes through touching The corresponding audio data distribution interface of at least two application programs of the first instruction of hair is distributed to each application program respectively The audio data, so that each corresponding application program of audio data distribution interface can obtain audio data or record Sound data.
Corresponding relationship between audio data distribution interface and application program is that the equipment for obtaining audio data is being each Application program is established when configuring audio data distribution interface.
For example, when the Internet telephony application, speech recognition wake-up application and video surveillance applications trigger the first instruction, The Internet telephony application corresponds to the first audio data distribution interface, and speech recognition wakes up the corresponding second audio data distribution of application and connects Mouthful, when video surveillance applications correspond to third audio data distribution interface, the equipment for obtaining audio data is getting audio data Later, the audio data got is distributed to the Internet telephony application by the first audio data distribution interface;Pass through the second audio The audio data that data distribution interface is got to speech recognition wake-up using distribution, so that speech recognition wake-up application basis should Audio data carries out speech recognition;Distribute the audio number got to video surveillance applications by third audio data distribution interface According to so that the audio data can be integrated, stored or be played with the image taken by video surveillance applications.
The embodiment of the present invention, by being that at least two application programs for needing to obtain audio data are respectively configured in system layer Audio data distribution interface forms audio data according to the voice messaging acquired in real time;Respectively by least two application programs The corresponding audio data distribution interface distributes audio data at least two application program respectively, thus hard not increasing Under the premise of part component, enable at least two application programs that can obtain real-time audio data or recording data simultaneously.
Referring to Fig. 2, Fig. 2 is the implementation process schematic diagram of the method provided in an embodiment of the present invention for obtaining audio data. The executing subject for obtaining the method for audio data in the present embodiment is the equipment for obtaining audio data, obtains setting for audio data It is standby to can be robot, it is also possible to the mobile terminals such as smart phone, tablet computer, PAD, wearable device, but be not limited to This, can also be and be built-in with the equipment that at least two application programs need while obtaining audio data, herein with no restrictions.Such as figure Shown in acquisition audio data method may include following steps:
S201: if detecting at least two application triggers for obtaining the first instruction of recording data, in system Layer is that audio data distribution interface is respectively configured at least two application program.
It obtains the equipment of audio data and needs to obtain at least two application programs of audio data for starting detecting Instruction when, be identified as at least two application triggers for request audio data first instruction.It needs to obtain Take the application program of audio data can include but is not limited to speech recognition application, the application program with video monitoring function or The Internet telephony application.
Alternatively, obtain the equipment of audio data detect built at least two application calls for managing audio When application programming interface (Application the Programming Interface, API) of the application program of data, know It Wei not first instruction of at least two application triggers for request audio data.
In order to realize at least two application programs while obtain audio data, obtain the equipment of audio data detect to It is triggering in the middle layer of operating system layer when few two application triggers are instructed for the first of request audio data Each application program of first instruction configures audio data distribution interface.Wherein, hardware is generally comprised in operating system framework Layer, driving layer, operating system layer and application layer.Audio data distribution interface is one and connects for transmitting the software of audio data Mouthful, for distributing audio data to corresponding application program.The corresponding audio data distribution interface of each application program is each It is not identical.
The equipment of audio data is obtained when an audio data distribution interface is respectively configured for each application program, it can be with Establish the binding relationship between the mark of audio data distribution interface and the mark of application program.One audio data distribution interface An application program can only be bound, two or more application programs cannot be bound simultaneously.The mark of each audio data distribution interface Knowledge is that uniquely, the mark of application program is also uniquely that the mark of application program can be the packet name of the application program.
Optionally, S201 can be with specifically: if detecting at least two application triggers for request audio number According to first instruction, then preset storage region creation preset number audio data distribution interface;For each application program Distribute audio data distribution interface;Wherein, the preset number is greater than or equal to the sum of at least two application program.
In one embodiment, the equipment for obtaining audio data can count the of triggering for request audio data The sum of the application program of one instruction, and audio data distribution interface is created according to the sum, wherein the audio data of creation point The quantity for sending out interface can be equal with the sum, so that each application program can be assigned to audio data distribution interface.
In another embodiment, the equipment for obtaining audio data is detecting at least two application triggers for asking When asking the first instruction for obtaining audio data, it can need to obtain audio according to installed in the equipment for obtaining audio data The quantity of the application program of data creates the audio data distribution interface of preset number.Preset number is that mounted needs obtain The sum of the application program of audio data is taken, preset number is greater than or equal to the quantity of the application program of the first instruction of triggering, with So that the application program of each the first instruction of triggering can be assigned to audio data distribution interface.
Optionally, in order to reduce the occupied storage resource of audio data distribution interface, the equipment of audio data is obtained also The quantity that can according to need the application program for obtaining audio data creates audio data distribution interface in real time, at this point, S201 is also It can be with specifically: if detecting first instruction of at least two application triggers for request audio data, create The corresponding audio data distribution interface of at least two application programs.
S202: audio data is formed according to the voice messaging acquired in real time.
The equipment for obtaining audio data obtains the voice letter that the built-in component for picking up and transmitting sound acquires in real time Breath, each sound source of the voice messaging from current environment.
In order to improve the sound quality of audio, when getting the voice messaging acquired in real time, denoising can be carried out to it And echo cancellation process obtains sound after carrying out analog-to-digital conversion and signal enhanced processing to treated voice messaging later Frequency evidence or recording data.Denoising, which refers to, eliminates outside noise interference.Echo cancellor refers to elimination echo.
In terms of echo Producing reason, echo can be divided into acoustic echo (Acoustic Echo) and route echo (Line Echo), corresponding echo cancellation technology, which is just called, learns echo cancellor (Acoustic Echo Cancellation, AEC) and line Road echo cancellor (Line Echo Cancellation, LEC).Acoustic echo is due to raising in hands-free or conference applications The sound of sound device is repeatedly fed back caused by microphone;Route echo is since two or the four lines matchings coupling of physical electronic route is drawn It rises.
It is understood that the audio data that the equipment for obtaining audio data can will acquire is stored to preset caching Area.
It is understood that in order to reduce the occupied storage resource of audio data, buffer area can cache preset duration The audio data inside got, or when audio data is successfully sent to need to obtain the application program of audio data, delete The audio data being successfully sent in buffer area.Preset duration can be 1 second or 5 seconds, and but it is not limited to this, specifically can basis Actual needs is configured, herein with no restrictions.The audio data of buffer area caching follows the principle of first in first out.It is clear when needing When managing the audio data of buffer area caching, preferential cleaning apart from current time at most at the time of the audio data that caches, i.e., from most The audio data early cached is begun a clean up.
Further, S202 can be with specifically: according to the voice messaging acquired in real time and collects the voice messaging Corresponding temporal information forms audio data.
The audio data of formation carries the temporal information for collecting voice messaging, in this way can be at least two application programs At different times when the first instruction of triggering, the time determination that can be instructed according to each application triggers first needs to transmit To the target audio data of each application program.Wherein, the initial time that the temporal information that target audio data carry includes can It is identical at the time of to be instructed with triggering first.
The target audio data for needing to pass to each application program may be the same or different.When different applications For program in different moments the first instruction of triggering, the target audio data for passing to these different application programs are different.
S203: by the corresponding audio data distribution interface of at least two application program respectively to described At least two application programs distribute the audio data.
The equipment of audio data is obtained according to the corresponding relationship between audio data distribution interface and application program, passes through touching The corresponding audio data distribution interface of at least two application programs of the first instruction of hair is distributed to each application program respectively The audio data, so that each corresponding application program of audio data distribution interface can obtain audio data or record Sound data.
Corresponding relationship between audio data distribution interface and application program is that the equipment for obtaining audio data is being each Application program is established when configuring audio data distribution interface.
For example, when the Internet telephony application, speech recognition wake-up application and video surveillance applications trigger the first instruction, The Internet telephony application corresponds to the first audio data distribution interface, and speech recognition wakes up the corresponding second audio data distribution of application and connects Mouthful, when video surveillance applications correspond to third audio data distribution interface, the equipment for obtaining audio data is getting audio data Later, the audio data got is distributed to the Internet telephony application by the first audio data distribution interface;Pass through the second audio The audio data that data distribution interface is got to speech recognition wake-up using distribution, so that speech recognition wake-up application basis should Audio data carries out speech recognition;Distribute the audio number got to video surveillance applications by third audio data distribution interface According to so that the audio data can be integrated, stored or be played with the image taken by video surveillance applications.
Further, when the audio data carrying formed in S202 collects the temporal information of voice messaging, S203 can With specifically: the temporal information of first instruction is respectively triggered according to each application program and collects the voice The corresponding temporal information of information determines each application program respectively from the audio data that the preset buffer area stores Corresponding target audio data;Pass through the corresponding audio data distribution interface difference of at least two application program Distribute the corresponding target audio data of each application program.
For example, the equipment for obtaining audio data is incited somebody to action when detecting the Internet telephony application the first instruction of triggering at the first moment The corresponding target audio data of the Internet telephony application are identified as in the first moment collected audio data, and pass through the networking telephone Using the corresponding target audio data of corresponding audio data distribution interface distribution network phone application.
The corresponding target audio data of each application program may be the same or different.When different application programs exists When synchronization the first instruction of triggering, the target audio data of these different application programs are identical;When different application programs In different moments the first instruction of triggering, the target audio data of these different application programs are different.
S205: if detecting the first application triggers for indicating that stopping obtaining the second of audio data instructs, and releases Put the corresponding audio sound data distribution interface of first application program.
Since the equipment of acquisition audio data is when being respectively configured audio data distribution interface at least two application programs, The binding relationship between audio data distribution interface and application program is established, is detecting the first application triggers for table When showing the second instruction for stopping obtaining audio data, the first application program audio number corresponding with the first application program can be released According to the binding relationship between distribution interface, to discharge the corresponding audio data distribution interface of the first application program.First applies journey After the corresponding audio data distribution interface of sequence is released, unappropriated shape can be set by the audio data distribution interface State.First application program refers to the application program of the second instruction of triggering.
Release binding relationship between the first application program audio data distribution interface corresponding with the first application program it Afterwards, the audio data stored in the audio data distribution interface can be emptied, which can be again with the Two application programs re-establish binding relationship, so that the audio data distribution interface can be reconfigured to second using journey Sequence, the second application program refer to the application program of other the first instructions of triggering in addition to the first application program.
In order to save storage resource, connect releasing the audio data distribution corresponding with the first application program of the first application program After binding relationship between mouthful, the corresponding audio data distribution interface of the first application program can also be deleted.Detecting touching Hair creates audio data point when the first instruction of request audio data, then to trigger the application program of first instruction Send out interface.
The embodiment of the present invention, by being that at least two application programs for needing to obtain audio data are respectively configured in system layer Audio data distribution interface forms audio data according to the voice messaging acquired in real time;Respectively by least two application programs The corresponding audio data distribution interface distributes audio data at least two application program respectively, thus hard not increasing Under the premise of part component, enable at least two application programs that can obtain real-time audio data or recording data simultaneously.
When detecting first instruction of at least two application triggers for request audio data, dynamic creation The corresponding audio data distribution interface of at least two application programs, can save system resource.
When detecting the first application triggers for indicating to stop obtaining the second instruction of audio data, first is released Binding relationship between application program audio sound data distribution interface corresponding with the first application program discharges the first application program Corresponding audio sound data distribution interface, it is other desired using journey so that the audio sound data distribution interface to be reassigned to Sequence, can flexible configuration audio sound data distribution interface, avoid not needing the audio sound data distribution interface of distribution audio data Occupying system resources result in waste of resources.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
Referring to Fig. 3, Fig. 3 is the schematic diagram of the device provided in an embodiment of the present invention for obtaining audio data.The present embodiment In each unit that includes of device 3 of acquisition audio data be used to execute each step in the corresponding embodiment of Fig. 1 or Fig. 2, tool Body please refers to the description of each step in the corresponding embodiment of Fig. 1 or Fig. 2, does not repeat herein.Acquisition audio data as shown in Figure 3 Device include: configuration unit 310, audio data generation unit 320 and audio data Dispatching Unit 330.
Configuration unit 310, if referring to for detecting at least two application triggers for obtaining the first of recording data It enables, is then that audio data distribution interface is respectively configured at least two application program in system layer.
Further, configuration unit 310 is specifically used for: if detecting at least two application triggers for obtaining audio First instruction of data, then in the audio data distribution interface of system layer creation preset number;For each application assigned sound Frequency is according to distribution interface;Wherein, the preset number is greater than or equal to the sum of at least two application program;Or
If detecting, at least two application triggers for obtaining the first instruction of audio data, are distinguished in system layer Create the corresponding audio data distribution interface of at least two application program.
Audio data generation unit 320, for forming audio data according to the voice messaging acquired in real time.
Audio data Dispatching Unit 330, for passing through the corresponding audio number of at least two application program Distribute the audio data at least two application program respectively according to distribution interface.
Further, the device for obtaining audio data can also include:
Releasing unit 340, if for detecting that the first application triggers stop the of acquisition audio data for indicating Two instructions, then discharge the corresponding audio sound data distribution interface of first application program.
Optionally, audio data generation unit 320 is specifically used for: according to the voice messaging acquired in real time and collecting institute The corresponding temporal information of voice messaging is stated, forms audio data, and the audio data is stored to preset buffer area;
Audio data Dispatching Unit 330 is specifically used for: respectively triggering first instruction according to each application program Temporal information and collect the corresponding temporal information of the voice messaging, the sound stored from the preset buffer area Frequency determines each corresponding target audio data of application program in;
Distributed respectively by the corresponding audio data distribution interface of at least two application program and is each answered With the corresponding target audio data of program.
The embodiment of the present invention, by being that at least two application programs for needing to obtain audio data are respectively configured in system layer Audio data distribution interface forms audio data according to the voice messaging acquired in real time;Respectively by least two application programs The corresponding audio data distribution interface distributes audio data at least two application program respectively, thus hard not increasing Under the premise of part component, enable at least two application programs that can obtain real-time audio data or recording data simultaneously.
When detecting first instruction of at least two application triggers for request audio data, dynamic creation The corresponding audio data distribution interface of at least two application programs, can save system resource.
When detecting the first application triggers for indicating to stop obtaining the second instruction of audio data, first is released Binding relationship between application program audio sound data distribution interface corresponding with the first application program discharges the first application program Corresponding audio sound data distribution interface, it is other desired using journey so that the audio sound data distribution interface to be reassigned to Sequence, can flexible configuration audio sound data distribution interface, avoid not needing the audio sound data distribution interface of distribution audio data Occupying system resources result in waste of resources.
Fig. 4 is the schematic diagram of the equipment for the acquisition audio data that one embodiment of the invention provides.As shown in figure 4, the implementation The equipment 4 of the acquisition audio data of example includes: processor 401, memory 402 and is stored in the memory 402 and can The computer program 403 run on the processor 401.The realization when processor 401 executes the computer program 403 Step in above-mentioned each embodiment of the method for obtaining audio data, such as S101 shown in FIG. 1 to S103.Alternatively, the place Reason device 401 realizes the function of each module/unit in above-mentioned each Installation practice, such as Fig. 3 when executing the computer program 403 Shown in unit 310 to 340 function.
Illustratively, the computer program 403 can be divided into one or more module/units, it is one or Multiple module/the units of person are stored in the memory 402, and are executed by the processor 401, to complete the present invention.Institute Stating one or more module/units can be the series of computation machine program instruction section that can complete specific function, the instruction segment For describing implementation procedure of the computer program 403 in the equipment 4 of the acquisition audio data.For example, the meter Calculation machine program 403 can be divided into configuration unit, audio data generation unit and audio data Dispatching Unit, can also quilt It is divided into releasing unit, each unit concrete function is as follows:
If configuration unit is used to detect that at least two application triggers to be instructed for obtaining the first of recording data, It is that audio data distribution interface is respectively configured at least two application program in system layer.
Further, configuration unit is specifically used for: if detecting at least two application triggers for obtaining audio number According to first instruction, then system layer creation preset number audio data distribution interface;For each application assigned audio Data distribution interface;Wherein, the preset number is greater than or equal to the sum of at least two application program;Or
If detecting, at least two application triggers for obtaining the first instruction of audio data, are distinguished in system layer Create the corresponding audio data distribution interface of at least two application program.
Audio data generation unit is used to form audio data according to the voice messaging acquired in real time.
Audio data Dispatching Unit is used for through the corresponding audio data of at least two application program point It sends out interface and distributes the audio data at least two application program respectively.
Further, the equipment for obtaining audio data can also include:
If releasing unit is used to detect the first application triggers for indicating that stopping obtaining the second of audio data refers to It enables, then discharges the corresponding audio sound data distribution interface of first application program.
Optionally, audio data generation unit is specifically used for: according to the voice messaging acquired in real time and collecting described The corresponding temporal information of voice messaging forms audio data, and the audio data is stored to preset buffer area;
Audio data Dispatching Unit is specifically used for: according to each application program respectively trigger it is described first instruction when Between information and collect the corresponding temporal information of the voice messaging, the audio number stored from the preset buffer area According to the corresponding target audio data of each application program of middle determination;
Distributed respectively by the corresponding audio data distribution interface of at least two application program and is each answered With the corresponding target audio data of program.
The equipment 4 for obtaining audio data can be desktop PC, notebook, palm PC and cloud server Deng calculating equipment, robot can also be.The equipment for obtaining audio data may include, but be not limited only to, processor 401, Memory 402.It will be understood by those skilled in the art that Fig. 4 is only the example for obtaining the equipment 4 of audio data, do not constitute Restriction to the equipment 4 for obtaining audio data may include components more more or fewer than diagram, or combine certain components, Or different components, such as it is described obtain audio data equipment can also include input-output equipment, network access equipment, Bus etc..
Alleged processor 401 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 402 can be 4 internal storage unit of the equipment for obtaining audio data, such as obtain sound The hard disk or memory of the equipment 4 of frequency evidence.The memory 402 is also possible to the outside of the equipment 4 for obtaining audio data Store the plug-in type hard disk being equipped in equipment, such as the equipment 4 for obtaining audio data, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, described to deposit Reservoir 402 can also both include it is described obtain audio data equipment 4 internal storage unit and also including External memory equipment.Institute Memory 402 is stated for other program sum numbers needed for storing the computer program and the equipment for obtaining audio data According to.The memory 402 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed device/terminal device and method, it can be with It realizes by another way.For example, device described above/terminal device embodiment is only schematical, for example, institute The division of module or unit is stated, only a kind of logical function partition, there may be another division manner in actual implementation, such as Multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.Separately A bit, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device Or the INDIRECT COUPLING or communication connection of unit, it can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program Code can be source code form, object identification code form, executable file or certain intermediate forms etc..Computer-readable Jie Matter may include: can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, Magnetic disk, CD, computer storage, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the meter The content that calculation machine readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, It such as does not include electric carrier signal and telecommunications according to legislation and patent practice, computer-readable medium in certain jurisdictions Signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of method for obtaining audio data characterized by comprising
If detect at least two application triggers for obtaining the first instruction of recording data, system layer be it is described extremely Audio data distribution interface is respectively configured in few two application programs;
Audio data is formed according to the voice messaging acquired in real time;
By the corresponding audio data distribution interface of at least two application program respectively to described at least two Application program distributes the audio data.
2. the method as described in claim 1, which is characterized in that if described detect at least two application triggers for obtaining It takes the first of recording data to instruct, then audio data distribution is respectively configured at least two application program in system layer and connects Mouthful, comprising:
If detecting, at least two application triggers for obtaining the first instruction of audio data, are preset in system layer creation The audio data distribution interface of number;For each application assigned audio data distribution interface;Wherein, the preset number is big In or equal at least two application program sum.
3. the method according to claim 1, wherein if described detect that at least two application triggers are used for The first instruction of recording data is obtained, then audio data distribution is respectively configured at least two application program in system layer and connects Mouthful, comprising:
If detecting, at least two application triggers for obtaining the first instruction of audio data, are respectively created in system layer The corresponding audio data distribution interface of at least two application programs.
4. method according to claim 1-3, which is characterized in that described to pass through at least two application program After corresponding audio data distribution interface distributes the audio data at least two application program respectively, Further include:
If detecting the first application triggers for indicating that stopping obtaining the second of audio data instructs, and discharges described first The corresponding audio sound data distribution interface of application program.
5. according to the method described in claim 4, it is characterized in that, the voice messaging that the basis acquires in real time forms audio number According to, comprising:
According to the voice messaging acquired in real time and the corresponding temporal information of the voice messaging is collected, forms audio data, And the audio data is stored to preset buffer area;
It is described by the corresponding audio data distribution interface of at least two application program respectively to it is described at least Two application programs distribute the audio data, comprising:
The temporal information of first instruction is respectively triggered according to each application program and collects the voice messaging Corresponding temporal information determines that each application program respectively corresponds to from the audio data that the preset buffer area stores Target audio data;
Distributed respectively by the corresponding audio data distribution interface of at least two application program each using journey The corresponding target audio data of sequence.
6. a kind of device for obtaining audio data characterized by comprising
Configuration unit, if being instructed for detecting at least two application triggers for obtaining the first of recording data, System layer is that audio data distribution interface is respectively configured at least two application program;
Audio data generation unit, for forming audio data according to the voice messaging acquired in real time;
Audio data Dispatching Unit, for being connect by the corresponding audio data distribution of at least two application program Mouth distributes the audio data at least two application program respectively.
7. device according to claim 6, which is characterized in that further include:
Releasing unit, if for detecting that the first application triggers are instructed for indicating that stopping obtains the second of audio data, Then discharge the corresponding audio sound data distribution interface of first application program.
8. the described in any item devices of according to claim 6 or 7, which is characterized in that
Audio data generation unit is specifically used for: according to the voice messaging acquired in real time and collecting the voice messaging correspondence Temporal information, form audio data, and the audio data stored to preset buffer area;
Audio data Dispatching Unit is specifically used for: being believed according to the time that each application program respectively triggers first instruction The corresponding temporal information of the voice messaging is ceased and collects, from the audio data that the preset buffer area stores Determine the corresponding target audio data of each application program;
Distributed respectively by the corresponding audio data distribution interface of at least two application program each using journey The corresponding target audio data of sequence.
9. a kind of equipment for obtaining audio data, including memory, processor and storage are in the memory and can be in institute State the computer program run on processor, which is characterized in that the processor is realized when executing the computer program as weighed Benefit requires the step of any one of 1 to 5 the method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
CN201711466381.2A 2017-12-28 2017-12-28 Method and device for acquiring audio data, equipment and computer-readable storage medium Active CN109976698B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711466381.2A CN109976698B (en) 2017-12-28 2017-12-28 Method and device for acquiring audio data, equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711466381.2A CN109976698B (en) 2017-12-28 2017-12-28 Method and device for acquiring audio data, equipment and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN109976698A true CN109976698A (en) 2019-07-05
CN109976698B CN109976698B (en) 2022-05-10

Family

ID=67075304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711466381.2A Active CN109976698B (en) 2017-12-28 2017-12-28 Method and device for acquiring audio data, equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN109976698B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111540385A (en) * 2020-04-26 2020-08-14 西安广和通无线软件有限公司 Recording data sharing method and device, computer equipment and storage medium
CN113076082A (en) * 2021-06-03 2021-07-06 杭州星犀科技有限公司 Method, system, electronic device and storage medium for audio source processing
CN117472321A (en) * 2023-12-28 2024-01-30 广东朝歌智慧互联科技有限公司 Audio processing method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199420A1 (en) * 2003-04-03 2004-10-07 International Business Machines Corporation Apparatus and method for verifying audio output at a client device
CN104991754A (en) * 2015-06-29 2015-10-21 小米科技有限责任公司 Recording method and apparatus
CN106911831A (en) * 2017-02-09 2017-06-30 青岛海信移动通信技术股份有限公司 The data processing method and the terminal with microphone of a kind of microphone of terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040199420A1 (en) * 2003-04-03 2004-10-07 International Business Machines Corporation Apparatus and method for verifying audio output at a client device
CN104991754A (en) * 2015-06-29 2015-10-21 小米科技有限责任公司 Recording method and apparatus
CN106911831A (en) * 2017-02-09 2017-06-30 青岛海信移动通信技术股份有限公司 The data processing method and the terminal with microphone of a kind of microphone of terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111540385A (en) * 2020-04-26 2020-08-14 西安广和通无线软件有限公司 Recording data sharing method and device, computer equipment and storage medium
CN113076082A (en) * 2021-06-03 2021-07-06 杭州星犀科技有限公司 Method, system, electronic device and storage medium for audio source processing
CN113076082B (en) * 2021-06-03 2021-09-03 杭州星犀科技有限公司 Method, system, electronic device and storage medium for audio source processing
CN117472321A (en) * 2023-12-28 2024-01-30 广东朝歌智慧互联科技有限公司 Audio processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109976698B (en) 2022-05-10

Similar Documents

Publication Publication Date Title
CN109976696A (en) Method and device for acquiring audio data, equipment and computer-readable storage medium
CN109976697A (en) Method and device for acquiring audio data, equipment and computer-readable storage medium
CN106465006B (en) The operating method of microphone and the electronic equipment for supporting this method
CN103081004B (en) For the method and apparatus providing input to voice-enabled application program
CN106330687B (en) Message treatment method, apparatus and system
CN104573611B (en) A kind of distributed recognition of face group system
CN109684069A (en) The method and terminal device of resource management
CN108449410A (en) Information management method, system and relevant apparatus in a kind of cloud platform
CN109976698A (en) Method and device for acquiring audio data, equipment and computer-readable storage medium
CN107111516A (en) Task without a head in personal digital assistant is completed
CN107665038A (en) Electronic equipment and the method for operating the electronic equipment
CN107241689A (en) A kind of earphone voice interactive method and its device, terminal device
CN107992517A (en) A kind of data processing method, server and computer-readable medium
CN109947821A (en) Generation method, display methods, device, equipment and the storage medium of report information
CN105788054B (en) It is lined up based reminding method and the server being applicable in, system
CN108897854A (en) A kind of monitoring method and device of overtime task
CN108235308A (en) data reporting method, device, mobile terminal and computer-readable medium
CN108134838A (en) data reporting method, device, mobile terminal and computer-readable medium
CN109600324A (en) Video communication method, device, computer equipment and storage medium
CN109660421A (en) Method, apparatus, server and the storage medium of flexible scheduling resource
CN107864270A (en) A kind of method, terminal and computer-readable recording medium for handling incoming call
CN110413822A (en) Offline image structural workflow net, device, system and storage medium
CN108366098A (en) A kind of data interactive method and device of network node
CN107632885A (en) The readjustment management method and device of inter-module
CN110223694A (en) Method of speech processing, system and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant