CN113672191A - Audio playing method and device - Google Patents

Audio playing method and device Download PDF

Info

Publication number
CN113672191A
CN113672191A CN202110937230.0A CN202110937230A CN113672191A CN 113672191 A CN113672191 A CN 113672191A CN 202110937230 A CN202110937230 A CN 202110937230A CN 113672191 A CN113672191 A CN 113672191A
Authority
CN
China
Prior art keywords
audio
audio output
playing
information
output 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
CN202110937230.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.)
Vivo Mobile Communication Hangzhou Co Ltd
Original Assignee
Vivo Mobile Communication Hangzhou 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 Vivo Mobile Communication Hangzhou Co Ltd filed Critical Vivo Mobile Communication Hangzhou Co Ltd
Priority to CN202110937230.0A priority Critical patent/CN113672191A/en
Publication of CN113672191A publication Critical patent/CN113672191A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Abstract

The application discloses an audio playing method and device, and belongs to the technical field of communication. The method mainly comprises the steps that under the condition that the method is connected with first audio output equipment and the first audio output equipment is controlled to play first audio, environment information of the environment where the electronic equipment is located is obtained; under the condition of acquiring the second audio, determining application scene information of the electronic equipment according to the environment information; determining target audio output equipment corresponding to the application scene information according to the application scene information of the electronic equipment, wherein the target audio output equipment comprises first audio output equipment or the electronic equipment; and displaying first information, wherein the first information is used for prompting that the equipment playing the second audio is the target audio output equipment.

Description

Audio playing method and device
Technical Field
The present application belongs to the field of communication technologies, and in particular, to an audio playing method and apparatus.
Background
With the development of electronic device technology, audio can be played through electronic devices and audio output devices connected with the electronic devices, such as bluetooth speakers, wireless earphones, wired earphones and the like. However, the current way of playing audio through the electronic device and the audio output device is not suitable in some scenarios, such as when the electronic device or the audio output device is playing audio a and the electronic device receives audio B, the user is required to manually select the device for playing audio B. Thus, user operation is increased, and the efficiency of audio playing is reduced.
Disclosure of Invention
An embodiment of the present application provides an audio playing method, an audio playing apparatus, an audio playing device, and a storage medium, which can solve the problems of low audio playing efficiency and complicated user operation at present.
In a first aspect, an embodiment of the present application provides an audio playing method, which is applied to an electronic device, and the method may include:
the method comprises the steps that under the condition that the electronic equipment is connected with first audio output equipment and the first audio output equipment is controlled to play first audio, environment information of the environment where the electronic equipment is located is obtained;
under the condition of acquiring the second audio, determining application scene information of the electronic equipment according to the environment information;
determining target audio output equipment corresponding to the application scene information according to the application scene information of the electronic equipment, wherein the target audio output equipment comprises first audio output equipment or the electronic equipment;
and displaying first information, wherein the first information is used for prompting that the equipment playing the second audio is the target audio output equipment.
In a second aspect, an embodiment of the present application provides an audio playing apparatus, which is applied to an electronic device, and the apparatus may include:
the acquisition module is used for acquiring the environmental information of the environment where the electronic equipment is located under the condition that the acquisition module is connected with the first audio output equipment and controls the first audio output equipment to play the first audio;
the determining module is used for determining application scene information of the electronic equipment according to the environment information under the condition of acquiring the second audio;
the processing module is used for determining target audio output equipment corresponding to the application scene information according to the application scene information of the electronic equipment, and the target audio output equipment comprises first audio output equipment or the electronic equipment;
and the display module is used for displaying first information, and the first information is used for prompting that the equipment for playing the second audio is the target audio output equipment.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, where the program or instructions, when executed by the processor, implement the steps of the audio playing method as shown in the first aspect.
In a fourth aspect, the present application provides a readable storage medium, on which a program or instructions are stored, and when executed by a processor, the program or instructions implement the steps of the audio playing method as shown in the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the steps of the audio playing method as shown in the first aspect.
In the embodiment of the application, the environment information of the environment where the electronic device is located is acquired under the condition that the first audio output device is connected and is controlled to play the first audio. And under the condition of acquiring the second audio, determining application scene information of the electronic equipment through the environment information, and determining target audio output equipment corresponding to the application scene information according to the application scene information. Therefore, when the electronic equipment or the audio output equipment plays audio and the electronic equipment receives new audio, the target audio output equipment for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the equipment for playing the new audio, the user operation is reduced, and the audio playing efficiency is improved.
Drawings
Fig. 1 is a schematic diagram of a control architecture according to an embodiment of the present application;
fig. 2 is a second schematic diagram of a control architecture according to an embodiment of the present application;
fig. 3 is a flowchart of an audio playing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an audio playing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
Based on this, the following describes in detail the audio playing method provided by the embodiment of the present application through a specific embodiment and an application scenario thereof with reference to fig. 1 to fig. 2.
The embodiment of the present application provides an audio playing architecture, as shown in fig. 1, the audio playing architecture may include an electronic device 10 and a first audio output device 11. The electronic device 10 is connected to the first audio output device 11, and the connection mode may be bluetooth connection or wired connection. The first audio output 11 may be an audio output device capable of playing audio, such as a bluetooth speaker, a wired speaker, a car speaker, a bluetooth headset, or a wired headset. It should be noted that the second audio output device may be a plurality of audio output devices.
Based on the architecture shown in fig. 1, the audio playing method provided by the embodiment of the present application is described in the embodiment of the present application according to the electronic device 10 and the first audio output device 11.
1) When the electronic device 10 is connected to the first audio output device 11, such as a bluetooth speaker, and the electronic device 10 controls the bluetooth speaker to play the first audio, such as a song, the environment information of the environment where the electronic device 10 is located is obtained. Next, in a case where the electronic device 10 acquires a second audio, such as an incoming call audio, application scenario information of the electronic device 10 is determined according to the environment information, where the application scenario information includes private application scenario information or non-private application scenario information. Furthermore, the electronic device 10 determines a target audio output device corresponding to the application scenario information according to the application scenario information of the electronic device, wherein if the application scenario information is the privacy application scenario information, the electronic device 10 is determined to be the target audio output device; otherwise, if the application scene information is the non-privacy application scene information, the Bluetooth sound box is determined to be the target audio output device. And then, displaying first information, wherein the first information is used for prompting that the equipment playing the second audio is the target audio output equipment.
Further, if the target audio output device is a bluetooth sound box, the electronic device may control the bluetooth sound box to stop playing the first audio, and control the first audio output device to play the second audio. If the target audio output device is an electronic device, the electronic device may determine the number of the audio output channels, and when it is detected that the number of the audio output channels is 2, determine, according to the application scene information, an output channel for playing the second audio from among the 2 audio output channels, such as a headphone audio output channel and a speaker audio output channel, if the application scene information is the privacy application scene information, determine the headphone audio output channel as the audio output channel for playing the second audio, and otherwise, if the application scene information is the non-privacy application scene information, determine the speaker audio output channel as the audio output channel for playing the second audio.
2) And acquiring the environment information of the environment where the electronic device 10 is located under the condition that the electronic device 10 plays the fourth audio such as audio and video A and is connected with the first audio output device 11 such as a Bluetooth sound box, and the electronic device 10 controls the Bluetooth sound box to play the first audio such as a song. Next, when the electronic device 10 acquires a second audio, such as an incoming call audio, the application scenario information of the electronic device 10 is determined according to the environment information, where the application scenario information includes private application scenario information or non-private application scenario information. Furthermore, the electronic device 10 determines a target audio output device corresponding to the application scenario information according to the application scenario information of the electronic device, wherein if the application scenario information is the privacy application scenario information, the electronic device 10 is determined to be the target audio output device; otherwise, if the application scene information is the non-privacy application scene information, the Bluetooth sound box is determined to be the target audio output device. And then, displaying first information, wherein the first information is used for prompting that the equipment playing the second audio is the target audio output equipment.
Further, if the target audio output device is a bluetooth sound box, the electronic device may control the bluetooth sound box to stop playing the first audio, and control the first audio output device to play the second audio. If the target audio output device is the electronic device, the electronic device may determine the number of the audio output channels, and determine the audio output channels other than the audio output channel playing the fourth audio as the audio output channels playing the second audio when detecting that the number of the audio output channels is 2; or, according to the application scene information, determining an audio output channel for playing the second audio from among the 2 audio output channels, such as the earpiece audio output channel and the speaker audio output channel, if the application scene information is the privacy application scene information, determining the earpiece audio output channel as the audio output channel for playing the second audio, otherwise, if the application scene information is the non-privacy application scene information, determining the speaker audio output channel as the audio output channel for playing the second audio, where if the audio output channel for playing the fourth audio is the earpiece audio output channel and the application scene information is the privacy application scene information, the earpiece audio output channel may be controlled to stop playing the third audio, and the earpiece audio output channel is controlled to play the second audio, and the speaker audio output channel is the same, and is not repeated here.
In addition, based on the above-mentioned architecture shown in fig. 1, if the first audio output device 11 is an earphone, the earphone is in a wearing state, and the application scene information is the privacy application scene information, it is determined that the playing earphone is the target audio output device; on the contrary, if the application scene information is the non-privacy application scene information, the electronic device is determined to be the target audio output device. If the first audio output device 11 is an earphone, the earphone is in an unworn state, and the application scene information is the privacy application scene information, determining that a receiver audio output channel of the electronic device plays the second audio; on the contrary, if the application scene information is the non-privacy application scene information, determining that the second audio playing channel is the loudspeaker audio output channel of the electronic equipment.
Therefore, based on the architecture shown in fig. 1, in the case of connecting with the first audio output device and controlling the first audio output device to play the first audio, the environment information of the environment where the electronic device is located is acquired. And under the condition of acquiring the second audio, determining application scene information of the electronic equipment through the environment information, and determining target audio output equipment corresponding to the application scene information according to the application scene information. Therefore, when the electronic equipment or the audio output equipment plays audio and the electronic equipment receives new audio, the target audio output equipment for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the equipment for playing the new audio, the user operation is reduced, and the audio playing efficiency is improved.
In addition, the embodiment of the present application proposes another audio playing architecture, as shown in fig. 2, the audio playing architecture may include an electronic device 10, a first audio output device 11, and a second audio output device 12. The electronic device 10 is connected to the first audio output device 11 and the second audio output device 12, and the connection mode may be bluetooth connection or wired connection. The first audio output 11 or the second audio output 12 may be an audio output device capable of playing audio, such as a bluetooth speaker, a wired speaker, a car speaker, a bluetooth headset, and a wired headset.
Based on the architecture shown in fig. 2, in the embodiment of the present application, an audio playing method provided in the embodiment of the present application is described according to the electronic device 10, the first audio output device 11, and the second audio output device 12.
1) Under the condition that the electronic device 10 is connected with the first audio output device 11, such as a bluetooth speaker, the electronic device 10 controls the bluetooth speaker to play the first audio, such as a song, and the electronic device 10 is connected with the second audio output device 12, such as a bluetooth headset, the environment information of the environment where the electronic device 10 is located is acquired. Next, when the electronic device 10 acquires a second audio, such as an incoming call audio, the application scenario information of the electronic device 10 is determined according to the environment information, where the application scenario information includes private application scenario information or non-private application scenario information. Furthermore, the electronic device 10 determines a target audio output device corresponding to the application scenario information according to the application scenario information of the electronic device, wherein if the application scenario information is the privacy application scenario information, the electronic device 10 or the bluetooth headset is determined as the target audio output device, here, the electronic device 10 further acquires the state information of the bluetooth headset, determines the bluetooth headset as the target audio output device when detecting that the state information of the bluetooth headset is in a wearing state, and determines the electronic device 10 as the target audio output device when detecting that the state information of the bluetooth headset is in an unworn state. Otherwise, if the application scene information is the non-privacy application scene information, the Bluetooth sound box is determined to be the target audio output device. And then, displaying first information, wherein the first information is used for prompting that the equipment playing the second audio is the target audio output equipment.
Further, if the target audio output device is a bluetooth sound box, the electronic device may control the bluetooth sound box to stop playing the first audio, and control the first audio output device to play the second audio. If the target audio output device is an electronic device, the electronic device may determine the number of the audio output channels, and when it is detected that the number of the audio output channels is 2, determine, according to the application scenario information, an output channel for playing a second audio from among the 2 audio output channels, such as a receiver audio output channel and a speaker audio output channel, where, if the application scenario information is privacy application scenario information and the state information of the bluetooth headset is an unworn state, the receiver audio output channel may be determined as the audio output channel for playing the second audio, and, conversely, if the application scenario information is non-privacy application scenario information, the speaker audio output channel may be determined as the audio output channel for playing the second audio.
2) When the electronic device 10 plays the fifth audio, the electronic device 10 is connected to the first audio output device 11, such as a bluetooth speaker, and the electronic device 10 controls the bluetooth speaker to play the first audio, such as a song, and the electronic device 10 is connected to the second audio output device 12, such as a bluetooth headset, at the same time, the environment information of the environment where the electronic device 10 is located is obtained. Next, when the electronic device 10 acquires a second audio, such as an incoming call audio, the application scenario information of the electronic device 10 is determined according to the environment information, where the application scenario information includes private application scenario information or non-private application scenario information. Furthermore, a target audio output device corresponding to the application scene information is determined according to the application scene information of the electronic device, wherein if the application scene information is the privacy application scene information, the electronic device 10 or the bluetooth headset is determined as the target audio output device, here, further, the electronic device 10 acquires the state information of the bluetooth headset, determines the bluetooth headset as the target audio output device when detecting that the state information of the bluetooth headset is in a wearing state, and determines the electronic device 10 as the target audio output device when detecting that the state information of the bluetooth headset is in an unworn state. Otherwise, if the application scene information is the non-privacy application scene information, the Bluetooth sound box is determined to be the target audio output device. And then, displaying first information, wherein the first information is used for prompting that the equipment playing the second audio is the target audio output equipment.
Further, if the target audio output device is a bluetooth sound box, the electronic device may control the bluetooth sound box to stop playing the first audio, and control the first audio output device to play the second audio. If the target audio output device is an electronic device, the electronic device may determine the number of audio output channels, and when it is detected that the number of audio output channels is 2, determine, according to the application scenario information, an output channel for playing a second audio from among the 2 audio output channels, such as a headphone audio output channel and a speaker audio output channel, and when the application scenario information is the privacy application scenario information, the state information of the bluetooth headset is the unworn state, and the speaker audio output channel plays a fifth audio, determine the headphone audio output channel as the audio output channel for playing the second audio; when the application scene information is the privacy application scene information, the state information of the Bluetooth headset is in the non-wearing state, and the earphone audio output channel plays the fifth audio, the earphone audio output channel can be controlled to stop playing the fifth audio, and the earphone audio output channel is controlled to play the second audio. If the application scene information is the non-privacy application scene information, determining the audio output channel of the loudspeaker as an audio output channel for playing the second audio; if the application scene information is the non-privacy application scene information and the speaker audio output channel plays the fifth audio, the speaker audio output channel can be controlled to stop playing the fifth audio and to play the second audio.
It should be noted that the audio output channel in the embodiment of the present application may be an output channel for playing audio in the same audio output device, such as a receiver audio output channel and a speaker audio output channel in an electronic device, and of course, may also be an audio output channel of different audio output devices, such as an output channel for playing audio by switching from a speaker audio output channel to a bluetooth (or wireless) headset.
In summary, an embodiment of the present application provides an audio playing method, where environment information of an environment where an electronic device is located is obtained when the audio playing method is connected to a first audio output device and a second audio output device and controls the first audio output device to play a first audio. Under the condition of acquiring the second audio, determining application scene information of the electronic device through the environment information, and determining a target audio output device corresponding to the application scene information according to the application scene information, where the target audio output device may include the electronic device, the first audio output device, or the second audio output device. Therefore, when the electronic equipment or the multiple audio output devices play audio and the electronic equipment receives new audio, the target audio output device for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the device for playing the new audio from the multiple devices, the user operation is reduced, and the audio playing efficiency is improved.
It should be noted that the control method provided in the embodiment of the present application can be applied to a scene played by multiple audios based on the electronic device and one audio output device connected to the electronic device. The method can also be applied to scenes played by a plurality of audios based on the electronic equipment and a plurality of audio output devices connected with the electronic equipment. Of course, the method can also be applied to at least one audio playing scene based on the electronic equipment and one audio output equipment connected with the electronic equipment. And a scene applied to at least one audio play based on the electronic device and a plurality of audio output devices connected to the electronic device.
According to the above architectures 1 and 2 and the application scenario, the following describes in detail the audio playing method provided by the embodiment of the present application with reference to fig. 3, respectively.
Fig. 3 is a flowchart of an audio playing method according to an embodiment of the present application.
As shown in fig. 3, the control method may be applied to the electronic device shown in fig. 1 or fig. 2, and based on this, may specifically include the following steps:
step 310, in a situation that the first audio output device is connected and the first audio output device is controlled to play the first audio, obtaining environment information of an environment where the electronic device is located. And 320, determining application scene information of the electronic equipment according to the environment information under the condition of acquiring the second audio. Step 330, determining a target audio output device corresponding to the application scene information according to the application scene information of the electronic device, where the target audio output device includes the first audio output device or the electronic device. Step 340, displaying first information, where the first information is used to prompt the device playing the second audio to be the target audio output device.
In this way, the environment information of the environment where the electronic device is located is obtained under the condition that the electronic device is connected with the first audio output device and the first audio output device is controlled to play the first audio. And under the condition of acquiring the second audio, determining application scene information of the electronic equipment through the environment information, and determining target audio output equipment corresponding to the application scene information according to the application scene information. Therefore, when the electronic equipment or the audio output equipment plays audio and the electronic equipment receives new audio, the target audio output equipment for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the equipment for playing the new audio, the user operation is reduced, and the audio playing efficiency is improved.
The above steps are described in detail below, specifically as follows:
first, in one or more optional embodiments, step 310 may specifically include: the environmental audio of the environment where the electronic device is located is collected by turning on a recording device such as a microphone, for example, the environmental audio is collected at a first preset time interval. The method includes the steps that an environment image is obtained through a camera (such as a front camera or a rear camera) in the electronic device, if the electronic device does not move and the camera is not shielded, the environment video is recorded or the environment image is shot, if the environment video is recorded, each frame of image in the environment video can be determined to be the environment image, of course, the environment image can also be collected according to a second preset time interval, and the second preset time interval can be the same as or different from the first preset time interval. Then, at least one of the following: the environmental audio and the environmental image are determined as the environmental information.
It should be noted that, the steps of collecting the environmental audio by the audio device and acquiring the image information by the camera may be executed when the user authorizes the electronic device. In the embodiment of the application, in order to ensure the privacy of the user, the environment information may not be sent to the server, but only stored locally, and after the target audio output device is determined, the environment information may be deleted.
In addition, in another or various alternative embodiments, before the environment information is acquired, the running state of the application program in the electronic device may be acquired, for example, in a case that the running state of the music player application program is running and playing music (or controlling an audio output device connected to the electronic device to play music), the environment audio a of the electronic device may be acquired, the audio of the music in the environment audio a is filtered, the environment audio B is obtained, and the environment audio B is determined as the environment information in step 320, so that the accuracy of the environment information acquired by the electronic device may be ensured.
Next, the detailed description of determining the application scene information of the electronic device is performed through step 320 according to different environment information, such as the environment audio, the environment image, and the environment audio and the environment image.
In one or more alternative embodiments, when the environmental information includes environmental audio, step 320 may specifically include:
performing voice recognition on the environmental audio to obtain first result information;
determining application scene information of the electronic equipment as privacy application scene information under the condition that the first result information meets a first preset condition; wherein the content of the first and second substances,
the first preset condition includes at least one of: the noise in the environmental audio is less than or equal to a first preset threshold, the environmental audio includes preset voice audio such as audio of a user holding the electronic device (or audio of a preset user stored in the electronic device), the environmental audio does not include first preset object such as audio of a user holding the electronic device, the number of sounding objects identified in the environmental audio is greater than or equal to a second preset threshold such as audio of a plurality of users, and the volume of the environmental audio is less than or equal to a third preset threshold.
In another or various alternative embodiments, when the environment information includes an environment image, step 320 may specifically include:
carrying out image recognition on the environment image to obtain second result information;
determining the application scene of the electronic equipment as privacy application scene information under the condition that the second result information meets a second preset condition; wherein the content of the first and second substances,
the second preset condition includes at least one of: the environment image includes images of a plurality of users such as facial images of the plurality of users, the face image of a second preset object not included in the environment image such as a facial image of a user holding the electronic device (or a facial image of a preset user stored in the electronic device), the object in the environment image such as a plurality of computers and office chairs in an office environment (or a projector and a plurality of office chairs in a conference environment, and objects such as a sofa and a bookshelf in a home environment), the environment image includes the second preset object, and the second preset object wears an audio output device such as a facial image of a user holding the electronic device (or a facial image of a preset user stored in the electronic device), and the audio output device such as a headset is determined at the ear position.
In still another or various alternative embodiments, when the environment information includes the environment audio and the environment image, step 320 may specifically refer to the above example, and will not be described herein again. It should be noted that, the step of acquiring the environmental audio and the environmental image may be acquiring sequentially or acquiring simultaneously, which is not limited herein.
Therefore, according to the environment audio and the environment image, the application scene information of the current electronic equipment is judged by using the existing artificial intelligence, for example, the privacy application scene information such as a conference scene, a public transportation scene and the like not only comprises the own scene of the user and the scene that the user needs to keep secret, but also the non-privacy application scene information such as a game scene, a home scene and the like comprises the own scene of the user and the scene that the user does not need to keep secret. Of course, in the embodiment of the application, the application scenario information may be determined according to the usage information of the electronic device used by the user, that is, the usage habit information of the user, for example, the ring mode of the electronic device is adjusted to the mute mode at 10 am to 12 am by the habit of the user, and the application scenario information may be determined to be a conference scenario. Of course, in addition to the above-described determination of the application context information by itself, it is also possible to notify that the application context information is determined from the environment information and the use information of the electronic device used by the user.
Further, the target audio output device may be determined through step 330 according to application context information with different attributes, such as private application context information or non-private application context information.
In one or more optional embodiments, when the application context information is private application context information, step 330 may specifically include:
determining the electronic equipment as target audio output equipment, and controlling a first target audio output channel of the electronic equipment to play second audio;
or, under the condition that the first audio output device is detected to be in the preset state, determining that the first audio output device is the target audio output device; wherein the preset state comprises at least one of the following: the wearing state of the user and the distance between the user and the user are smaller than or equal to a fourth preset threshold.
For example, if the first audio output device, such as a bluetooth (wired) headset, is worn by the user, it may be determined that the first audio output device is the target audio output device, and conversely, if the first audio output device is not worn by the user, it may be determined that the electronic device is the target audio output device. In addition, if the distance between the first audio output device, such as a bluetooth (wired) speaker, and the user is less than or equal to a fourth preset threshold, the bluetooth (wired) speaker may be controlled to play the second audio at a third preset volume.
Further, since the target audio output device includes different numbers of audio output channels, such as an earpiece audio output channel and a speaker audio output channel included in the electronic device, and one audio output channel included in the bluetooth headset, the following determination of the audio output channel for playing the second audio in the target audio output device is provided in the embodiments of the present application.
In the case where the target audio output device includes one audio output channel, it is detected whether the audio output channel plays audio such as the first audio. And under the condition that the audio output channel is detected to play the first audio, the electronic equipment controls the audio output channel to stop playing the first audio and controls the audio output channel to play the second audio.
Therefore, if the target audio output device only has a single audio output channel and the single audio output channel plays audio, if the audio output channel is determined as an audio output channel playing second audio, the audio output channel is controlled to stop playing the first audio, and the audio output channel is controlled to play the second audio.
Conversely, in the case that the target audio output device includes a plurality of (i.e., at least two) audio output channels, the audio output channel for playing the second audio may be selected according to the application scene information of the electronic device, as shown in detail below. In the case where the target audio output device includes a plurality of audio output channels, the audio output channel for playing the second audio may be determined by the following steps, and the step 330 may specifically include steps 3301-3303.
Step 3301, detect the number of audio output channels of the target audio output device.
And 3302, determining a second target audio output channel among the N audio output channels according to the application scene information when it is detected that the number of the audio output channels is N, where N is an integer greater than or equal to 2.
And 3303, controlling a second target audio output channel of the target audio output device to play a second audio.
The above steps are described in detail below, specifically as follows:
referring to step 3302, when the target audio output device is an electronic device that includes an earpiece audio output channel and a speaker audio output channel.
Determining the earphone audio output channel as a second target audio output channel under the condition that the application scene information of the electronic equipment is the privacy application scene information; and under the condition that the application scene information of the electronic equipment is the non-privacy application scene information, determining the loudspeaker audio output channel as a second target audio output channel.
Referring to step 3303, in case that the second target audio output channel plays the third audio, the audio output channel is controlled to stop playing the third audio, and the audio output channel is controlled to play the second audio.
In addition, in addition to the above-mentioned possibility that the electronic device is connected only to one or more first audio output devices, the electronic device may also be connected to one or more second audio output devices. Here, the difference between the first audio output device and the second audio output device may include that the first audio output device is playing the first audio while the second audio is acquired, and the second audio output device is not playing the audio. Therefore, under the condition that the electronic equipment is connected with the second audio output equipment, the state information of the second audio output equipment is acquired;
under the condition that the state information of the second audio output device is detected to be a wearing state, determining that the application scene information is privacy application scene information;
and controlling the second audio output equipment to play the second audio according to the privacy application scene information.
In addition, it should be noted that, in one or more alternative embodiments, the obtaining of the state information of the second audio output device may be performed after determining that the application context information is the privacy application context information, so that in a case that it is detected that the state information of the second audio output device is in a wearing state, the second audio output device is controlled to play the second audio. At this time, the second audio output device may include a bluetooth headset or a wired headset.
Then, referring to step 240, in one or more alternative embodiments, the target image may be obtained through the front-facing camera, and when the target image includes a facial image of a user (e.g., a facial image of a user holding the electronic device or a facial image of another user), first information is displayed, where the first information may prompt the user to play a target audio output device of the second audio, and may also include application scene information of the electronic device, where, for example, it is detected that the current scene is a conference scene, and playing the incoming audio is automatically set for you to play in the earphone.
It should be noted that when the audio output channel playing the second audio (or the first audio) changes, sometimes the audio is lost, for example, the electronic device suddenly switches from the audio output channel of the speaker that is externally playing to the audio output channel of the earphone that is close to the ear, which may cause a sound perception fault. In order to prevent audio loss and cause a sound perception fault, the embodiment of the application switches different audio output channels, that is, different audio output channels of the same device are switched, for example, the electronic device plays a second audio, and the earphone audio output channel is switched to the loudspeaker audio output channel, or different devices are switched, so that the audio output channels of different devices are switched, for example, the earphone audio output channel of the electronic device is switched to the audio output channel of the bluetooth headset, different modes for playing the second audio are provided, and the modes are shown as follows.
In one or more alternative embodiments, the target audio device includes a first audio output channel and a second audio output channel, and after step 340, the audio playing method may further include:
under the condition that an audio output channel for playing a second audio is detected and is changed from a first audio output channel to a second audio output channel, copying the second audio to obtain a first sub audio and a second sub audio;
transmitting the first sub-audio to a first audio output channel and the second sub-audio to a second audio output channel;
adjusting a first audio parameter of a first audio output channel for playing a first sub audio, wherein the first audio parameter comprises a first audio playing time and a first audio playing volume;
and under the condition that the first audio parameter meets a third preset condition, controlling the first audio output channel to stop playing the first sub audio, and adjusting the audio playing volume of the second audio output channel for playing the second sub audio to be the first preset volume.
In another or more alternative embodiments, after step 340, the audio playing method may further include:
copying the second audio to obtain a third sub audio and a fourth sub audio under the condition that the target audio output device is a first audio output device and the condition that the device for playing the second audio is switched from the first audio output device to the electronic device is detected;
transmitting the third sub-audio to the first audio output device and the fourth sub-audio to a fourth target audio output channel of the electronic device;
adjusting a second audio parameter of the third sub audio played by the first audio output device, wherein the second audio parameter comprises a second audio playing time and a second audio playing volume;
and under the condition that the second audio parameter meets a fourth preset condition, controlling the first audio output device to stop playing the third sub audio, and adjusting the audio playing volume of the fourth target audio output channel for playing the fourth sub audio to be a second preset volume.
Illustratively, when the audio output channels are switched, the audio of the audio output channel A of the original audio is not directly closed, but the original audio is copied into two parts, one part is sent to the audio output channel A of the original audio for output, and the other part is sent to the new audio output channel B. And the audio output channel A keeps outputting the original volume for 1 second, then starts to slowly weaken the volume, changes the volume to zero when the volume reaches 3 seconds, and simultaneously cuts the audio to copy and output to the audio output channel A.
In summary, the environment information of the environment where the electronic device is located is obtained under the condition that the electronic device is connected with the first audio output device and the first audio output device is controlled to play the first audio. And under the condition of acquiring the second audio, determining application scene information of the electronic equipment through the environment information, and determining target audio output equipment corresponding to the application scene information according to the application scene information. Therefore, when the electronic equipment or the audio output equipment plays audio and the electronic equipment receives new audio, the target audio output equipment for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the equipment for playing the new audio, the user operation is reduced, and the audio playing efficiency is improved.
In addition, the audio playing side provided by the embodiment of the application can keep the audio output of the audio output channel A of the audio for a period of time when the played second audio is switched, and ensures that no fault is perceived in the short time during switching. Through above-mentioned embodiment, when having new audio playback equipment and new audio frequency to insert, need the equipment of user's manual selection broadcast new audio frequency, reduced user operation, promoted the efficiency of audio playback and just can obtain fine audio output mode, in addition, if the switching of audio output passageway has taken place, can also better increase the perception of user to sound through above-mentioned mode, improve user experience.
It should be noted that, in the audio playing method provided in the embodiment of the present application, the execution main body may be an audio playing device, or an audio playing module used in the audio playing device for executing the audio playing method. The embodiment of the present application takes an audio playing device executing an audio playing method as an example, and describes an audio playing device provided in the embodiment of the present application.
Based on the same inventive concept, the application also provides an audio playing device. The details are described with reference to fig. 4.
Fig. 4 is a schematic structural diagram of an audio playing device according to an embodiment of the present application.
As shown in fig. 4, the audio playing apparatus 40 is applied to the electronic devices shown in fig. 1 to fig. 2, and may specifically include:
the obtaining module 401 is configured to obtain environment information of an environment where the electronic device is located, when the obtaining module is connected to the first audio output device and controls the first audio output device to play the first audio;
a determining module 402, configured to determine application scenario information of the electronic device according to the environment information when the second audio is obtained;
a processing module 403, configured to determine, according to application scenario information of an electronic device, a target audio output device corresponding to the application scenario information, where the target audio output device includes a first audio output device or the electronic device;
the display module 404 is configured to display first information, where the first information is used to prompt a device playing the second audio to be a target audio output device.
Therefore, the environment information of the environment where the electronic equipment is located is obtained under the condition that the electronic equipment is connected with the first audio output equipment and the first audio output equipment is controlled to play the first audio. And under the condition of acquiring the second audio, determining application scene information of the electronic equipment through the environment information, and determining target audio output equipment corresponding to the application scene information according to the application scene information. Therefore, when the electronic equipment or the audio output equipment plays audio and the electronic equipment receives new audio, the target audio output equipment for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the equipment for playing the new audio, the user operation is reduced, and the audio playing efficiency is improved.
The following describes the audio playing device 40 in detail, specifically as follows:
in one or more possible embodiments, the determining module 402 may be specifically configured to, in a case that the environmental information includes environmental audio, perform speech recognition on the environmental audio to obtain first result information;
determining application scene information of the electronic equipment as privacy application scene information under the condition that the first result information meets a first preset condition; wherein the content of the first and second substances,
the first preset condition includes at least one of: the noise in the environmental audio is less than or equal to a first preset threshold, the environmental audio comprises preset voice audio, the environmental audio does not comprise audio of a first preset object, the number of the recognized sounding objects in the environmental audio is greater than or equal to a second preset threshold, and the volume of the environmental audio is less than or equal to a third preset threshold.
In another or more possible embodiments, the determining module 402 may be specifically configured to, in a case that the environment information includes an environment image, perform image recognition on the environment image to obtain second result information;
determining the application scene of the electronic equipment as privacy application scene information under the condition that the second result information meets a second preset condition; wherein the content of the first and second substances,
the second preset condition includes at least one of: the environment image comprises images of a plurality of users, the environment image does not comprise a face image of a second preset object, the environment image comprises an object in a preset environment, the environment image comprises the second preset object, and the second preset object wears the audio output equipment.
In one or more possible embodiments, the processing module 403 may be specifically configured to, in a case that the application context information is the private application context information, determine the electronic device as a target audio output device, and control a first target audio output channel of the electronic device to play a second audio;
or, under the condition that the first audio output device is detected to be in the preset state, determining that the first audio output device is the target audio output device; wherein the preset state comprises at least one of the following: the wearing state of the user and the distance between the user and the user are smaller than or equal to a fourth preset threshold.
In another or more possible embodiments, the processing module 403 may be specifically configured to detect the number of audio output channels of the target audio output device;
under the condition that the number of the audio output channels is detected to be N, determining a second target audio output channel in the N audio output channels according to the application scene information, wherein N is an integer greater than or equal to 2;
and controlling a second target audio output channel of the target audio output device to play second audio.
Further, the processing module 403 may be specifically configured to, when the target audio output device is an electronic device, the electronic device includes a receiver audio output channel and a speaker audio output channel, and the application context information of the electronic device is the privacy application context information, determine the receiver audio output channel as a second target audio output channel;
and under the condition that the application scene information of the electronic equipment is the non-privacy application scene information, determining the loudspeaker audio output channel as a second target audio output channel.
In one or more possible embodiments, the audio playing device 40 may include a first copying module, a first sending module, a first adjusting module, and a first control module; wherein the content of the first and second substances,
the first copying module is used for copying the second audio to obtain a first sub audio and a second sub audio under the condition that the audio output channel for playing the second audio is detected and is changed from the first audio output channel to the second audio output channel;
a first transmitting module for transmitting the first sub-audio to a first audio output channel and the second sub-audio to a second audio output channel;
the first adjusting module is used for adjusting a first audio parameter of the first audio output channel for playing the first sub audio, wherein the first audio parameter comprises first audio playing time and first audio playing volume;
and the first control module is used for controlling the first audio output channel to stop playing the first sub audio and adjusting the audio playing volume of the second audio output channel for playing the second sub audio to be the first preset volume under the condition that the first audio parameter meets the third preset condition.
In another or more possible embodiments, the audio playing device 40 may include a second copying module, a second sending module, a second adjusting module, and a second control module; wherein the content of the first and second substances,
the second copying module is used for copying the second audio to obtain a third sub audio and a fourth sub audio under the condition that the target audio output device is the first audio output device and the condition that the device for playing the second audio is switched from the first audio output device to the electronic device is detected;
a second sending module, configured to send the third sub-audio to the first audio output device, and send the fourth sub-audio to a fourth target audio output channel of the electronic device;
the second adjusting module is used for adjusting a second audio parameter of the third sub-audio played by the first audio output device, wherein the second audio parameter comprises second audio playing time and second audio playing volume;
and the second control module is used for controlling the first audio output device to stop playing the third sub audio and adjusting the audio playing volume of the fourth target audio output channel for playing the fourth sub audio to be the second preset volume under the condition that the second audio parameter meets the fourth preset condition.
In one or more possible embodiments, the processing module 403 may be specifically configured to, when the electronic device is connected to a second audio output device, obtain status information of the second audio output device;
under the condition that the state information of the second audio output device is detected to be a wearing state, determining that the application scene information is privacy application scene information;
and controlling the second audio output equipment to play the second audio according to the privacy application scene information.
The audio playing apparatus in the embodiment of the present application may be an apparatus, and may also be a component, an integrated circuit, or a chip in an electronic device. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The audio playing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The audio playing device provided in the embodiment of the present application can implement each process implemented by the method embodiments in fig. 1 to fig. 3, and is not described herein again to avoid repetition.
In the embodiment of the application, the environment information of the environment where the electronic device is located is acquired under the condition that the first audio output device is connected and is controlled to play the first audio. And under the condition of acquiring the second audio, determining application scene information of the electronic equipment through the environment information, and determining target audio output equipment corresponding to the application scene information according to the application scene information. Therefore, when the electronic equipment or the audio output equipment plays audio and the electronic equipment receives new audio, the target audio output equipment for playing the second audio can be automatically selected through the application scene of the electronic equipment, the user does not need to manually select the equipment for playing the new audio, the user operation is reduced, and the audio playing efficiency is improved.
Optionally, as shown in fig. 5, an electronic device 50 is further provided in this embodiment of the present application, and includes a processor 501, a memory 502, and a program or an instruction stored in the memory 502 and executable on the processor 501, where the program or the instruction is executed by the processor 501 to implement each process of the foregoing audio playing method embodiment, and can achieve the same technical effect, and no further description is provided here to avoid repetition.
It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic device and the non-mobile electronic device described above.
Fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
The electronic device 600 includes, but is not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, processor 610, and radio 611.
Those skilled in the art will appreciate that the electronic device 600 may further comprise a power source (e.g., a battery) for supplying power to the various components, and the power source may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The electronic device structure shown in fig. 6 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
In this embodiment of the application, the processor 610 is configured to obtain environment information of an environment in which the electronic device is located, when the processor is connected to the first audio output device and controls the first audio output device to play the first audio. And the processor 610 is further configured to, in a case where the second audio is obtained, determine application scenario information of the electronic device according to the environment information, and determine a target audio output device corresponding to the application scenario information according to the application scenario information of the electronic device, where the target audio output device includes the first audio output device or the electronic device. The display unit 606 is configured to display first information, where the first information is used to prompt a device playing the second audio to be a target audio output device.
It is to be understood that the input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still image or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The display unit 606 may include a display panel, and may configure a display surface in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 607 includes a touch panel 6071 and other input devices 6072. A touch panel 6071, also referred to as a touch screen. The touch panel 6071 may include two parts of a touch detection device and a touch audio player. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume audio play keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. The memory 609 may be used to store software programs as well as various data including, but not limited to, application programs and an operating system. The processor 610 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned audio playing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
In addition, an embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the above-mentioned audio playing method embodiment, and the same technical effect can be achieved.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An audio playing method, comprising:
the method comprises the steps that under the condition that the electronic equipment is connected with first audio output equipment and the first audio output equipment is controlled to play first audio, environment information of the environment where the electronic equipment is located is obtained;
under the condition of acquiring a second audio, determining application scene information of the electronic equipment according to the environment information;
determining a target audio output device corresponding to the application scene information according to the application scene information of the electronic device, wherein the target audio output device comprises the first audio output device or the electronic device;
and displaying first information, wherein the first information is used for prompting that the equipment for playing the second audio is the target audio output equipment.
2. The method of claim 1, wherein the environmental information comprises an environmental image; the determining the application scene information of the electronic device according to the environment information includes:
carrying out image recognition on the environment image to obtain second result information;
determining that the application scene of the electronic equipment is privacy application scene information under the condition that the second result information meets a second preset condition; wherein the content of the first and second substances,
the second preset condition comprises at least one of the following conditions: the environment image comprises images of a plurality of users, the environment image does not comprise a face image of a second preset object, the environment image comprises objects in a preset environment, the environment image comprises the second preset object, and the second preset object wears audio output equipment.
3. The method of claim 1, wherein determining the target audio output device corresponding to the application scenario information according to the application scenario information of the electronic device comprises:
detecting the number of audio output channels of the target audio output device;
under the condition that the number of the audio output channels is detected to be N, determining a second target audio output channel in the N audio output channels according to the application scene information, wherein N is an integer greater than or equal to 2;
and controlling a second target audio output channel of the target audio output device to play the second audio.
4. The method of claim 1, wherein the target audio device comprises a first audio output channel and a second audio output channel; after the displaying the first information, the method further comprises:
under the condition that an audio output channel for playing the second audio is detected and is changed from the first audio output channel to the second audio output channel, copying the second audio to obtain a first sub audio and a second sub audio;
transmitting the first sub-audio to the first audio output channel and the second sub-audio to the second audio output channel;
adjusting a first audio parameter of the first audio output channel for playing the first sub audio, wherein the first audio parameter comprises a first audio playing time and a first audio playing volume;
and under the condition that the first audio parameter meets a third preset condition, controlling the first audio output channel to stop playing the first sub audio, and adjusting the audio playing volume of the second audio output channel for playing the second sub audio to be a first preset volume.
5. The method of claim 1, wherein after displaying the first information, the method further comprises:
when the target audio output device is the first audio output device and the device for playing the second audio is detected to be switched from the first audio output device to the electronic device, copying the second audio to obtain a third sub audio and a fourth sub audio;
transmitting the third sub-audio to a first audio output device and the fourth sub-audio to a fourth target audio output channel of the electronic device;
adjusting a second audio parameter of the third sub audio played by the first audio output device, wherein the second audio parameter comprises a second audio playing time and a second audio playing volume;
and under the condition that the second audio parameter meets a fourth preset condition, controlling the first audio output device to stop playing the third sub audio, and adjusting the audio playing volume of the fourth target audio output channel for playing the fourth sub audio to be a second preset volume.
6. An audio playback apparatus, comprising:
the acquisition module is used for acquiring environmental information of the environment where the electronic equipment is located under the condition that the acquisition module is connected with first audio output equipment and controls the first audio output equipment to play a first audio;
the determining module is used for determining application scene information of the electronic equipment according to the environment information under the condition of acquiring the second audio;
the processing module is used for determining target audio output equipment corresponding to the application scene information according to the application scene information of the electronic equipment, wherein the target audio output equipment comprises the first audio output equipment or the electronic equipment;
and the display module is used for displaying first information, and the first information is used for prompting that the equipment for playing the second audio is the target audio output equipment.
7. The apparatus according to claim 6, wherein the determining module is specifically configured to perform image recognition on the environment image to obtain second result information;
determining that the application scene of the electronic equipment is privacy application scene information under the condition that the second result information meets a second preset condition; wherein the content of the first and second substances,
the second preset condition comprises at least one of the following conditions: the environment image comprises images of a plurality of users, the environment image does not comprise a face image of a second preset object, the environment image comprises objects in a preset environment, the environment image comprises the second preset object, and the second preset object wears audio output equipment.
8. The apparatus of claim 6, wherein the processing module is specifically configured to detect a number of audio output channels of the target audio output device;
under the condition that the number of the audio output channels is detected to be N, determining a second target audio output channel in the N audio output channels according to the application scene information, wherein N is an integer greater than or equal to 2;
and controlling a second target audio output channel of the target audio output device to play the second audio.
9. The apparatus of claim 6, wherein the audio playing apparatus further comprises a first copying module, a first sending module, a first adjusting module and a first control module; wherein the content of the first and second substances,
the first copying module is configured to copy the second audio to obtain a first sub audio and a second sub audio when the target audio device includes a first audio output channel and a second audio output channel, detects that the audio output channel for playing the second audio is changed from the first audio output channel to the second audio output channel;
the first sending module is configured to send the first sub-audio to the first audio output channel and send the second sub-audio to the second audio output channel;
the first adjusting module is configured to adjust a first audio parameter of the first audio output channel for playing the first sub audio, where the first audio parameter includes a first audio playing time and a first audio playing volume;
the first control module is configured to control the first audio output channel to stop playing the first sub audio when the first audio parameter meets a third preset condition, and adjust an audio playing volume of the second audio output channel for playing the second sub audio to a first preset volume.
10. The apparatus of claim 6, wherein the audio playing apparatus further comprises a second copying module, a second sending module, a second adjusting module and a second control module; wherein the content of the first and second substances,
the second copying module is configured to copy a second audio to obtain a third sub audio and a fourth sub audio when the target audio output device is the first audio output device and it is detected that a device playing the second audio is switched from the first audio output device to the electronic device;
the second sending module is configured to send the third sub audio to a first audio output device, and send the fourth sub audio to a fourth target audio output channel of the electronic device;
the second adjusting module is configured to adjust a second audio parameter of the third sub audio played by the first audio output device, where the second audio parameter includes a second audio playing time and a second audio playing volume;
and the second control module is used for controlling the first audio output device to stop playing the third sub-audio and adjusting the audio playing volume of the fourth target audio output channel for playing the fourth sub-audio to be a second preset volume under the condition that the second audio parameter meets a fourth preset condition.
CN202110937230.0A 2021-08-16 2021-08-16 Audio playing method and device Pending CN113672191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110937230.0A CN113672191A (en) 2021-08-16 2021-08-16 Audio playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110937230.0A CN113672191A (en) 2021-08-16 2021-08-16 Audio playing method and device

Publications (1)

Publication Number Publication Date
CN113672191A true CN113672191A (en) 2021-11-19

Family

ID=78542965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110937230.0A Pending CN113672191A (en) 2021-08-16 2021-08-16 Audio playing method and device

Country Status (1)

Country Link
CN (1) CN113672191A (en)

Similar Documents

Publication Publication Date Title
RU2666966C2 (en) Audio playback control method and device
CN109559763B (en) Real-time digital audio signal sound mixing method and device
CN105451111B (en) Earphone control method for playing back, device and terminal
EP2990943B1 (en) Intelligent terminal device control method and system
US9402124B2 (en) Method for controlling terminal device and the smart terminal device thereof
CN106454644B (en) Audio playing method and device
RU2656693C2 (en) Event prompting method and device
WO2017181365A1 (en) Earphone channel control method, related apparatus, and system
CN111078448A (en) Method for processing audio abnormity and electronic equipment
CN104636110B (en) Control the method and device of volume
CN108924361B (en) Audio playing and acquisition control method, system and computer readable storage medium
CN106445453A (en) Method and device for switching audio output paths
CN112764710A (en) Audio playing mode switching method and device, electronic equipment and storage medium
WO2023151526A1 (en) Audio acquisition method and apparatus, electronic device and peripheral component
CN112291615A (en) Audio output method and audio output device
CN110517711A (en) Playback method, device, storage medium and the electronic equipment of audio
CN106375846B (en) The processing method and processing device of live audio
CN111770404A (en) Recording method, recording device, electronic equipment and readable storage medium
WO2023011370A1 (en) Audio playing method and apparatus
US11388281B2 (en) Adaptive method and apparatus for intelligent terminal, and terminal
CN2922049Y (en) Digital music player with carry-on speaker audio device capable of playing Mic sound
CN113672191A (en) Audio playing method and device
CN114650496A (en) Audio playing method and electronic equipment
WO2018058331A1 (en) Method and apparatus for controlling volume
CN106936972B (en) Method, device and system for controlling audio channel

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