Audio playback method, device, earphone, electronic device and storage medium

By pre-storing the target audio file in the headset and playing it directly, the problem of delay in playing electronic device audio by the headset is solved and the user experience is improved.

CN113157238BActive Publication Date: 2025-01-17SHENZHEN IQOO COMM SOFTWARE
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110417888.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-19
Publication Date
2025-01-17
Estimated Expiration
2041-04-19

AI Technical Summary

Technical Problem

When the headset plays audio information from electronic devices, there is a long playback delay, which affects the user experience.

Method used

By pre-storing the target audio file in the headset and playing it directly when playback is needed, it avoids the need to transfer the audio file from the electronic device to the headset during playback.

Benefits of technology

The playback delay of audio files is shortened and the user experience is improved, especially in scenarios that require high real-time performance of sound transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113157238B_ABST
    Figure CN113157238B_ABST
Patent Text Reader

Abstract

The present application discloses an audio playback method, device, earphone, electronic device and storage medium, belonging to the field of electronic devices. The audio playback method is applied to earphones, and the audio playback method includes: when the electronic device displays a first application interface, receiving target audio identification information sent by the electronic device, the target audio identification information is used to identify a target audio file; playing the target audio file stored in the earphone, wherein the target audio file is a file in a first application corresponding to the first application interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of electronic equipment, and specifically relates to an audio playback method, device, earphones, electronic equipment and storage medium. Background Art

[0002] With the development of electronic technology, the use of electronic devices such as mobile phones and tablets is becoming more and more common. Users can use electronic devices for communication, shopping, playing games, etc. In some scenarios, users need to play the audio information of applications running on electronic devices through headphones. For example, when users use electronic devices to play games in a noisy environment, in order to be able to hear the audio information such as gunshots, footsteps, and car sounds in the game clearly, the users play the audio information in the game through headphones.

[0003] However, it takes some time for the audio file to be transmitted from the electronic device to the earphone for playback. As a result, when the earphone plays the audio information of the electronic device, there will be a long playback delay, which leads to a poor user experience. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide an audio playback method, device, earphones, electronic equipment and storage medium, which can solve the problem of long playback delay when the earphones play audio information of the electronic equipment.

[0005] In a first aspect, an embodiment of the present application provides an audio playback method, which is applied to headphones, and the method includes:

[0006] When the electronic device displays the first application interface, receiving target audio identification information sent by the electronic device, where the target audio identification information is used to identify a target audio file;

[0007] The target audio file stored in the headset is played, wherein the target audio file is a file in the first application corresponding to the first application interface.

[0008] In a second aspect, an embodiment of the present application provides an audio playback method, which is applied to an electronic device, and the method includes:

[0009] When a first application interface is displayed on the electronic device, target audio identification information is obtained, where the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface;

[0010] The target audio identification information is sent to an earphone that is communicatively connected to the electronic device, so that the earphone plays the target audio file stored in the earphone according to the target audio identification information.

[0011] In a third aspect, an embodiment of the present application provides an audio playback device, applied to headphones, the device comprising:

[0012] A first receiving module, configured to receive target audio identification information sent by the electronic device when the electronic device displays the first application interface, wherein the target audio identification information is used to identify a target audio file;

[0013] A playing module is used to play the target audio file stored in the headset, wherein the target audio file is a file in the first application corresponding to the first application interface.

[0014] In a fourth aspect, an embodiment of the present application provides an audio playback device, which is applied to an electronic device, and the device includes:

[0015] A first acquisition module, configured to acquire target audio identification information when a first application interface is displayed on the electronic device, wherein the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface;

[0016] The first sending module is used to send the target audio identification information to the earphone that is communicatively connected to the electronic device, so that the earphone plays the target audio file stored in the earphone according to the target audio identification information.

[0017] In a fifth aspect, an embodiment of the present application provides a headset, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the audio playback method provided in the first aspect.

[0018] In a sixth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the audio playback method provided in the second aspect.

[0019] In the seventh aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the audio playback method described in the first aspect or the steps of the audio playback method described in the second aspect are implemented.

[0020] In an eighth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instructions to implement the steps of the audio playback method described in the first aspect or to implement the steps of the audio playback method described in the second aspect.

[0021] In the embodiment of the present application, the earphone receives the target audio identification information sent by the electronic device, and then plays the target audio file identified by the target audio identification information stored in the earphone according to the target audio identification information. Since the target audio file is pre-stored in the earphone, the earphone can directly play the target audio file, avoiding sending the target audio file to the earphone when the target audio file needs to be played, saving the time of transmitting the target audio file from the electronic device to the earphone, and thus shortening the playback delay of the target audio file. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a system architecture diagram of an embodiment of an audio playback system provided by the present application.

[0023] Figure 2 This is a timing diagram of an embodiment of an audio playback method provided by the present application.

[0024] Figure 3 This is a timing diagram of another embodiment of an audio playback method provided by the present application.

[0025] Figure 4 This is a timing diagram of another embodiment of an audio playback method provided by the present application.

[0026] Figure 5 It is a flowchart of an embodiment of an audio playback method provided in the first aspect of the present application.

[0027] Figure 6 It is a flowchart of an embodiment of an audio playback method provided in the second aspect of the present application.

[0028] Figure 7 It is a structural diagram of an embodiment of an audio playback device provided in the third aspect of the present application.

[0029] Figure 8 It is a structural diagram of an embodiment of an audio playback device provided in the fourth aspect of the present application.

[0030] Fig. 9 It is a structural schematic diagram of an embodiment of an earphone provided in the fifth aspect of the present application.

[0031] Fig.10 It is a structural diagram of an embodiment of an electronic device provided in the sixth aspect of the present application.

[0032] Fig.11 It is a hardware structure diagram of an embodiment of an electronic device provided in the sixth aspect of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0034] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0035] In the related art, in order to enable headphones to play audio files on electronic devices, usually when the audio file needs to be played, the electronic device calls the audio file of the corresponding scene and sends it to the headphones, and the headphones play the audio file. However, it takes a certain amount of time for the audio file to be transmitted from the electronic device to the headphones for playback, resulting in a delay in the headphones playing the audio file.

[0036] When the delay of playing audio files with headphones is greater than the hearing error of the human ear (generally, the hearing error of the human ear is 100 milliseconds), the human ear hears the audio files played with headphones relatively late. Especially in scenarios where the real-time requirements for sound transmission are relatively high, such as when users use headphones to play games, sounds such as footsteps, car sounds, and gunshots that affect the player's movement judgment are crucial to the success of the game, and users have high requirements for the real-time reception of such audio files. In this scenario, if the human ear hears the audio files played with headphones relatively late, it will affect the user experience.

[0037] In order to solve the problem of long delay when playing audio files in electronic devices with headphones, the present application provides an audio playing method. The audio playing method provided by the embodiment of the present application is described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

[0038] Figure 1 1 is a system architecture diagram of an embodiment of an audio playback system provided by the present application. Figure 1As shown, the audio playback system includes an electronic device 102 and an earphone 104 . After a communication connection is established between the electronic device 102 and the earphone 104 , the audio file on the electronic device 102 is sent to the earphone 104 and played by the earphone 104 .

[0039] It should be noted that the earphone 104 can be a wired earphone or a wireless earphone (such as a Bluetooth earphone), and the earphone 104 can be in-ear, head-mounted, earplug-type, etc., and the type of the earphone 104 is not limited here.

[0040] Based on the above audio playback system, the audio playback method implemented by using the audio playback system is described below. Figure 2 1 is a timing diagram of an embodiment of an audio playback method provided by the present application. Figure 2 As shown, the audio playing method 200 includes:

[0041] S202: When a first application interface is displayed on the electronic device, target audio identification information is obtained, where the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface.

[0042] In S202, the first application needs to play the target audio file, and before playing the target audio file, the electronic device obtains the target audio identification information for identifying the target audio file. Specifically, the electronic device can obtain the target audio identification information from the preset audio identification information. For example, during the process of running a game application on the electronic device, if it is necessary to play the footsteps in the game, the identification information of the footsteps audio file is obtained from the preset audio identification information.

[0043] The first application may be an application that plays audio information periodically or irregularly. For example, the first application may be a game application or a competitive application.

[0044] The target audio identification information may be any information that can identify the target audio file. For example, the target audio identification information may be the code (Identity document, ID) of the target audio file or the name of the target audio file.

[0045] The audio playing method 200 further includes:

[0046] S204: The electronic device sends target audio identification information to a headset that is communicatively connected to the electronic device.

[0047] In S204, when a Bluetooth connection has been established between the electronic device and the headset, the electronic device may send the target audio identification information to the headset via Bluetooth; when a Wireless-Fidelity (Wi-Fi) connection has been established between the electronic device and the headset, the electronic device may send the target audio identification information to the headset via Wi-Fi.

[0048] The audio playing method 200 further includes:

[0049] S206: After receiving the target audio identification information, the earphone plays a target audio file stored in the earphone, wherein the target audio file is a file in the first application corresponding to the first application interface.

[0050] It should be noted that the first application may correspond to multiple audio files, and the target audio file may be one of the multiple audio files corresponding to the first application. For example, the first application corresponds to a first audio file set, and the target audio file may be one of the audio files in the first audio file set.

[0051] In the embodiment of the present application, the earphone receives the target audio identification information sent by the electronic device, and then plays the target audio file identified by the target audio identification information stored in the earphone according to the target audio identification information. Since the target audio file is pre-stored in the earphone, the earphone can directly play the target audio file, avoiding sending the target audio file to the earphone when the target audio file needs to be played, saving the time of transmitting the target audio file from the electronic device to the earphone, and thus shortening the playback delay of the target audio file.

[0052] In the related art, before the electronic device sends the audio file to the earphone, the electronic device first decodes the audio file, and then sends the decoded audio file to the earphone. After receiving the decoded audio file, the earphone plays it.

[0053] It takes a certain amount of time for an electronic device to decode an audio file. Moreover, some audio files are encoded using complex encoding algorithms, which takes a long time to decode the audio files. As a result, the delay in playing audio files with headphones is relatively long.

[0054] In order to further shorten the time delay of the headset playing the audio file, in one or more embodiments of the present application, the target audio file stored in the headset is a decoded audio file. In this way, the headset can directly play the decoded target audio file, saving the time of decoding the audio file, thereby further shortening the time delay of the headset playing the audio file.

[0055] In one or more embodiments of the present application, Figure 3 As shown, before S202, the audio playing method 200 may further include:

[0056] S208: The electronic device obtains a playback delay of an audio file in the first application.

[0057] It should be noted that the playback delay may be: when the earphone plays the audio file in the electronic device, the duration between the electronic device decoding the audio file and the earphone playing the audio file.

[0058] In the embodiment of the present application, the first audio file may be a decoded file.

[0059] The playback delay can be the sum of the following multiple durations: the decoding duration of the audio file, the transmission duration of the decoded audio file to the headset, and the duration from the headset receiving the decoded audio file to playing the audio file.

[0060] The implementation process of S208 is exemplarily described below.

[0061] As an example, the duration of transmitting the decoded audio file to the headset and the duration of the headset receiving the decoded audio file and playing the audio file are respectively predetermined values. In this case, S208 may include:

[0062] The electronic device calls the system interface according to the format and data size of the audio file of the first application, and obtains the decoding duration of the audio file from the system interface;

[0063] The electronic device calculates the sum of the decoding time of the audio file, the time it takes to transmit the decoded audio file to the headset, and the time it takes for the headset to receive the decoded audio file and play the audio file, to obtain the playback delay of the audio file.

[0064] As another example, S208 may include:

[0065] The electronic device decodes the audio files in the first application and records the initial time point when each audio file starts to be decoded;

[0066] When decoding is completed, the electronic device sends the decoded audio file to the headset;

[0067] The electronic device receives a play time point of each audio file sent by the headset, where the play time point is a time point at which the decoded audio file is played;

[0068] The electronic device determines the duration between the initial time point and the playback time point as the playback delay of the audio file.

[0069] When the electronic device receives the decoded audio file and plays it, the electronic device can play it in silence, thus avoiding affecting the normal use of the user. Alternatively, at least part of the decoded audio file is an audio file without sound, thus avoiding affecting the normal use of the user when the electronic device plays it.

[0070] After S208, the audio playing method 200 may further include:

[0071] S210, the electronic device determines an audio file in the first application whose playing delay is greater than a preset time as a first audio file, wherein the number of the first audio files may be one or more, and the first audio files include a target audio file;

[0072] S212, the electronic device sends the first audio file to the earphone, and the earphone receives the first audio file sent by the electronic device;

[0073] S214: When the earphone receives the first audio file, the earphone stores the first audio file in the earphone.

[0074] As an example, after S210 and before S212, the audio playing method 200 may further include: the electronic device decodes the first audio file to obtain a decoded first audio file. In S212, the electronic device sends the decoded first audio file to the headset.

[0075] It should be noted that there may be multiple first audio files, and the multiple first audio files stored in the headset form a first audio file set. In addition, the headset may also store a second audio file set, a third audio file set, etc., and different audio file sets may be audio files in different applications whose playback delay is greater than a preset time length.

[0076] In an embodiment of the present application, an audio file whose playback delay is greater than a preset duration is determined as a first audio file. If the solution in the related art is adopted, the first audio file is sent to the headset only when the electronic device needs to play the first audio file, which will cause a long playback delay when the headset plays the first audio file. Therefore, in an embodiment of the present application, the electronic device sends the first audio file to the headset in advance, and the headset can directly play the first audio file when it needs to play, thereby shortening the playback delay of the audio file.

[0077] In addition, the electronic device sends the first audio file whose playback delay is greater than the preset time to the headset in advance, instead of sending all audio files in the first application to the headset, which can avoid storing too many files in the headset and affecting the normal use of the headset.

[0078] In one or more embodiments of the present application, S208 may include:

[0079] When the electronic device starts the first application, it means that the electronic device may play the audio file of the first application through headphones, so the playback delay of the audio file in the first application is obtained.

[0080] In this way, the first audio file in the first application with a playback delay greater than the preset duration can be sent to the headset in a timely manner.

[0081] In one or more embodiments of the present application, the headset includes a first audio file set, and the first audio file set corresponds to the first application.

[0082] After S206, the audio playing method 200 may further include:

[0083] When the first application ends running or the electronic device and the headset end the communication connection, the first audio file set in the headset is deleted.

[0084] In this way, the audio files in the headset can be deleted in time, and the storage space of the headset can be released in time.

[0085] The audio playback method provided in this application is exemplarily described below.

[0086] Figure 4 FIG. 1 is a timing diagram of another embodiment of an audio playback method provided by the present application. Figure 4 As shown, the audio playing method 300 includes:

[0087] S302, the electronic device receives a user's start input for a first application installed on the electronic device, and in response to the start input, starts the first application;

[0088] S304, the electronic device preloads the audio file of the first application;

[0089] S306, the electronic device obtains the playback delay of each audio file;

[0090] S308, the electronic device traverses each audio file and obtains a first audio file whose playback delay is greater than a preset time length;

[0091] S310: The electronic device marks a first audio file to obtain audio identification information of the first audio file, and decodes the first audio file to obtain a decoded first audio file.

[0092] Among them, after marking and decoding the first audio file whose playback delay is greater than the preset duration, a corresponding relationship as shown in Table 1 can be obtained. In Table 1, the audio file ID is the audio identification information, and K1 represents the preset duration.

[0093] Table 1

[0094]

[0095] As can be seen from Table 1, the first audio file with a playback delay greater than the preset duration needs to be pre-stored, that is, the first audio file needs to be forwarded to the headset for storage in advance. Since the playback delay of the audio files with IDs 1, 3, 4, 6, 7, 8, and 9 is greater than the preset duration, these audio files are determined as the first audio files and sent to the headset for storage.

[0096] The audio playing method 300 further includes:

[0097] S312, the electronic device sends each first audio file and its audio identification information to an earphone that is communicatively connected to the electronic device, so that the earphone pre-stores the first decoded audio file;

[0098] S314, when the electronic device needs to play a target audio file during the running of the first application, and the target audio file is the first audio file pre-transferred and stored in Table 1, target audio identification information for identifying the target audio file is sent to the headset;

[0099] S316: After receiving the target audio identification information, the earphone plays the target audio file identified by the target audio identification information stored in the earphone.

[0100] In this way, the delay for the user to actually hear the sound of the audio file is less than the preset duration, thereby improving the user experience.

[0101] The following uses the example of the first application being a mobile game (i.e., a mobile game) to illustrate an embodiment of the present application.

[0102] Assuming that the human ear has a perception delay of 150ms, 150ms is used as the preset time length for determining whether to pre-save. Of course, the preset time length can also be adjusted according to actual needs, and the specific value of the preset time length is not limited here.

[0103] When a mobile game is loaded on a mobile phone, the playback delay of each audio file of the mobile game is obtained, and then the first audio file with a playback delay greater than 150ms is decoded, and the decoded first audio file is sent to the headset that is connected to the mobile phone for communication. For example, if the playback delay of the audio file of "Rolling Stones" in the mobile game is greater than 150ms, the audio file of "Rolling Stones" is decoded, transmitted and pre-stored, and after compression, it is marked as an "Angry Birds-Rolling Stones.avi" file. When the mobile game needs to use the "Rolling Stones" sound effect, the mobile phone sends the "Angry Birds-Rolling Stones.avi" logo to the headset, and the headset obtains the "Rolling Stones" audio file stored locally based on the logo and plays it. In this way, users can enjoy seamless audio and video synchronous output and enhance the experience of related mobile games.

[0104] Based on the above embodiments, the audio playback method provided in the first aspect and the audio playback method provided in the second aspect of the present application are described below respectively.

[0105] Figure 5 1 is a flow chart of an embodiment of an audio playback method provided by the first aspect of the present application. The audio playback method is applied to headphones, such as Figure 5 As shown, the audio playing method 400 includes:

[0106] S402, when the electronic device displays the first application interface, receiving target audio identification information sent by the electronic device, where the target audio identification information is used to identify a target audio file;

[0107] S404: Play a target audio file stored in the headset, where the target audio file is a file in the first application corresponding to the first application interface.

[0108] In the embodiment of the present application, the earphone receives the target audio identification information sent by the electronic device, and then plays the target audio file identified by the target audio identification information stored in the earphone according to the target audio identification information. Since the target audio file is pre-stored in the earphone, the earphone can directly play the target audio file, avoiding sending the target audio file to the earphone when the target audio file needs to be played, saving the time of transmitting the target audio file from the electronic device to the earphone, and thus shortening the playback delay of the target audio file.

[0109] In one or more embodiments of the present application, before receiving the target audio identification information sent by the electronic device, the audio playing method 400 may further include:

[0110] Receiving a first audio file sent by an electronic device, wherein a playback delay of the first audio file is greater than a preset duration;

[0111] A first audio file is stored in the earphone, wherein the first audio file includes a target audio file.

[0112] In an embodiment of the present application, an audio file whose playback delay is greater than a preset duration is determined as a first audio file. If the electronic device in the related art sends the first audio file to the headset only when the first audio file needs to be played, the headset will have a long playback delay when playing the first audio file. Therefore, in an embodiment of the present application, the electronic device sends the first audio file to the headset in advance, and the headset can directly play the first audio file when the first audio file needs to be played, thereby shortening the playback delay of the audio file.

[0113] In one or more embodiments of the present application, the headset includes a first audio file set, and after the first audio file set corresponds to the first application playing a target audio file stored in the headset, the audio playing method 400 may further include:

[0114] When the first application ends running or the electronic device and the headset end the communication connection, the first audio file set in the headset is deleted.

[0115] In this way, the audio files in the headset can be deleted in time, and the storage space of the headset can be released in time.

[0116] Figure 6 1 is a flow chart of an embodiment of an audio playback method provided in the second aspect of the present application. The audio playback method is applied to electronic devices such as Figure 6 As shown, the audio playing method 500 includes:

[0117] S502: when a first application interface is displayed on the electronic device, obtaining target audio identification information, where the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface;

[0118] S504: Send target audio identification information to an earphone that is communicatively connected to the electronic device, so that the earphone plays a target audio file stored in the earphone according to the target audio identification information.

[0119] In an embodiment of the present application, when the first application needs to play the target audio file, the electronic device sends the target audio identification information used to identify the target audio file to the headset, so that the headset plays the target audio file identified by the target audio identification information stored locally. The electronic device does not need to process and transmit the target audio file when it needs to be played, which can shorten the playback delay of the target audio file.

[0120] In one or more embodiments of the present application, before obtaining the target audio identification information, the audio playing method 500 may further include:

[0121] Get the playback delay of the audio file in the first application;

[0122] Determine an audio file in the first application whose playback delay is greater than a preset time as a first audio file;

[0123] The first audio file is sent to the earphone, so that the earphone stores the first audio file.

[0124] In an embodiment of the present application, the electronic device pre-sends the first audio file in the first application whose playback delay is greater than a preset time to the headset, instead of sending all audio files of the first application to the headset, thereby avoiding storing too many files in the headset and affecting normal use.

[0125] In one or more embodiments of the present application, the first audio file is a decoded file, and obtaining the playback delay of the audio file in the first application may include:

[0126] Decoding the audio files in the first application, and recording the initial time point when decoding of each audio file starts;

[0127] When decoding is completed, the decoded audio file is sent to the earphone;

[0128] Receive the playback time of each audio file sent by the headset;

[0129] The duration between the initial time point and the playback time point is determined as the playback delay of the audio file.

[0130] Corresponding to the audio playback method provided in the first aspect of the present application, the third aspect of the present application provides an audio playback device, Figure 7 1 is a schematic diagram of the structure of an embodiment of an audio playback device provided in the third aspect of the present application. Figure 7 As shown, the audio playback device 600 includes:

[0131] A first receiving module 602 is used to receive target audio identification information sent by the electronic device when the electronic device displays the first application interface, where the target audio identification information is used to identify a target audio file;

[0132] The playing module 604 is used to play the target audio file stored in the earphone, wherein the target audio file is a file in the first application corresponding to the first application interface.

[0133] In the embodiment of the present application, the earphone receives the target audio identification information sent by the electronic device, and then plays the target audio file identified by the target audio identification information stored in the earphone according to the target audio identification information. Since the target audio file is pre-stored in the earphone, the earphone can directly play the target audio file, avoiding sending the target audio file to the earphone when the target audio file needs to be played, saving the time of transmitting the target audio file from the electronic device to the earphone, and thus shortening the playback delay of the target audio file.

[0134] In one or more embodiments of the present application, the audio playback device 600 may further include:

[0135] A second receiving module is used to receive a first audio file sent by an electronic device, wherein a playback delay of the first audio file is greater than a preset duration;

[0136] The storage module is used to store a first audio file in the earphone, wherein the first audio file includes a target audio file.

[0137] In an embodiment of the present application, an audio file whose playback delay is greater than a preset duration is determined as a first audio file. If the electronic device in the related art sends the first audio file to the headset only when the first audio file needs to be played, the headset will have a long playback delay when playing the first audio file. Therefore, in an embodiment of the present application, the electronic device sends the first audio file to the headset in advance, and the headset can directly play the first audio file when the first audio file needs to be played, thereby shortening the playback delay of the audio file.

[0138] In one or more embodiments of the present application, the earphone includes a first audio file set, the first audio file set corresponds to a first application, and the audio playback device 600 may further include:

[0139] The deleting module is used to delete the first audio file set in the headset when the first application ends running or the electronic device and the headset end the communication connection.

[0140] In this way, the audio files in the headset can be deleted in time, and the storage space of the headset can be released in time.

[0141] It should be noted that the audio playback method provided in the first aspect of the present application can be executed by the audio playback device provided in the third aspect of the present application, or a control module in the audio playback device for executing the audio playback method. In the embodiment of the present application, the audio playback method executed by the audio playback device provided in the third aspect of the present application is used as an example for explanation.

[0142] Corresponding to the audio playback method provided in the second aspect of the present application, the fourth aspect of the present application provides an audio playback device, Figure 8 1 is a schematic diagram of the structure of an embodiment of an audio playback device provided in the fourth aspect of the present application. Figure 8 As shown, the audio playback device 700 includes:

[0143] A first acquisition module 702 is used to acquire target audio identification information when a first application interface is displayed on the electronic device, where the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface;

[0144] The first sending module 704 is configured to send target audio identification information to an earphone that is communicatively connected to the electronic device, so that the earphone plays a target audio file stored in the earphone according to the target audio identification information.

[0145] In an embodiment of the present application, when the first application needs to play the target audio file, the electronic device sends the target audio identification information used to identify the target audio file to the headset, so that the headset plays the target audio file identified by the target audio identification information stored locally. The electronic device does not need to process and transmit the target audio file when it needs to be played, which can shorten the playback delay of the target audio file.

[0146] In one or more embodiments of the present application, the audio playback device 700 may further include:

[0147] A second acquisition module is used to acquire the playback delay of the audio file in the first application;

[0148] A determination module, configured to determine an audio file in the first application whose playback delay is greater than a preset duration as a first audio file;

[0149] The second sending module is used to send the first audio file to the earphone, so that the earphone stores the first audio file.

[0150] In an embodiment of the present application, the electronic device sends the first audio file in the first application whose playback delay is greater than a preset time to the headset in advance, instead of sending all audio files of the first application to the headset, thereby avoiding storing too many files in the headset and affecting normal use.

[0151] In one or more embodiments of the present application, the first audio file is a decoded file, and the second acquisition module may include:

[0152] A decoding unit, used to decode the audio file in the first application;

[0153] A recording unit, used to record the initial time point when each audio file starts to be decoded;

[0154] A sending unit, used for sending the decoded audio file to the earphone when the decoding is completed;

[0155] A receiving unit, used for receiving a playing time point of each audio file sent by the earphone;

[0156] The determination unit is used to determine the duration between the initial time point and the playback time point as the playback delay of the audio file.

[0157] It should be noted that the audio playback method provided in the second aspect of the present application can be executed by the audio playback device provided in the fourth aspect of the present application, or a control module in the audio playback device for executing the audio playback method. In the embodiment of the present application, the audio playback method executed by the audio playback device provided in the fourth aspect of the present application is used as an example for explanation.

[0158] The audio playback device provided in the third aspect of the present application or the audio playback device provided in the fourth aspect of the present application may be a device, or a component, an integrated circuit, or a chip in a terminal.

[0159] The audio playback device provided in the fourth aspect of the present application may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the non-mobile electronic device may be a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc., which is not specifically limited in the embodiments of the present application.

[0160] The audio playback device provided in the fourth aspect of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

[0161] The audio playback device provided in the third aspect of the present application can achieve Figure 5 The audio playback device provided in the fourth aspect of the present application can implement each process of the method embodiment. Figure 6 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0162] The fifth aspect of the present application provides a headset, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor, which implements the steps of the audio playback method provided in the first aspect of the present application when the program or instruction is executed by the processor.

[0163] like Fig. 9 As shown, the earphone 800 provided in the embodiment of the present application includes a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, each process of the audio playback method provided in the first aspect of the present application is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0164] The sixth aspect of the present application provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the audio playback method provided in the second aspect of the present application are implemented.

[0165] like Fig.10 As shown, the electronic device 900 provided in the embodiment of the present application includes a processor 901, a memory 902, and a program or instruction stored in the memory 902 and executable on the processor 901. When the program or instruction is executed by the processor 901, the various processes of the audio playback method embodiment provided in the second aspect of the present application are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0167] Fig.11 It is a hardware structure diagram of an embodiment of an electronic device provided in the sixth aspect of the present application.

[0168] like Fig.11 As shown, the electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0169] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power consumption. Fig.11 not shown in the figure). Fig.11The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0170] The processor 1010 is configured to obtain target audio identification information when a first application interface is displayed on the electronic device, where the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface;

[0171] The network module 1002 or the Bluetooth module is used to send the target audio identification information to the earphone that is communicatively connected to the electronic device, so that the earphone plays the target audio file stored in the earphone according to the target audio identification information.

[0172] In an embodiment of the present application, when the first application needs to play the target audio file, the electronic device sends the target audio identification information used to identify the target audio file to the headset, so that the headset plays the target audio file identified by the target audio identification information stored locally. The electronic device does not need to process and transmit the target audio file when it needs to be played, which can shorten the playback delay of the target audio file.

[0173] In one or more embodiments of the present application, the processor 1010 is further configured to:

[0174] Get the playback delay of the audio file in the first application;

[0175] Determine an audio file in the first application whose playback delay is greater than a preset time as a first audio file;

[0176] The first audio file is sent to the earphone, so that the earphone stores the first audio file.

[0177] In an embodiment of the present application, the electronic device pre-sends the first audio file in the first application whose playback delay is greater than a preset time to the headset, instead of sending all audio files of the first application to the headset, thereby avoiding storing too many files in the headset and affecting normal use.

[0178] In one or more embodiments of the present application, the processor 1010 may be configured to: decode the audio files in the first application, and respectively record an initial time point at which decoding of each audio file starts.

[0179] The network module 1002 or the Bluetooth module is used for:

[0180] When decoding is completed, the decoded audio file is sent to the earphone;

[0181] Receive the playback time of each audio file sent by the headset.

[0182] The processor 1010 may be configured to determine the duration between the initial time point and the playback time point as the playback delay of the audio file.

[0183] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 1009 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1010.

[0184] The seventh aspect of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of any embodiment of the above-mentioned audio playback method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0185] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0186] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of any embodiment of the above-mentioned audio playback method, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0187] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0188] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0189] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0190] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An audio playback method, applied to headphones, characterized in that: The method comprises: When the electronic device displays the first application interface, receiving target audio identification information sent by the electronic device, the target audio identification information is used to identify a target audio file, and the electronic device is connected to the headset by wireless communication; Play the target audio file stored in the headset, wherein the target audio file is a file in a first application corresponding to the first application interface, a first audio file set is stored in the headset, the first audio file set corresponds to the first application, the first audio file set includes a plurality of first audio files with a playback delay greater than a preset time length, the first audio file includes the target audio file, and the target audio file is a decoded audio file sent by the electronic device; The method further comprises: Receiving a decoded audio file sent by the electronic device, where the decoded audio file is obtained by the electronic device decoding the audio file in the first application; The decoded audio file is played silently, and the playback time point of the decoded audio file is sent to the electronic device, so that the electronic device determines the playback delay of the audio file in the first application according to the initial time point when decoding the audio file in the first application and the playback time point.

2. The method according to claim 1, characterized in that Before receiving the target audio identification information sent by the electronic device, the method further includes: Receiving a first audio file sent by the electronic device, wherein a playback delay of the first audio file is greater than a preset duration; The first audio file is stored in the headset.

3. The method according to claim 1 or 2, characterized in that: After playing the target audio file stored in the headset, the method further includes: When the first application ends running or the electronic device and the headset end the communication connection, the first audio file set in the headset is deleted.

4. An audio playback method, applied to an electronic device, characterized in that: The method comprises: When a first application interface is displayed on the electronic device, target audio identification information is obtained, where the target audio identification information is identification information of a target audio file of a first application corresponding to the first application interface, and the electronic device is wirelessly connected to the headset; Sending the target audio identification information to an earphone that is communicatively connected to the electronic device, so that the earphone plays the target audio file stored in the earphone according to the target audio identification information, wherein a first audio file set is stored in the earphone, the first audio file set corresponds to the first application, the first audio file set includes a plurality of first audio files whose playing delay is greater than a preset time length, the first audio file includes the target audio file, and the target audio file is a decoded audio file sent by the electronic device; The method further comprises: Decoding the audio files in the first application, and recording the initial time point when decoding of each audio file starts; Sending the decoded audio file to the headset; Receiving a play time point of each of the audio files sent by the headset, the play time point being a time point at which the headset plays the decoded audio file in silence; The playback delay of the audio file in the first application is determined according to the initial time point and the playback time point.

5. The method according to claim 4, characterized in that Before obtaining the target audio identification information, the method further includes: Obtaining a playback delay of an audio file in the first application; Determine an audio file in the first application whose playback delay is greater than a preset time as a first audio file; The first audio file is sent to the headset so that the headset stores the first audio file.

6. The method according to claim 5, characterized in that The first audio file is a decoded file, The obtaining the playback delay of the audio file in the first application includes: Decoding the audio files in the first application, and recording the initial time point when decoding of each audio file starts; When decoding is completed, the decoded audio file is sent to the headset; Receiving a playing time point of each audio file sent by the headset; The duration between the initial time point and the playback time point is determined as the playback delay of the audio file.

7. An audio playback device, applied to headphones, characterized in that: The device comprises: A first receiving module, configured to receive target audio identification information sent by the electronic device when the electronic device displays a first application interface, wherein the target audio identification information is used to identify a target audio file, and the electronic device is connected to the headset by wireless communication; a playing module, configured to play the target audio file stored in the headset, wherein the target audio file is a file in the first application corresponding to the first application interface; The headset stores a first audio file set, the first audio file set corresponds to the first application, the first audio file set includes a plurality of first audio files with a playback delay greater than a preset time length, the first audio files include the target audio file, and the target audio file is a decoded audio file sent by the electronic device; The device is also used for: Receiving a decoded audio file sent by the electronic device, where the decoded audio file is obtained by the electronic device decoding the audio file in the first application; The decoded audio file is played silently, and the playback time point of the decoded audio file is sent to the electronic device, so that the electronic device determines the playback delay of the audio file in the first application according to the initial time point when decoding the audio file in the first application and the playback time point.

8. The device according to claim 7, characterized in that The device also includes: A second receiving module is used to receive a first audio file sent by the electronic device, wherein the playback delay of the first audio file is greater than a preset duration; A storage module is used to store the first audio file in the headset, wherein the first audio file includes the target audio file.

9. The device according to claim 7 or 8, characterized in that The earphone includes a first audio file set, the first audio file set corresponds to the first application, and the device further includes: The deleting module is used to delete the first audio file set in the headset when the first application ends running or the electronic device and the headset end the communication connection.

10. An audio playback device, applied to electronic equipment, characterized in that: The device comprises: A first acquisition module, configured to acquire target audio identification information when a first application interface is displayed on the electronic device, the target audio identification information being identification information of a target audio file of a first application corresponding to the first application interface, and the electronic device being wirelessly connected to the headset; A first sending module, configured to send the target audio identification information to an earphone that is communicatively connected to the electronic device, so that the earphone plays the target audio file stored in the earphone according to the target audio identification information; The headset stores a first audio file set, the first audio file set corresponds to the first application, the first audio file set includes a plurality of first audio files with a playback delay greater than a preset time length, the first audio files include the target audio file, and the target audio file is a decoded audio file; The second acquisition module includes: A decoding unit, configured to decode the audio file in the first application; A recording unit, used to record the initial time point when each audio file starts to be decoded; A sending unit, used for sending the decoded audio file to the headset when the decoding is completed; A receiving unit, configured to receive a play time point of each audio file sent by the headset, wherein the play time point is a time point when the headset plays the decoded audio file in silence; A determining unit is used to determine the playback delay of the audio file in the first application according to the initial time point and the playback time point.

11. The device according to claim 10, characterized in that The device also includes: A second acquisition module, used to acquire the playback delay of the audio file in the first application; A determination module, configured to determine an audio file in the first application whose playback delay is greater than a preset duration as a first audio file; The second sending module is used to send the first audio file to the headset, so that the headset stores the first audio file.

12. The device according to claim 11, characterized in that The first audio file is a decoded file, and the determining unit is used to determine the duration between the initial time point and the playback time point as the playback delay of the audio file.

Citation Information

Patent Citations

  • Audio playing method and device, electronic device and computer-readable medium

    CN109445739A

  • Independent audio playing method based on Bluetooth headset

    CN111163452A

  • Audio playing method and device

    CN112579034A