CN112929149B - Audio synchronization method and system - Google Patents

Audio synchronization method and system Download PDF

Info

Publication number
CN112929149B
CN112929149B CN202110301165.2A CN202110301165A CN112929149B CN 112929149 B CN112929149 B CN 112929149B CN 202110301165 A CN202110301165 A CN 202110301165A CN 112929149 B CN112929149 B CN 112929149B
Authority
CN
China
Prior art keywords
audio
loudspeaker
time
delay time
bluetooth
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
CN202110301165.2A
Other languages
Chinese (zh)
Other versions
CN112929149A (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.)
Fengmi Beijing Technology Co ltd
Original Assignee
Fengmi Beijing 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 Fengmi Beijing Technology Co ltd filed Critical Fengmi Beijing Technology Co ltd
Priority to CN202110301165.2A priority Critical patent/CN112929149B/en
Publication of CN112929149A publication Critical patent/CN112929149A/en
Application granted granted Critical
Publication of CN112929149B publication Critical patent/CN112929149B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0079Receiver details
    • H04L7/0087Preprocessing of received signal for synchronisation, e.g. by code conversion, pulse generation or edge detection
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Processing of the speech or voice signal to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/04Time compression or expansion
    • G10L21/055Time compression or expansion for synchronising with other signals, e.g. video signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging

Abstract

The invention relates to an audio synchronization method and system, which enable Bluetooth sound boxes and loudspeakers in an audio surround system to simultaneously play audio signals of which the same section is a square wave pulse signal, obtain audio data of each Bluetooth sound box and each loudspeaker by using a self-contained machine body or external recording equipment, analyze the recorded Bluetooth audio data played by each Bluetooth sound box, and obtain a first moment corresponding to any rising edge or any falling edge in the audio signals; the recorded loudspeaker audio data played by each loudspeaker are analyzed, the second moment corresponding to the rising edge or the falling edge of the audio signal is obtained, at least one of the first delay time and the second delay time is further obtained, and the audio playing time of each loudspeaker or each Bluetooth loudspeaker box is adjusted according to the first delay time or the second delay time, so that the audio is synchronous, the audio immersion experience of a user can be guaranteed, and the user experience degree can be guaranteed.

Description

Audio synchronization method and system
Technical Field
The invention belongs to the technical field of audio adjustment, and particularly relates to an audio synchronization method and system.
Background
There are a lot of projecting equipment of far field pronunciation at present, in order to make the user have better audio frequency and immerse the experience, can use loudspeaker and a plurality of bluetooth speaker promptly wireless bluetooth speaker to constitute audio frequency surround system, as shown in fig. 1, loudspeaker and bluetooth speaker use the user to arrange as the center, however, in audio frequency surround system, because the environment can have the influence of factors such as interference to bluetooth transmission process, lead to there being delay between bluetooth speaker broadcast audio frequency and the loudspeaker broadcast audio frequency, the audio frequency that has greatly influenced the user immerses the experience, user experience degree has been reduced promptly.
Disclosure of Invention
The invention aims to solve the technical problem of providing an audio synchronization method and system aiming at the defects of the prior art.
The technical scheme of the audio synchronization method of the invention is as follows:
s1, enabling each Bluetooth sound box and each loudspeaker in an audio surround system to play the same section of audio signals, wherein the audio signals are square wave pulse signals;
s2, respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signals according to the audio played by each Bluetooth sound box, and respectively obtaining a second moment corresponding to the rising edge or the falling edge according to the audio played by each loudspeaker;
s3, at least one of first delay time and second delay time is obtained, wherein the first delay time is the time difference between any first moment and any second moment, and the second delay time is the average value of the time difference between each first moment and each second moment;
and S4, adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box according to the first delay time or the second delay time so as to synchronize the audio.
The audio synchronization method has the following beneficial effects:
each Bluetooth sound box and each loudspeaker in the audio surround system play the same section of audio signals which are square wave pulse signals, first time corresponding to any rising edge or any falling edge in the audio signals is obtained according to the audio played by each Bluetooth sound box, second time corresponding to the rising edge or the falling edge is obtained according to the audio played by each loudspeaker, at least one of first delay time and second delay time is obtained, the time for playing the audio by each loudspeaker or each Bluetooth sound box is adjusted according to the first delay time or the second delay time, the audio is synchronous, the audio immersion experience of a user can be guaranteed, and the user experience degree can be guaranteed.
On the basis of the above scheme, the audio synchronization method of the present invention can be further improved as follows.
Further, the method also comprises the following steps:
repeating the step S2 to obtain a plurality of first delay times and a plurality of second delay times;
acquiring at least one of a third delay time and a fourth delay time, wherein the third delay time is an average value of a plurality of first delay times, and the fourth delay time is an average value of a plurality of second delay times;
the S4 further includes:
and adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box according to the third delay time or the fourth delay time so as to synchronize the audio.
The beneficial effect of adopting the further scheme is that: and adjusting the time for playing the audio by each loudspeaker or each Bluetooth loudspeaker box according to the third delay time or the fourth delay time so as to synchronize the audio, ensure the audio immersion experience of the user, and ensure the user experience.
Further, the obtaining a first time corresponding to any rising edge or any falling edge in the audio signal according to the audio played by each bluetooth speaker respectively includes:
recording the audio played by each Bluetooth sound box to obtain Bluetooth audio data corresponding to each Bluetooth sound box;
and respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signal according to the sampling rate and the sampling format set when the Bluetooth audio data are recorded and the Bluetooth audio data corresponding to each Bluetooth sound box record.
Further, the process of obtaining the second time includes:
recording the audio frequency played by each loudspeaker to obtain loudspeaker audio frequency data corresponding to each loudspeaker;
and respectively obtaining second moments according to the sampling rate and the sampling format set when the loudspeaker audio data are recorded and the loudspeaker audio data corresponding to each loudspeaker.
The technical scheme of the audio synchronization system is as follows:
the device comprises an audio playing module, a first acquisition module, a second acquisition module, a third acquisition module and a synchronous adjustment module;
the audio playing module is used for enabling each Bluetooth sound box and each loudspeaker in the audio surround system to play the same section of audio signal, and the audio signal is a square wave pulse signal;
the first acquisition module is used for respectively acquiring a first moment corresponding to any rising edge or any falling edge in the audio signals according to the audio played by each Bluetooth sound box;
the second acquisition module is used for respectively acquiring a second moment corresponding to the rising edge or the falling edge according to the audio played by each loudspeaker;
the third obtaining module is configured to obtain at least one of a first delay time and a second delay time, where the first delay time is a time difference between any one first time and any one second time, and the second delay time is an average value of time differences between each first time and each second time;
and the synchronous adjusting module is used for adjusting the time of playing the audio by each loudspeaker or each Bluetooth sound box according to the first delay time or the second delay time so as to synchronize the audio.
The audio synchronization system has the following beneficial effects:
each Bluetooth sound box and each loudspeaker in the audio surround system play the same section of audio signals which are square wave pulse signals, first time corresponding to any rising edge or any falling edge in the audio signals is obtained according to the audio played by each Bluetooth sound box, second time corresponding to the rising edge or the falling edge is obtained according to the audio played by each loudspeaker, at least one of first delay time and second delay time is obtained, the time for playing the audio by each loudspeaker or each Bluetooth sound box is adjusted according to the first delay time or the second delay time, the audio is synchronous, the audio immersion experience of a user can be guaranteed, and the user experience degree can be guaranteed.
On the basis of the above scheme, the audio synchronization system of the present invention can be further improved as follows.
Further, the system also comprises a repeated calling module;
the repeated calling module is used for repeatedly calling the first obtaining module and the second obtaining module to obtain a plurality of first delay times and a plurality of second delay times;
the third obtaining module is further configured to obtain at least one of a third delay time and a fourth delay time, where the third delay time is an average of a plurality of first delay times, and the fourth delay time is an average of a plurality of second delay times;
and the synchronous adjusting module is also used for adjusting the time of playing the audio by each loudspeaker or each Bluetooth sound box according to the third delay time or the fourth delay time so as to synchronize the audio.
The beneficial effect of adopting the further scheme is that: the time for playing the audio frequency of each loudspeaker or each Bluetooth sound box is adjusted according to the third delay time or the fourth delay time so as to synchronize the audio frequency, ensure the audio frequency immersion experience of the user, namely ensure the user experience degree
Further, the first obtaining module is specifically configured to:
recording the audio played by each Bluetooth sound box to obtain Bluetooth audio data corresponding to each Bluetooth sound box;
and respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signal according to the sampling rate and the sampling format set when the Bluetooth audio data are recorded and the Bluetooth audio data corresponding to each Bluetooth sound box record.
Further, the second obtaining module is specifically configured to:
recording the audio frequency played by each loudspeaker to obtain loudspeaker audio frequency data corresponding to each loudspeaker;
and respectively obtaining second moments according to the sampling rate and the sampling format set when the loudspeaker audio data are recorded and the loudspeaker audio data corresponding to each loudspeaker.
Drawings
Fig. 1 is a schematic diagram of an audio surround system;
FIG. 2 is a flowchart illustrating an audio synchronization method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an audio signal that is a square-wave pulse signal;
FIG. 4 is a schematic structural diagram of an audio synchronization system according to an embodiment of the present invention;
Detailed Description
As shown in fig. 2, an audio synchronization method according to an embodiment of the present invention includes the following steps:
s1, enabling each Bluetooth sound box and each loudspeaker in an audio surround system to play the same section of audio signals, wherein the audio signals are square wave pulse signals;
s2, respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signals according to the audio played by each Bluetooth sound box, and respectively obtaining a second moment corresponding to the rising edge or the falling edge according to the audio played by each loudspeaker;
s3, at least one of first delay time and second delay time is obtained, wherein the first delay time is the time difference between any first time and any second time, and the second delay time is the average value of the time difference between each first time and each second time;
and S4, adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box according to the first delay time or the second delay time so as to synchronize the audio.
Each Bluetooth sound box and each loudspeaker in the audio surround system play the same section of audio signals which are square wave pulse signals, first time corresponding to any rising edge or any falling edge in the audio signals is obtained according to the audio played by each Bluetooth sound box, second time corresponding to the rising edge or the falling edge is obtained according to the audio played by each loudspeaker, at least one of first delay time and second delay time is obtained, the time for playing the audio by each loudspeaker or each Bluetooth sound box is adjusted according to the first delay time or the second delay time, the audio is synchronous, the audio immersion experience of a user can be guaranteed, and the user experience degree can be guaranteed.
The audio signal which is a square wave pulse signal is shown in fig. 3, and parameters of the played audio signal, such as frequency and amplitude, can be adjusted and set according to actual situations, which are not described herein again;
in S2, obtaining a first time corresponding to any rising edge or any falling edge in the audio signal according to the audio played by each bluetooth speaker respectively includes:
recording the audio played by each Bluetooth sound box to obtain Bluetooth audio data corresponding to each Bluetooth sound box;
and respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signal according to the sampling rate and the sampling format set when the Bluetooth audio data are recorded and the Bluetooth audio data corresponding to each Bluetooth sound box record.
Wherein the process of obtaining the second time includes:
recording the audio frequency played by each loudspeaker to obtain loudspeaker audio frequency data corresponding to each loudspeaker;
and respectively obtaining second moments according to the sampling rate and the sampling format set when the loudspeaker audio data are recorded and the loudspeaker audio data corresponding to each loudspeaker.
Can adopt recording equipment such as microphone, recording pen to record the audio frequency that every bluetooth speaker and every loudspeaker box broadcast, obtain the bluetooth audio data that every bluetooth speaker corresponds and the loudspeaker audio data that every loudspeaker correspond to explain for example four bluetooth speakers and two loudspeaker, specifically:
make every bluetooth speaker and every loudspeaker broadcast same section audio signal in the audio frequency surrounding system, record the audio frequency of every bluetooth speaker and every loudspeaker box broadcast through recording equipment, obtain the bluetooth audio data that every bluetooth speaker corresponds, and the loudspeaker audio data that every loudspeaker corresponds, namely obtain 4 groups of bluetooth audio data and 2 groups of loudspeaker audio data, it can be understood that every group bluetooth audio data and every group loudspeaker audio data are square wave pulse signal, then:
1) When recording bluetooth audio data, the sampling rate may be set to acquire 48000 sampling points per second, and the sampling format may be set to mark each sampling point with an integer serial number sequence such as 1, 2, 3 … …, for example, within 1 second, serial number 1 corresponds to the 1 st sampling point, serial number 2 corresponds to the 2 nd sampling point, and the like, it can be understood that any sampling point includes amplitude corresponding to a serial number and audio played by a bluetooth sound box, that is, bluetooth audio data is composed of a plurality of sampling points obtained according to a time sequence, and each sampling point includes a serial number and amplitude of audio played by a bluetooth sound box; it can be understood that the amplitude of the audio played by the bluetooth speaker is related to the sound level set by the bluetooth speaker, and is unrelated to the amplitude of the original audio signal; therefore, in the present application, a rising edge or a falling edge is identified by analyzing a change in a slope of an amplitude of an audio played by each bluetooth speaker, so that a first time corresponding to any rising edge or any falling edge in the audio signal is obtained from the audio played by each bluetooth speaker, and an example of obtaining a second rising edge in the audio signal according to any bluetooth audio data is described as follows:
because each rising edge in the bluetooth audio data corresponding to the bluetooth sound box playing corresponds to a rising edge in each audio signal one by one, and each falling edge in the bluetooth audio data corresponding to the bluetooth sound box playing corresponds to a falling edge in each audio signal one by one, then, the second rising edge in the bluetooth audio data corresponds to the second rising edge in the audio signal, for example, the serial number corresponding to the second rising edge in the bluetooth audio data is 120000, then according to the bluetooth audio data, the first time corresponding to the second rising edge in the audio signal is 120000/48000=2.5 seconds, and 48000 is the sampling rate;
similarly, according to each Bluetooth audio data, respectively obtaining a first moment corresponding to a second rising edge in the audio signal, and obtaining 4 first moments in total;
2) When loudspeaker audio data are recorded, the sampling rate can be set to acquire 48000 sampling points per second, and the sampling format can be set to mark each sampling point in an integer serial number sequence such as 1, 2, 3 … …, and the like, for example, within 1 second, serial number 1 corresponds to the 1 st sampling point, serial number 2 corresponds to the 2 nd sampling point, and the like, it can be understood that any sampling point includes amplitude corresponding to a serial number and loudspeaker playing audio, that is, loudspeaker audio data is composed of a plurality of sampling points obtained according to time sequence, and each sampling point includes a serial number and loudspeaker playing audio amplitude respectively; it can be understood that the amplitude of the audio played by the loudspeaker is related to the sound level set by the loudspeaker, and is not related to the amplitude of the original audio signal; therefore, the present application recognizes a rising edge or a falling edge by analyzing a change in a slope of an amplitude of an audio played by each speaker, thereby obtaining a first time corresponding to any rising edge or any falling edge in the audio signal from the audio played by each speaker, and taking obtaining a second rising edge in the audio signal according to any speaker audio data as an example to explain:
because each rising edge in the speaker audio data corresponding to the speaker playing corresponds to a rising edge in each audio signal one-to-one, and each falling edge in the speaker audio data corresponding to the speaker playing corresponds to a falling edge in each audio signal one-to-one, then, the second rising edge in the speaker audio data corresponds to the second rising edge in the audio signal, for example, the serial number corresponding to the second rising edge in the speaker audio data is 96000, then according to the speaker audio data, the second time corresponding to the second rising edge in the audio signal is 105600/48000=2.2 seconds, 48000 is the sampling rate;
similarly, according to the audio data of each loudspeaker, respectively obtaining second moments corresponding to a second rising edge in the audio signal, and obtaining 2 second moments in total;
because in the audio frequency system of encircleing, all bluetooth speaker and all loudspeaker are the annular and arrange, then the deviation between 4 first moments is minimum to and the deviation between 2 second moments is minimum, then:
(1) acquiring a time difference between any first time and any second time, namely first delay time, and adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box so as to synchronize the audio, wherein for example, the first delay time is 2.5 seconds, the second delay time is 2.2 seconds, and then the time for playing the audio by each loudspeaker is delayed by 2.5-2.2=0.3 seconds, so that the audio played by each loudspeaker or each Bluetooth sound box can be ensured to be synchronized at this time;
it can be understood that, since the sampling rate and the sampling format set when recording the bluetooth audio data are the same as those set when recording the horn audio data, the first delay time can be obtained by (120000-105600)/48000 =2.2 seconds.
(2) And obtaining the average value of the time difference between each first time and each second time, namely the second delay time, and adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box so as to synchronize the audio, wherein the specific process is not repeated.
The sampling rate and the sampling format set when recording the bluetooth audio data may be adjusted according to an actual situation, for example, the sampling format may be set to 16bit, at this time, each sampling point may be shifted by two bytes, which is equivalent to serial numbers of 2, 4, 6 … …, and the like, the serial number corresponding to the second rising edge in the audio signal is 240000, at this time, the first time corresponding to the second rising edge in the audio signal is calculated as 240000/(48000 × 2) =2.5 seconds, 48000 is a sampling rate, and the sampling rate and the sampling format set when recording the speaker audio data may be adjusted according to an actual situation, which is not described herein.
In order to obtain the same rising edge or the same falling edge in the audio signal according to the audio played by each Bluetooth sound box and the audio played by each loudspeaker, the Bluetooth audio data and the loudspeaker audio data can be recorded at the same time, so that the same rising edge or the same falling edge in the audio signal can be obtained from each Bluetooth audio data and each loudspeaker audio data according to the sequence from front to back, the Bluetooth audio data and the loudspeaker audio data can also be recorded at the same time, so that the same rising edge or the same falling edge in the audio signal can be obtained from each Bluetooth audio data and each loudspeaker audio data according to the sequence from back to front, the marking purpose can be achieved by adjusting the frequency or other parameters of the square wave pulse signal, and the same rising edge or the same falling edge in the audio signal can be obtained from the audio played by each Bluetooth sound box and the audio played by each loudspeaker according to the mark.
Preferably, in the above technical solution, the method further comprises:
repeating the step S2 to obtain a plurality of first delay times and a plurality of second delay times;
acquiring at least one of a third delay time and a fourth delay time, wherein the third delay time is an average value of a plurality of first delay times, and the fourth delay time is an average value of a plurality of second delay times;
the S4 further includes:
adjusting the time for each loudspeaker or each bluetooth speaker to play audio according to the third delay time or the fourth delay time, so as to synchronize the audio.
That is to say, adjust the time of every loudspeaker or every bluetooth speaker broadcast audio frequency according to first delay time, second delay time, third delay time or fourth delay time to make the audio frequency synchronous, can guarantee user's audio frequency and immerse the experience, can guarantee user experience degree promptly.
The invention relates to an audio synchronization method, which enables a Bluetooth sound box and a loudspeaker in an audio surround system to simultaneously play audio signals of which the same section is a square wave pulse signal, obtains audio data of each Bluetooth sound box and each loudspeaker by utilizing a self-contained machine body or external recording equipment such as a microphone, analyzes the recorded Bluetooth audio data played by each Bluetooth sound box, and obtains a first moment corresponding to any rising edge or any falling edge in the audio signals; the recorded loudspeaker audio data played by each loudspeaker are analyzed, the second moment corresponding to the rising edge or the falling edge of the audio signal is obtained, at least one of the first delay time and the second delay time is further obtained, and the audio playing time of each loudspeaker or each Bluetooth loudspeaker box is adjusted according to the first delay time or the second delay time, so that the audio is synchronous, the audio immersion experience of a user can be guaranteed, and the user experience degree can be guaranteed.
In the foregoing embodiments, although the steps are numbered as S1, S2, etc., but only specific examples are given in this application, and those skilled in the art may adjust the execution sequence of S1, S2, etc. according to actual situations, which is also within the protection scope of the present invention, and it is understood that some embodiments may include some or all of the above embodiments.
As shown in fig. 4, an audio synchronization system 200 according to an embodiment of the present invention includes an audio playing module 210, a first obtaining module 220, a second obtaining module 230, a third obtaining module 240, and a synchronization adjusting module 250;
the audio playing module 210 is configured to enable each bluetooth speaker and each speaker in the audio surround system to play an audio signal of the same segment, where the audio signal is a square wave pulse signal;
the first obtaining module 220 is configured to obtain a first time corresponding to any rising edge or any falling edge in the audio signal according to the audio played by each bluetooth speaker;
the second obtaining module 230 is configured to obtain a second time corresponding to the rising edge or the falling edge according to the audio played by each speaker;
the third obtaining module 240 is configured to obtain at least one of a first delay time and a second delay time, where the first delay time is a time difference between any one first time and any one second time, and the second delay time is an average value of time differences between each first time and each second time;
the synchronization adjustment module 250 is configured to adjust the time for each speaker or each bluetooth speaker to play the audio according to the first delay time or the second delay time, so as to synchronize the audio.
Each Bluetooth sound box and each loudspeaker in the audio surround system play the same section of audio signals which are square wave pulse signals, first time corresponding to any rising edge or any falling edge in the audio signals is obtained according to the audio played by each Bluetooth sound box, second time corresponding to the rising edge or the falling edge is obtained according to the audio played by each loudspeaker, at least one of first delay time and second delay time is obtained, the time for playing the audio by each loudspeaker or each Bluetooth sound box is adjusted according to the first delay time or the second delay time, the audio is synchronous, the audio immersion experience of a user can be guaranteed, and the user experience degree can be guaranteed.
Preferably, in the above technical solution, the apparatus further comprises a repeat call module;
the repeated calling module is used for repeatedly calling the first obtaining module and the second obtaining module to obtain a plurality of first delay times and a plurality of second delay times;
the third obtaining module 240 is further configured to obtain at least one of a third delay time and a fourth delay time, where the third delay time is an average value of a plurality of first delay times, and the fourth delay time is an average value of a plurality of second delay times;
the synchronization adjustment module 250 is further configured to adjust the time for each speaker or each bluetooth speaker to play the audio according to the third delay time or the fourth delay time, so as to synchronize the audio.
The time for playing the audio frequency of each loudspeaker or each Bluetooth sound box is adjusted according to the third delay time or the fourth delay time so as to synchronize the audio frequency, ensure the audio frequency immersion experience of the user, namely ensure the user experience degree
Preferably, in the above technical solution, the first obtaining module 220 is specifically configured to:
recording the audio played by each Bluetooth sound box to obtain Bluetooth audio data corresponding to each Bluetooth sound box;
and respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signal according to the sampling rate and the sampling format set when the Bluetooth audio data are recorded and the Bluetooth audio data corresponding to each Bluetooth sound box record.
Preferably, in the above technical solution, the second obtaining module 230 is specifically configured to:
recording the audio frequency played by each loudspeaker to obtain loudspeaker audio frequency data corresponding to each loudspeaker;
and respectively obtaining second moments according to the sampling rate and the sampling format set when the loudspeaker audio data are recorded and the loudspeaker audio data corresponding to each loudspeaker.
The above steps for realizing the corresponding functions of each parameter and each unit module in the audio synchronization system 200 of the present invention can refer to each parameter and step in the above embodiments of an audio synchronization method, which are not described herein again.
As will be appreciated by one skilled in the art, the present invention may be embodied as a system, method or computer program product.
Accordingly, the present disclosure may be embodied in the form of: may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software, and may be referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media having computer-readable program code embodied in the medium.
Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer-readable storage medium include 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 context of this document, 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.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (8)

1. An audio synchronization method, comprising:
s1, enabling each Bluetooth sound box and each loudspeaker in an audio surround system to play the same section of audio signals, wherein the audio signals are square wave pulse signals;
s2, respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signals according to the audio played by each Bluetooth sound box, and respectively obtaining a second moment corresponding to the rising edge or the falling edge according to the audio played by each loudspeaker;
s3, at least one of first delay time and second delay time is obtained, wherein the first delay time is the time difference between any first time and any second time, and the second delay time is the average value of the time difference between each first time and each second time;
and S4, adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box according to the first delay time or the second delay time so as to synchronize the audio.
2. The audio synchronization method of claim 1, further comprising:
repeating S2 to obtain a plurality of first delay times and a plurality of second delay times;
acquiring at least one of a third delay time and a fourth delay time, wherein the third delay time is an average value of a plurality of first delay times, and the fourth delay time is an average value of a plurality of second delay times;
the S4 further includes:
and adjusting the time for playing the audio by each loudspeaker or each Bluetooth sound box according to the third delay time or the fourth delay time so as to synchronize the audio.
3. The audio synchronization method according to claim 1 or 2, wherein the obtaining a first time corresponding to any rising edge or any falling edge in the audio signal according to the audio played by each bluetooth speaker respectively comprises:
recording the audio played by each Bluetooth sound box to obtain Bluetooth audio data corresponding to each Bluetooth sound box;
and respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signal according to the sampling rate and the sampling format set when the Bluetooth audio data are recorded and the Bluetooth audio data corresponding to each Bluetooth sound box record.
4. The audio synchronization method according to claim 1 or 2, wherein the process of obtaining the second time comprises:
recording the audio played by each loudspeaker to obtain loudspeaker audio data corresponding to each loudspeaker;
and respectively obtaining second moments according to the sampling rate and the sampling format set when the loudspeaker audio data are recorded and the loudspeaker audio data corresponding to each loudspeaker.
5. An audio synchronization system is characterized by comprising an audio playing module, a first acquisition module, a second acquisition module, a third acquisition module and a synchronization adjustment module;
the audio playing module is used for enabling each Bluetooth sound box and each loudspeaker in the audio surround system to play the same section of audio signal, and the audio signal is a square wave pulse signal;
the first acquisition module is used for respectively acquiring a first moment corresponding to any rising edge or any falling edge in the audio signals according to the audio played by each Bluetooth sound box;
the second acquisition module is used for respectively acquiring a second moment corresponding to the rising edge or the falling edge according to the audio played by each loudspeaker;
the third obtaining module is configured to obtain at least one of a first delay time and a second delay time, where the first delay time is a time difference between any one of the first time instants and any one of the second time instants, and the second delay time is an average value of time differences between each first time instant and each second time instant;
and the synchronous adjusting module is used for adjusting the time of playing the audio by each loudspeaker or each Bluetooth sound box according to the first delay time or the second delay time so as to synchronize the audio.
6. The audio synchronization system of claim 5, further comprising a repeat call module;
the repeated calling module is used for repeatedly calling the first obtaining module and the second obtaining module to obtain a plurality of first delay times and a plurality of second delay times;
the third obtaining module is further configured to obtain at least one of a third delay time and a fourth delay time, where the third delay time is an average of a plurality of first delay times, and the fourth delay time is an average of a plurality of second delay times;
and the synchronous adjusting module is also used for adjusting the time of playing the audio by each loudspeaker or each Bluetooth sound box according to the third delay time or the fourth delay time so as to synchronize the audio.
7. The audio synchronization system according to claim 5 or 6, wherein the first obtaining module is specifically configured to:
recording the audio played by each Bluetooth sound box to obtain Bluetooth audio data corresponding to each Bluetooth sound box;
and respectively obtaining a first moment corresponding to any rising edge or any falling edge in the audio signal according to the sampling rate and the sampling format set when the Bluetooth audio data are recorded and the Bluetooth audio data corresponding to each Bluetooth sound box record.
8. The audio synchronization system according to claim 5 or 6, wherein the second obtaining module is specifically configured to:
recording the audio frequency played by each loudspeaker to obtain loudspeaker audio frequency data corresponding to each loudspeaker;
and respectively obtaining second moments according to the sampling rate and the sampling format which are set when the loudspeaker audio data are recorded and the loudspeaker audio data corresponding to each loudspeaker.
CN202110301165.2A 2021-03-22 2021-03-22 Audio synchronization method and system Active CN112929149B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110301165.2A CN112929149B (en) 2021-03-22 2021-03-22 Audio synchronization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110301165.2A CN112929149B (en) 2021-03-22 2021-03-22 Audio synchronization method and system

Publications (2)

Publication Number Publication Date
CN112929149A CN112929149A (en) 2021-06-08
CN112929149B true CN112929149B (en) 2023-01-03

Family

ID=76175377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110301165.2A Active CN112929149B (en) 2021-03-22 2021-03-22 Audio synchronization method and system

Country Status (1)

Country Link
CN (1) CN112929149B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742357A (en) * 2009-12-29 2010-06-16 北京牡丹电子集团有限责任公司 Method for measuring audio/video synchronous error of digital television device
CN107172419A (en) * 2017-06-08 2017-09-15 广州华多网络科技有限公司 Audio-visual synchronization method of testing and system
CN112073879A (en) * 2020-09-11 2020-12-11 成都极米科技股份有限公司 Audio synchronous playing method and device, video playing equipment and readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI545971B (en) * 2014-10-03 2016-08-11 絡達科技股份有限公司 Audio synchronization method for bluetooth speaker

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101742357A (en) * 2009-12-29 2010-06-16 北京牡丹电子集团有限责任公司 Method for measuring audio/video synchronous error of digital television device
CN107172419A (en) * 2017-06-08 2017-09-15 广州华多网络科技有限公司 Audio-visual synchronization method of testing and system
CN112073879A (en) * 2020-09-11 2020-12-11 成都极米科技股份有限公司 Audio synchronous playing method and device, video playing equipment and readable storage medium

Also Published As

Publication number Publication date
CN112929149A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN104685563B (en) The audio signal shaping of playback in making an uproar for noisy environment
CN106302997B (en) Output control method, electronic equipment and system
US8000824B2 (en) Audio reproducing apparatus
CN105448312B (en) Audio sync playback method, apparatus and system
RU2018119087A (en) DEVICE AND METHOD FOR FORMING A FILTERED AUDIO SIGNAL REALIZING AN ANGLE RENDERIZATION
CN106612482B (en) Method for adjusting audio parameters and mobile terminal
US9748914B2 (en) Transforming audio content for subjective fidelity
CN106024035B (en) A kind of method and terminal of audio processing
US20160239253A1 (en) Method for audio correction in electronic devices
CN108347686A (en) Audio testing method, device, smart machine and storage medium
CN111145773B (en) Sound field restoration method and device
CN110890100B (en) Voice enhancement method, multimedia data acquisition method, multimedia data playing method, device and monitoring system
WO2020125325A1 (en) Method for eliminating echo and device
CN112929149B (en) Audio synchronization method and system
US9070371B2 (en) Method and system for peak limiting of speech signals for delay sensitive voice communication
CN115022767A (en) Earphone wind noise reduction method and device, earphone and computer readable storage medium
CN108932953B (en) Audio equalization function determination method, audio equalization method and equipment
US9570056B2 (en) Audio data synthesis method, audio output method, and program for synthesizing audio data based on a time difference
CN113517000A (en) Echo cancellation test method, terminal and storage device
US10997984B2 (en) Sounding device, audio transmission system, and audio analysis method thereof
CN111818413A (en) Microphone gain adjustment method, related device and readable storage medium
CN107277687A (en) A kind of audio frequency apparatus and its processing method
CN111726730A (en) Sound playing device and method for adjusting output sound
CN104023296A (en) Sound output method and device and mobile terminal
CN113613145B (en) Noise reduction processing method and related device

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