CN113838488B - Audio playing packet generation method and device and audio playing method and device - Google Patents

Audio playing packet generation method and device and audio playing method and device Download PDF

Info

Publication number
CN113838488B
CN113838488B CN202010588396.1A CN202010588396A CN113838488B CN 113838488 B CN113838488 B CN 113838488B CN 202010588396 A CN202010588396 A CN 202010588396A CN 113838488 B CN113838488 B CN 113838488B
Authority
CN
China
Prior art keywords
audio
sequence
instruction
playing
played
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010588396.1A
Other languages
Chinese (zh)
Other versions
CN113838488A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010588396.1A priority Critical patent/CN113838488B/en
Publication of CN113838488A publication Critical patent/CN113838488A/en
Application granted granted Critical
Publication of CN113838488B publication Critical patent/CN113838488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B19/00Driving, starting, stopping record carriers not specifically of filamentary or web form, or of supports therefor; Control thereof; Control of operating function ; Driving both disc and head
    • G11B19/02Control of operating function, e.g. switching from recording to reproducing
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel

Abstract

The embodiment of the disclosure discloses an audio playing packet generation method and device and an audio playing method and device. One embodiment of the method comprises: acquiring an audio sequence to be played and a preset time interval, wherein the audio sequence to be played is arranged according to the playing sequence of the audio to be played; generating an instruction sequence based on an audio sequence to be played and a preset time interval, wherein the instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, the audio playing instructions are used for playing the corresponding audio to be played, the time interval setting instructions in the instruction sequence are positioned between the two audio playing instructions, and the time interval setting instructions are used for setting the preset time interval; and generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence. The implementation mode improves the diversity of audio playing and is beneficial to improving the user experience.

Description

Audio playing packet generation method and device and audio playing method and device
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to an audio playing packet generation method and device and an audio playing method and device.
Background
Currently, the audio playing mode may include a selective playing mode and an automatic playing mode. Selecting the play mode means that the user can select a certain section of audio to play, and after the selected audio is played, the user can continue to select the next section of audio to play; the automatic playing mode refers to that a user can select the playing of audio from a certain audio list, and when the playing of the selected audio is completed, other audio in the audio list can be automatically played.
Disclosure of Invention
The embodiment of the disclosure provides an audio playing packet generation method and device and an audio playing method and device.
In a first aspect, an embodiment of the present disclosure provides an audio play package generating method, where the method includes: acquiring an audio sequence to be played and a preset time interval, wherein the audio sequence to be played is arranged according to the playing sequence of the audio to be played; generating an instruction sequence based on an audio sequence to be played and a preset time interval, wherein the instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, the audio playing instructions are used for playing the corresponding audio to be played, the time interval setting instructions in the instruction sequence are positioned between the two audio playing instructions, and the time interval setting instructions are used for setting the preset time interval; and generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence.
In some embodiments, before generating the sequence of instructions based on the audio sequence to be played and the preset time interval, the method further comprises: acquiring a pre-waiting time; and generating the instruction sequence based on the audio sequence to be played and the preset time interval further comprises: and generating an instruction sequence based on the audio sequence to be played, the preset time interval and the pre-waiting time, wherein the instruction sequence comprises a pre-waiting time setting instruction, the pre-waiting time setting instruction is positioned at the head of the instruction sequence, and the pre-waiting time setting instruction is used for setting the pre-waiting time.
In some embodiments, before generating the sequence of instructions based on the audio sequence to be played and the preset time interval, the method further comprises: acquiring post-waiting time; and generating the instruction sequence based on the audio sequence to be played and the preset time interval further comprises: and generating a playing instruction sequence based on the audio sequence to be played, the preset time interval and the post-waiting time, wherein the instruction sequence comprises a post-waiting time setting instruction, the post-waiting time setting instruction is positioned at the last position of the instruction sequence, and the post-waiting time setting instruction is used for setting the post-waiting time.
In some embodiments, generating, based on the instruction sequence, an audio playing packet corresponding to the audio sequence to be played includes: acquiring an identification control instruction for controlling an audio identification on a target user interface, wherein the audio identification comprises a first audio identification and a second audio identification, the first audio identification is used for indicating that the audio is in a playing state, the second audio identification is used for indicating that the audio is in an unplayed state, and the identification control instruction is used for adjusting the first audio identification to be the second audio identification or adjusting the second audio identification to be the first audio identification; and generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence and the identification control instruction.
In some embodiments, the instruction sequence further includes an audio stop playing instruction and a time interval stop setting instruction, the audio stop playing instruction in the instruction sequence corresponds to the audio playing instruction, and the time interval stop setting instruction corresponds to the time interval setting instruction.
In some embodiments, the same audio is included in the audio sequence to be played.
In a second aspect, an embodiment of the present disclosure provides an audio playing method, including: in response to receiving a playing request initiated by a user and directed to an audio corresponding to a target audio playing packet, obtaining the target audio playing packet, wherein the target audio playing packet is generated by adopting any one of the methods in the first aspect; and executing the instructions in the instruction sequence included in the target audio playing packet in sequence.
In some embodiments, the target audio data packet includes identification control instructions for controlling audio identification on the target user interface; and after executing the instructions in the sequence of instructions included in the target audio playback packet in order, the method further comprises: and executing the identification control instruction to adjust the second audio identification on the target user interface to the first audio identification.
In some embodiments, the method further comprises: in response to the instructions in the instruction sequence being executed, executing an identification control instruction to adjust a first audio identification on the target user interface to a second audio identification.
In a third aspect, an embodiment of the present disclosure provides an audio play pack generating apparatus, where the apparatus includes: the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is configured to acquire an audio sequence to be played and a preset time interval, and the audio sequence to be played is arranged according to the playing sequence of audio to be played; the first generation unit is configured to generate an instruction sequence based on an audio sequence to be played and a preset time interval, wherein the instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, the audio playing instructions are used for playing the corresponding audio to be played, the time interval setting instructions in the instruction sequence are positioned between the two audio playing instructions, and the time interval setting instructions are used for setting the preset time interval; and the second generating unit is configured to generate an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence.
In some embodiments, the apparatus further comprises: a second acquisition unit configured to acquire a pre-latency; and the first generating unit is further configured to: and generating an instruction sequence based on the audio sequence to be played, the preset time interval and the pre-waiting time, wherein the instruction sequence comprises a pre-waiting time setting instruction, the pre-waiting time setting instruction is positioned at the head of the instruction sequence, and the pre-waiting time setting instruction is used for setting the pre-waiting time.
In some embodiments, the apparatus further comprises: a third acquisition unit configured to acquire a post-wait time; and the first generating unit is further configured to: and generating a playing instruction sequence based on the audio sequence to be played, the preset time interval and the post-waiting time, wherein the instruction sequence comprises a post-waiting time setting instruction, the post-waiting time setting instruction is positioned at the last position of the instruction sequence, and the post-waiting time setting instruction is used for setting the post-waiting time.
In some embodiments, the second generating unit comprises: the acquisition module is configured to acquire an identification control instruction for controlling an audio identification on the target user interface, wherein the audio identification comprises a first audio identification and a second audio identification, the first audio identification is used for indicating that the audio is in a playing state, the second audio identification is used for indicating that the audio is in an unplayed state, and the identification control instruction is used for adjusting the first audio identification to be the second audio identification or adjusting the second audio identification to be the first audio identification; and the generating module is configured to generate an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence and the identification control instruction.
In some embodiments, the instruction sequence further includes an audio stop playing instruction and a time interval stop setting instruction, the audio stop playing instruction in the instruction sequence corresponds to the audio playing instruction, and the time interval stop setting instruction corresponds to the time interval setting instruction.
In some embodiments, the same audio is included in the audio sequence to be played.
In a fourth aspect, an embodiment of the present disclosure provides an audio playing apparatus, including: a fourth obtaining unit, configured to obtain a target audio playing packet in response to receiving a playing request initiated by a user and for an audio corresponding to the target audio playing packet, where the target audio playing packet is generated by using any one of the methods in the first aspect; a first execution unit configured to sequentially execute instructions in a sequence of instructions included in a target audio playback packet.
In some embodiments, the target audio data packet includes identification control instructions for controlling audio identification on the target user interface; and the apparatus further comprises: a second execution unit configured to execute the identification control instruction to adjust a second audio identification on the target user interface to the first audio identification.
In some embodiments, the apparatus further comprises: and the third execution unit is configured to execute the identification control instruction to adjust the first audio identification on the target user interface to be the second audio identification in response to the instruction in the instruction sequence being executed completely.
In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement the method of any of the embodiments of the first and second aspects described above.
In a sixth aspect, embodiments of the present disclosure provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the method of any of the embodiments of the first and second aspects described above.
The audio playing packet generating method, the audio playing packet generating device, the audio playing method and the audio playing device provided by the embodiment of the disclosure are characterized in that an audio sequence to be played and a preset time interval are obtained, wherein the audio sequence to be played is arranged according to a playing sequence of audio to be played, and then an instruction sequence is generated based on the audio sequence to be played and the preset time interval, wherein the instruction sequence comprises an audio playing instruction and a time interval setting instruction, the order of the audio playing instruction in the instruction sequence corresponds to the order of the audio to be played in the audio sequence to be played, the audio playing instruction is used for playing the corresponding audio to be played, the time interval setting instruction in the instruction sequence is located between the two audio playing instructions, the time interval setting instruction is used for setting the preset time interval, and finally, the audio playing packet corresponding to the audio sequence to be played is generated based on the instruction sequence, so that the audio sequence to be played and the time interval to be set between the audio to be played can be integrally formed into a representation instruction sequence, and the audio playing and the time interval can be controlled by the instruction sequence; in addition, the preset time interval can provide the user with the reaction time for the previous section of audio, which is beneficial to improving the user experience; in addition, compared with a mode that a user manually clicks a pause button to obtain a time interval in the related art, the audio playing method and the audio playing device can improve the automation degree of audio playing, reduce user operation and further improve user experience.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of an audio play pack generation method according to the present disclosure;
fig. 3 is a schematic diagram of an application scenario of an audio play pack generation method according to an embodiment of the present disclosure;
FIG. 4 is a flow diagram of one embodiment of an audio playback method according to the present disclosure;
fig. 5 is a schematic diagram of an application scenario of an audio playing method according to an embodiment of the present disclosure
FIG. 6 is a schematic block diagram of an embodiment of an audio play out package generation apparatus according to the present disclosure;
FIG. 7 is a schematic block diagram of one embodiment of an audio playback device according to the present disclosure;
FIG. 8 is a schematic structural diagram of a computer system suitable for use with the electronic device used to implement embodiments of the present disclosure.
Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of an audio play package generation method, an audio play package generation apparatus, an audio play method, or an audio play apparatus of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. Various communication client applications, such as an audio playing application, audio processing software, a searching application, an instant messaging tool, a mailbox client, social platform software, and the like, may be installed on the terminal devices 101, 102, and 103.
The terminal devices 101, 102, 103 may be hardware or software. When the terminal devices 101, 102, and 103 are hardware, they may be various electronic devices, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as an audio processing server that processes data such as audio sequences to be played, which are transmitted by the terminal apparatuses 101, 102, 103. The audio processing server may analyze and perform other processing on the received data such as the audio sequence to be played, and obtain a processing result (e.g., an audio playing packet corresponding to the audio sequence to be played).
It should be noted that the audio play packet generation method provided by the embodiment of the present disclosure may be executed by the terminal devices 101, 102, and 103, or may be executed by the server 105, and accordingly, the audio play packet generation apparatus may be disposed in the terminal devices 101, 102, and 103, or may be disposed in the server 105. The audio playing method provided by the embodiment of the present disclosure may be executed by the terminal devices 101, 102, 103, and accordingly, the audio playing apparatus may be disposed in the terminal devices 101, 102, 103.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of an audio play out package generation method according to the present disclosure is shown. The audio playing packet generating method comprises the following steps:
step 201, an audio sequence to be played and a preset time interval are obtained.
In this embodiment, an execution subject (for example, a server shown in fig. 1) of the audio playing packet generating method may obtain the audio sequence to be played and the preset time interval from a remote location or a local location through a wired connection manner or a wireless connection manner. The audio to be played in the audio sequence to be played is arranged according to the playing sequence, and the audio to be played may be the audio to be played. The audio sequence to be played may include at least two audios to be played. Specifically, the audio to be played in the audio sequence to be played may be various audios, for example, the audio corresponding to music, the audio corresponding to words and phrases, and the like. Here, the audio corresponding to the words may be audio for the user to learn the reading of the words.
Specifically, each audio to be played in the audio sequence to be played may be an audio corresponding to a sentence, and the whole audio sequence to be played may be an audio corresponding to a text composed of sentences.
In some optional implementations of this embodiment, the same audio may be included in the audio sequence to be played. As an example, the audio sequence to be played may include: audio "suit, military suit"; audio "suit, military suit"; audio "suit", military suit. Therefore, the same audio is played repeatedly, so that the impression of the user is deepened, the user can more accurately acquire the content in the audio, and the learning effect of the user is improved.
In this embodiment, the preset time interval may be a time interval predetermined by a technician, and is configured between two audio to be played, so that when the audio to be played is played, a reaction time of the audio to be played can be provided for a user. Specifically, the preset time interval may be any, and may be, for example, 5 seconds, 7 seconds, or the like.
As an example, the preset time interval may be 5 seconds, and further, after playing the first audio "suit, military suit" in the audio sequence to be played, the pause may be 5 seconds, and within the 5 seconds, the user may read along the audio "suit, military suit" by the user; then, the second audio in the audio sequence to be played can be played, namely the package of military uniform, and then the pause is carried out for 5 seconds; finally, the third audio in the audio sequence to be played can be played, namely the costume and the military costume.
Step 202, generating an instruction sequence based on the audio sequence to be played and the preset time interval.
In this embodiment, the execution subject may generate an instruction sequence based on the audio sequence to be played and the preset time interval obtained in step 201. The instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, and the audio playing instructions are used for playing the corresponding audio to be played. As an example, the audio sequence to be played is "audio 1; audio 2; audio 3 ', the audio playing instruction in the instruction sequence is ' audio playing instruction 1 '; audio playback instruction 2; an audio playing instruction 3", wherein the audio playing instruction 1 corresponds to the audio 1 and is used for playing the audio 1; the audio playing instruction 2 corresponds to the audio 2 and is used for playing the audio 2; the audio play instruction 3 corresponds to audio 3, and is used for playing audio 3.
In this embodiment, the time interval setting instruction in the instruction sequence is located between two audio playing instructions, and the time interval setting instruction is used for setting a preset time interval.
Specifically, as an example, the audio playing instruction in the instruction sequence is "audio playing instruction 1; audio playback instruction 2; audio play instruction 3", the instruction sequence may be" audio play instruction 1; time interval setting instruction 1; audio playback instruction 2; time interval setting instruction 2; audio play instruction 3". The time interval setting instruction 1 is located between the audio playing instruction 1 and the audio playing instruction 2, and is used for setting a preset time interval for playing the audio 1 and the audio 2. The time interval setting instruction 2 is located between the audio playing instruction 2 and the audio playing instruction 3, and is used for setting a preset time interval for playing the audio 2 and the audio 3.
In practice, the preset time interval may be set in various ways, for example, the preset time interval may be set by using a timer, and the time interval setting instruction may be used to control the timer to count time with the preset time interval as a target. Alternatively, the preset time interval may be set by using a blank audio, and the time interval setting instruction may be used to control the blank audio to be played with the preset time interval as the playing duration. It should be noted that the blank audio may be pre-recorded audio that does not include sound.
In some optional implementations of this embodiment, before step 202, the execution subject may further obtain a pre-wait time; and the execution subject may generate the instruction sequence by: and generating an instruction sequence based on the audio sequence to be played, the preset time interval and the pre-waiting time, wherein the instruction sequence comprises a pre-waiting time setting instruction, the pre-waiting time setting instruction is positioned at the head of the instruction sequence, and the pre-waiting time setting instruction is used for setting the pre-waiting time.
In this implementation, the pre-wait time may be a wait time predetermined by a technician for setting before the audio sequence to be played, so as to provide a preparation time for the user before playing the audio to be played. Specifically, the pre-wait time may be arbitrary, and may be, for example, 5 seconds, 7 seconds, or the like.
Specifically, the method for setting the pre-wait time may refer to the above method for setting the preset time interval, and is not described herein again.
In some optional implementations of this embodiment, before step 202, the execution subject may further obtain a post-wait time; and the execution subject may generate the instruction sequence by: and generating a playing instruction sequence based on the audio sequence to be played, the preset time interval and the post-waiting time, wherein the instruction sequence comprises a post-waiting time setting instruction, the post-waiting time setting instruction is positioned at the last position of the instruction sequence, and the post-waiting time setting instruction is used for setting the post-waiting time.
In this implementation, the post-waiting time may be a waiting time predetermined by a technician and set after the audio sequence to be played, so that after the audio sequence to be played is played, a time for sorting the received and heard content can be provided for the user. Specifically, the post-wait time may be arbitrary, and may be, for example, 5 seconds, 7 seconds, or the like.
Specifically, the method for setting the post-wait time may refer to the method for setting the preset time interval, and is not described herein again.
In some optional implementation manners of this embodiment, the instruction sequence may further include an audio stop playing instruction and a time interval stop setting instruction, where the audio stop playing instruction in the instruction sequence corresponds to the audio playing instruction, and the time interval stop setting instruction corresponds to the time interval setting instruction.
Here, two instructions correspond may mean that two instructions control the same object. As an example, the instruction sequence may be "audio play instruction 1, audio stop play instruction 1; a time interval setting instruction 1 and a time interval stop setting instruction 1; an audio playing instruction 2 and an audio playing stopping instruction 2; a time interval setting instruction 2 and a time interval stop setting instruction 2; audio playback command 3, audio stop playback command 3". The audio playing instruction 1 corresponds to the audio playing stopping instruction 1 and is used for controlling the audio 1; the time interval setting instruction 1 corresponds to the time interval stop setting instruction 1 and is used for controlling a preset time interval between the audio 1 and the audio 2; the audio playing instruction 2 corresponds to the audio playing stopping instruction 2 and is used for controlling the audio 2; the time interval setting instruction 2 corresponds to the time interval stop setting instruction 2 and is used for controlling a preset time interval between the audio 2 and the audio 3; the audio play command 3 corresponds to the audio stop play command 3, and is used for controlling the audio 3.
It should be noted that the preset time interval stop setting may be implemented based on a setting manner of the preset time interval, for example, if the preset time interval is set by a timer, the preset time interval stop setting may be implemented by stopping the timer; or, the preset time interval is set by blank audio, and the stop setting of the preset time interval can be realized by stopping playing the blank audio.
The instruction sequence of the implementation mode can comprise an instruction for stopping playing the audio, so that the control of stopping playing the audio to be played can be realized on the basis of realizing the control of playing the audio to be played based on the audio playing data packet comprising the instruction sequence, and the comprehensiveness of the control of playing the audio is improved. And based on the time interval stop setting instruction in the instruction sequence, the time interval between the audios to be played can be selected to be set, and the time interval set between the audios to be played can also be selected to be cancelled, so that the flexibility of setting the time interval can be provided, and the flexibility of audio playing is further improved.
Step 203, based on the instruction sequence, generating an audio playing packet corresponding to the audio sequence to be played.
In this embodiment, based on the instruction sequence obtained in step 202, the execution main body may generate an audio playing packet corresponding to the audio sequence to be played. The audio playing packet corresponding to the audio sequence to be played may be a data packet for playing the audio to be played in the audio sequence to be played. The audio data packet comprises the instruction sequence. Furthermore, it can be understood that executing the instruction sequence in the audio data packet may implement playing the audio to be played in the audio sequence to be played.
Specifically, based on the instruction sequence, the execution main body may generate an audio data packet corresponding to an audio sequence to be played by using various methods, for example, the instruction sequence may be directly used as the audio data packet.
In some optional implementation manners of this embodiment, based on the instruction sequence, the execution main body may generate an audio playing packet corresponding to the audio sequence to be played through the following steps: first, the execution subject may obtain an identification control instruction for controlling an audio identification on a target user interface. Then, the execution main body may generate an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence and the identification control instruction.
In this implementation, the target user interface may be any interface that includes audio identification. The audio identification comprises a first audio identification and a second audio identification. The first audio identifier is used for indicating that the audio is in a playing state. The second audio identifier is used for indicating that the audio is in an unplayed state. The identification control instruction is used for adjusting the first audio identification to be the second audio identification or adjusting the second audio identification to be the first audio identification.
As an example, if the audio identifier on the current target user interface is the first audio identifier, executing the identifier control instruction may adjust the first audio identifier on the current target user interface to be the second audio identifier; and if the audio identifier on the current target user interface is the second audio identifier, executing the identifier control instruction to adjust the second audio identifier on the current target user interface to be the first audio identifier.
The audio playing packet in the implementation mode comprises the identification control instruction, so that the audio playing packet is used for controlling the audio identification on the target user interface while the audio playing packet is used for audio playing, and compared with a scheme in the prior art that the audio identification on the target user interface is controlled by clicking operation of a user, the implementation mode is used for improving the consistency between the actual audio playing state and the audio playing state displayed on the target user interface and improving the synchronization between the conversion of the actual audio playing state and the conversion of the audio playing state displayed on the target user interface.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the audio play packet generation method according to the present embodiment. In the application scenario of fig. 3, the server 301 may first obtain an audio sequence to be played 302 and a preset time interval 303 (for example, 5 seconds), where the audio sequence to be played 302 may include an audio to be played 3021 and an audio to be played 3022, and the audio to be played 3021 and the audio to be played 3022 are arranged in a playing order.
Then, the server 301 may generate an instruction sequence 304 based on the audio sequence to be played 302 and the preset time interval 303, where the instruction sequence 304 includes an audio playing instruction 3041 corresponding to the audio to be played 3021, an audio playing instruction 3042 corresponding to the audio to be played 3022, and a time interval setting instruction 3043 corresponding to the preset time interval 303, where the audio playing instruction is used to play the corresponding audio to be played, and the time interval setting instruction 3043 is used to set the preset time interval 303. Specifically, the sequence of the audio playing instructions in the instruction sequence 304 corresponds to the sequence of the audio to be played in the audio sequence to be played 302, the time interval setting instruction 3043 is located between two audio playing instructions 3041 and 3042, and the instruction sequence 304 is "audio playing instruction 3041; time interval setting instructions 3043; audio play instructions 3042".
Finally, the server 301 may generate an audio playing packet 305 corresponding to the audio sequence 302 to be played based on the instruction sequence 304.
The method provided by the above embodiment of the present disclosure can integrally represent the audio sequence to be played and the time interval that needs to be set between the audios to be played as an instruction sequence, and further can control the playing of the audios and the setting of the time interval by using the instruction sequence, specifically, by using the instruction sequence of the present disclosure, a preset time interval can be automatically inserted between two audios to be played in the audio playing process, thereby improving the diversity of audio playing; in addition, the preset time interval can provide the user with the reaction time for the previous section of audio, which is beneficial to improving the user experience; in addition, compared with the mode that the user manually clicks the pause button to obtain the time interval in the prior art, the audio playing method and the audio playing device can improve the automation degree of audio playing, reduce user operation and further improve user experience.
With continued reference to fig. 4, a flow 400 of one embodiment of an audio playback method according to the present disclosure is shown. The audio playing method comprises the following steps:
step 401, in response to receiving a playing request for an audio corresponding to a target audio playing packet initiated by a user, obtaining the target audio playing packet.
In this embodiment, an execution main body of the audio playing method (for example, the terminal device shown in fig. 1) may obtain the target audio playing packet in response to receiving a playing request for the audio corresponding to the target audio playing packet, where the playing request is initiated by a user in a wired connection manner or a wireless connection manner. The target audio playing packet may be generated in a manner corresponding to any one of the embodiments corresponding to fig. 2, and specific generation manners may refer to the contents corresponding to fig. 2, which is not described herein again.
In this embodiment, the audio corresponding to the target audio playing packet may be the audio that can be controlled by the target audio playing packet. Specifically, as can be seen from the embodiment corresponding to fig. 2, the target audio playing packet may be generated based on an audio sequence to be played, and then the audio corresponding to the target audio playing packet may belong to the audio sequence to be played, or the audio corresponding to the target audio playing packet may be an audio composed of the audio sequence to be played.
In this embodiment, the user may send a playing request for the audio corresponding to the target audio playing packet by using various methods, for example, may send a voice "please play the second lesson", or may click a control corresponding to the "second lesson" displayed on the user interface, so as to send a playing request for the audio of the "second lesson".
In this embodiment, after receiving the play request, the execution main body may obtain a target audio play packet. Specifically, the execution subject may obtain the target audio playing packet locally or from other electronic devices (e.g., the server shown in fig. 1) in communication connection.
Step 402, executing the instructions in the instruction sequence included in the target audio playing packet in sequence.
In this embodiment, based on the target audio playing packets obtained in step 401, the execution main body may sequentially execute the instructions in the instruction sequence included in the target audio playing packets.
As an example, the instruction sequence in the target audio playback packet is "audio playback instruction 1; time interval setting instruction 1; audio playback instruction 2; time interval setting instruction 2; and audio playing instruction 3 ″, the execution main body may execute the audio playing instruction 1 first, then execute the time interval setting instruction 1, then execute the audio playing instruction 2, then execute the time interval setting instruction 2, and finally execute the audio playing instruction 3 according to the sequence of the instructions in the instruction sequence, so that the execution main body may pause the preset time interval after each audio is played while playing the audio 1, 2, and 3 corresponding to the audio playing instructions 1, 2, and 3 to the user, and then play the next audio.
In some optional implementations of this embodiment, the target audio data packet includes an identification control instruction for controlling an audio identification on the target user interface; and after step 402, the executing body may further execute an identification control instruction to adjust the second audio identification on the target user interface to the first audio identification. Therefore, the adjustment operation of the audio identifier on the target user interface can be triggered by the execution of the instruction in the instruction sequence, the execution of the instruction in the instruction sequence can control the playing of the audio, and further the instruction in the instruction sequence can simultaneously control the playing of the audio and the adjustment operation of the audio identifier, so that the audio playing and the interface display are controlled by the same object, the consistency of the actual audio playing state and the audio playing state displayed on the target user interface is favorably improved, and the synchronism of the conversion of the actual audio playing state and the conversion of the audio playing state displayed on the target user interface is improved.
In some optional implementation manners of this embodiment, the execution subject may further execute, in response to completion of execution of an instruction in the instruction sequence, the identification control instruction to adjust the first audio identification on the target user interface to the second audio identification.
It can be understood that the instruction in the instruction sequence is executed and the audio to be played in the corresponding audio sequence to be played is played, and then the audio is in an unplayed state, so the execution main body can execute the identifier control instruction to adjust the first audio identifier on the target user interface to be the second audio identifier.
Specifically, when the instruction sequence includes an audio stop play instruction, if the audio stop play instruction is executed, the execution main body may also execute the identifier control instruction to adjust the first audio identifier on the target user interface to the second audio identifier.
With continued reference to fig. 5, fig. 5 is a schematic diagram of an application scenario of the audio playing method according to the present embodiment. In the application scenario of fig. 5, the terminal device 501 may obtain a target audio playing packet 504 in response to receiving a playing request 503 initiated by the user 502 and directed to an audio corresponding to the target audio playing packet, where the target audio playing packet 504 is generated by using the method corresponding to any embodiment in the embodiment corresponding to fig. 2. Then, the terminal device 501 may sequentially execute the instructions in the instruction sequence 5041 included in the target audio play packet 504, so that the terminal device 501 may play the audio sequence corresponding to the target audio play packet 504 to the user 502, and may set a preset time interval for the user 502 between two played audios.
The method provided by the above embodiment of the present disclosure may perform audio playing based on the audio playing packet in the embodiment corresponding to fig. 2, so that a preset time interval may be automatically inserted between two audio to be played when the audio is played, thereby improving the diversity of audio playing; in addition, the preset time interval can provide the user with the reaction time for the previous section of audio, which is beneficial to improving the user experience; in addition, compared with the mode that the user manually clicks the pause button to obtain the time interval in the prior art, the audio playing method and the audio playing device can improve the automation degree of audio playing, reduce user operation and further improve user experience.
With further reference to fig. 6, as an implementation of the method shown in the above-mentioned figures, the present disclosure provides an embodiment of a web page generation apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 6, the audio packet generation apparatus 600 of the present embodiment includes: a first acquisition unit 601, a first generation unit 602, and a second generation unit 603. The first obtaining unit 601 is configured to obtain an audio sequence to be played and a preset time interval, where the audio sequence to be played is arranged according to a playing order of the audio to be played; the first generating unit 602 is configured to generate an instruction sequence based on an audio sequence to be played and a preset time interval, where the instruction sequence includes an audio playing instruction and a time interval setting instruction, an arrangement order of the audio playing instruction in the instruction sequence corresponds to an arrangement order of audio to be played in the audio sequence to be played, the audio playing instruction is used to play corresponding audio to be played, the time interval setting instruction in the instruction sequence is located between two audio playing instructions, and the time interval setting instruction is used to set the preset time interval; the second generating unit 603 is configured to generate an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence.
In this embodiment, the first obtaining unit 601 of the audio playing packet generating device 600 may obtain the audio sequence to be played and the preset time interval from a remote location or a local location by a wired connection manner or a wireless connection manner. The audio to be played in the audio sequence to be played is arranged according to the playing sequence, and the audio to be played may be the audio to be played. The audio sequence to be played may include at least two audio sequences to be played.
In this embodiment, the preset time interval may be a time interval predetermined by a technician, and is used to be set between two audio to be played, so that when the audio to be played is played, a reaction time of the audio to be played can be provided for a user.
In this embodiment, the first generating unit 602 may generate the instruction sequence based on the audio sequence to be played and the preset time interval obtained by the first obtaining unit 601. The instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, and the audio playing instructions are used for playing the corresponding audio to be played.
In this embodiment, the time interval setting instruction in the instruction sequence is located between two audio playing instructions, and the time interval setting instruction is used to set a preset time interval.
In this embodiment, based on the instruction sequence obtained by the first generating unit 602, the second generating unit 603 may generate an audio playing packet corresponding to the audio sequence to be played. The audio playing packet corresponding to the audio sequence to be played may be a data packet for playing the audio to be played in the audio sequence to be played. The audio data packet comprises the instruction sequence. Furthermore, it can be understood that executing the instruction sequence in the audio data packet can realize the playing of the audio to be played in the audio sequence to be played.
In some optional implementations of this embodiment, the apparatus 600 further includes: a second acquisition unit (not shown in the figure) configured to acquire the pre-latency; and the first generating unit 602 is further configured to: and generating an instruction sequence based on the audio sequence to be played, the preset time interval and the pre-waiting time, wherein the instruction sequence comprises a pre-waiting time setting instruction, the pre-waiting time setting instruction is positioned at the head of the instruction sequence, and the pre-waiting time setting instruction is used for setting the pre-waiting time.
In some optional implementations of this embodiment, the apparatus 600 further includes: a third acquisition unit (not shown in the figure) configured to acquire a post-wait time; and the first generating unit 602 is further configured to: and generating a playing instruction sequence based on the audio sequence to be played, the preset time interval and the post-waiting time, wherein the instruction sequence comprises a post-waiting time setting instruction, the post-waiting time setting instruction is positioned at the last position of the instruction sequence, and the post-waiting time setting instruction is used for setting the post-waiting time.
In some optional implementations of this embodiment, the second generating unit 603 includes: an obtaining module (not shown in the figure) configured to obtain an identifier control instruction for controlling an audio identifier on a target user interface, where the audio identifier includes a first audio identifier and a second audio identifier, the first audio identifier is used to indicate that an audio is in a playing state, the second audio identifier is used to indicate that the audio is in an unplayed state, and the identifier control instruction is used to adjust the first audio identifier to the second audio identifier or adjust the second audio identifier to the first audio identifier; and the generating module is configured to generate an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence and the identification control instruction.
In some optional implementations of this embodiment, the instruction sequence further includes an audio stop playing instruction and a time interval stop setting instruction, where the audio stop playing instruction in the instruction sequence corresponds to the audio playing instruction, and the time interval stop setting instruction corresponds to the time interval setting instruction.
In some optional implementations of this embodiment, the audio sequence to be played includes the same audio.
It will be understood that the elements described in the apparatus 600 correspond to various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 600 and the units included therein, and are not described herein again.
The device 600 provided by the above embodiment of the present disclosure can integrally represent the audio sequence to be played and the time interval that needs to be set between the audios to be played as an instruction sequence, and further can control the playing of the audios and the setting of the time interval by using the instruction sequence, specifically, by using the instruction sequence of the present disclosure, a preset time interval can be automatically inserted between two audios to be played in the audio playing process, thereby improving the diversity of audio playing; in addition, the preset time interval can provide the user with the reaction time for the previous section of audio, which is beneficial to improving the user experience; in addition, compared with the mode that the user manually clicks the pause button to obtain the time interval in the prior art, the audio playing method and the audio playing device can improve the automation degree of audio playing, reduce user operation and further improve user experience.
With further reference to fig. 7, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of an audio playing apparatus, which corresponds to the embodiment of the method shown in fig. 4, and which can be applied in various electronic devices.
As shown in fig. 7, the audio playback apparatus 700 of the present embodiment includes: a fourth acquisition unit 701 and a first execution unit 702. The fourth obtaining unit 701 is configured to, in response to receiving a user-initiated play request for an audio corresponding to a target audio play packet, obtain the target audio play packet, where the target audio play packet is generated by using the method corresponding to any one of the embodiments corresponding to fig. 2; the first execution unit 702 is configured to execute the instructions in the sequence of instructions included in the target audio playback packet in order.
In this embodiment, the fourth obtaining unit 701 of the audio playing apparatus 700 may obtain the target audio playing packet in response to receiving a playing request for the audio corresponding to the target audio playing packet, which is initiated by a user, through a wired connection manner or a wireless connection manner. The target audio playing packet may be generated in a manner corresponding to any one of the embodiments corresponding to fig. 2, and specific generation manners may refer to the contents corresponding to fig. 2, which is not described herein again.
In this embodiment, the audio corresponding to the target audio playing packet may be the audio that can be controlled by the target audio playing packet. Specifically, as can be seen from the embodiment corresponding to fig. 2, the target audio playing packet may be generated based on an audio sequence to be played, and then the audio corresponding to the target audio playing packet may belong to the audio sequence to be played, or the audio corresponding to the target audio playing packet may be the audio composed of the audio sequence to be played.
In this embodiment, based on the target audio playing packet obtained by the fourth obtaining unit 701, the first executing unit 702 may sequentially execute the instructions in the instruction sequence included in the target audio playing packet.
In some optional implementations of this embodiment, the target audio data packet includes an identification control instruction for controlling an audio identification on the target user interface; and the apparatus 700 further comprises: and a second execution unit (not shown in the figure) configured to execute the identification control instruction to adjust the second audio identification on the target user interface to the first audio identification.
In some optional implementations of this embodiment, the apparatus 700 further includes: and a third execution unit (not shown in the figure) configured to execute the identification control instruction to adjust the first audio identification on the target user interface to the second audio identification in response to the instruction in the instruction sequence being executed.
It will be understood that the units described in the apparatus 700 correspond to the various steps in the method described with reference to fig. 4. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 700 and the units included therein, and will not be described herein again.
The apparatus 700 provided in the above embodiment of the present disclosure may perform audio playing based on the audio playing packet in the embodiment corresponding to fig. 2, so that when the audio is played, a preset time interval may be automatically inserted between two audio to be played, thereby improving the diversity of audio playing; in addition, the preset time interval can provide the reaction time for the user aiming at the previous section of audio, and is beneficial to improving the user experience; in addition, compared with the mode that the user acquires the time interval by manually clicking the pause button in the prior art, the audio playing method and the audio playing device can improve the automation degree of audio playing, reduce user operation and further improve user experience.
Referring now to fig. 8, a schematic diagram of an electronic device (e.g., the terminal device or the server in fig. 1) 800 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, an electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, or the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an audio sequence to be played and a preset time interval, wherein the audio sequence to be played is arranged according to the playing sequence of the audio to be played; generating an instruction sequence based on an audio sequence to be played and a preset time interval, wherein the instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, the audio playing instructions are used for playing the corresponding audio to be played, the time interval setting instructions in the instruction sequence are positioned between the two audio playing instructions, and the time interval setting instructions are used for setting the preset time interval; and generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence.
Alternatively, the one or more programs, when executed by the electronic device, cause the electronic device to: responding to a received playing request which is initiated by a user and aims at the audio corresponding to a target audio playing packet, and acquiring the target audio playing packet, wherein the target audio playing packet is generated by adopting the method corresponding to any embodiment in the embodiment corresponding to the method shown in FIG. 2; and executing the instructions in the instruction sequence included in the target audio playing packet in sequence.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first acquisition unit may also be described as a "unit that acquires an audio sequence to be played and a preset time interval".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (12)

1. An audio play pack generation method, comprising:
acquiring an audio sequence to be played and a preset time interval, wherein the audio sequence to be played is arranged according to the playing sequence of the audio to be played;
generating an instruction sequence based on the audio sequence to be played and the preset time interval, wherein the instruction sequence comprises audio playing instructions and time interval setting instructions, the arrangement sequence of the audio playing instructions in the instruction sequence corresponds to the arrangement sequence of the audio to be played in the audio sequence to be played, the audio playing instructions are used for playing the corresponding audio to be played, the time interval setting instructions in the instruction sequence are positioned between the two audio playing instructions, the time interval setting instructions are used for setting the preset time interval, the instruction sequence further comprises audio playing stopping instructions and time interval setting stopping instructions, the audio playing stopping instructions in the instruction sequence correspond to the audio playing instructions, and the time interval setting instructions correspond to the time interval setting instructions;
and generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence.
2. The method of claim 1, wherein prior to the generating a sequence of instructions based on the sequence of audio to be played and the preset time interval, the method further comprises:
acquiring a pre-waiting time; and
the generating of the instruction sequence based on the audio sequence to be played and the preset time interval further comprises:
generating an instruction sequence based on the audio sequence to be played, the preset time interval and the pre-waiting time, wherein the instruction sequence comprises a pre-waiting time setting instruction, the pre-waiting time setting instruction is located at the head of the instruction sequence, and the pre-waiting time setting instruction is used for setting the pre-waiting time.
3. The method of claim 1, wherein prior to the generating a sequence of instructions based on the sequence of audio to be played and the preset time interval, the method further comprises:
acquiring post-waiting time; and
the generating of the instruction sequence based on the audio sequence to be played and the preset time interval further comprises:
and generating a playing instruction sequence based on the audio sequence to be played, the preset time interval and the post-waiting time, wherein the instruction sequence comprises a post-waiting time setting instruction, the post-waiting time setting instruction is positioned at the last position of the instruction sequence, and the post-waiting time setting instruction is used for setting the post-waiting time.
4. The method according to claim 1, wherein the generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence comprises:
acquiring an identification control instruction for controlling an audio identification on a target user interface, wherein the audio identification comprises a first audio identification and a second audio identification, the first audio identification is used for indicating that the audio is in a playing state, the second audio identification is used for indicating that the audio is in an unplayed state, and the identification control instruction is used for adjusting the first audio identification to be the second audio identification or adjusting the second audio identification to be the first audio identification;
and generating an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence and the identification control instruction.
5. The method according to one of claims 1 to 4, wherein the audio sequences to be played comprise the same audio.
6. An audio playback method, comprising:
in response to receiving a playing request initiated by a user and aiming at audio corresponding to a target audio playing packet, acquiring the target audio playing packet, wherein the target audio playing packet is generated by adopting the method of one of the claims 1 to 5;
and executing the instructions in the instruction sequence included in the target audio playing packet in sequence.
7. The method of claim 6, wherein the target audio data packet includes identification control instructions for controlling audio identification on a target user interface; and
after the in-order execution of instructions in a sequence of instructions included in the target audio playback packet, the method further includes:
and executing the identification control instruction to adjust the second audio identification on the target user interface to the first audio identification.
8. The method of claim 7, wherein the method further comprises:
and in response to the execution of the instructions in the instruction sequence being completed, executing the identification control instruction to adjust the first audio identification on the target user interface to be the second audio identification.
9. An audio play-out package generation apparatus comprising:
the device comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is configured to acquire an audio sequence to be played and a preset time interval, and the audio sequence to be played is arranged according to the playing sequence of audio to be played;
a first generating unit, configured to generate an instruction sequence based on the audio sequence to be played and the preset time interval, where the instruction sequence includes an audio playing instruction and a time interval setting instruction, an arrangement order of the audio playing instruction in the instruction sequence corresponds to an arrangement order of the audio to be played in the audio sequence to be played, the audio playing instruction is used for playing the corresponding audio to be played, the time interval setting instruction in the instruction sequence is located between two audio playing instructions, the time interval setting instruction is used for setting the preset time interval, the instruction sequence further includes an audio playing stopping instruction and a time interval stopping setting instruction, the audio playing stopping instruction in the instruction sequence corresponds to the audio playing instruction, and the time interval stopping setting instruction corresponds to the time interval setting instruction;
and the second generating unit is configured to generate an audio playing packet corresponding to the audio sequence to be played based on the instruction sequence.
10. An audio playback apparatus comprising:
a fourth obtaining unit, configured to obtain a target audio playing packet in response to receiving a playing request initiated by a user and for audio corresponding to the target audio playing packet, where the target audio playing packet is generated by using the method of any one of claims 1 to 5;
a first execution unit configured to execute instructions in a sequence of instructions included in the target audio playback packet in order.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
12. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202010588396.1A 2020-06-24 2020-06-24 Audio playing packet generation method and device and audio playing method and device Active CN113838488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010588396.1A CN113838488B (en) 2020-06-24 2020-06-24 Audio playing packet generation method and device and audio playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010588396.1A CN113838488B (en) 2020-06-24 2020-06-24 Audio playing packet generation method and device and audio playing method and device

Publications (2)

Publication Number Publication Date
CN113838488A CN113838488A (en) 2021-12-24
CN113838488B true CN113838488B (en) 2023-03-14

Family

ID=78963424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010588396.1A Active CN113838488B (en) 2020-06-24 2020-06-24 Audio playing packet generation method and device and audio playing method and device

Country Status (1)

Country Link
CN (1) CN113838488B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104978981A (en) * 2015-01-29 2015-10-14 腾讯科技(深圳)有限公司 Random playing method and device of music
US9383965B1 (en) * 2013-08-16 2016-07-05 Amazon Technologies, Inc. Media library analyzer
CN105976849A (en) * 2016-05-05 2016-09-28 广州酷狗计算机科技有限公司 Method and apparatus for playing audio data
WO2017148442A1 (en) * 2016-03-03 2017-09-08 腾讯科技(深圳)有限公司 Audio and video processing method and apparatus, and computer storage medium
WO2017190576A1 (en) * 2016-05-04 2017-11-09 阿里巴巴集团控股有限公司 Object allocation method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10331399B2 (en) * 2015-06-05 2019-06-25 Apple Inc. Smart audio playback when connecting to an audio output system
US20170169857A1 (en) * 2015-12-15 2017-06-15 Le Holdings (Beijing) Co., Ltd. Method and Electronic Device for Video Play
CN105592568A (en) * 2015-12-22 2016-05-18 Tcl通力电子(惠州)有限公司 Audio playing method and system
EP3671747A4 (en) * 2017-08-18 2020-08-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Sound volume adjustment method and apparatus, mobile terminal, and storage medium
CN110290412B (en) * 2019-08-26 2019-11-29 恒玄科技(北京)有限公司 A kind of audio sync playback method, device and loudspeaker apparatus, wireless headset

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9383965B1 (en) * 2013-08-16 2016-07-05 Amazon Technologies, Inc. Media library analyzer
CN104978981A (en) * 2015-01-29 2015-10-14 腾讯科技(深圳)有限公司 Random playing method and device of music
WO2017148442A1 (en) * 2016-03-03 2017-09-08 腾讯科技(深圳)有限公司 Audio and video processing method and apparatus, and computer storage medium
WO2017190576A1 (en) * 2016-05-04 2017-11-09 阿里巴巴集团控股有限公司 Object allocation method and device
CN105976849A (en) * 2016-05-05 2016-09-28 广州酷狗计算机科技有限公司 Method and apparatus for playing audio data

Also Published As

Publication number Publication date
CN113838488A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US11240050B2 (en) Online document sharing method and apparatus, electronic device, and storage medium
US11158102B2 (en) Method and apparatus for processing information
CN108965907B (en) Method, device and system for playing video
CN111064987B (en) Information display method and device and electronic equipment
US11270690B2 (en) Method and apparatus for waking up device
CN111291220A (en) Label display method and device, electronic equipment and computer readable medium
WO2021012952A1 (en) Message processing method, device and electronic equipment
CN112040330A (en) Video file processing method and device, electronic equipment and computer storage medium
CN109582274B (en) Volume adjusting method and device, electronic equipment and computer readable storage medium
CN111930973A (en) Multimedia data playing method and device, electronic equipment and storage medium
CN110958481A (en) Video page display method and device, electronic equipment and computer readable medium
US20240103802A1 (en) Method, apparatus, device and medium for multimedia processing
WO2024037480A1 (en) Interaction method and apparatus, electronic device, and storage medium
CN110996155B (en) Video playing page display method and device, electronic equipment and computer readable medium
CN113838488B (en) Audio playing packet generation method and device and audio playing method and device
CN111460211A (en) Audio information playing method and device and electronic equipment
CN112306595A (en) Interaction method and device and electronic equipment
CN112307393A (en) Information issuing method and device and electronic equipment
EP4344218A1 (en) Special effect playback method and system for live broadcast room, and device
CN113766303B (en) Multi-screen interaction method, device, equipment and storage medium
CN112162686B (en) House resource information display method and device, electronic equipment and computer readable medium
CN115103236A (en) Image record generation method and device, electronic equipment and storage medium
JP2024500300A (en) Information interaction methods, devices, and equipment
CN111385638B (en) Video processing method and device
CN111930229B (en) Man-machine interaction method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant