Audio playing method, device, equipment and storage medium

文档序号:7149 发布日期:2021-09-17 浏览:46次 中文

1. An audio playing method is applied to a first electronic device, wherein the first electronic device is connected with a first earphone, and the first electronic device is connected with a second earphone, and the method comprises the following steps:

acquiring a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone;

the first ear canal feature is matched with a first preset ear canal feature in the target ear canal feature set, and the second ear canal feature is matched with a second preset ear canal feature in the target ear canal feature set under the condition that the second preset ear canal feature is matched with the target ear canal feature set, and the target audio associated with the target ear canal feature set is played.

2. The method of claim 1, wherein prior to playing target audio associated with the target ear canal feature set if the first ear canal feature matches a first preset ear canal feature in a target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set, the method further comprises:

playing the first audio;

the first ear canal feature is matched with the first ear canal feature of predetermineeing in the target ear canal feature set, just the second ear canal feature with under the condition that the ear canal feature was matched is predetermine to the second in the target ear canal feature set, play with the target audio that the target ear canal feature set is correlated with includes:

when the first ear canal feature is matched with a first preset ear canal feature in a target ear canal feature set and the second ear canal feature is matched with a second preset ear canal feature in the target ear canal feature set, pausing playing the first audio and playing a target audio associated with the target ear canal feature set;

after the playing of the target audio associated with the target ear canal feature set, the method further comprises:

and when the duration of the first earphone in the unworn state is greater than a first preset value or the duration of the second earphone in the unworn state is greater than a second preset value, pausing the playing of the target audio and playing of the first audio.

3. The method of claim 1, wherein the first electronic device is connected to a second headset, comprising:

the first electronic equipment is connected with second electronic equipment, and the second electronic equipment is connected with the second earphone;

the obtaining a second ear canal characteristic of a user wearing the second earpiece includes:

receiving the second ear canal characteristic sent by the second electronic device, wherein the second ear canal characteristic is obtained by the second electronic device through the second earphone;

the playing of the target audio associated with the target ear canal feature set comprises:

playing a target audio associated with the target ear canal feature set, and sending first information to the second electronic device to instruct the second electronic device to play the target audio.

4. The method of claim 3, wherein the first electronic device and the second electronic device log into a same account, and prior to the playing of the target audio associated with the target ear canal feature set and sending first information to the second electronic device instructing the second electronic device to play the target audio, the method further comprises:

acquiring audio playing information of the second electronic equipment;

under the condition that the target audio is not played by the second electronic equipment, sending second information to the second electronic equipment to instruct the second electronic equipment to play the target audio;

and under the condition that the target audio is played by the second electronic equipment, acquiring the playing progress of the target audio played by the second electronic equipment, and adjusting the playing progress of the first electronic equipment to the playing progress of the second electronic equipment or sending third information to the second electronic equipment so as to adjust the playing progress of the second electronic equipment to the playing progress of the first electronic equipment.

5. The method of claim 1, wherein playing the target audio associated with the target ear canal feature set comprises:

determining a song list associated with the target ear canal feature set, and playing the target audio in the song list.

6. An audio playing apparatus, applied to a first electronic device, the first electronic device being connected to a first earphone, the first electronic device being connected to a second earphone, the apparatus comprising:

a first obtaining module, configured to obtain a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone;

a first playing module, configured to match the first ear canal feature with a first preset ear canal feature in the target ear canal feature set, and play a target audio associated with the target ear canal feature set under the condition that the second ear canal feature matches with a second preset ear canal feature in the target ear canal feature set.

7. The apparatus of claim 6, further comprising:

the second playing module is used for playing the first audio;

the first playing module comprises:

the first playing unit is used for pausing playing the first audio and playing the target audio associated with the target ear canal feature set under the condition that the first ear canal feature is matched with a first preset ear canal feature in the target ear canal feature set and the second ear canal feature is matched with a second preset ear canal feature in the target ear canal feature set;

the second playing module is further configured to pause playing the target audio and play the first audio when a duration of the first earphone in the unworn state is greater than a first preset value or when a duration of the second earphone in the unworn state is greater than a second preset value.

8. The apparatus of claim 6, wherein the first electronic device is connected to a second headset, comprising:

the first electronic equipment is connected with second electronic equipment, and the second electronic equipment is connected with the second earphone;

the first obtaining module includes:

a receiving unit, configured to receive the second ear canal characteristic sent by the second electronic device, where the second ear canal characteristic is obtained by the second electronic device through the second earphone;

the first playing module comprises:

a second playing unit, configured to play a target audio associated with the target ear canal feature set;

and the sending unit is used for sending first information to the second electronic equipment so as to instruct the second electronic equipment to play the target audio.

9. The apparatus of claim 8, further comprising:

the second acquisition module is used for acquiring audio playing information of the second electronic equipment;

the sending module is used for sending second information to the second electronic equipment to indicate the second electronic equipment to play the target audio under the condition that the second electronic equipment does not play the target audio;

the adjusting module is configured to, under the condition that the target audio is played by the second electronic device, obtain a playing progress of the target audio played by the second electronic device, adjust the playing progress of the first electronic device to the playing progress of the second electronic device, or send third information to the second electronic device, so that the playing progress of the second electronic device is adjusted to the playing progress of the first electronic device.

10. The apparatus of claim 6, wherein the first playing module further comprises:

and the third playing unit is used for determining the song list associated with the target ear canal characteristic set and playing the target audio in the song list.

Background

When a user listens to audio, situations often occur in which the same audio needs to be listened to together with other users, that is, audio sharing needs to be performed.

At present, when a user shares audio with other users, a friend relationship is usually established between the user and an electronic device of the shared user through the electronic device, and then the user shares audio with the other user. Taking an example of a song list with audio needing to be shared as a music program, a user needs to establish a music friend relationship of the music program with electronic equipment of a user to be shared, create a music room, invite the electronic equipment of the user to be shared to join the music room, and then play the song list. Therefore, a friend relationship needs to be established first to invite the friend to join the music room and then the audio can be played, so that the audio playing process is complicated, and the audio sharing process is complicated.

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 technical problems of a complicated audio playing process and a complicated audio sharing operation in the prior art.

In order to solve the technical problem, the present application is implemented as follows:

in a first aspect, an embodiment of the present application provides an audio playing method, which is applied to a first electronic device, where the first electronic device is connected to a first earphone, and the first electronic device is connected to a second earphone, and the method includes:

acquiring a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone;

the first ear canal feature is matched with a first preset ear canal feature in the target ear canal feature set, and the second ear canal feature is matched with a second preset ear canal feature in the target ear canal feature set under the condition that the second preset ear canal feature is matched with the target ear canal feature set, and the target audio associated with the target ear canal feature set is played.

In a second aspect, an embodiment of the present application provides an audio playing apparatus, which is applied to a first electronic device, where the first electronic device is connected to a first earphone, and the first electronic device is connected to a second earphone, and the apparatus includes:

a first obtaining module, configured to obtain a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone;

a first playing module, configured to match the first ear canal feature with a first preset ear canal feature in the target ear canal feature set, and play a target audio associated with the target ear canal feature set under the condition that the second ear canal feature matches with a second preset ear canal feature in the target ear canal feature set.

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, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.

In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to 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 method according to the first aspect.

In an embodiment of the application, by obtaining a first ear canal feature of a user wearing a first earphone and a second ear canal feature of a user wearing a second earphone, a target audio associated with a target ear canal feature set is played under the condition that the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set. Therefore, audio playing can be realized through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and therefore audio sharing among users is realized. Therefore, compared with the prior art, the audio playing can be realized only through the matching of the ear canal characteristics without establishing a friend relationship or inviting friends to join a music room, so that the audio playing process can be effectively simplified, and the audio sharing process can be effectively simplified.

Drawings

Fig. 1 is a schematic diagram of an audio playing method provided in an embodiment of the present application;

fig. 2 is a schematic diagram illustrating a display manner of third information provided in an embodiment of the present application;

fig. 3 is a schematic structural diagram of an audio playing apparatus according to an embodiment of the present application;

fig. 4 is a schematic structural diagram 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 clearly and completely described 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

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 is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. 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.

The following describes the audio playing method provided by the embodiments of the present application in detail by using specific embodiments with reference to the accompanying drawings.

Fig. 1 shows a flowchart of an audio playing method provided in an embodiment of the present application, where the audio playing method may be applied to a first electronic device, the first electronic device is connected to a first earphone, and the first electronic device is connected to a second earphone. As shown in fig. 1, the method may include the steps of:

s110, acquiring a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone.

The first electronic device may be any electronic device, such as a mobile phone, a tablet computer, a notebook computer, a palm computer, and the like. The first electronic device may be connected with a first earphone or a second earphone, for example, one of a left earphone and a right earphone in a pair of earphones may be determined as the first earphone, and the other may be determined as the second earphone; or the first electronic equipment is connected with two pairs of earphones, one pair of earphones is determined as a first earphone, and the other pair of earphones is determined as a second earphone.

The ear canal characteristic of the user wearing the first earpiece is a first ear canal characteristic that may be captured by the first earpiece. The ear canal characteristic of the user wearing the second earpiece is a second ear canal characteristic that may be captured by the second earpiece.

As an example, the first and second earphones may be worn separately when different users want to listen to the same audio, e.g. one user may wear the first earphone and another user wears the second earphone. The first earpiece may then capture a first ear canal characteristic of a user wearing the first earpiece, and the second earpiece may capture a second ear canal characteristic of a user wearing the second earpiece. The earphones (including the first earphone and the second earphone) can acquire the characteristics of the ear canal of the user through ultrasonic waves, for example, the earphones can transmit ultrasonic waves into the ear canal of the user, receive the ultrasonic waves which are folded back for multiple times in the ear canal, and determine the characteristics of the ear canal based on the folded-back ultrasonic waves. The first electronic device may then obtain, from the first earpiece, a first ear canal characteristic of the user wearing the first earpiece, and obtain, from the second earpiece, a second ear canal characteristic of the user wearing the second earpiece.

And S120, playing the target audio associated with the target ear canal feature set under the condition that the first ear canal feature is matched with the first preset ear canal feature in the target ear canal feature set and the second ear canal feature is matched with the second preset ear canal feature in the target ear canal feature set.

The target ear canal feature set may include a first preset ear canal feature and a second preset ear canal feature, and the target ear canal feature set is stored in association with the target audio, that is, the first preset ear canal feature and the second preset ear canal feature are stored in association with the audio. The first preset ear canal feature may be a pre-stored ear canal feature of one user associated with the target audio, and the second preset ear canal feature may be a pre-stored ear canal feature of another user associated with the target audio; the target audio is the audio associated with the target ear canal feature set, and in the case of audio being a song, the target audio may be a certain song.

As an example, after obtaining the first ear canal feature of the user wearing the first earphone and the second ear canal feature of the user wearing the second earphone, the first electronic device may match the first ear canal feature with the first preset ear canal feature in the target ear canal feature set, and match the second ear canal feature with the first preset ear canal feature in the target ear canal feature set.

Under the condition that the first ear canal feature is matched with the first preset ear canal feature in the target ear canal feature set and the second ear canal feature is matched with the second preset ear canal feature in the target ear canal feature set, the target audio associated with the target ear canal feature set can be obtained and played. Therefore, the two users can respectively listen to the target audio through the first earphone and the second earphone, and the target audio can be shared among the users.

It is understood that the first ear canal feature matches the first predetermined ear canal feature, and may be the same as or closer to the first predetermined ear canal feature; the second ear canal feature matches the second predetermined ear canal feature, and may be the same as or closer to the second predetermined ear canal feature. When the user wearing the first earphone and the user wearing the second earphone are two different users, the acquired first ear canal characteristics and the acquired second ear canal characteristics are the respective ear canal characteristics of the two different users, the target audio associated with the target ear canal characteristic set is broadcasted at the moment, and audio sharing between the two different users can be realized.

In an embodiment of the present application, by obtaining a first ear canal feature of a user wearing a first earphone and a second ear canal feature of a user wearing a second earphone, a target audio associated with a target ear canal feature set is played under the condition that the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set. Therefore, audio playing can be realized through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and therefore audio sharing among users is realized. Therefore, compared with the prior art, the audio playing can be realized only through the matching of the ear canal characteristics without establishing a friend relationship or inviting friends to join a music room, so that the audio playing process can be effectively simplified, and the audio sharing process can be effectively simplified.

Specifically, the target audio is played through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, that is, the ear canal characteristics of the user are an authentication manner for playing the target audio. Therefore, even if the users are not in good friend relationship, the target audio can be played through the matching of the ear canal characteristics of the users and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and the sharing of the target audio is realized, so that the audio playing process and the audio sharing process can be effectively simplified.

In addition, because the ear canal characteristics of each user are unique and are not easy to copy and change, the ear canal characteristics of the user are used as an authentication mode for playing the target audio, so that the safety of the target audio can be effectively improved. Moreover, the target audio can be played only by the authentication of the ear canal characteristics of the users, so that the interactivity among the users can be better improved, and the user experience is improved.

In some embodiments, before step S120, the following steps may also be performed:

playing the first audio;

at this time, a specific implementation manner of step S120 may be as follows:

under the condition that the first ear canal feature is matched with a first preset ear canal feature in the target ear canal feature set and the second ear canal feature is matched with a second preset ear canal feature in the target ear canal feature set, pausing playing the first audio and playing the target audio associated with the target ear canal feature set;

after playing the target audio associated with the target ear canal feature set, further comprising:

and when the duration of the first earphone in the unworn state is greater than a first preset value or the duration of the second earphone in the unworn state is greater than a second preset value, pausing the playing of the target audio and playing the first audio.

The first preset value may be a preset maximum allowable time length of the first earphone in the unworn state, and once the time length of the first earphone in the unworn state is greater than the first preset value, the playing of the target audio is suspended. The second preset value may be a preset maximum allowable time length of the second earphone in the unworn state, and once the time length of the second earphone in the unworn state is greater than the second preset value, the playing of the target audio is paused. The first preset value may be the same as or different from the second preset value.

As an example, before the target audio is broadcasted, a first audio may be broadcasted, and the first audio may be any audio other than the target audio, such as a certain song. At this moment, if it is detected that the first ear canal feature is matched with the first preset ear canal feature in the target ear canal feature set, and the second ear canal feature is matched with the second preset ear canal feature in the target ear canal feature set, the broadcasting of the first audio can be suspended, and the target audio associated with the target ear canal feature set is broadcasted. After the first electronic device plays the target audio associated with the target ear canal feature set, the first earphone and the second earphone may further detect whether the first earphone and the second earphone are in an unworn state, and in a case where the first earphone detects that the first earphone is in an unworn state or the second earphone detects that the second earphone is in an unworn state, the first earphone or the second earphone in the unworn state may send information to the first electronic device, so that the first electronic device can determine that the first earphone or the second earphone is in an unworn state.

The first electronic device can count the duration of the first earphone in an unworn state, and the duration is recorded as H1Or the duration of the second earphone in the non-wearing state is recorded as H2And can be substituted by H1With a first predetermined value H01Making a comparison, or2And a second preset value H02A comparison is made. At H1Greater than H01Or H2Greater than H02In this case, it may be considered that the user does not want to listen to the target audio but wants to listen to the first audio, and at this time, the first electronic device may pause playing the target audio and play the first audio. After pausing the target audio, if necessary, repeatingWhen the target audio is played again, the ear canal characteristic authentication process, i.e., the processes of steps S110 to S120, needs to be performed again.

It is understood that in H1Is less than or equal to H01Or H2Is less than or equal to H02In this case, it may be considered that the user temporarily takes off the earphone, and at this time, the first electronic device may pause the target audio being played if the first earphone is at the first preset value H01Is re-worn or the second earphone is at the second preset value H02When the first electronic device is worn again, the first electronic device can continue to play the target audio. Before the target audio is played, if other audio is not played, then H1Greater than H01Or H2Greater than H02In this case, the first electronic device may pause playing only the target audio and not play other audio.

Therefore, when the time length of the first earphone in the unworn state is greater than the first preset value or the time length of the second earphone in the unworn state is greater than the second preset value, the playing of the target audio is paused and the original first audio is played. Therefore, the user can play or pause the target audio or the first audio only by wearing or taking off the earphone, so that the user experience can be further improved.

In some embodiments, the first electronic device may obtain, by the second electronic device, a second ear canal characteristic of a user wearing the second earphone, and accordingly, the specific implementation manner may be:

the first electronic device is connected with the second electronic device, and the second electronic device is connected with the second earphone.

At this time, a specific implementation manner of acquiring the second ear canal characteristic of the user wearing the second earphone in step S110 may be:

and receiving a second ear canal characteristic sent by the second electronic equipment, wherein the second ear canal characteristic is obtained by the second electronic equipment through the second earphone.

Accordingly, the specific implementation manner of playing the target audio associated with the target ear canal feature set in step S120 may be as follows:

playing the target audio associated with the target ear canal feature set, and sending first information to the second electronic device to instruct the second electronic device to play the target audio.

The second electronic device may be an electronic device external to the first electronic device, and the electronic device may store the target ear canal feature set and the target audio in an associated manner.

As an example, in a case where the second electronic device is connected to the second earphone, the first electronic device may acquire the second ear canal characteristic of the user wearing the second earphone through the second electronic device, that is, the second earphone transmits the acquired second ear canal characteristic of the user wearing the second earphone to the second electronic device, and the second electronic device may transmit the second ear canal characteristic to the first electronic device through a connection with the first electronic device, where the connection between the first electronic device and the second electronic device may be a bluetooth connection, a network connection, or the like. The first electronic device can receive the second ear canal characteristics sent by the second electronic device, match the first ear canal characteristics with the first preset ear canal characteristics in the target ear canal characteristic set, and match the second ear canal characteristics with the second preset ear canal characteristics in the target ear canal characteristic set. In the case where the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set, the target audio associated with the target ear canal feature set is played and information, namely first information, may be sent to the second electronic device, where the first information may be used to instruct the second electronic device to play the target audio. In this way, after the second electronic device receives the first information, the target audio can be played, so that audio sharing with the first electronic device is realized.

In some embodiments, in a case that the first electronic device and the second electronic device log in to the same account, after playing the target audio associated with the target ear canal feature set, before sending the first information to the second electronic device to instruct the second electronic device to play the target audio, the adjustment of the playing progress between the first electronic device and the second electronic device may also be implemented as follows:

acquiring audio playing information of second electronic equipment;

under the condition that the second electronic equipment does not play the target audio, sending second information to the second electronic equipment to instruct the second electronic equipment to play the target audio;

and under the condition that the second electronic equipment plays the target audio, acquiring the playing progress of the second electronic equipment playing the target audio, and adjusting the playing progress of the first electronic equipment to the playing progress of the second electronic equipment or sending third information to the second electronic equipment so as to adjust the playing progress of the second electronic equipment to the playing progress of the first electronic equipment.

As an example, in a case where the first electronic device and the second electronic device log in to the same account, after the first electronic device plays the target audio associated with the target ear canal feature set, the first electronic device may further obtain audio playing information of the second electronic device, such as whether the second electronic device is playing the target audio. In a case that the audio playing information of the second electronic device is that the second electronic device does not play the target audio, the first electronic device may send information, that is, second information, to the second electronic device, where the second information may be used to instruct the second electronic device to play the target audio. When the audio playing information of the second electronic device is that the second electronic device plays the target audio, the first electronic device can acquire the playing progress of the second electronic device in playing the target audio, and then adjust the playing progress of the first electronic device to the playing progress of the second electronic device; or, the first electronic device may also send information, that is, third information, to the second electronic device to instruct the second electronic device to adjust the playing progress of the target audio to the playing progress of the first electronic device.

Taking the target audio played by the first electronic device as song a, and the second electronic device does not play song a as an example, the first electronic device may send second information to the second electronic device, the second electronic device may play song a after receiving the second information, and the second electronic device may play song a according to the playing progress of the first electronic device, or may play song a from the beginning.

Taking the example that the first electronic device and the second electronic device are both playing the target audio song a, assuming that the playing progress of the first electronic device playing the song a is 1 min 05 sec, and the playing progress of the second electronic device playing the song a is 0 min 30 sec, the first electronic device may adjust the playing progress to the playing progress of the second electronic device, that is, the playing progress is adjusted from 1 min 05 sec of the song a to 0 min 30 sec of the song a. Or, the first electronic device may send the third information to the second electronic device, and the second electronic device may adjust the playing progress from 0 min 30 s of song a to 1 min 05 s of song a after receiving the third information.

As a specific example, fig. 2 shows a schematic diagram of a display manner of third information, in fig. 3, "user a" may represent a second electronic device, "user B" may represent a first electronic device, "song a playback progress detected by user a is 01: and 05, determining whether the music progress is played synchronously as third information, wherein the control "yes" indicates that the playing progress is adjusted to the playing progress of the first electronic equipment, and the control "no" indicates that the playing progress is not adjusted to the playing progress of the first electronic equipment. If the user B selects yes, the second electronic device may adjust the playing progress to 01: 05, carrying out a reaction; otherwise, the playing progress is not adjusted.

It can be understood that, the first electronic device may adjust the play progress of the first electronic device to the play progress of the second electronic device under the condition that the play progress of the first electronic device is slower than the play progress of the second electronic device; and under the condition that the playing progress of the electronic device is faster than that of the second electronic device, sending third information to the second electronic device so as to adjust the playing progress of the second electronic device to the playing progress of the first electronic device.

Therefore, the playing progress of the second electronic equipment is adjusted to be the playing progress of the first electronic equipment by adjusting the playing progress of the first electronic equipment or sending third information to the second electronic equipment, audio sharing among users can be further realized, interaction among the users is increased, and user experience is further provided.

In some embodiments, a specific implementation manner of playing the target audio associated with the target ear canal feature in step S120 may be as follows:

and determining a song list associated with the target ear canal characteristic set, and playing the target audio in the song list.

As an example, in the case that the target ear canal feature set is associated with a song list that is not a specific audio but includes a plurality of audios, the first electronic device may determine the song list associated with the target ear canal feature set, determine the target audio in the song list, and play the target audio when playing the target audio. Wherein the target audio may be the audio in the song list that the user last paused playing. In this way, the target audio can be played under the condition that the song list is associated with the target ear canal feature set, so that the audio sharing of the target audio is realized.

In some embodiments, before step S110, the preset ear canal feature set and the second audio may be stored in association, and accordingly, the specific implementation manner may be as follows:

creating a second audio; the second audio may include a target audio;

acquiring a target auditory canal characteristic set; the target ear canal feature set may include a first preset ear canal feature of a user wearing the first earpiece and a second preset ear canal feature of a user wearing the second earpiece;

the second audio is stored in association with the target ear canal feature set.

As one example, prior to obtaining a first ear canal characteristic of a user wearing a first earphone and a second ear canal characteristic of a user wearing a second earphone, the user may first determine desired audio on the first electronic device and then operate the first electronic device such that the first electronic device may create second audio based on the desired audio. Wherein the second audio comprises a target audio. It is to be understood that, the aforementioned audio which the user determines to want to listen to may be one or a plurality of, and when the audio which the user determines to want to listen to is one, the second audio created based on the audio which the user determines to want to listen to may only include the one audio; when the user determines that there are a plurality of desired audios to be listened to, the second audio created based on the desired audios may include the plurality of audios, and at this time, the second audio may be a song list.

In the case where one user wears a first earphone and another user wears a second earphone, the first earphone may obtain a first preset ear canal characteristic of the user wearing the first earphone; the second earpiece may acquire a second preset ear canal characteristic of a user wearing the second earpiece. Then, the first electronic device may obtain the first preset ear canal feature from the first earphone and obtain the second preset ear canal feature from the second earphone, so as to obtain the target ear canal feature set. It will be appreciated that the user may wear the headset when, before, or after the second audio is created. Correspondingly, the processes of creating the second audio and obtaining the first preset ear canal feature and the second preset ear canal feature may be performed simultaneously or sequentially, and the execution sequence of the two processes is not limited in this embodiment. The first electronic device may then store the target ear canal feature set in association with the second audio. Thus, the pre-associated storage of the second audio comprising the target audio and the target ear canal feature set may provide sufficient data support for the playback of the target audio, and thus may provide data support for the user to share the target audio through the ear canal features.

In some embodiments, in the case that there are a plurality of second audios associated with the target ear canal feature set, the plurality of second audios may be further displayed for the user to select, and accordingly, before the target audio associated with the target ear canal feature set is played in step S120, the following steps may be further performed:

displaying a plurality of second audios associated with a set of target ear canal features;

receiving a first input; the first input is for selecting a target audio from a plurality of second audios.

At this time, the specific implementation manner of playing the target audio associated with the target ear canal feature set in step S120 may be as follows:

in response to the second input, the target audio is played.

As an example, considering that a user may create multiple second audios, in such a case, the target ear canal feature set may then be associated with the multiple second audios. At this time, in order to enable the user to listen to the target audio, the first electronic device may display a plurality of second audio associated with the target ear canal feature set under the condition that the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set, and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set. In this way, the user can see the plurality of second audios associated with the target ear canal feature set on the interface of the first electronic device, and can operate the first electronic device to select the target audio desired to be listened to, so that the first electronic device can receive the input, i.e., the first input, of the user selecting the target audio from the plurality of second audios. The first electronic device, after receiving the first input, may determine, in response to the first input, the second audio indicated by the first input as the target audio and play the target audio.

Therefore, the user can select the target audio to be listened to from the plurality of second audios associated with the target ear canal feature set, so that the user can be further ensured to listen to the audio wanted by the user, and the user experience can be further improved.

In some embodiments, after the target audio associated with the target ear canal feature set is played in step S120, the audio volume of the played target audio may be further adjusted, and the specific implementation manner may be as follows:

detecting the environmental volume of the current environment;

and adjusting the audio volume of the played target audio according to the environment volume.

As an example, when the first electronic device plays the target audio, it may further detect an ambient volume of the surrounding environment, and adjust an audio volume of the target audio according to the ambient volume. As a specific example, if it is detected that the volume of the environment in the current environment is high, for example, the environment is noisy, the audio volume of the target audio played by the earphone may be increased. On the contrary, if it is detected that the ambient volume of the current environment is low, for example, the environment is quiet, the audio volume of the target audio played by the earphone can be reduced.

It can be understood that, in the case that two users sharing the target audio listen to the target audio together through the first electronic device, the audio volume of the target audio played by the first earphone and the second earphone can be adjusted by adjusting the volume of the first electronic device. Under the condition that one user listens to the target audio through the first electronic device and the other user listens to the target audio through the second electronic device, the first electronic device and the second electronic device can respectively detect the environmental volume of the current environment where the first electronic device and the second electronic device are located, and the audio volume of the target audio played by the first electronic device and the second electronic device can be adjusted according to the environmental volume.

Therefore, the audio volume of the played target audio is adjusted according to different environment volumes, so that the audio volume of the played target audio can better meet the actual requirements of users, and the user experience can be further improved.

Based on the same inventive concept, the present application further provides an audio playing apparatus, which is applied to a first electronic device, the first electronic device is connected to a first earphone, the first electronic device is connected to a second earphone, as shown in fig. 3, the audio playing apparatus 300 may include:

a first obtaining module 310, configured to obtain a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone;

the first playing module 320 may be configured to play the target audio associated with the target ear canal feature set when the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set, and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set.

In an embodiment of the present application, by obtaining a first ear canal feature of a user wearing a first earphone and a second ear canal feature of a user wearing a second earphone, a target audio associated with a target ear canal feature set is played under the condition that the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set. Therefore, audio playing can be realized through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and therefore audio sharing among users is realized. Therefore, compared with the prior art, the audio playing can be realized only through the matching of the ear canal characteristics without establishing a friend relationship or inviting friends to join a music room, so that the audio playing process can be effectively simplified, and the audio sharing process can be effectively simplified.

Specifically, the target audio is played through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, that is, the ear canal characteristics of the user are an authentication manner for playing the target audio. Therefore, even if the users are not in good friend relationship, the target audio can be played through the matching of the ear canal characteristics of the users and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and the sharing of the target audio is realized, so that the audio playing process and the audio sharing process can be effectively simplified.

In addition, because the ear canal characteristics of each user are unique and are not easy to copy and change, the ear canal characteristics of the user are used as an authentication mode for playing the target audio, so that the safety of the target audio can be effectively improved. Moreover, the target audio can be played only by the authentication of the ear canal characteristics of the users, so that the interactivity among the users can be better improved, and the user experience is improved.

In some embodiments, the apparatus 300 may further include:

the second playing module can be used for playing the first audio;

the first playing module 320 may include:

the first playing unit may be configured to pause playing the first audio and play a target audio associated with the target ear canal feature set when the first ear canal feature matches a first preset ear canal feature in a target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set;

the second playing module may be further configured to pause playing the target audio and play the first audio when a duration of the first earphone in the unworn state is greater than a first preset value or when a duration of the second earphone in the unworn state is greater than a second preset value.

Therefore, when the time length of the first earphone in the unworn state is greater than the first preset value or the time length of the second earphone in the unworn state is greater than the second preset value, the playing of the target audio is paused and the original first audio is played. Therefore, the user can play or pause the target audio or the first audio only by wearing or taking off the earphone, so that the user experience can be further improved.

In some embodiments, the first electronic device is connected to a second headset, which may include:

the first electronic equipment is connected with second electronic equipment, and the second electronic equipment is connected with the second earphone;

the first obtaining module 310 may include:

a receiving unit, configured to receive the second ear canal characteristic sent by the second electronic device, where the second ear canal characteristic is obtained by the second electronic device through the second earphone;

the first playing module 320 may include:

a second playing unit operable to play a target audio associated with the target ear canal feature set;

the sending unit may be configured to send first information to the second electronic device to instruct the second electronic device to play the target audio.

In this way, after the second electronic device receives the first information, the target audio can be played, so that audio sharing with the first electronic device is realized.

In some embodiments, the apparatus 300 may further include:

the second obtaining module may be configured to obtain audio playing information of the second electronic device;

the sending module may be configured to send second information to the second electronic device to instruct the second electronic device to play the target audio when the target audio is not played by the second electronic device;

the adjusting module may be configured to, under the condition that the target audio is played by the second electronic device, obtain a playing progress of the target audio played by the second electronic device, adjust the playing progress of the first electronic device to the playing progress of the second electronic device, or send third information to the second electronic device, so that the playing progress of the second electronic device is adjusted to the playing progress of the first electronic device.

Therefore, the playing progress of the second electronic equipment is adjusted to be the playing progress of the first electronic equipment by adjusting the playing progress of the first electronic equipment or sending third information to the second electronic equipment, audio sharing among users can be further realized, interaction among the users is increased, and user experience is further provided.

In some embodiments, the first playing module 320 may further include:

and the third playing unit can be used for determining the song list associated with the target ear canal feature set and playing the target audio in the song list.

In this way, the target audio can be played under the condition that the song list is associated with the target ear canal feature set, so that the audio sharing of the target audio is realized.

The audio playing device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. 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, which is not specifically limited in the embodiments of the present application.

The audio playing device provided in the embodiment of the present application can implement each process implemented by the audio playing device in the method embodiment of fig. 1, and is not described herein again to avoid repetition.

Optionally, an electronic device is further provided in this embodiment of the present application, and includes a processor 410, a memory 409, and a program or an instruction stored in the memory 409 and executable on the processor 410, where the program or the instruction is executed by the processor 410 to implement each process of the above-mentioned embodiment of the audio playing method, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.

It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and the non-mobile electronic devices described above.

Fig. 4 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

The electronic device 400 includes, but is not limited to: radio unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, and processor 410.

Those skilled in the art will appreciate that the electronic device 400 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 410 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. 4 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.

Wherein, the processor 410 may be configured to obtain a first ear canal characteristic of a user wearing the first earphone and a second ear canal characteristic of a user wearing the second earphone;

the audio output unit 403 may be configured to play the target audio associated with the target ear canal feature set when the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set, and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set. .

In an embodiment of the present application, by obtaining a first ear canal feature of a user wearing a first earphone and a second ear canal feature of a user wearing a second earphone, a target audio associated with a target ear canal feature set is played under the condition that the first ear canal feature matches a first preset ear canal feature in the target ear canal feature set and the second ear canal feature matches a second preset ear canal feature in the target ear canal feature set. Therefore, audio playing can be realized through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and therefore audio sharing among users is realized. Therefore, compared with the prior art, the audio playing can be realized only through the matching of the ear canal characteristics without establishing a friend relationship or inviting friends to join a music room, so that the audio playing process can be effectively simplified, and the audio sharing process can be effectively simplified.

Specifically, the target audio is played through matching of the ear canal characteristics of the user and the preset ear canal characteristics corresponding to the target ear canal characteristic set, that is, the ear canal characteristics of the user are an authentication manner for playing the target audio. Therefore, even if the users are not in good friend relationship, the target audio can be played through the matching of the ear canal characteristics of the users and the preset ear canal characteristics corresponding to the target ear canal characteristic set, and the sharing of the target audio is realized, so that the audio playing process and the audio sharing process can be effectively simplified.

In addition, because the ear canal characteristics of each user are unique and are not easy to copy and change, the ear canal characteristics of the user are used as an authentication mode for playing the target audio, so that the safety of the target audio can be effectively improved. Moreover, the target audio can be played only by the authentication of the ear canal characteristics of the users, so that the interactivity among the users can be better improved, and the user experience is improved.

Optionally, the audio output unit 403 may be further configured to:

playing the first audio;

when the first ear canal feature is matched with a first preset ear canal feature in a target ear canal feature set and the second ear canal feature is matched with a second preset ear canal feature in the target ear canal feature set, pausing playing the first audio and playing a target audio associated with the target ear canal feature set;

and when the duration of the first earphone in the unworn state is greater than a first preset value or the duration of the second earphone in the unworn state is greater than a second preset value, pausing the playing of the target audio and playing of the first audio.

Therefore, when the time length of the first earphone in the unworn state is greater than the first preset value or the time length of the second earphone in the unworn state is greater than the second preset value, the playing of the target audio is paused and the original first audio is played. Therefore, the user can play or pause the target audio or the first audio only by wearing or taking off the earphone, so that the user experience can be further improved.

Optionally, the first electronic device is connected to a second headset, and includes:

the first electronic equipment is connected with second electronic equipment, and the second electronic equipment is connected with the second earphone;

a network module 402 operable to:

receiving the second ear canal characteristic sent by the second electronic device, wherein the second ear canal characteristic is obtained by the second electronic device through the second earphone;

the audio output unit 403 may further be configured to:

playing target audio associated with the set of target ear canal features,

the network module 402 may further be configured to:

and sending first information to the second electronic equipment to instruct the second electronic equipment to play the target audio.

In this way, after the second electronic device receives the first information, the target audio can be played, so that audio sharing with the first electronic device is realized.

Optionally, the network module 402 may further be configured to:

acquiring audio playing information of the second electronic equipment;

under the condition that the target audio is not played by the second electronic equipment, sending second information to the second electronic equipment to instruct the second electronic equipment to play the target audio;

under the condition that the second electronic equipment plays the target audio, acquiring the playing progress of the second electronic equipment in playing the target audio;

the processor 610 may be further configured to:

adjusting the playing progress of the first electronic equipment to the playing progress of the second electronic equipment;

alternatively, the network module 402 may further be configured to:

and sending third information to the second electronic equipment so as to adjust the playing progress of the second electronic equipment to the playing progress of the first electronic equipment.

Therefore, the playing progress of the second electronic equipment is adjusted to be the playing progress of the first electronic equipment by adjusting the playing progress of the first electronic equipment or sending third information to the second electronic equipment, audio sharing among users can be further realized, interaction among the users is increased, and user experience is further provided.

Optionally, the processor 610 may further be configured to:

determining a song list associated with the target ear canal feature set;

the audio output unit 403 may further be configured to:

and playing the target audio in the song list.

In this way, the target audio can be played under the condition that the song list is associated with the target ear canal feature set, so that the audio sharing of the target audio is realized.

An 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 process of the embodiment of the audio playing method shown in fig. 1 is implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not repeated here.

The processor is the processor in the electronic device described 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, and so on.

The 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 embodiment of the audio playing method shown in fig. 1, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.

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 according to 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.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:智能设备识别

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类