Audio synchronization method, audio playback system and storage medium

By calculating the delay data and buffer size of the audio terminal and adjusting the audio frame transmission time, the problem of difference in audio synchronization between different terminals is solved, and synchronous playback of audio between multiple terminals is realized, thereby reducing sound delay.

CN117768993BActive Publication Date: 2024-11-15GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311799490.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2024-11-15
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

When playing the same audio between different terminals, there may be a problem of sound delay, mainly due to different execution rules between terminals, the audio synchronization difference is caused.

Method used

By calculating the delay data of each audio terminal, determining the terminal with the largest delay is used as a reference point, calculating the delay difference between other terminals and it, and adjusting the frame transmission time according to the audio file format and buffer size to realize the audio frame Synchronous playback.

Benefits of technology

It effectively reduces the sound delay when playing the same audio between terminals with different execution rules, ensuring the time consistency of the audio between multiple terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117768993B_ABST
    Figure CN117768993B_ABST
Patent Text Reader

Abstract

The present invention discloses an audio synchronization method, an audio playback system and a storage medium, which are applied to an audio playback system, wherein the audio playback system includes at least two audio terminals; the method includes: in response to an operation of sending a playback task to each audio terminal, obtaining the initial time of task startup, the total audio playback duration of the playback task and the playback audio, and calculating the delay data of each audio terminal; comparing the delay data of each audio terminal, taking the audio terminal with the largest playback delay as the first audio terminal; calculating the delay difference between other audio terminals and the first audio terminal as the delay sending duration of each audio terminal; calculating the duration of each frame of audio of the playback task according to playback task information; and sending the preset frame of the playback audio to the corresponding audio terminal for playback according to the duration of each frame of audio of the playback task and the delay sending duration of each audio terminal, so as to reduce the playback sound delay of the same audio played by terminals with different execution rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of broadcasting technology, and in particular to an audio synchronization method, an audio playback system and a storage medium. Background Art

[0002] In the prior art, all terminals in the same project play the same audio, which usually makes it impossible for the human ear to distinguish whether there are differences and delays in the sound; however, if terminals of other projects / models need to be connected to the project, and the execution rules between different terminals are different, it is possible that when all terminals play the same audio, there will be a problem of sound playback delay. Summary of the invention

[0003] The present invention provides an audio synchronization method, an audio playback system and a storage medium, so as to reduce the sound delay of playing the same audio by terminals with different execution rules.

[0004] The present invention provides an audio synchronization method, which is applied to an audio playback system, wherein the audio playback system includes at least two audio terminals;

[0005] The method comprises:

[0006] In response to the operation of sending the playback task to each of the audio terminals, the initial time of task start, the total audio playback duration of the playback task and the playback audio are obtained according to the playback task information, and the delay data of each of the audio terminals is calculated; the delay data of each of the audio terminals are compared, and the audio terminal with the largest playback delay is taken as the first audio terminal; the delay difference between other audio terminals and the first audio terminal is calculated as the delay sending duration of each of the audio terminals;

[0007] According to the playback task information, the duration of each audio frame of the playback task is calculated; according to the duration of each audio frame of the playback task and the delayed sending duration of each audio terminal, the preset frame of the playback audio is sent to the corresponding audio terminal for playback.

[0008] Furthermore, before calculating the delay data of each audio terminal according to the playback task information, the method further includes:

[0009] Read the audio file information of the playback task to obtain the audio data and audio format of the playback task;

[0010] The initial time when the playback task is started is recorded as the initial time, and the audio data, the audio format and the initial time are recorded in the playback task information.

[0011] Further, the delay data of each of the audio terminals is calculated, specifically:

[0012] Calculate the audio data size per second of the playback task according to the audio data and audio format of the playback task;

[0013] According to the audio buffer size of each audio terminal and the data size of the audio per second of the playback task, the delay required by each audio terminal is obtained; the delay is the distance from the initial time to the start of playback of each audio terminal;

[0014] The expression of the delay is:

[0015]

[0016] Among them, T ms is the delay required by the second audio terminal, AudBuff is the audio buffer size of the second audio terminal, and MediaSize is the data size of the audio per second of the playback task.

[0017] Furthermore, the data size of the audio per second of the playing task is calculated as follows:

[0018] If the audio format of the playback task is WAV, the expression for calculating the data size of the audio per second of the playback task is:

[0019]

[0020] Wherein, SampleRate is the sampling rate of the audio data, BitDeep is the audio sampling accuracy of the audio data; NumChannel is the number of audio channels of the audio data;

[0021] If the audio format of the playback task is MP3 or AAC, the expression for calculating the data size of the audio per second of the playback task is:

[0022]

[0023] Wherein, BitRate is the bit rate of the audio data.

[0024] Further, the delay difference between other audio terminals and the first audio terminal is calculated as the delay sending duration of each audio terminal, specifically:

[0025] The expression of the delayed transmission duration of each audio terminal is:

[0026] Delay i =T 1 -T i ;

[0027] Delay i is the delay sending time of the i-th audio terminal, T1 is the delay of the first audio terminal, T i is the delay of the i-th audio terminal;

[0028] Furthermore, the duration of each audio frame of the playback task is calculated according to the playback task information, specifically:

[0029] If the audio format of the playback task is MP3 or AAC, the expression for the duration of each audio frame of the playback task is:

[0030]

[0031] If the audio format of the playback task is WAV, the expression for the duration of each frame of audio of the playback task is:

[0032]

[0033] Among them, FrameDuration is the duration of each audio frame, FrameSize is the size of each audio frame, MediaSize is the data size of the audio per second, and BitRate is the bit rate of the playback task.

[0034] Further, according to the duration of each audio frame of the playback task and the delayed transmission duration of each audio terminal, the preset frame of the playback audio is sent to the corresponding audio terminal for playback, specifically:

[0035] Put each frame of audio playback into the memory queue in sequence;

[0036] Starting from the initial time, the playing audio frame is sent to the first audio terminal frame by frame from the initial time; starting from the delayed sending time of each audio terminal, the playing audio frame is sent to the corresponding audio terminal frame by frame;

[0037] When the playing time of each audio terminal meets the preset condition, the next playing audio frame is obtained from the memory queue and sent to the corresponding audio terminal, and the sent frame is removed from the memory queue.

[0038] Further, when the playing time of each audio terminal meets the preset condition, the next playing audio frame is obtained from the memory queue and sent to the corresponding audio terminal, and the sent frame is removed from the memory queue, specifically:

[0039] If the current time is greater than the initial time, the sum of the played time and the delayed sending time of each audio terminal, the next frame of the played audio frame will be sent to the corresponding audio terminal, and the sent frame will be removed from the memory queue; the current time starts from the initial time.

[0040] Since the sampling rate, bit depth, channels, bit rate and other factors of audio affect the size of each frame of audio data, the data size of audio data of the same length may vary greatly. Therefore, if there are differences in the audio buffer sizes between terminals, it is not possible to simply increase the fixed delay to achieve the purpose of synchronous playback of all audio on all terminals.

[0041] As a preferred solution, the present invention takes into account the differences in audio buffer size and playback delay set among various terminals. When scheduling the audio stream, the corresponding processing time is calculated according to the terminal buffer and playback delay rules, and the playback audio is sent to the corresponding audio terminals according to the corresponding processing time for playback, so that the audio can be played synchronously at various terminals, reducing the playback sound delay of the same audio played by terminals with different execution rules.

[0042] Other features and advantages of the present invention will be described in detail in the following detailed description.

[0043] Accordingly, the present invention also provides an audio playback system, comprising: a control module and an audio terminal module; the audio terminal module comprises at least two audio terminals; the control module comprises a reading unit and a scheduling unit;

[0044] The reading unit is used to respond to the operation of sending the playback task to each of the audio terminals, obtain the initial time of task start, the total audio playback duration of the playback task and the playback audio according to the playback task information, and calculate the delay data of each of the audio terminals; compare the delay data of each of the audio terminals, and take the audio terminal with the largest playback delay as the first audio terminal; calculate the delay difference between other audio terminals and the first audio terminal as the delay sending duration of each of the audio terminals;

[0045] The scheduling unit is used to calculate the duration of each audio frame of the playback task according to the playback task information; and send the preset frame of the playback audio to the corresponding audio terminal for playback according to the duration of each audio frame of the playback task and the delayed sending duration of each audio terminal.

[0046] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute an audio synchronization method as described in the content of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flowchart of an embodiment of the audio synchronization method provided by the present invention;

[0048] Figure 2It is a structural schematic diagram of an embodiment of the audio playback system provided by the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] Audio synchronization between audio terminals refers to maintaining the time consistency of audio playback between different terminal devices. The factors that cause differences in audio synchronization between terminals can be divided into several aspects:

[0051] 1. Network delay: Network delay is one of the most common influencing factors. During the audio streaming process, network delay may cause data packet delay, thus affecting the synchronization of audio. Network delay is affected by factors such as network topology, bandwidth, and network congestion.

[0052] 2. Network jitter: Network jitter refers to the instability of data packets during transmission, which may cause inconsistent arrival time of audio data. Especially in wireless networks or unstable network environments, network jitter may be more significant.

[0053] 3. Clock drift: The clocks of different devices may drift slightly, which will cause the clocks between devices to be out of sync, thus affecting audio synchronization. The lack of a clock synchronization mechanism may cause time offset.

[0054] 4. Buffering and playback delay: The audio buffering and playback delay on different terminal devices may be different, which will affect the synchronization of audio. Factors such as the device's processing speed and buffering strategy will affect synchronization.

[0055] 5. Codec delay: Delays in the audio codec process may also cause inconsistent audio playback time between different devices. Different codec algorithms and hardware performance used on different devices may introduce additional delays.

[0056] 6. Protocols and synchronization mechanisms: The communication protocols and synchronization mechanisms used will also affect the audio synchronization between terminals. Some protocols and synchronization mechanisms may be more suitable for real-time audio synchronization.

[0057] The network delay, network jitter, clock drift, codec delay and protocol mechanism are not considered in the processing scope of the present invention. The present invention only considers solving the difference between the audio buffer size and the playback delay set in various terminals to reach the mechanism of synchronous audio playback of various terminals;

[0058] Since the sampling rate, bit depth, channels, bit rate and other factors of audio affect the size of each frame of audio data, the data size of the same 10ms audio data may vary greatly. Therefore, if there is a difference in the audio buffer size between terminals, it is impossible to simply increase the fixed delay to achieve the purpose of synchronous playback of all audio on all terminals.

[0059] Embodiment 1

[0060] Please refer to Figure 1 , an audio synchronization method provided by an embodiment of the present invention is applied to an audio playback system, wherein the audio playback system includes at least two audio terminals; the method includes steps S101-S103:

[0061] Step S101: in response to the operation of sending the playback task to each of the audio terminals, the initial time of task start, the total audio playback duration of the playback task and the playback audio are obtained according to the playback task information, and the delay data of each of the audio terminals is calculated;

[0062] Furthermore, before calculating the delay data of each audio terminal according to the playback task information, the method further includes:

[0063] Read the audio file information of the playback task to obtain the audio data and audio format of the playback task;

[0064] The initial time when the playback task is started is recorded as the initial time, and the audio data, the audio format and the initial time are recorded in the playback task information.

[0065] Further, the delay data of each of the audio terminals is calculated, specifically:

[0066] Calculate the audio data size per second of the playback task according to the audio data and audio format of the playback task;

[0067] According to the audio buffer size of each audio terminal and the data size of the audio per second of the playback task, the delay required by each audio terminal is obtained; the delay is the distance from the initial time to the start of playback of each audio terminal;

[0068] The expression of the delay is:

[0069]

[0070] Among them, T ms is the delay required by the second audio terminal, AudBuff is the audio buffer size of the second audio terminal, and MediaSize is the data size of the audio per second of the playback task.

[0071] Step S102: Compare the delay data of each audio terminal, and take the audio terminal with the largest playback delay as the first audio terminal; calculate the delay difference between other audio terminals and the first audio terminal as the delay transmission duration of each audio terminal;

[0072] Step S103: Calculate the duration of each audio frame of the playback task according to the playback task information; send the preset frame of the playback audio to the corresponding audio terminal for playback according to the duration of each audio frame of the playback task and the delayed transmission duration of each audio terminal.

[0073] Furthermore, the data size of the audio per second of the playing task is calculated as follows:

[0074] If the audio format of the playback task is WAV, the expression for calculating the data size of the audio per second of the playback task is:

[0075]

[0076] Wherein, SampleRate is the sampling rate of the audio data, BitDeep is the audio sampling accuracy of the audio data; NumChannel is the number of audio channels of the audio data;

[0077] If the audio format of the playback task is MP3 or AAC, the expression for calculating the data size of the audio per second of the playback task is:

[0078]

[0079] Wherein, BitRate is the bit rate of the audio data.

[0080] Further, the delay difference between other audio terminals and the first audio terminal is calculated as the delay sending duration of each audio terminal, specifically:

[0081] The expression of the delayed transmission duration of each audio terminal is:

[0082] Delay i =T 1 -T i ;

[0083] Delay i is the delay sending time of the i-th audio terminal, T 1 is the delay of the first audio terminal, T i is the delay of the i-th audio terminal;

[0084] Furthermore, the duration of each audio frame of the playback task is calculated according to the playback task information, specifically:

[0085] If the audio format of the playback task is MP3 or AAC, the expression for the duration of each audio frame of the playback task is:

[0086]

[0087] If the audio format of the playback task is WAV, the expression for the duration of each frame of audio of the playback task is:

[0088]

[0089] Among them, FrameDuration is the duration of each audio frame, FrameSize is the size of each audio frame, MediaSize is the data size of the audio per second, and BitRate is the bit rate of the playback task.

[0090] Further, according to the duration of each audio frame of the playback task and the delayed transmission duration of each audio terminal, the preset frame of the playback audio is sent to the corresponding audio terminal for playback, specifically:

[0091] Put each frame of audio playback into the memory queue in sequence;

[0092] Starting from the initial time, the playing audio frame is sent to the first audio terminal frame by frame from the initial time; starting from the delayed sending time of each audio terminal, the playing audio frame is sent to the corresponding audio terminal frame by frame;

[0093] When the playing time of each audio terminal meets the preset condition, the next playing audio frame is obtained from the memory queue and sent to the corresponding audio terminal, and the sent frame is removed from the memory queue.

[0094] Further, when the playing time of each audio terminal meets the preset condition, the next playing audio frame is obtained from the memory queue and sent to the corresponding audio terminal, and the sent frame is removed from the memory queue, specifically:

[0095] If the current time is greater than the initial time, the sum of the played time and the delayed sending time of each audio terminal, the next frame of the played audio frame will be sent to the corresponding audio terminal, and the sent frame will be removed from the memory queue; the current time starts from the initial time.

[0096] This embodiment provides a preferred implementation scheme, selecting three types of terminals, terminal a, terminal b and terminal c, to play several audio files; the audio files can be MP3 format audio files, and the bit rates of different MP3 format audio files are not necessarily the same; the audio files can also be WAV format audio files, and the parameters such as sampling rate, channel and bit depth of different WAV format audio files are not necessarily the same.

[0097] The control module of the audio playback system starts the audio file frame reading thread including:

[0098] The audio file information is read to obtain the audio data and the audio format; the audio data and the audio format are recorded in the task information, and the task start initial time TimeStarted is recorded in the task information.

[0099] The control module of the audio playback system starts the audio scheduling thread including:

[0100] Obtain task information and calculate the delay T of each terminal based on the task information a 、T b and T c ;

[0101] According to the calculation, the maximum delay terminal T b , with the maximum delay terminal T b As the initial marking point, the delay time of the remaining terminals is obtained:

[0102] Delay a =T b -T a ;

[0103] Delay b =T b -T b ;

[0104] Delay c =T b -T c ;

[0105] Read the audio frame pointer and store it in the audio queue buffer of each terminal; wait for the sending thread to send to three types of terminals in different peaks according to the terminal delay;

[0106] If the audio file is MP3, calculate the audio playback duration of each frame:

[0107]

[0108] If the audio file is WAV, calculate the audio playback duration of each frame:

[0109]

[0110] Current latest time TimeNow;

[0111] The terminal has played the time TimePlayed a ,TimePlayed b ,TimePlayed c ;

[0112] if (TimeStarted+Delay+TimePlayed>TimeNow) indicates that a new frame needs to be sent to the terminal;

[0113] TimePlayed += FrameDuraion;

[0114] Sends a frame to the endpoint and removes the sent frame from the audio queue buffer.

[0115] Implementing the embodiments of the present invention has the following effects:

[0116] The present invention takes into account the differences in audio buffer sizes and playback delays set among various terminals. When scheduling audio streams, the corresponding processing time is calculated according to the terminal buffer and playback delay rules, and the playback audio is sent to the corresponding audio terminals according to the corresponding processing time for playback, so that the audio can be played synchronously at various terminals, thereby reducing the playback sound delay of the same audio played by terminals with different execution rules.

[0117] Embodiment 2

[0118] Please refer to Figure 2 , an audio playback system provided by an embodiment of the present invention, comprising: a control module 201 and an audio terminal module 202; the audio terminal module comprises at least two audio terminals;

[0119] The control module includes a reading unit and a scheduling unit;

[0120] The reading unit is used to respond to the operation of sending the playback task to each of the audio terminals, obtain the initial time of task start, the total audio playback duration of the playback task and the playback audio according to the playback task information, and calculate the delay data of each of the audio terminals; compare the delay data of each of the audio terminals, and take the audio terminal with the largest playback delay as the first audio terminal; calculate the delay difference between other audio terminals and the first audio terminal as the delay sending duration of each of the audio terminals;

[0121] The scheduling unit is used to calculate the duration of each audio frame of the playback task according to the playback task information; and send the preset frame of the playback audio to the corresponding audio terminal for playback according to the duration of each audio frame of the playback task and the delayed sending duration of each audio terminal.

[0122] The above-mentioned device can implement the audio synchronization method of the above-mentioned method embodiment. The optional items in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of this application can refer to the contents of the above-mentioned method embodiment and will not be described in detail in this embodiment.

[0123] Embodiment 3

[0124] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the audio synchronization method described in any one of the above embodiments.

[0125] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.

[0126] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0127] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0128] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0129] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0130] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. An audio synchronization method, characterized in that: Applied to an audio playback system, the audio playback system comprising at least two audio terminals; The method comprises: In response to the operation of sending the playback task to each of the audio terminals, the initial time of task start, the total audio playback duration of the playback task and the playback audio are obtained according to the playback task information, and the delay data of each of the audio terminals is calculated; the delay data of each of the audio terminals are compared, and the audio terminal with the largest playback delay is taken as the first audio terminal; the delay difference between other audio terminals and the first audio terminal is calculated as the delay sending duration of each of the audio terminals; According to the playback task information, the duration of each audio frame of the playback task is calculated; according to the duration of each audio frame of the playback task and the delayed sending duration of each audio terminal, the preset frame of the playback audio is sent to the corresponding audio terminal for playback.

2. An audio synchronization method as claimed in claim 1, characterized in that: Before calculating the delay data of each audio terminal according to the playback task information, the method further includes: Read the audio file information of the playback task to obtain the audio data and audio format of the playback task; The initial time when the playback task is started is recorded as the initial time, and the audio data, the audio format and the initial time are recorded in the playback task information.

3. An audio synchronization method as claimed in claim 2, characterized in that: The calculation of the delay data of each of the audio terminals is specifically as follows: Calculate the audio data size per second of the playback task according to the audio data and audio format of the playback task; According to the audio buffer size of each audio terminal and the data size of the audio per second of the playback task, the delay required by each audio terminal is obtained; the delay is the distance from the initial time to the start of playback of each audio terminal; The expression of the delay is: Among them, T ms is the delay required by the second audio terminal, AudBuff is the audio buffer size of the second audio terminal, and MediaSize is the data size of the audio per second of the playback task.

4. An audio synchronization method as claimed in claim 3, characterized in that: The data size of the audio per second of the playing task is calculated as follows: If the audio format of the playback task is WAV, the expression for calculating the data size of the audio per second of the playback task is: Wherein, SampleRate is the sampling rate of the audio data, BitDeep is the audio sampling accuracy of the audio data; NumChannel is the number of audio channels of the audio data; If the audio format of the playback task is MP3 or AAC, the expression for calculating the data size of the audio per second of the playback task is: Wherein, BitRate is the bit rate of the audio data.

5. An audio synchronization method as claimed in claim 1, characterized in that: The calculation of the delay difference between other audio terminals and the first audio terminal as the delay transmission duration of each audio terminal is specifically as follows: The expression of the delayed transmission duration of each audio terminal is: Delay i =T1-T i ; Delay i is the delay sending duration of the i-th audio terminal, T1 is the delay of the first audio terminal, T i is the delay of the ith audio terminal.

6. An audio synchronization method as claimed in claim 1, characterized in that: The duration of each frame of audio of the playback task is calculated according to the playback task information, specifically: If the audio format of the playback task is MP3 or AAC, the expression for the duration of each audio frame of the playback task is: If the audio format of the playback task is WAV, the expression for the duration of each frame of audio of the playback task is: Among them, FrameDuration is the duration of each audio frame, FrameSize is the size of each audio frame, MediaSize is the data size of the audio per second, and BitRate is the bit rate of the playback task.

7. An audio synchronization method as claimed in claim 6, characterized in that: According to the duration of each audio frame of the playback task and the delayed transmission duration of each audio terminal, the preset frame of the playback audio is sent to the corresponding audio terminal for playback, specifically: Put each frame of audio playback into the memory queue in sequence; Starting from the initial time, the playing audio frame is sent to the first audio terminal frame by frame from the initial time; starting from the delayed sending time of each audio terminal, the playing audio frame is sent to the corresponding audio terminal frame by frame; When the playing time of each audio terminal meets the preset condition, the next playing audio frame is obtained from the memory queue and sent to the corresponding audio terminal, and the sent frame is removed from the memory queue.

8. An audio synchronization method as claimed in claim 7, characterized in that: When the playing time of each audio terminal meets the preset condition, the next playing audio frame is obtained from the memory queue and sent to the corresponding audio terminal, and the sent frame is removed from the memory queue, specifically: If the current time is greater than the initial time, the sum of the played time and the delayed sending time of each audio terminal, the next frame of the played audio frame will be sent to the corresponding audio terminal, and the sent frame will be removed from the memory queue; the current time starts from the initial time.

9. An audio playback system, characterized in that: include: A control module and an audio terminal module; the audio terminal module includes at least two audio terminals; the control module includes a reading unit and a scheduling unit; The reading unit is used to respond to the operation of sending the playback task to each of the audio terminals, obtain the initial time of task start, the total audio playback duration of the playback task and the playback audio according to the playback task information, calculate the delay data of each of the audio terminals; compare the delay data of each of the audio terminals, and take the audio terminal with the largest playback delay as the first audio terminal; Calculating the delay difference between other audio terminals and the first audio terminal as the delay sending duration of each audio terminal; The scheduling unit is used to calculate the duration of each audio frame of the playback task according to the playback task information; and send the preset frame of the playback audio to the corresponding audio terminal for playback according to the duration of each audio frame of the playback task and the delayed sending duration of each audio terminal.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute an audio synchronization method as described in any one of claims 1 to 8.