CN109947387A - Audio collection method, audio frequency playing method, system, equipment and storage medium - Google Patents
Audio collection method, audio frequency playing method, system, equipment and storage medium Download PDFInfo
- Publication number
- CN109947387A CN109947387A CN201910244021.0A CN201910244021A CN109947387A CN 109947387 A CN109947387 A CN 109947387A CN 201910244021 A CN201910244021 A CN 201910244021A CN 109947387 A CN109947387 A CN 109947387A
- Authority
- CN
- China
- Prior art keywords
- audio
- focus
- application
- kernel
- input output
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000005236 sound signal Effects 0.000 claims abstract description 79
- 230000004044 response Effects 0.000 claims abstract description 21
- 238000004590 computer program Methods 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 16
- 230000006854 communication Effects 0.000 description 13
- 238000004891 communication Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 5
- 230000005291 magnetic effect Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000000151 deposition Methods 0.000 description 3
- 239000000571 coke Substances 0.000 description 2
- 230000005611 electricity Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012952 Resampling Methods 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005086 pumping Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Landscapes
- Stored Programmes (AREA)
- Telephonic Communication Services (AREA)
Abstract
The embodiment of the invention discloses a kind of audio collection method, audio frequency playing method, system, equipment and storage mediums.Wherein, audio collection method includes: call request when audio input output interface in hardware abstraction layer acquires audio in response to audio application, calls kernel;The kernel-driven audio collecting device acquires audio signal;The collected audio signal of audio collecting device is transferred to the audio input output interface by the kernel;The audio signal is transferred to the audio application by the audio input output interface.The embodiment of the present invention can reduce the time delay of audio collection, broadcasting.
Description
Technical field
The present embodiments relate to audio signal processing technique more particularly to a kind of audio collection method, audio frequency playing method, it is
System, equipment and storage medium.
Background technique
It in voice communication, voice and video telephone and plays in the application scenarios such as music, is required to be acquired audio signal
Or it plays.In conjunction with Fig. 1 a, existing audio system based on android system successively include: from top to bottom audio application,
Application framework, audio service, hardware abstraction layer, kernel and audio-class devices.
Currently, based on above-mentioned audio system including: audio-class devices (such as microphone) to the collection process of audio signal
Audio signal is acquired, kernel and hardware abstraction layer are successively transferred to, hardware abstraction layer copies to audio signal local slow
In depositing, local cache is then forwarded to audio service, by audio service to the specific frequency of audio signal resampling, and again
It is transferred to application framework by local cache, and then passes to audio application.Based on above-mentioned audio system to audio signal
Playing process include: that audio application is copied to audio signal in local cache by application framework interface, it is local slow
It deposits and is then forwarded to audio service, audio service carries out audio mixing to audio signal, lays equal stress on and samples specific frequency, copies to again
In local cache, audio signal is sent to hardware abstraction layer by local cache, and via kernel in audio-class devices (such as loudspeaking
Device) on play.
As it can be seen that the acquisition of current audio signal, playing process need the processing by multiple system modules, and need
Multiple copies cause to introduce excessive time delay, audio plays, the real-time of collection process is poor into local cache.
Summary of the invention
The embodiment of the present invention provides a kind of audio collection method, audio frequency playing method, system, equipment and storage medium, with
Reduce the time delay of audio collection, broadcasting.
In a first aspect, the embodiment of the invention provides a kind of audio collection methods, comprising:
Calling when audio input output interface in hardware abstraction layer acquires audio in response to audio application is asked
It asks, calls kernel;
The kernel-driven audio collecting device acquires audio signal;
The collected audio signal of audio collecting device is transferred to the audio input output interface by the kernel;
The audio signal is transferred to the audio application by the audio input output interface.
Second aspect, the embodiment of the invention also provides a kind of audio frequency playing methods, comprising:
Calling when audio input output interface in hardware abstraction layer plays audio in response to audio application is asked
It asks, audio signal to be played is transferred to kernel;
The kernel-driven audio-frequence player device plays the audio signal.
The third aspect, the embodiment of the invention also provides a kind of audio collecting system, the system comprises: voice applications journey
Sequence, hardware abstraction layer, kernel and audio collecting device are configured with audio input output interface in the hardware abstraction layer;
Audio input output interface in the hardware abstraction layer, when for acquiring audio in response to audio application
Call request, call kernel;
The kernel, for driving audio collecting device to acquire audio signal;
The kernel is also used to the collected audio signal of audio collecting device being transferred to the audio input defeated
Outgoing interface;
The audio input output interface is also used to the audio signal being transferred to the audio application.
Fourth aspect, the embodiment of the invention also provides a kind of audio frequency broadcast system, the system comprises: voice applications journey
Sequence, hardware abstraction layer, kernel and audio-frequence player device are configured with audio input output interface in the hardware abstraction layer;
Audio input output interface in the hardware abstraction layer, for playing sound in response to the audio application
Audio signal to be played is transferred to the kernel by call request when frequency;
The kernel, for driving audio-frequence player device to play the audio signal.
5th aspect, the embodiment of the invention also provides a kind of electronic equipment, comprising:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes audio frequency playing method described in audio collection method described in any embodiment or any embodiment.
6th aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program is realized described in audio collection method described in any embodiment or any embodiment when the program is executed by processor
Audio frequency playing method.
Audio collecting system provided in an embodiment of the present invention only include audio application, hardware abstraction layer, kernel and
Audio collecting device is not required to audio service and application framework, reduces the module in system;Exactly because moreover, reducing sound
Be taken in small doses at short intervals business and application framework, does not need hardware abstraction layer and copies to audio signal in local cache, local cache retransmits
To audio service, audio service is not needed yet by local cache and is transferred to application framework, but by hardware abstraction layer
Input/output interface audio signal is directly transferred to audio application so that audio input output interface is directly and kernel
With audio application interaction, reduce the number for copying to local cache, reduces time delay, improve the reality of audio collection process
Shi Xing.
Detailed description of the invention
Fig. 1 a is the structural schematic diagram of audio system based on android system in the prior art;
Fig. 1 b is a kind of structural schematic diagram for audio collecting system that the embodiment of the present invention one provides;
Fig. 2 a is a kind of structural schematic diagram of audio collecting system provided by Embodiment 2 of the present invention;
Fig. 2 b is the structural schematic diagram of another audio collecting system provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of structural schematic diagram for audio frequency broadcast system that the embodiment of the present invention three provides;
Fig. 4 a is a kind of structural schematic diagram for audio frequency broadcast system that the embodiment of the present invention four provides;
Fig. 4 b is the structural schematic diagram for another audio frequency broadcast system that the embodiment of the present invention four provides;
Fig. 5 is a kind of flow chart for audio collection method that the embodiment of the present invention five provides;
Fig. 6 is a kind of flow chart for audio frequency playing method that the embodiment of the present invention six provides;
Fig. 7 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention seven provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 b is a kind of structural schematic diagram for audio collecting system that the embodiment of the present invention one provides, the audio collecting system
It is built based on Android system, is suitable for Android system.Audio collecting system can be applied in the operation of vehicle-mounted Android, or application
In the Android system etc. of mobile terminal.
In conjunction with Fig. 1 b, audio collecting system successively includes: audio application 10, hardware pumping according to sequence from top to bottom
As module 20, kernel 30 and audio collecting device 40.
Wherein, audio application 10 is located at application layer, including but not limited to voice communication application program, voice and video telephone
The voice class application program such as application program.Other than audio application 10, the application layer of Android system further includes that music is answered
With non-voices class application programs such as program, video application, live streaming application programs.In order to facilitate describing and distinguish, by non-language
Sound class application program is known as other application program.
Hardware abstraction layer 20 is located at hardware abstraction layer, is different from hardware abstraction layer in the prior art, the present embodiment
In hardware abstraction layer 20 in be configured with audio input output interface 21.In order to not influence the use of other applications, originally
Embodiment is not modified the hardware abstraction layer in existing audio system, but it is new to rewrite one in hardware abstraction layer
Hardware abstraction layer 20, the new hardware abstraction layer 20 are adapted to audio application 10 and kernel 30 respectively, and C++ can be used
Language is write.In order to facilitate describing and distinguish, will be known as in the prior art for the hardware abstraction layer that other application program uses
Primary hardware abstraction layer, the hardware abstraction layer title newly write in the present embodiment is still hardware abstraction layer.
Kernel 30 is specially linux kernel, is located at inner nuclear layer, the driving including audio collecting device 40.Audio collection is set
Standby 40 are located at hardware layer, including microphone etc..
Under the scene of acquisition audio signal, audio application 10 is used to operate in response to the audio collection of user, to
Audio input output interface 21 in hardware abstraction layer 20 sends call request when acquisition audio.Audio input output interface
21, for acquiring call request when audio in response to audio application 10, call kernel 30.
Kernel 30 is for driving audio collecting device 40 to acquire audio signal.Specifically, kernel 30 is set by audio collection
Standby 40 driving drives audio collecting device 40, audio collecting device 40 and then acquires audio signal, such as user's input
Voice signal.Then, collected audio signal is passed up to kernel 30 in real time by audio collecting device 40.Kernel 30 is also used
In the collected audio signal of audio collecting device 40 is transferred to audio input output interface 21;Then, audio input exports
Interface 21 is also used to for audio signal to be transferred to audio application 10, so far completes audio collection operation.
Audio collecting system provided in an embodiment of the present invention only includes audio application 10, hardware abstraction layer 20, interior
Core 30 and audio collecting device 40, are not required to audio service and application framework, reduce the module in system;Exactly because moreover,
Reduce audio service and application framework, does not need hardware abstraction layer 20 and copy to audio signal in local cache, it is local
Caching is then forwarded to audio service, does not also need audio service by local cache and is transferred to application framework, but passes through hardware
Audio signal is directly transferred to audio application 10 by the audio input output interface 21 in abstract module 20, so that audio is defeated
Enter output interface 21 directly to interact with kernel 30 and audio application 10, reduce the number for copying to local cache, reduces
Time delay improves the real-time of audio collection process.
In an optional embodiment, hardware abstraction layer 20 further includes the interface for initializing kernel, initializes kernel
Interface is for configuring predeterminated frequency into kernel 30.Based on this, kernel 30 is also used to predeterminated frequency being configured to audio collection and set
In standby 40 or the audio collecting device 40 to match with predeterminated frequency is selected, so that audio collecting device 40 is adopted with predeterminated frequency
Collect audio signal.That is, audio collecting device 40 when acquiring audio signal, is specifically used for acquiring audio with predeterminated frequency
Signal.Present embodiment is suitable for the application scenarios of voice communication or voice and video telephone, and collected audio signal is user
Voice signal, voice signal has fixed frequency, generally 12kHz, 16kHz, then by predeterminated frequency be set as 12kHz or
Person 16kHz, audio collecting device 40 are able to accurately acquire the voice signal of user.In present embodiment, audio collecting device 40
It is responsible for the frequency modulation of voice signal, instead of the frequency modulation of audio service, is effectively reduced the time delay of acquisition voice signal, improves voice
Real-time in communication process.
Embodiment two
Fig. 2 a is a kind of structural schematic diagram of audio collecting system provided by Embodiment 2 of the present invention.Fig. 2 b is of the invention real
The structural schematic diagram of another audio collecting system of the offer of example two is provided.On the basis of Fig. 1 b, Fig. 2 a and Fig. 2 b show audio
Acquisition system further include: focus processing module 50.In application framework layer, application framework layer is located at answers the configuration of focus processing module 50
Under layer, on hardware abstraction layer.In conjunction with Fig. 2 b, in order to not influence the use of other applications, the present embodiment is not to existing
There is the application framework 51 in audio system to be modified, but rewrites a new focus processing module in application framework layer
50.The focus processing module 50 is adapted to audio application 10 and application framework 51 respectively.Focus processing module 50 is for being
Audio application 10 or other applications 11 provide audio focus.
When audio application 10 is used to send call request when acquiring audio to audio input output interface 21, to coke
Point processing module 50 requests audio focus.Focus processing module 50 is used to audio focus being supplied to audio application 10, and
Notice other applications 11 lose audio focus.After audio application 10 obtains audio focus, audio broadcasting can be monopolized and set
Standby 70.In conjunction with Fig. 2 b, focus processing module 50 is specifically used for for the notice that other applications 11 lose audio focus being sent to
Application framework 51, application framework 51 is for notifying other applications 11 to lose audio focus.11 unlocking noise of other applications
Frequency signal is output and input.
Audio application 10 is used for the operation of the end audio collection in response to user, terminates audio collection.Wherein, it ties
The operation of beam audio collection includes to terminating the clicking operation of call icon, exit the operation of voice communication.Audio application
10 for when terminating audio collection, notice focus processing module 50 to abandon audio focus, to discharge the input of audio signal and defeated
Out.Focus processing module 50 is also used to audio focus being supplied to other application program 11.Focus processing module 50 is specifically used for
The notice that audio application 10 abandons audio focus is sent to application framework 51, application framework 51 is for proposing audio focus
Supply other application program 11.
In conjunction with Fig. 2 b, audio collecting system not only includes audio application 10, hardware abstraction layer 20, kernel 30 and sound
Frequency acquisition this audio collection channel of equipment 40, further includes other application program 11, application framework involved in background technique
51, audio service 60, primary hardware abstraction layer 11, kernel 30 and this channel of audio collecting device 40.In the present embodiment, two
Channel shared internal nucleus 30 and audio collecting device 40.
The present embodiment joined focus processing module 50 on the basis of low time delay audio system, handle mould by focus
Audio focus is supplied to audio application 10 by block 50, so that audio application 10 be made to monopolize playback equipment, and stops it
Its application program 11 uses playback equipment, avoids obscuring for audio signal, and also there is no need to audio services 60 believes multiple audios
Number carry out audio mixing.Moreover, by the offer logic for writing hardware abstraction layer 20 and audio focus, so that other application program
11 audio collection channel and the audio collection channel of audio application 10 are mutually indepedent, will not interact.
Embodiment three
Fig. 3 is a kind of structural schematic diagram for audio frequency broadcast system that the embodiment of the present invention three provides.The audio frequency broadcast system
It is built based on Android system, is suitable for Android system, audio frequency broadcast system can be applied in the operation of vehicle-mounted Android, or application
In the Android system etc. of mobile terminal.
Audio frequency broadcast system provided in this embodiment according to sequence from top to bottom successively include: audio application 10,
Hardware abstraction layer 20, kernel 30 and audio-frequence player device 70.Description for audio application 10, hardware abstraction layer 20
The various embodiments described above are detailed in, details are not described herein again.
Kernel 30 is specially linux kernel 30, the driving including audio-frequence player device 70.Audio-frequence player device 70 is located at hard
Part layer, including loudspeaker etc..
Under the scene of playing audio signal, audio application 10 is used for the audio player operation in response to user, to
Audio input output interface 21 in hardware abstraction layer 20 sends call request when playing audio, audio input output interface
21, for playing call request when audio in response to audio application 10, call kernel 30.
Kernel 30 is for driving 70 playing audio signal of audio-frequence player device.Specifically, kernel 30 is set by audio broadcasting
Standby 70 driving drives audio-frequence player device 70, audio-frequence player device 70 and then playing audio signal, such as other side's transmission
Voice signal so far completes audio player operation.
Audio frequency broadcast system provided in an embodiment of the present invention only includes audio application 10, hardware abstraction layer 20, interior
Core 30 and audio-frequence player device 70, are not required to audio service 60 and application framework 51, reduce the module in system;Moreover, exactly
Because reducing audio service 60 and application framework 51, do not need to copy to audio signal by application framework interface local slow
It in depositing, does not need audio service yet and audio mixing is carried out to audio signal, lay equal stress on and sample specific frequency, copy to again local slow
In depositing, but audio signal is directly transferred to kernel 30 by audio input output interface 21, drives audio broadcasting to set by kernel 30
Standby 70 playing audio signals are reduced so that audio input output interface 21 is directly interacted with kernel 30 and audio application 10
The number of local cache is copied to, time delay is reduced, improves the real-time of audio collection process.
In an optional embodiment, hardware abstraction layer 20 further includes the interface for initializing kernel, initializes kernel
Interface is for configuring predeterminated frequency into kernel 30.Based on this, kernel 30 is also used to for predeterminated frequency being configured to audio broadcasting and sets
In standby 70 or the audio-frequence player device 70 to match with predeterminated frequency is selected, so that audio-frequence player device 70 is adopted with predeterminated frequency
Collect audio signal.That is, audio-frequence player device 70 in playing audio signal, is specifically used for playing audio with predeterminated frequency
Signal.Present embodiment is suitable for the application scenarios of voice communication or voice and video telephone, and the audio signal of broadcasting is user's
Voice signal, voice signal have fixed frequency, generally 12kHz, 16kHz, then by predeterminated frequency be set as 12kHz or
16kHz, audio-frequence player device 70 are able to accurately play the voice signal of user.In present embodiment, audio-frequence player device 70 is negative
The frequency modulation for blaming voice signal is effectively reduced the time delay for playing voice signal instead of the frequency modulation of audio service 60, improves voice
Real-time in communication process.
Example IV
Fig. 4 a is a kind of structural schematic diagram for audio frequency broadcast system that the embodiment of the present invention four provides.Fig. 4 b is of the invention real
The structural schematic diagram of another audio frequency broadcast system of the offer of example four is provided.Audio on the basis of Fig. 3, shown in Fig. 4 a and Fig. 4 b
Play system further include: focus processing module 50.The description of 50 structure of focus point processing module is detailed in above-described embodiment, herein not
It repeats again, the difference is that only the function of focus processing module 50.
When audio application 10 is used to send call request when playing audio to audio input output interface 21, to coke
Point processing module 50 requests audio focus.Focus processing module 50 is used to audio focus being supplied to audio application 10, and
Notice other applications 11 lose audio focus.After audio application 10 obtains audio focus, audio broadcasting can be monopolized and set
Standby 70.In conjunction with Fig. 4 b, focus processing module 50 is specifically used for for the notice that other applications 11 lose audio focus being sent to
Application framework 51, application framework 51 is for notifying other applications 11 to lose audio focus.11 unlocking noise of other applications
Frequency signal is output and input.
Audio application 10 is used for the operation played in response to the end audio of user, terminates audio and plays.Wherein, it ties
The operation that beam audio plays includes to terminating to converse the clicking operation of icon, exit the operation of voice communication.Audio application
10 for terminating audio when playing, and notice focus processing module 50 abandons audio focus, to discharge the input of audio signal and defeated
Out.Focus processing module 50 is also used to audio focus being supplied to other application program 11.Focus processing module 50 is specifically used for
The notice that audio application 10 abandons audio focus is sent to application framework 51, application framework is for providing audio focus
To other application program 11.
In conjunction with Fig. 4 b, audio frequency broadcast system not only includes audio application 10, hardware abstraction layer 20, kernel 30 and sound
This audio collection channel of frequency playback equipment 70 further includes other application program 11, application framework involved in background technique
51, audio service 60, primary hardware abstraction layer 22, kernel 30 and this channel of audio-frequence player device 70.In the present embodiment, two
Channel shared internal nucleus 30 and audio-frequence player device 70.
The present embodiment joined focus processing module 50 on the basis of low time delay audio system, handle mould by focus
Audio focus is supplied to audio application 10 by block 50, so that audio application 10 be made to monopolize playback equipment, and stops it
Its application program 11 uses playback equipment, avoids obscuring for audio signal, and also there is no need to audio services 60 believes multiple audios
Number carry out audio mixing.Moreover, by the offer logic for writing hardware abstraction layer 20 and audio focus, so that other application program
11 audio plays channel and the audio broadcasting channel of audio application 10 is mutually indepedent, will not interact.
Embodiment five
Fig. 5 is a kind of flow chart for audio collection method that the embodiment of the present invention five provides, the applicable audio of the present embodiment
Acquisition system is detailed in the description of above-described embodiment, and details are not described herein again.In conjunction with Fig. 5, method provided in this embodiment includes following
Operation:
Audio input output interface in S510, hardware abstraction layer acquires tune when audio in response to audio application
With request, kernel is called.
S520, kernel-driven audio collecting device acquire audio signal.
The collected audio signal of audio collecting device is transferred to audio input output interface by S530, kernel.
Audio signal is transferred to audio application by S540, audio input output interface.
Optionally, when the audio input output interface in hardware abstraction layer acquires audio in response to audio application
Call request, call kernel before, further includes: hardware abstraction layer by initialization kernel interface, configured into kernel
Predeterminated frequency;Predeterminated frequency is configured in audio collecting device by kernel, or selection is adopted with the audio that predeterminated frequency matches
Collect equipment, so that audio collecting device acquires audio signal with predeterminated frequency.
Optionally, the above method further include: when audio application sends acquisition audio to audio input output interface
When call request, module request audio focus is handled to focus;Audio focus is supplied to voice applications journey by focus processing module
Sequence, and other applications is notified to lose audio focus.
Optionally, after audio signal is transferred to audio application by audio input output interface, further includes: audio
When application program terminates audio collection, notice focus processing module abandons audio focus;Focus processing module proposes audio focus
Supply other application program.
In the embodiment of the present invention, audio signal is directly transferred to by sound by the input/output interface in hardware abstraction layer
Frequency application program does not need hardware abstraction mould so that audio input output interface is directly interacted with kernel and audio application
Block copies to audio signal in local cache, and local cache is then forwarded to audio service, does not also need audio service and passes through this
Ground caching is transferred to application framework, reduces the number for copying to local cache, reduces time delay, improves audio collection process
Real-time.
Embodiment six
Fig. 6 is a kind of flow chart for audio frequency playing method that the embodiment of the present invention six provides, the applicable audio of the present embodiment
Play system is detailed in the description of above-described embodiment, and details are not described herein again.In conjunction with Fig. 6, method provided in this embodiment includes following
Operation:
Audio input output interface in S610, hardware abstraction layer plays tune when audio in response to audio application
With request, audio signal to be played is transferred to kernel.
S620, kernel-driven audio-frequence player device playing audio signal.
Optionally, when the audio input output interface in hardware abstraction layer plays audio in response to audio application
Call request, audio signal to be played is transferred to before kernel, further includes: hardware abstraction layer by initialization kernel
Interface, predeterminated frequency is configured into kernel;Predeterminated frequency is configured in audio-frequence player device by kernel, so that audio broadcasting is set
It is standby that audio-frequency information is played with predeterminated frequency.
Optionally, the above method further include: audio application is sent when playing audio to audio input output interface
When call request, module request audio focus is handled to focus;Audio focus is supplied to voice applications journey by focus processing module
Sequence, and other applications is notified to lose audio focus.
Optionally, after kernel-driven audio-frequence player device playing audio signal, further includes: audio application terminates
When audio plays, notice focus processing module abandons audio focus;Audio focus is supplied to other application by focus processing module
Program.
In the embodiment of the present invention, audio signal is directly transferred to kernel by audio input output interface, by kernel-driven sound
Frequency playback equipment playing audio signal is not required to so that audio input output interface is directly interacted with kernel and audio application
Audio signal to be copied in local cache by application framework interface, also not need audio service and audio signal is mixed
Sound lays equal stress on and samples specific frequency, copies in local cache again, and this embodiment reduces times for copying to local cache
Number reduces time delay, improves the real-time of audio collection process.
Embodiment seven
Fig. 7 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention seven provides.Fig. 7, which is shown, to be suitable for being used in fact
The block diagram of the example electronic device 120 of existing embodiment of the present invention.The electronic equipment 120 that Fig. 7 is shown is only an example,
Should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in fig. 7, electronic equipment 120 is showed in the form of universal computing device.The component of electronic equipment 120 can wrap
Include but be not limited to: one or more processor or processing unit 160, system storage 280 connect different system components
The bus 180 of (including system storage 280 and processing unit 160).
Bus 180 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller,
Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts
For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC)
Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Electronic equipment 120 typically comprises a variety of computer system readable media.These media can be it is any can be by
The usable medium of electronic equipment access, including volatile and non-volatile media, moveable and immovable medium.
System storage 280 may include the computer system readable media of form of volatile memory, such as deposit at random
Access to memory (RAM) 300 and/or cache memory 320.Electronic equipment 120 may further include it is other it is removable/no
Movably, volatile/non-volatile computer system storage medium.Only as an example, storage system 340 can be used for reading and writing
Immovable, non-volatile magnetic media (Fig. 7 do not show, commonly referred to as " hard disk drive ").It, can although being not shown in Fig. 7
To provide the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk "), and it is non-volatile to moving
Property CD (such as CD-ROM, DVD-ROM or other optical mediums) read and write CD drive.In these cases, each drive
Dynamic device can be connected by one or more data media interfaces with bus 180.Memory 280 may include at least one journey
Sequence product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform this hair
The function of bright each embodiment.
Program/utility 400 with one group of (at least one) program module 420, can store in such as memory
In 280, such program module 420 includes but is not limited to operating system, one or more application program, other program modules
And program data, it may include the realization of network environment in each of these examples or certain combination.Program module 420
Usually execute the function and/or method in embodiment described in the invention.
Electronic equipment 120 can also with one or more external equipments 140 (such as keyboard, sensing equipment, display 240,
Camera, positioning system etc.) communication, the equipment interacted with the electronic equipment 120 can be also enabled a user to one or more
Communication, and/or with enable the electronic equipment 120 and one or more of the other any equipment (example for being communicated of calculating equipment
Such as network interface card, modem etc.) communication.This communication can be carried out by input/output (I/O) interface 220.Also, electricity
Sub- equipment 120 can also pass through network adapter 200 and one or more network (such as local area network (LAN), wide area network
(WAN) and/or public network, for example, internet) communication.As shown, network adapter 200 is set by bus 180 with electronics
Standby 120 other modules communicate.It should be understood that although not shown in the drawings, other hardware can be used in conjunction with electronic equipment 120
And/or software module, including but not limited to: microcode, device driver, redundant processing unit, external disk drive array,
RAID system, tape drive and data backup storage system etc..
Processing unit 160 by the program that is stored in system storage 280 of operation, thereby executing various function application with
And data processing, such as realize audio collection method and audio frequency playing method provided by the embodiment of the present invention.
Embodiment eight
The embodiment of the present invention eight additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
The audio collection method or audio frequency playing method that any embodiment provides are realized when program is executed by processor.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, programming language include object oriented program language-such as Java, Smalltalk, C++, are also wrapped
Include conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete
Ground executes on the user computer, partly executes on the user computer, executing as an independent software package, partially existing
Part executes on the remote computer or executes on a remote computer or server completely on subscriber computer.It is being related to
In the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area
Net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as utilize ISP
To be connected by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (14)
1. a kind of audio collection method characterized by comprising
Audio input output interface in hardware abstraction layer acquires call request when audio in response to audio application, adjusts
Use kernel;
The kernel-driven audio collecting device acquires audio signal;
The collected audio signal of audio collecting device is transferred to the audio input output interface by the kernel;
The audio signal is transferred to the audio application by the audio input output interface.
2. the method according to claim 1, wherein the audio input output in the hardware abstraction layer connects
Mouthful in response to audio application acquire audio when call request, call kernel before, further includes:
The hardware abstraction layer passes through the interface of initialization kernel, configures predeterminated frequency in Xiang Suoshu kernel;
The predeterminated frequency is configured in audio collecting device by the kernel, or the audio that selection matches with predeterminated frequency
Equipment is acquired, so that the audio collecting device acquires audio signal with the predeterminated frequency.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
When the audio application sends call request when acquiring audio to the audio input output interface, to focal point
Manage module request audio focus;
Audio focus is supplied to the audio application by the focus processing module, and other applications is notified to lose sound
Frequency focus.
4. according to the method described in claim 3, it is characterized in that, in the audio input output interface by the audio signal
It is transferred to after the audio application, further includes:
When the audio application terminates audio collection, the focus processing module is notified to abandon audio focus;
The audio focus is supplied to other application program by the focus processing module.
5. a kind of audio frequency playing method characterized by comprising
Audio input output interface in hardware abstraction layer plays call request when audio in response to audio application, will
Audio signal to be played is transferred to kernel;
The kernel-driven audio-frequence player device plays the audio signal.
6. according to the method described in claim 5, it is characterized in that, the audio input output in the hardware abstraction layer connects
Mouth plays call request when audio in response to audio application, before audio signal to be played is transferred to kernel, also
Include:
The hardware abstraction layer passes through the interface of initialization kernel, configures predeterminated frequency in Xiang Suoshu kernel;
The predeterminated frequency is configured in the audio-frequence player device by the kernel, so that the audio-frequence player device is with described
Predeterminated frequency plays audio-frequency information.
7. method according to claim 5 or 6, which is characterized in that the method also includes:
When the audio application sends call request when playing audio to the audio input output interface, to focal point
Manage module request audio focus;
Audio focus is supplied to the audio application by the focus processing module, and other applications is notified to lose sound
Frequency focus.
8. the method according to the description of claim 7 is characterized in that playing the sound in the kernel-driven audio-frequence player device
After frequency signal, further includes:
When the audio application terminates audio broadcasting, the focus processing module is notified to abandon audio focus;
The audio focus is supplied to other application program by the focus processing module.
9. a kind of audio collecting system characterized by comprising audio application, hardware abstraction layer, kernel and audio are adopted
Collect equipment, is configured with audio input output interface in the hardware abstraction layer;
Audio input output interface in the hardware abstraction layer, for acquiring tune when audio in response to audio application
With request, kernel is called;
The kernel, for driving audio collecting device to acquire audio signal;
The kernel is also used to for the collected audio signal of audio collecting device being transferred to the audio input output and connects
Mouthful;
The audio input output interface is also used to the audio signal being transferred to the audio application.
10. system according to claim 9, which is characterized in that further include: focus processing module;
The audio application, when for sending call request when acquiring audio to the audio input output interface, to
The focus handles module request audio focus;
The focus processing module for audio focus to be supplied to the audio application, and notifies other applications
Lose audio focus;
The audio application when being also used to terminate audio collection, notifies the focus processing module to abandon audio focus;
The focus processing module is also used to the audio focus being supplied to other application program.
11. a kind of audio frequency broadcast system characterized by comprising audio application, hardware abstraction layer, kernel and audio
Playback equipment is configured with audio input output interface in the hardware abstraction layer;
Audio input output interface in the hardware abstraction layer, when for playing audio in response to the audio application
Call request, audio signal to be played is transferred to the kernel;
The kernel, for driving audio-frequence player device to play the audio signal.
12. system according to claim 11, which is characterized in that further include: focus processing module;
The audio application, when for sending call request when playing audio to the audio input output interface, to
The focus handles module request audio focus;
The focus processing module for audio focus to be supplied to the audio application, and notifies other applications
Lose audio focus;
The audio application notifies the focus processing module to abandon audio focus when being also used to terminate audio broadcasting;
The focus processing module is also used to the audio focus being supplied to other application program.
13. a kind of electronic equipment characterized by comprising
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
Audio frequency playing method as described in now any in the audio collection method as described in any in claim 1-4 or 5-8.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
Realized when execution it is any in audio collection method as described in any in claim 1-4 or 5-8 as described in audio broadcasting side
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910244021.0A CN109947387B (en) | 2019-03-28 | 2019-03-28 | Audio acquisition method, audio playing method, system, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910244021.0A CN109947387B (en) | 2019-03-28 | 2019-03-28 | Audio acquisition method, audio playing method, system, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109947387A true CN109947387A (en) | 2019-06-28 |
CN109947387B CN109947387B (en) | 2022-10-21 |
Family
ID=67012251
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910244021.0A Active CN109947387B (en) | 2019-03-28 | 2019-03-28 | Audio acquisition method, audio playing method, system, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109947387B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111142978A (en) * | 2019-12-27 | 2020-05-12 | 杭州涂鸦信息技术有限公司 | Method and system for making call on basis of intelligent voice equipment |
CN111328061A (en) * | 2020-02-28 | 2020-06-23 | 诚迈科技(南京)股份有限公司 | Audio resource control method, vehicle-mounted terminal and system |
CN111596885A (en) * | 2020-07-23 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Audio data processing method, server and storage medium |
CN113518258A (en) * | 2021-05-14 | 2021-10-19 | 北京天籁传音数字技术有限公司 | Low-delay full-scene audio implementation method and device and electronic equipment |
CN113990354A (en) * | 2021-12-29 | 2022-01-28 | 北京鲸鲮信息***技术有限公司 | Audio control method, device, equipment and storage medium based on Linux |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080045140A1 (en) * | 2006-08-18 | 2008-02-21 | Xerox Corporation | Audio system employing multiple mobile devices in concert |
US20110289506A1 (en) * | 2010-05-18 | 2011-11-24 | Google Inc. | Management of computing resources for applications |
CN104007977A (en) * | 2014-06-09 | 2014-08-27 | 威盛电子股份有限公司 | Electronic device and audio playing method |
CN105183446A (en) * | 2015-07-16 | 2015-12-23 | 贵阳语玩科技有限公司 | Audio management system |
CN106293659A (en) * | 2015-05-21 | 2017-01-04 | 阿里巴巴集团控股有限公司 | A kind of audio frequency real-time processing method, device and intelligent terminal |
WO2017177873A1 (en) * | 2016-04-15 | 2017-10-19 | 中兴通讯股份有限公司 | System and method for synchronous audio recording and playing, and storage medium |
CN109144464A (en) * | 2018-08-27 | 2019-01-04 | 歌尔科技有限公司 | A kind of method, apparatus and Android device of audio output |
-
2019
- 2019-03-28 CN CN201910244021.0A patent/CN109947387B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080045140A1 (en) * | 2006-08-18 | 2008-02-21 | Xerox Corporation | Audio system employing multiple mobile devices in concert |
US20110289506A1 (en) * | 2010-05-18 | 2011-11-24 | Google Inc. | Management of computing resources for applications |
CN104007977A (en) * | 2014-06-09 | 2014-08-27 | 威盛电子股份有限公司 | Electronic device and audio playing method |
CN106293659A (en) * | 2015-05-21 | 2017-01-04 | 阿里巴巴集团控股有限公司 | A kind of audio frequency real-time processing method, device and intelligent terminal |
CN105183446A (en) * | 2015-07-16 | 2015-12-23 | 贵阳语玩科技有限公司 | Audio management system |
WO2017177873A1 (en) * | 2016-04-15 | 2017-10-19 | 中兴通讯股份有限公司 | System and method for synchronous audio recording and playing, and storage medium |
CN109144464A (en) * | 2018-08-27 | 2019-01-04 | 歌尔科技有限公司 | A kind of method, apparatus and Android device of audio output |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111142978A (en) * | 2019-12-27 | 2020-05-12 | 杭州涂鸦信息技术有限公司 | Method and system for making call on basis of intelligent voice equipment |
CN111142978B (en) * | 2019-12-27 | 2024-01-30 | 杭州涂鸦信息技术有限公司 | Method and system for making telephone call based on intelligent voice equipment |
CN111328061A (en) * | 2020-02-28 | 2020-06-23 | 诚迈科技(南京)股份有限公司 | Audio resource control method, vehicle-mounted terminal and system |
CN111596885A (en) * | 2020-07-23 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Audio data processing method, server and storage medium |
CN113518258A (en) * | 2021-05-14 | 2021-10-19 | 北京天籁传音数字技术有限公司 | Low-delay full-scene audio implementation method and device and electronic equipment |
CN113990354A (en) * | 2021-12-29 | 2022-01-28 | 北京鲸鲮信息***技术有限公司 | Audio control method, device, equipment and storage medium based on Linux |
Also Published As
Publication number | Publication date |
---|---|
CN109947387B (en) | 2022-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109947387A (en) | Audio collection method, audio frequency playing method, system, equipment and storage medium | |
US7379961B2 (en) | Spatialized audio in a three-dimensional computer-based scene | |
KR100719981B1 (en) | Controlling home entertainment systems using a natural language server | |
CN101969467B (en) | The method that customer service is provided in mirroring device | |
CN108737845A (en) | Processing method, device, equipment and storage medium is broadcast live | |
CN108012173A (en) | A kind of content identification method, device, equipment and computer-readable storage medium | |
CN112272170B (en) | Voice communication method and device, electronic equipment and storage medium | |
CN109166570B (en) | A kind of method, apparatus of phonetic segmentation, equipment and computer storage medium | |
CN109600677A (en) | Data transmission method and device, storage medium, electronic equipment | |
CN107957908A (en) | A kind of microphone sharing method, device, computer equipment and storage medium | |
CN100428128C (en) | Multisystem network, device and method for access to data storage | |
JP7417272B2 (en) | Terminal device, server device, distribution method, learning device acquisition method, and program | |
CN109743528A (en) | A kind of audio collection of video conference and play optimization method, device and medium | |
CN105913698B (en) | Method and device for playing course multimedia information | |
US20240040191A1 (en) | Livestreaming audio processing method and device | |
CN113452853B (en) | Voice interaction method and device, electronic equipment and storage medium | |
CN105306501A (en) | Method and system for performing interactive update on multimedia data | |
CN108153508A (en) | A kind of method and device of audio frequency process | |
CN109901939A (en) | The information source call method and system of High Availabitity | |
CN107659839A (en) | Control method, video searching method, equipment and the system of intelligent terminal | |
WO2020087788A1 (en) | Audio processing method and device | |
WO2024131576A1 (en) | Video processing method and apparatus, and electronic device | |
CN110855832A (en) | Method and device for assisting call and electronic equipment | |
CN109275140A (en) | A kind of information processing method, system and server | |
CN108845879A (en) | A kind of robot resource transfer method, apparatus, server and storage medium |
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 | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20211015 Address after: 100176 101, floor 1, building 1, yard 7, Ruihe West 2nd Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing Applicant after: Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Address before: 100085 Baidu Building, 10 Shangdi Tenth Street, Haidian District, Beijing Applicant before: BAIDU ONLINE NETWORK TECHNOLOGY (BEIJING) Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |