CN116741190A - Audio providing method and device based on android system - Google Patents

Audio providing method and device based on android system Download PDF

Info

Publication number
CN116741190A
CN116741190A CN202210209324.0A CN202210209324A CN116741190A CN 116741190 A CN116741190 A CN 116741190A CN 202210209324 A CN202210209324 A CN 202210209324A CN 116741190 A CN116741190 A CN 116741190A
Authority
CN
China
Prior art keywords
audio
application
microphone
speaker
channel
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.)
Pending
Application number
CN202210209324.0A
Other languages
Chinese (zh)
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.)
Botai Internet Of Vehicles Dalian Co ltd
Original Assignee
Botai Internet Of Vehicles Dalian 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 Botai Internet Of Vehicles Dalian Co ltd filed Critical Botai Internet Of Vehicles Dalian Co ltd
Priority to CN202210209324.0A priority Critical patent/CN116741190A/en
Publication of CN116741190A publication Critical patent/CN116741190A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0208Noise filtering
    • G10L2021/02082Noise filtering the noise being echo, reverberation of the speech

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The invention provides an audio providing method and device based on an android system and a computer readable storage medium. The audio providing method includes the steps of: responding to an audio input focus application of a first upper application with an echo cancellation function or a second upper application without an echo cancellation function, obtaining at least one path of microphone audio and at least one path of corresponding speaker audio in a frame layer of an android system by default, and performing echo cancellation on the microphone audio according to the speaker audio; and transmitting the microphone audio after echo cancellation to the first upper layer application or the second upper layer application according to the audio input focus application. By executing the steps, the audio providing method can reduce the development cost and development difficulty of application of an application layer, reduce the data processing load of the application layer of the android system, and promote the use experience of application programs without customized echo cancellation functions.

Description

Audio providing method and device based on android system
Technical Field
The present invention relates to audio data processing technologies, and in particular, to an audio providing method based on an android system, an audio providing device based on an android system, and a computer readable storage medium.
Background
In various application scenarios involving both a microphone and a speaker, the microphone inevitably captures sound emitted by the speaker, thereby generating echoes and affecting the user experience. In order to cancel the echo collected by the microphone, prior art in this field generally requires that the application developer individually customize for the usage needs of each application. This prior solution requires on the one hand that developers of the respective application repeatedly spend a lot of time, effort and economic resources to develop the respective echo cancellation functions separately, and on the other hand increases the workload of the application and increases the amount of repeated data processing load at the application layer of the android system, thereby affecting the data processing capacity of the android system.
In order to overcome the above-mentioned drawbacks of the prior art, a technology for processing audio data is needed in the art, which is used for reducing development cost and development difficulty of application layer application, reducing data processing load of application layer of android system, and improving use experience of application program without customized echo cancellation function.
Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
In order to overcome the above-mentioned drawbacks of the prior art, the present invention provides an audio providing method based on an android system, an audio providing apparatus based on an android system, and a computer readable storage medium.
Specifically, the audio providing method based on the android system provided by the first aspect of the invention comprises the following steps: responding to an audio input focus application provided by a first upper-layer application with an echo cancellation function or a second upper-layer application without an echo cancellation function, acquiring at least one path of microphone audio and at least one path of corresponding speaker audio at a frame layer of a default android system, and performing echo cancellation on the microphone audio according to the speaker audio; and transmitting the microphone audio after echo cancellation to the first upper layer application or the second upper layer application according to the audio input focus application. By executing the steps, the audio providing method based on the android system can uniformly perform echo cancellation processing on a framework layer of the android system, and then transmit the microphone audio after echo cancellation to an upper layer application, so that the development cost and development difficulty of the application layer application are reduced, the data processing load of the application layer of the android system is reduced, and the use experience of an application program with an undetermined echo cancellation function is improved.
In addition, the audio providing device based on the android system provided by the second aspect of the invention comprises a memory and a processor. The processor is connected to the memory and configured to implement the above-mentioned android system-based audio providing method provided in the first aspect of the present invention. By implementing the audio providing method, the audio providing device can uniformly perform echo cancellation processing on the framework layer of the android system, and then transmit the microphone audio after echo cancellation to the upper layer application, so that the development cost and development difficulty of the application layer application are reduced, the data processing load of the application layer of the android system is reduced, and the use experience of application programs with non-customized echo cancellation functions is improved.
Further, the above-described computer-readable storage medium according to the third aspect of the present invention has stored thereon computer instructions. When the computer instructions are executed by the processor, the audio providing method based on the android system provided by the first aspect of the invention is implemented. By implementing the audio providing method, the computer readable storage medium can uniformly perform echo cancellation processing on the framework layer of the android system, and then transmit the microphone audio after echo cancellation to the upper layer application, thereby reducing the development cost and development difficulty of the application layer application, reducing the data processing load of the application layer of the android system, and improving the use experience of application programs without customized echo cancellation functions.
Drawings
The above features and advantages of the present invention will be better understood after reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
Fig. 1 illustrates an architecture diagram of an android-based audio providing apparatus provided according to some embodiments of the present invention.
Fig. 2 illustrates a flow diagram of an audio providing method based on an android system according to some embodiments of the present invention.
Fig. 3 illustrates a schematic diagram of echo cancellation for microphone audio required for a voice control application provided in accordance with some embodiments of the invention.
Detailed Description
Further advantages and effects of the present invention will become apparent to those skilled in the art from the disclosure of the present specification, by describing the embodiments of the present invention with specific examples. While the description of the invention will be presented in connection with a preferred embodiment, it is not intended to limit the inventive features to that embodiment. Rather, the purpose of the invention described in connection with the embodiments is to cover other alternatives or modifications, which may be extended by the claims based on the invention. The following description contains many specific details for the purpose of providing a thorough understanding of the present invention. The invention may be practiced without these specific details. Furthermore, some specific details are omitted from the description in order to avoid obscuring the invention.
In the description of the present invention, it should be noted that, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In addition, the terms "upper", "lower", "left", "right", "top", "bottom", "horizontal", "vertical" as used in the following description should be understood as referring to the orientation depicted in this paragraph and the associated drawings. This relative terminology is for convenience only and is not intended to be limiting of the invention as it is described in terms of the apparatus being manufactured or operated in a particular orientation.
It will be understood that, although the terms "first," "second," "third," etc. may be used herein to describe various elements, regions, layers and/or sections, these elements, regions, layers and/or sections should not be limited by these terms and these terms are merely used to distinguish between different elements, regions, layers and/or sections. Accordingly, a first component, region, layer, and/or section discussed below could be termed a second component, region, layer, and/or section without departing from some embodiments of the present invention.
As described above, prior echo cancellation techniques generally require that the application developer individually customize the usage requirements of each application. This prior solution requires on the one hand that developers of the respective application repeatedly spend a lot of time, effort and economic resources to develop the respective echo cancellation functions separately, and on the other hand increases the workload of the application and increases the amount of repeated data processing load at the application layer of the android system, thereby affecting the data processing capacity of the android system.
In order to overcome the defects in the prior art, the invention provides an audio providing method based on an android system, an audio providing device based on the android system and a computer readable storage medium, which can uniformly perform echo cancellation processing on a framework layer of the android system and transmit microphone audio after echo cancellation to an upper layer application, thereby reducing development cost and development difficulty of the application layer application, reducing data processing load of the application layer of the android system and improving use experience of an application program without customized echo cancellation function.
In some non-limiting embodiments, the above-mentioned audio providing method based on the android system provided in the first aspect of the present invention may be implemented by the above-mentioned audio providing device based on the android system provided in the second aspect of the present invention. The audio providing device can be configured in various electronic devices with speakers and supporting an android system, such as a car machine, a mobile phone, a tablet personal computer, a palm computer (Personal Digital Assistant, a PDA), a notebook computer, a personal computer (Personal Computer, a PC), a smart watch, a smart bracelet, smart glasses and the like in the form of software programs and/or hardware devices.
Referring further to fig. 1, fig. 1 illustrates an architecture diagram of an audio providing apparatus based on an android system according to some embodiments of the present invention.
As shown in fig. 1, in some embodiments, the audio providing apparatus 10 based on the android system according to the second aspect of the present invention is configured with a memory 11 and a processor 12. The memory 11 includes, but is not limited to, the above-described computer-readable storage medium provided by the third aspect of the present invention, on which computer instructions are stored. The processor 12 is connected to the memory 11 and is configured to execute computer instructions stored on the memory 11 to implement the above-mentioned android system based audio providing method provided in the first aspect of the present invention.
The following describes the operation of the audio providing apparatus 10 configured in the android system of the vehicle in conjunction with some embodiments of the audio providing method. It will be appreciated by those skilled in the art that these audio providing methods are merely some non-limiting embodiments provided by the present invention, and are intended to clearly illustrate the general concepts of the present invention and to provide some specific solutions for public implementation, and are not intended to limit the overall functionality or overall operation of the audio providing apparatus 10. Similarly, the audio providing apparatus 10 is just a non-limiting embodiment of the present invention, and is not limited to the implementation scenario and implementation subject of each step in the audio providing method.
Please refer to fig. 2 and fig. 3 in combination. Fig. 2 illustrates a flow diagram of an audio providing method based on an android system according to some embodiments of the present invention. Fig. 3 illustrates a schematic diagram of echo cancellation for microphone audio required for a voice control application provided in accordance with some embodiments of the invention.
As shown in fig. 2 and 3, in some embodiments of the present invention, the audio providing apparatus 10 may be configured in a framework layer of an android system of a vehicle, and obtain an audio input focus application issued by an application layer of an upper layer, so as to determine whether the application layer needs to use microphone audio.
In particular, the framework layer of the in-car android system may be configured with an audio policy unit (AudioPolicy). When an upper application (e.g., hiCar application) configured on the android application layer of the car needs to use the car microphone to collect the voice of the user, it can apply for a microphone-type audio focus to the android framework layer below. The audio providing apparatus 10 may monitor the audio input focus application issued by each application layer of the voice control application (for example, hiCar), the phone application, the voice call application, the video call application, etc. via the AudioPolicy unit to determine whether each upper layer application needs to use microphone audio.
It can be understood that, as an audio processing technology for uniformly performing echo cancellation processing on a framework layer of an android system and transmitting microphone audio after echo cancellation to an upper application, the upper application supported by the present invention may include a first upper application with an echo cancellation function or a second upper application without an echo cancellation function.
In response to acquiring the audio input focus application provided by the first upper layer application with the echo cancellation function or the second upper layer application without the echo cancellation function, the audio providing apparatus 10 may determine that the upper layer application needs to use microphone audio, thereby acquiring at least one path of microphone audio and at least one path of corresponding speaker audio in a frame layer of the android system by default, and performing echo cancellation on the acquired microphone audio according to the acquired speaker audio.
In particular, the framework layer of the in-car android system may be configured with an Audio hardware abstraction layer (Audio Hardware Abstraction Layer, audio HAL). The Audio HAL is configured at the bottommost layer of the framework layer of the android system and is used for adapting to the Linux layer below the framework layer. In response to acquiring the Audio input focus application of the upper layer application using the microphone, the Audio providing apparatus 10 may uniformly transmit a notification of turning on the echo cancellation function to the Audio HAL via the AudioPolicy unit. In response to the notification of turning on the echo cancellation function, the Audio HAL may obtain, via the Linux layer below, at least one path of microphone Audio collected by the car microphone and at least one path of corresponding speaker Audio output by the car speaker, respectively. Then, the Audio HAL may perform echo cancellation processing on the acquired at least one path of microphone Audio by using the acquired at least one path of speaker Audio as a reference sound.
Further, in some embodiments, the echo cancellation process described above may be implemented based on the channel type of the microphone audio. In particular, audio providing apparatus 10 may parse the acquired audio input focus application to determine the channel type of microphone audio required by the upper layer application. If the required channel type of the microphone Audio belongs to the mono channel type, the Audio HAL only needs to acquire one path of microphone Audio and one path of loudspeaker Audio, and carries out echo cancellation processing on the acquired one path of microphone Audio according to the acquired one path of loudspeaker Audio so as to acquire one path of microphone Audio after echo cancellation. Otherwise, if the required channel type of the microphone Audio belongs to the binaural type, the Audio HAL needs to acquire the microphone Audio of the left and right channels respectively, and acquire the speaker Audio of the left and right channels respectively. Then, the Audio HAL may perform echo cancellation processing on the microphone Audio of the left channel according to the speaker Audio of the left channel, and perform echo cancellation processing on the microphone Audio of the right channel according to the speaker Audio of the right channel, so as to obtain the microphone Audio of the left channel and the microphone Audio of the right channel after echo cancellation, respectively.
In addition, as shown in fig. 2 and 3, in some embodiments of the present invention, a frame layer of the vehicle android system may be further configured with an audio recording unit (AudioRecord). The AudioRecord unit provides a data interaction interface for the framework layer and the application layer application. In response to obtaining the audio input focus application provided by the upper layer application, the audio providing device 10 may newly build a corresponding AudioRecord unit in the framework layer of the android system, and by default, the AudioRecord unit uniformly requests to open at least one downward microphone audio channel and at least one downward speaker audio channel, so as to obtain the microphone audio after echo cancellation and the speaker audio output by the vehicle speaker.
Further, in some embodiments, the above-described procedure of opening the audio channel may also be implemented based on the channel type of the microphone audio. In particular, audio providing apparatus 10 may parse the acquired audio input focus application to determine the channel type of microphone audio required by the upper layer application. If the required channel type of the microphone audio belongs to the mono type, the AudioRecord unit only needs to open one downward microphone audio channel and one downward speaker audio channel. Then, the AudioRecord unit can obtain the microphone Audio after echo cancellation and the speaker Audio output by the vehicle speaker from the audiohal through the opened microphone Audio channel and the speaker Audio channel respectively.
Otherwise, if the channel type of the required microphone audio belongs to the binaural type, the AudioRecord unit needs to open the left microphone audio channel and the right microphone audio channel and the left speaker audio channel respectively. The AudioRecord unit may then obtain left and right microphone Audio after echo cancellation from the audiohal via the left and right microphone Audio channels that are opened, respectively. In addition, the AudioRecord unit can also obtain left and right speaker Audio output by the vehicle speaker from the audiohal through the left and right speaker Audio channels which are opened.
Further, as shown in fig. 2 and 3, in some embodiments, the frame layer of the vehicle android system may be further configured with an audio management unit (audioplayer). The AudioRecord unit performs data interaction with the audiohal through the AudioFlinger unit. In response to acquiring the Audio input focus application provided by the upper layer application, the Audio providing device 10 may control the audioplayer unit to acquire the microphone Audio after echo cancellation and the speaker Audio output by the vehicle speaker from the audiohal, and transmit the microphone Audio after echo cancellation and the speaker Audio to the AudioRecord unit through at least one microphone Audio channel and at least one speaker Audio channel opened by the AudioRecord unit.
As shown in fig. 2 and 3, in some embodiments of the present invention, after obtaining the echo-cancelled microphone Audio and the speaker Audio output by the speaker of the vehicle, the Audio providing apparatus 10 may transmit the echo-cancelled microphone Audio to the first upper layer application or the second upper layer application that sends the Audio input focus application according to the Audio input focus application, so that the echo-cancelled microphone Audio is used by the Audio providing apparatus to perform applications such as voice recognition and voice communication.
Specifically, the AudioRecord unit configured in the android system framework layer may first analyze an audio input focus application of an upper layer application to determine the number of audio channels requested by the audio input focus application, and then determine whether the upper layer application has an echo cancellation function according to the number of audio channels requested by the audio input focus application.
If the upper layer application using the microphone has an echo cancellation function, the audio input focus application provided by the upper layer application indicates at least one path of microphone audio and at least one path of corresponding speaker audio. At this time, the AudioRecord unit may transmit the microphone audio after echo cancellation in the at least one microphone audio channel and the speaker audio in the at least one speaker audio channel to the first upper layer application together according to the audio input focus application provided by the first upper layer application.
If the upper layer application using the microphone does not customize the echo cancellation function, the audio input focus application provided by the upper layer application only indicates at least one path of microphone audio. At this time, the AudioRecord unit may remove at least one path of speaker Audio channel from the microphone Audio obtained by the audiohal after the echo is removed and the speaker Audio output by the vehicle speaker according to the Audio input focus application provided by the second upper layer application, and use a preconfigured algorithm for removing speaker Audio, so as to obtain at least one path of pure microphone Audio after the echo is removed.
For example, for audio data of mono type, the audio providing apparatus 10 may use an algorithm pre-configured in the AudioRecord unit to remove the speaker audio via the speaker audio channel and speaker audio therein to obtain the echo-cancelled microphone audio returned via the microphone audio channel.
For another example, for the audio data of the binaural type, the audio providing apparatus 10 may use an algorithm pre-configured in the AudioRecord unit to remove the left and right speaker audio channels and the left and right speaker audio therein, so as to obtain the left and right microphone audio from which the echo is removed, which is returned via the left and right microphone audio channels.
After obtaining the pure microphone audio after echo cancellation, the audio providing apparatus 10 may transmit the microphone audio after echo cancellation to a second upper layer application that issues the audio input focus application, through a data interaction interface between the framework layer and the application layer application provided by the AudioRecord unit, so that the application such as voice recognition, voice communication, etc. can be performed by directly using the microphone audio after echo cancellation.
Therefore, whether the echo cancellation function is customized by the upper layer application of the audio input focus application or not is judged, the method and the device can transmit the microphone audio after echo cancellation meeting the requirements of the upper layer application to each upper layer application according to the audio input focus application, so that the development cost and the development difficulty of the application layer application are reduced, the data processing load of the application layer of the android system is reduced, and the use experience of an application program with the echo cancellation function which is not customized is improved.
It will be appreciated by those skilled in the art that the above-mentioned audio providing apparatus 10 configured in the android system of the vehicle is merely some non-limiting embodiments provided by the present invention, and is intended to clearly illustrate the main concept of the present invention and provide some specific solutions for public implementation, not to limit the scope of the present invention.
Optionally, in other embodiments, the audio providing apparatus provided in the second aspect of the present invention may be further configured in various electronic devices with speakers and supporting an android system, such as a mobile phone, a tablet computer, a palm computer, a notebook computer, a personal computer, a smart watch, a smart bracelet, and a smart glasses, and the audio providing method based on the android system provided in the first aspect of the present invention is implemented to achieve the same technical effects, which is not described herein in detail.
The invention can directly apply the microphone audio after echo cancellation to the upper application layer by configuring the function of uniformly performing echo cancellation processing on the android system framework layer. Therefore, the android system adopting the scheme does not need to customize and execute the echo cancellation processing function respectively for each application layer application, so that the development cost and development difficulty of the application layer application can be reduced, the use experience of an application program with the echo cancellation function which is not customized can be improved, the data processing load of the application layer of the android system can be reduced, and the redundant data processing load caused by repeatedly executing the echo cancellation processing function for each application layer application can be reduced, so that the performance of the android system can be further improved.
While, for purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it is to be understood and appreciated that the methodologies are not limited by the order of acts, as some acts may, in accordance with one or more embodiments, occur in different orders and/or concurrently with other acts from that shown and described herein or not shown and described herein, as would be understood and appreciated by those skilled in the art.
Those of skill in the art would understand that information, signals, and data may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
Although the audio providing apparatus 10 described in the above embodiment may be implemented by a combination of software and hardware. It will be appreciated that the audio providing apparatus 10 may also be implemented solely in software or hardware. For hardware implementation, the audio providing apparatus 10 may be implemented in one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic devices for performing the functions described above, or a selected combination of the above. For software implementation, the audio providing apparatus 10 may be implemented by individual software modules, such as program modules (procedures) and function modules (functions), running on a common chip, each of which performs one or more of the functions and operations described herein.
The various illustrative logical modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. An audio providing method based on an android system is characterized by comprising the following steps:
responding to an audio input focus application of a first upper application with an echo cancellation function or a second upper application without an echo cancellation function, obtaining at least one path of microphone audio and at least one path of corresponding speaker audio in a frame layer of an android system by default, and performing echo cancellation on the microphone audio according to the speaker audio; and
and transmitting the microphone audio after echo cancellation to the first upper layer application or the second upper layer application according to the audio input focus application.
2. The audio providing method as claimed in claim 1, wherein the frame layer is configured with an audio abstraction layer, the step of obtaining at least one path of microphone audio and at least one path of corresponding speaker audio at the frame layer of the android system by default, and performing echo cancellation on the microphone audio according to the speaker audio comprises:
acquiring the at least one path of microphone audio and the at least one path of corresponding loudspeaker audio by the audio abstraction layer; and
and performing echo cancellation on the microphone audio according to the loudspeaker audio at the audio abstraction layer.
3. The audio providing method of claim 2, wherein the step of obtaining, by the audio abstraction layer, the at least one path of microphone audio, and the at least one path of corresponding speaker audio comprises:
and the audio abstraction layer acquires the at least one path of microphone audio and the at least one path of corresponding loudspeaker audio from the Linux layer below.
4. The audio providing method as claimed in claim 2, wherein the frame layer is further configured with an audio recording unit, and the transmitting the echo-cancelled microphone audio to the first upper layer application or the second upper layer application according to the audio input focus application comprises:
responsive to the audio input focus application provided by the second upper layer application, requesting, by default, by the audio recording unit to open at least one microphone audio channel and at least one speaker audio channel;
acquiring microphone audio after echo cancellation and the loudspeaker audio from the audio abstraction layer through the at least one microphone audio channel and the at least one loudspeaker audio channel; and
and removing the at least one path of loudspeaker audio channels by the audio recording unit, and transmitting the microphone audio after echo cancellation in the at least one path of microphone audio channels to the second upper layer application.
5. The audio providing method as claimed in claim 4, wherein the transmitting the echo-cancelled microphone audio to the first upper layer application or the second upper layer application according to the audio input focus application further comprises:
responsive to the audio input focus application provided by the first upper layer application, requesting, by default, by the audio recording unit to open at least one microphone audio channel and at least one speaker audio channel;
acquiring microphone audio after echo cancellation and the loudspeaker audio from the audio abstraction layer through the at least one microphone audio channel and the at least one loudspeaker audio channel; and
transmitting, by the audio recording unit, the echo cancelled microphone audio in the at least one microphone audio channel and the speaker audio in the at least one speaker audio channel together to the first upper layer application.
6. The audio providing method as claimed in claim 4 or 5, wherein the step of requesting, by default, by the audio recording unit, opening of at least one microphone audio channel, and at least one speaker audio channel comprises:
determining a channel type of the microphone audio of the audio input focus application;
responding to the channel type of the microphone audio as two-channel audio, and requesting to open left and right microphone audio channels and left and right speaker audio channels by the audio recording unit by default; and
in response to the channel type of the microphone audio being mono audio, opening one of the microphone audio channels and one of the speaker audio channels is requested by default by the audio recording unit.
7. The audio providing method of claim 4 or 5, wherein the frame layer is further configured with an audio management unit, the step of requesting, by default, by the audio recording unit to open at least one microphone audio channel, and at least one speaker audio channel, comprises:
requesting, by the audio recording unit, the audio management unit to open the at least one microphone audio channel and the at least one speaker audio channel.
8. The audio providing method of claim 7, wherein the obtaining the echo cancelled microphone audio and the speaker audio from the audio abstraction layer via the at least one microphone audio channel and the at least one speaker audio channel comprises:
the audio management unit obtains the microphone audio after echo cancellation and the speaker audio from the audio abstraction layer, and transmits the microphone audio after echo cancellation and the speaker audio to the audio recording unit through the at least one path of microphone audio channel and the at least one path of speaker audio channel.
9. The audio providing method of claim 4 or 5, wherein the framework layer is further configured with an audio policy unit, the audio providing method further comprising the steps of:
obtaining, by the audio policy unit, the audio input focus application from at least one of the upper layer applications of an application layer; and
and in response to obtaining the audio input focus application, notifying the audio abstraction layer to turn on an echo cancellation function by the audio policy unit.
10. The audio providing method of claim 1, wherein the upper layer application comprises at least one of a voice control application, a telephony application, a voice call application, and a video call application.
11. An audio providing apparatus based on an android system, comprising:
a memory; and
a processor connected to the memory and configured to implement the android system based audio providing method of any one of claims 1 to 10.
12. A computer readable storage medium having stored thereon computer instructions, which when executed by a processor, implement the android system based audio providing method of any of claims 1 to 10.
CN202210209324.0A 2022-03-03 2022-03-03 Audio providing method and device based on android system Pending CN116741190A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210209324.0A CN116741190A (en) 2022-03-03 2022-03-03 Audio providing method and device based on android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210209324.0A CN116741190A (en) 2022-03-03 2022-03-03 Audio providing method and device based on android system

Publications (1)

Publication Number Publication Date
CN116741190A true CN116741190A (en) 2023-09-12

Family

ID=87908513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210209324.0A Pending CN116741190A (en) 2022-03-03 2022-03-03 Audio providing method and device based on android system

Country Status (1)

Country Link
CN (1) CN116741190A (en)

Similar Documents

Publication Publication Date Title
US11907604B2 (en) Screen mirroring display method using layer orders of target controls and electronic device
CN105549819B (en) The display methods and device of background application information
JP2021166391A (en) Operational change of companion communication device on the basis of state of wearable device
CN108076226B (en) Method for adjusting call quality, mobile terminal and storage medium
US20170245032A1 (en) Electronic device having side acoustic emission speaker device
EP2749988B1 (en) Method and device for application program operation, mobile terminal
CN108052312B (en) Method for realizing multi-channel recording based on android system and audio system
CN105100059A (en) Method, device and system for processing high-concurrent requests
US20230325072A1 (en) Split-screen display method and apparatus
CN111147660B (en) Control operation method and electronic equipment
TW201719631A (en) System for voice capture via nasal vibration sensing
TW201712673A (en) Noise reduction for electronic devices
CN106126172A (en) A kind of sound effect treatment method and mobile terminal
CN109841214A (en) Voice wakes up processing method, device and storage medium
CN106878883A (en) Speaker unit and the electronic equipment including the speaker unit
US20230142593A1 (en) Conference speech enhancement method, apparatus, and system
JP6706633B2 (en) System and method for improving call quality
CN106126183A (en) Electronic equipment and audio-frequency processing method
CN108763139A (en) A kind of control method and device of I2C communications
CN116741190A (en) Audio providing method and device based on android system
KR101402869B1 (en) Method and system for processing audio signals in a central audio hub
CN107273087B (en) Audio input/output system, equipment and method based on Type-C interface
CN116450082A (en) Cabin domain controller, software architecture thereof, intelligent cabin system and vehicle
EP4152756A1 (en) Device recommendation method and electronic device
CN114786116A (en) Sound processing method of conference all-in-one machine, conference all-in-one machine 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