Method for determining audio signal processing time, terminal device and computer-readable storage medium
By adding trigger information to the audio signal, the processing end signal of the audio equipment or microphone equipment is obtained, and the audio signal processing time is calculated, which solves the problem of difficulty in determining the audio signal processing time and achieves the effect of audio-visual synchronization and user singing alignment.
Patent Information
- Application Number
- CN202310362306.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-03-31
AI Technical Summary
In the listening and karaoke scenes, the audio signal processing time is difficult to determine, making synchronization or alignment difficult.
By adding trigger information to the audio signal, the information is sent to the target audio device or microphone device, so that it sends a processing end signal after the processing is completed. The music client calculates the processing time based on the received time point and the sending time point.
It achieves accurate measurement of audio signal processing time, supports audio and video synchronization and alignment of user singing and music accompaniment, making measurement convenient and low cost.
Smart Images

Figure 00000000_0000
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio processing, and in particular to a method for determining the time taken to process an audio signal, a terminal device, and a music client. Background Art
[0002] In the music listening scenario, users can open a music client on a mobile phone or other terminal device, determine the song they want to listen to, and play the song through the audio equipment. At the same time, the music client can synchronously display the corresponding lyrics on the mobile phone.
[0003] In the karaoke scene, users can open karaoke music clients on mobile phones and other terminal devices. The microphone device can collect the user's singing voice and form a corresponding audio signal to send to the music client. The music client aligns the audio signal and the music accompaniment to form a complete personal work.
[0004] However, it is difficult for music clients to determine the time it takes for the audio device to process the audio signal internally in the music listening scenario, and the time it takes for the microphone device to process the audio signal internally in the karaoke scenario, which makes it difficult to perform synchronization or alignment processing. Summary of the invention
[0005] Based on this, it is necessary to provide a method for determining the time required for audio signal processing, a terminal device and a music client in response to the above technical problems.
[0006] The present application provides a method for determining the time taken to process an audio signal, which is applied to a music client, and the method comprises:
[0007] Obtaining trigger information associated with a target audio device;
[0008] Adding the trigger information to the audio signal, and sending the audio signal carrying the trigger information to the target audio device; the trigger information causes the target audio device to send a processing end signal after processing the audio signal;
[0009] receiving a processing end signal sent by the target audio device;
[0010] The processing time of the audio signal is determined according to the time point of receiving the processing end signal and the time point of sending the audio signal.
[0011] In the above method provided by the present application, in a music listening scenario, the music client can obtain trigger information associated with the target audio device, add the trigger information to the audio signal, and send the audio signal carrying the trigger information to the target audio device; the trigger information enables the target audio device to send a processing end signal after processing the audio signal; the music client receives the processing end signal sent by the target audio device; the music client can determine the processing time of the audio signal based on the time point of receiving the processing end signal and the time point of sending the audio signal, thereby performing audio and video synchronization.
[0012] The present application provides a method for determining the time taken to process an audio signal, which is applied to a music client, and the method comprises:
[0013] Sending a processing start signal to the target microphone device; the processing start signal enables the target microphone device to collect sound signals, process the collected sound signals into audio signals, add trigger information to the audio signals, and send the audio signals carrying the trigger information to the music client;
[0014] Receiving an audio signal carrying the trigger information sent by the target microphone device;
[0015] The processing time of the audio signal is determined according to the time point when the processing start signal is sent and the time point when the audio signal carrying the trigger information is received.
[0016] In the above method provided by the present application, in a karaoke scenario, the music client can send a processing start signal to the target microphone device; the processing start signal enables the target microphone device to collect sound signals, process the collected sound signals into audio signals, add trigger information to the audio signals, and send the audio signal carrying the trigger information to the music client; the music client receives the audio signal carrying the trigger information sent by the target microphone device; the music client determines the time required for audio signal processing based on the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information, thereby aligning the audio signal of the user's singing with the music accompaniment.
[0017] The present application provides a terminal device, which runs a music client. When the music client executes a computer program through a processor, the above method is implemented.
[0018] The present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to execute the above method.
[0019] The present application provides a music client, including a computer program, which implements the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A schematic diagram of a scenario for determining the time required for processing an audio signal in a music listening scenario in one embodiment;
[0021] Figure 2 A schematic diagram of a flow chart of determining the time taken to process an audio signal in a music listening scenario in one embodiment;
[0022] Figure 3 A schematic diagram of a scenario for determining the time required for processing an audio signal in a music listening scenario in another embodiment;
[0023] Figure 4 A schematic diagram of a scenario for determining the time required for processing an audio signal in a music listening scenario in yet another embodiment;
[0024] Figure 5 A schematic diagram of a scenario for determining the time required for audio signal processing in a karaoke scenario in one embodiment;
[0025] Figure 6 A schematic diagram of a flow chart for determining the time taken to process an audio signal in a karaoke scenario in one embodiment;
[0026] Figure 7 A schematic diagram of a scenario for determining the time required for audio signal processing in a karaoke scenario in another embodiment;
[0027] Figure 8 A schematic diagram of a scenario for determining the time required for processing an audio signal in a music listening scenario in yet another embodiment;
[0028] Fig. 9 FIG. 4 is a diagram showing the internal structure of a terminal device in an embodiment. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0031] The following is an introduction to the technical terms involved in this application:
[0032] Audio equipment: A device that is a sound-generating device that can receive audio signals and play sounds. Audio equipment is equipped with a sound-generating device that is used to convert electrical signals into sounds. A typical example is a speaker.
[0033] Microphone device: A device that collects sound, forms corresponding audio signals and sends out audio signals. Microphone equipment is equipped with a sound pickup device that converts sound signals into electrical signals. A typical example is a microphone.
[0034] Terminal devices: can run music clients; in the music listening scenario, the terminal device can transmit audio signals wirelessly, and if the terminal device is equipped with a sound pickup device, the terminal device can also collect external sounds; in the karaoke scenario, the terminal device can receive audio signals, and if the terminal device is equipped with a sound generating device, the terminal device can also play sounds. Typical examples of terminal devices include: mobile phones, tablet computers, laptops, smart TVs, smart projectors, smart speakers, etc.
[0035] The terminal device may transmit or receive audio signals in a wired manner or a wireless manner. When a wireless manner is adopted, it is generally performed using a near-field wireless signal.
[0036] Near-field wireless signal: The distance between the transmitter and the receiver of the wireless signal in space is relatively close. The signal uses electromagnetic waves as a carrier to transmit information over short distances. Common signals of this type include Bluetooth, WiFi (wireless fidelity), infrared, UHF (Ultra High Frequency), and 2.4G.
[0037] In this application, the audio device used to play the audio such as songs provided by the music client is referred to as the target audio device, and the target audio device includes but is not limited to headphones.
[0038] Reference Figure 1 The music client can run on the terminal device, and transmit the audio signal to the target audio device by wire or wirelessly through the terminal device. After the target audio device receives the audio signal, it processes the audio signal into a playable sound signal through demodulation and other processing.
[0039] After the music client provides the audio signal to the terminal device, in the case of wired transmission of audio signals between the terminal device and the target audio device, the audio signal is directly transmitted through the signal line, and the time taken for the audio signal to be transmitted between the two devices is shorter; after the target audio device receives the audio signal, it processes the audio signal into a playable sound signal internally, and the processing of the audio signal inside the target audio device takes longer than wired transmission. In the case of wired transmission of audio signals, the time taken for audio signal processing obtained by the method provided in this application mainly lies in: the processing process inside the target audio device.
[0040] After the music client provides the audio signal to the terminal device, when the terminal device and the target audio device transmit the audio signal wirelessly, the audio signal is transmitted via a near-field wireless signal. The near-field wireless signal is subject to radio interference such as WiFi, and the time it takes for the audio signal to be transmitted between the two devices may be longer. In addition, the processing process of the audio signal inside the target audio device is also longer. In the case of wireless transmission of audio signals, the audio signal processing time obtained by the method provided in this application mainly lies in: the time it takes for the audio signal to be transmitted between the terminal device and the target audio device, and the processing process inside the target audio device.
[0041] The method provided in this application includes Figure 2 The steps shown are:
[0042] Step S201, obtaining trigger information associated with a target audio device.
[0043] Step S202: adding trigger information to the audio signal, and sending the audio signal carrying the trigger information to the target audio device; the trigger information causes the target audio device to send a processing end signal after processing the audio signal.
[0044] The trigger information is mainly used to make the target audio device send a processing end signal after processing the audio signal carrying the trigger information. The amount of trigger information can be much smaller than the amount of audio signal information. Therefore, even if the audio signal carries trigger information, it will not affect the duration of the target audio device processing the audio signal too much, thereby improving the measurement accuracy. In some examples, simple control characters can be selected as trigger information.
[0045] The music client can negotiate the trigger information with the target audio device in advance. The trigger information negotiated in advance with the target audio device can be called the trigger information associated with the target audio device. The music client can add the trigger information to the audio signal; when the audio signal is transmitted in the form of a data packet, the music client can add the trigger information to the header of the data packet, or add the trigger information to the body of the data packet; in the music listening scenario, the header of the data packet is generally used to store information such as the song name and singer, and the body is used to store the audio signal corresponding to the song.
[0046] After the music client adds the trigger information to the audio signal, it sends the audio signal carrying the trigger information to the target audio device; specifically, refer to Figure 3 The music client can send an audio signal carrying trigger information to an audio signal transmitting module of a terminal device. The audio signal transmitting module of the terminal device sends the audio signal carrying trigger information to an audio signal receiving module of a target audio device. During the process in which the audio signal processing module of the target audio device processes the audio signal received by the audio signal receiving module into a sound signal that can be played by a sound device, if it is found that the audio signal carries the pre-negotiated trigger information, then after the processing is completed, a processing end signal is sent through a processing end signal transmitting module provided in the music client. The processing end signal is used to inform the music client that the processing of the audio signal has been completed and the corresponding sound signal can be played. The music client receives the above-mentioned processing end signal through a processing end signal receiving module provided in the terminal device.
[0047] Processing completion mainly means that the audio signal is processed into a sound signal that can be played by the sound device. The processing end signal can be negotiated in advance between the music client and the target audio device. When the audio signal is transmitted between the terminal device and the target audio device in a wireless manner, the audio signal transmitting module of the terminal device can be called an audio signal wireless transmitting module, and the audio signal receiving module of the target audio device can be called an audio signal wireless receiving module.
[0048] The amount of information in the processing end signal can be less than the preset value, so that the target audio device can send it in time and the music client can receive it in time; the processing end signal can be transmitted by wire or wirelessly; the wireless method includes but is not limited to sound waves, infrared rays, BLE (Bluetooth Low Energy, low-power Bluetooth connection). Sound waves include ultrasonic waves, infrasound waves, audible sound waves, etc. Sound waves are a common way of information transmission in daily life. The propagation speed in the air is about 340 meters per second, which is relatively fast. The transmission delay is 10ms at a distance of 3.4 meters and 50ms at a distance of 17 meters.
[0049] Step S203: receiving a processing end signal sent by the target audio device.
[0050] If the target audio device sends a processing end signal via a wired connection, the music client can receive the processing end signal through the wired connection between the terminal device and the target audio device. If the target audio device sends a processing end signal via a wireless connection, the music client can receive the processing end signal through the wireless connection between the terminal device and the target audio device. After receiving the processing end signal, the music client can record the time point when the processing end signal is received.
[0051] Step S204, determining the processing time of the audio signal according to the time point of receiving the processing end signal and the time point of sending the audio signal.
[0052] As mentioned above, when the audio signal is transmitted between the terminal device and the target audio device via a wired method, the time taken to process the audio signal mainly lies in: the processing process inside the target audio device. When the audio signal is transmitted between the terminal device and the target audio device via a wireless method, the time taken to process the audio signal mainly lies in: the time taken to transmit the audio signal between the terminal device and the target audio device, and the processing process inside the target audio device.
[0053] In addition, if the time point of receiving the processing end signal is: the time point when the music client obtains the processing end signal from the processing signal receiving module of the terminal device, then the audio signal processing time also includes: the time taken for the processing signal receiving module of the terminal device to receive the processing end signal.
[0054] In addition, if the time point of sending the audio signal is: the time point when the music client provides the audio signal carrying trigger information to the audio signal transmitting module of the terminal device, then the audio signal processing time also includes: the time taken by the audio signal processing transmitting module of the terminal device to send the audio signal.
[0055] In the present application, based on the time difference between the time point when the processing end signal is received and the time point when the audio signal is sent, the time difference is compared on the same time axis of the same end, that is, the time difference is compared on the time axis of the music client, so that the music client can determine the time taken to process the audio signal.
[0056] The music client estimates the time required to process the audio signal based on the time difference between the time when the processing end signal is received and the time when the audio signal is sent. In this case, the shorter the transmission time of the processing end signal, the higher the accuracy of the estimated result. When the processing end signal is transmitted wirelessly, the distance between the terminal device where the music client is located and the target audio device is less than a preset value; when the wireless method is sound waves, experiments show that the accuracy of the estimated result is better when the terminal device and the target audio device are within a range of 17 meters, and the longer the distance, the worse the accuracy of the estimated result.
[0057] In the above method provided by the present application, in a music listening scenario, the music client can obtain trigger information associated with the target audio device, add the trigger information to the audio signal, and send the audio signal carrying the trigger information to the target audio device; the trigger information causes the target audio device to send a processing end signal after processing the audio signal; the music client receives the processing end signal sent by the target audio device; the music client can determine the time it takes for the target audio device to process the audio signal based on the time point of receiving the processing end signal and the time point of sending the audio signal, thereby performing audio and video synchronization; and the method provided by the present application can be automatically completed by the music client to determine the time taken for audio signal processing without the aid of other instruments, and the measurement is convenient and the measurement cost is low.
[0058] In one embodiment, the processing end signal is a sound signal with a target frequency; the step of receiving the processing end signal sent by the target audio device specifically includes: obtaining the sound signal collected by the sound pickup device of the terminal device where the music client is located; analyzing the frequency of the sound signal collected by the sound pickup device; when the analyzed frequency contains the target frequency, determining that the processing end signal sent by the target audio device is received.
[0059] The target audio device itself is provided with a sound producing device for playing the sound corresponding to the audio signal. In this case, the music client and the target audio device may negotiate in advance to transmit the processing end signal by means of sound waves, which may be a sound signal with a target frequency.
[0060] Reference Figure 4 After processing the audio signal, the target audio device reuses the above-mentioned sound generating device to emit a sound signal with a target frequency, without the need to set up other modules. At this time, the music client can collect the sound signal through the sound pickup device provided in the terminal device, and analyze the frequency of the sound signal collected by the sound pickup device. When the analyzed frequency includes the target frequency, it can be determined that the processing end signal sent by the target audio device has been received.
[0061] In one embodiment, the step of adding trigger information to an audio signal specifically includes: in the process of sending an audio signal stream corresponding to a song to a target audio device, selecting an audio signal in the audio signal stream, and adding trigger information to the selected audio signal; the trigger information causes the target audio device to play a sound signal with a target frequency inaudible to the human ear during the process of playing a music clip corresponding to the song after processing the audio signal.
[0062] In a scenario where a user listens to music in real time, the music client can use the method provided in this application to measure the time taken to process the audio signal in real time.
[0063] When the processing end signal is transmitted via sound waves, the target audio device needs to emit a sound signal with a target frequency to represent the processing end signal. In order to avoid affecting the user's listening experience, a frequency other than frequencies that are inaudible to the human ear can be selected as the target frequency. After the target audio device processes the audio signal, it can play a sound signal with the target frequency while playing the corresponding music clip. The sound signal with the target frequency exceeds the sound range audible to the human ear and will not affect the user's listening experience.
[0064] In one embodiment, in the process of sending the audio signal stream corresponding to the song to the target audio device, the step of selecting the audio signal in the audio signal stream may specifically include: obtaining the number of audio signal selection intervals; in the process of sending the audio signal stream corresponding to the song to the target audio device, selecting the audio signal in the audio signal stream according to the number of audio signal selection intervals.
[0065] When the audio signal is wirelessly transmitted between the terminal device and the target audio device, the wireless method is susceptible to interference from radio such as WiFi. After the music client measures the time taken to process the audio signal, the environment in which the wireless transmission between the terminal device and the target audio device is located may suddenly switch from a WiFi environment to a non-WiFi environment, and the radio interference is reduced. At this time, the music client can measure the time taken to process the audio signal again. Considering that it is difficult for the music client to monitor in real time whether the wireless transmission between the terminal device and the target audio device is subject to significant radio interference, the music client can periodically measure the time taken to process the audio signal.
[0066] In the music listening scenario, when the music client sends the audio signal stream corresponding to the song to the target audio device, it selects the interval number according to the audio signal, selects the audio signal at intervals in the audio signal stream, and adds trigger information to the interval-selected audio signal, so that the target audio device sends a processing end signal after processing each audio signal carrying trigger information, thereby realizing the periodic measurement of the time taken by the music client to process the audio signal.
[0067] In one embodiment, before obtaining the trigger information associated with the target audio device, the method provided by the present application also includes: determining a Bluetooth connection used for negotiation with the target audio device; if the Bluetooth connection used for negotiation is a Bluetooth connection for transmitting audio signals, then negotiating the trigger information with the target audio device when establishing a Bluetooth connection for transmitting audio signals with the target audio device; if the Bluetooth connection used for negotiation is a low-power Bluetooth connection, then negotiating the trigger information with the target audio device using the low-power Bluetooth connection at any time point before and after establishing the Bluetooth connection for transmitting audio signals.
[0068] Bluetooth Low Energy is a low-power Bluetooth connection, abbreviated as BLE in English. The music client transmits audio signals to the target audio device through a Bluetooth connection; when the music client determines the Bluetooth connection used for negotiation with the target audio device, if the Bluetooth connection used for negotiation is a Bluetooth connection for transmitting audio signals, then when the music client establishes a Bluetooth connection for transmitting audio signals with the target audio device, the music client adds trigger information to the packet header or packet body of the relevant Bluetooth protocol so that the target audio device receives the trigger information and completes the negotiation of the trigger information. If the Bluetooth connection used for negotiation is a low-power Bluetooth connection, not a Bluetooth connection for transmitting audio signals, then the music client can use the low-power Bluetooth connection to negotiate the trigger information with the target audio device at any time point before or after the Bluetooth connection for transmitting audio signals is established.
[0069] The above-mentioned negotiation trigger information method can be used to negotiate the processing end signal, and the details are not repeated here.
[0070] In one embodiment, the step of determining the time taken by the target audio device to process the audio signal based on the time point when the processing end signal is received and the time point when the audio signal is sent may specifically include: determining an estimated value of the time taken to receive the processing end signal; subtracting the estimated value from the time difference between the time point when the processing end signal is received and the time point when the audio signal is sent to determine the time taken to process the audio signal.
[0071] When the processing end signal is transmitted wirelessly, the estimated time it takes for the music client to receive the processing end signal can be determined based on the normal distance between the terminal device and the target audio device and the propagation speed of the transmission carrier corresponding to the wireless method (for example, the propagation speed of sound waves); then, the estimated value is subtracted from the time difference between the time point when the processing end signal is received and the time point when the audio signal is sent to determine the time taken for audio signal processing, thereby improving measurement accuracy.
[0072] In the present application, a microphone device used to collect sound signals provided to a music client is referred to as a target microphone device, and the target microphone device includes but is not limited to headphones.
[0073] In the karaoke scene, refer to Figure 5 The target microphone device can collect the user's singing voice and convert the collected user's singing voice into a corresponding audio signal, and send the audio signal to the music client running on the terminal device through a wired or wireless connection with the terminal device. The music client performs subsequent processing based on the audio signal, such as aligning the audio signal with the music accompaniment to generate a personal karaoke work.
[0074] After the target microphone device collects the user's singing voice, it undergoes a series of processing inside the device to convert the collected sound signal into an audio signal that can be provided to the music client. This process is the processing process of the audio signal inside the target microphone device, which takes a long time.
[0075] When the terminal device and the target microphone device are connected by wire, the audio signal is directly transmitted from the target microphone device to the terminal device through the signal line, and the time taken for the audio signal to be transmitted between the two devices is relatively short. In the case of a wired connection, the time taken for processing the audio signal obtained by the method provided by the present application mainly lies in: the processing process inside the target microphone device.
[0076] When the terminal device and the target microphone device are wirelessly connected, the audio signal is transmitted via a near-field wireless signal. The near-field wireless signal is subject to radio interference such as WiFi, and the audio signal takes a long time to transmit between the two devices. In the case of a wireless connection, the audio signal processing time obtained by the method provided by the present application mainly lies in: the processing process inside the target microphone device, and the transmission time between the target microphone device and the terminal color plate.
[0077] The method provided in this application includes Figure 6 Steps shown:
[0078] Step S601, sending a processing start signal to the target microphone device; the processing start signal enables the target microphone device to collect sound signals, process the collected sound signals into audio signals, add trigger information to the audio signals, and send the audio signals carrying the trigger information to the music client.
[0079] Step S602: receiving an audio signal carrying trigger information sent by a target microphone device.
[0080] Reference Figure 7 When the music client wants to measure the time taken to process the audio signal, it can send a processing start signal through the processing start signal transmitting module of the terminal device; after the processing start signal receiving module of the target microphone device receives the processing start signal, it starts to process the audio signal internally, such as collecting the sound signal and converting the sound signal into an audio signal that can be provided to the music client through a series of processing.
[0081] The amount of information in the processing start signal can be less than the preset value, so that the music client can send it in time and the target microphone device can receive it in time; the processing start signal can be transmitted by wire or wirelessly; the wireless method includes but is not limited to sound waves, infrared rays, BLE (Bluetooth Low Energy, low-power Bluetooth connection). Sound waves include ultrasonic waves, infrasound waves, audible sound waves, etc. Sound waves are a common information transmission method in daily life. The propagation speed in the air is about 340 meters per second, which is relatively fast. The transmission delay is 10ms at a distance of 3.4 meters and 50ms at a distance of 17 meters.
[0082] In order to let the music client know that the audio signal is formed under the instruction of the processing start signal, the target microphone device can add trigger information to the audio signal and send the audio signal carrying the trigger information to the music client. In other words, the trigger information is mainly used to let the music client know that the audio signal is formed under the instruction of the processing start signal, so as to measure the time taken for audio signal processing.
[0083] Refer again Figure 7 , the target microphone device can send out an audio signal carrying trigger information through the audio signal transmitting module provided in the target microphone device. After receiving the audio signal through the audio signal receiving module of the terminal device, the music client analyzes the audio signal. During the analysis process, if it is found that the audio signal carries trigger information, it is determined that the audio signal is an audio signal used to measure the time taken for audio signal processing, and the time point when the audio signal is received is recorded.
[0084] The amount of information in the trigger information can be much smaller than that in the audio signal. Therefore, even if the audio signal carries trigger information, it will not affect the duration of the audio signal parsed by the music client too much, thereby improving the measurement accuracy. In some examples, simple control characters can be selected as trigger information.
[0085] Step S603: determining the time required for audio signal processing according to the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information.
[0086] As mentioned above, when the terminal device and the target microphone device are connected by wire, the time taken for audio signal processing mainly lies in: the processing process inside the target microphone device. When the terminal device and the target microphone device are connected wirelessly, the time taken for audio signal processing mainly lies in: the processing process inside the target microphone device, and the transmission time between the target microphone device and the terminal color palette.
[0087] In addition, if the time point of sending the processing start signal is: the time point when the music client provides the processing start signal to the processing signal receiving module of the terminal device, then the audio signal processing time also includes: the time taken for the processing signal receiving module of the terminal device to send the processing start signal.
[0088] In addition, if the time point of receiving the audio signal is: the time point when the music client obtains the audio signal from the audio signal receiving module of the terminal device, then the audio signal processing time also includes: the time taken for the audio signal receiving module of the terminal device to receive the audio signal.
[0089] In the present application, based on the time difference between the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information, the time difference is compared on the same time axis of the same end, that is, the time difference is compared on the time axis of the music client, so that the music client can determine the time taken to process the audio signal.
[0090] The music client estimates the time required for processing the audio signal based on the time difference between the time point when the processing start signal is sent and the time point when the audio signal carrying the trigger information is received. In this case, the shorter the transmission time of the processing start signal, the higher the accuracy of the estimated result. When the processing start signal is transmitted wirelessly, the distance between the terminal device where the music client is located and the target microphone device is less than a preset value; when the wireless method is sound waves, experiments show that the accuracy of the estimated result is better within a range of 17 meters between the terminal device and the target microphone device, and the longer the distance, the worse the accuracy of the estimated result.
[0091] In the above method provided by the present application, in a karaoke scenario, the music client can send a processing start signal to the target microphone device; the processing start signal enables the target microphone device to collect sound signals, processes the collected sound signals into audio signals, adds trigger information to the audio signals, and sends the audio signals carrying the trigger information to the music client; the music client receives the audio signals carrying the trigger information sent by the target microphone device; the music client determines the time required for audio signal processing based on the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information, thereby aligning the audio signal of the user's singing with the music accompaniment; and the method provided by the present application can be automatically completed by the music client to determine the time required for audio signal processing without the aid of other instruments, and the measurement is convenient and the measurement cost is low.
[0092] In one embodiment, the processing start signal is a sound signal with a target frequency, and the step of sending the processing start signal to the target microphone device specifically includes: playing the sound signal with the target frequency to the target microphone device through the sound producing device of the terminal device where the music client is located; so that the target microphone device executes the following steps: analyzing the frequency of the sound signal collected by the sound pickup device provided in the target microphone device itself, and determining that the processing start signal is received when the analyzed frequency contains the target frequency.
[0093] The target microphone device itself is provided with a sound pickup device, which is used to collect sound signals to provide corresponding audio signals to the music client. In this case, the music client and the target microphone device can pre-negotiate to transmit a processing start signal by means of sound waves, which can be a sound signal with a target frequency.
[0094] Reference Figure 8 The music client can send out a sound signal with a target frequency through a sound generating device provided in the terminal device. At this time, the target microphone device collects the sound signal through a sound pickup device provided in itself, and analyzes the frequency of the collected sound signal. When the analyzed frequency includes the target frequency, it is determined that a processing start signal sent by the music client is received.
[0095] In one embodiment, a sound signal having a target frequency is played to a target microphone device through a sound producing device of a terminal device where a music client is located, including: during the process of the target microphone device collecting a user's singing voice, a sound signal having a target frequency other than a human vocal frequency is played through a sound producing device of the terminal device where the music client is located.
[0096] In the scenario where users sing karaoke in real time, the music client can also use the method provided in this application to measure the time taken to process the audio signal.
[0097] When the processing start signal is transmitted in the form of sound waves, the music client needs to use the sound device of the terminal device to send out a sound signal with a target frequency to represent the processing start signal. In order to avoid interfering with the target microphone device collecting the user's singing voice, a frequency other than the human voice frequency can be selected as the target frequency. When the target microphone device collects the user's singing voice, the music client plays the sound signal with the target frequency through the sound device of the terminal device.
[0098] In one embodiment, during the process of the target microphone device collecting the user's singing voice, a sound signal with a target frequency other than the human vocal frequency is played through the sound producing device of the terminal device where the music client is located, including: obtaining the playing interval duration; during the process of the target microphone device collecting the user's singing voice, according to the playing interval duration, the sound signal with a target frequency other than the human vocal frequency is played at intervals through the sound producing device of the terminal device where the music client is located.
[0099] When the audio signal is transmitted between the terminal device and the target microphone device via wireless, the wireless method is susceptible to interference from radio such as WiFi. After the music client measures the audio signal processing time, the wireless transmission environment between the terminal device and the target microphone device may suddenly switch from a WiFi environment to a non-WiFi environment, and the radio interference is reduced. At this time, the music client can measure the audio signal processing time again. Considering that it is difficult for the music client to monitor in real time whether the wireless transmission between the terminal device and the target audio device is subject to significant radio interference, the music client can periodically measure the audio signal processing time.
[0100] In the karaoke scenario, while the target microphone device is collecting the user's singing voice, the music client uses the sound device of the terminal device to play sound signals with the target frequency at intervals according to the playback interval length, thereby achieving periodic measurement of the time taken by the music client to process the audio signal.
[0101] In one embodiment, the method provided by the present application also includes: determining a Bluetooth connection used for negotiation with a target microphone device; if the Bluetooth connection used for negotiation is a Bluetooth connection for transmitting audio signals, then when establishing a Bluetooth connection for transmitting audio signals with the target microphone device, negotiating trigger information with the target microphone device; if the Bluetooth connection used for negotiation is a low-power Bluetooth connection, then at any time point before and after establishing the Bluetooth connection for transmitting audio signals, using the low-power Bluetooth connection, negotiating trigger information with the target microphone device.
[0102] The music client receives the audio signal from the target microphone device through a Bluetooth connection; when the music client determines the Bluetooth connection used for negotiation with the target microphone device, if the Bluetooth connection used for negotiation is a Bluetooth connection for audio signals, then when the music client establishes a Bluetooth connection for transmitting audio signals with the target microphone device, the music client adds trigger information to the packet header or packet body of the relevant Bluetooth protocol so that the target microphone device receives the trigger information and completes the negotiation of the trigger information. If the Bluetooth connection used for negotiation is a low-power Bluetooth connection, not a Bluetooth connection for transmitting audio signals, then the music client can use the low-power Bluetooth connection to negotiate the trigger information with the target microphone device at any time point before or after the Bluetooth connection for transmitting audio signals is established.
[0103] The above-mentioned negotiation trigger information method can be used for the negotiation processing start signal, and the details are not repeated here.
[0104] In one embodiment, the time taken to process the audio signal is determined based on the time point when the processing start signal is sent and the time point when the audio signal carrying the trigger information is received, including: determining an estimated value of the time it takes the target microphone device to receive the processing start signal; and determining the time taken to process the audio signal by subtracting the estimated value from the time difference between the time point when the processing start signal is sent and the time point when the audio signal carrying the trigger information is received.
[0105] When the processing start signal is transmitted wirelessly, the estimated time it takes for the target microphone device to receive the processing start signal can be determined based on the normal distance between the terminal device and the target microphone device and the propagation speed of the transmission carrier corresponding to the wireless method (for example, the propagation speed of sound waves); then, the estimated value is subtracted from the time difference between the time point when the processing start signal is sent and the time point when the audio signal carrying the trigger information is received to determine the time required for audio signal processing, thereby improving measurement accuracy.
[0106] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0107] In one embodiment, a terminal device is provided, which runs a music client, and the music client implements the above method when executing the computer program through a processor.
[0108] The internal structure diagram of the terminal device can be shown as follows Fig. 9As shown. The terminal device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the terminal device is used to provide computing and control capabilities. The memory of the terminal device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the terminal device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The terminal device also includes an input and output interface, which is a connection circuit for exchanging information between the processor and the external device. They are connected to the processor through a bus, referred to as an I / O interface. When the computer program is executed by the processor, a method for measuring audio signal delay is implemented. The display screen of the terminal device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the terminal device shell, or an external keyboard, touchpad or mouse.
[0109] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device to which the scheme of the present application is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0110] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0111] In one embodiment, a music client is provided, comprising a computer program, wherein the computer program is used by a processor to execute the steps in the above-mentioned various method embodiments.
[0112] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0113] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0114] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for determining the time taken to process an audio signal, It is characterized in that Applied to a music client, the method includes: Obtaining trigger information associated with a target audio device; In the process of sending the audio signal stream corresponding to the song to the target audio device, selecting an audio signal in the audio signal stream, and adding the trigger information to the selected audio signal; The audio signal carrying the trigger information is sent to the target audio device; the trigger information causes the target audio device to play a sound signal with a target frequency that is inaudible to human ears during the process of playing the music clip corresponding to the song after processing the audio signal; Acquire the sound signal collected by the sound pickup device of the terminal device where the music client is located; Analyzing the frequency of the sound signal collected by the sound pickup device; When the analyzed frequency contains the target frequency, determining that a processing end signal sent by the target audio device is received; The processing time of the audio signal is determined according to the time point of receiving the processing end signal and the time point of sending the audio signal.
2. The method according to claim 1, It is characterized in that In the process of sending the audio signal stream corresponding to the song to the target audio device, selecting an audio signal in the audio signal stream includes: Get the number of audio signal selection intervals; In the process of sending the audio signal stream corresponding to the song to the target audio device, the audio signal is selected at intervals in the audio signal stream according to the number of intervals selected for the audio signal.
3. The method according to claim 1, It is characterized in that Before acquiring the trigger information associated with the target audio device, the method further includes: determining a Bluetooth connection to be used for negotiation with the target audio device; If the Bluetooth connection used for negotiation is a Bluetooth connection for transmitting audio signals, negotiating trigger information with the target audio device when establishing a Bluetooth connection for transmitting audio signals with the target audio device; If the Bluetooth connection used for negotiation is a low-power Bluetooth connection, then at any time point before or after the Bluetooth connection for transmitting the audio signal is established, the low-power Bluetooth connection is used to negotiate the trigger information with the target audio device.
4. The method according to claim 1, It is characterized in that Determining the processing time of the audio signal according to the time point of receiving the processing end signal and the time point of sending the audio signal includes: Determining an estimate of how long it will take to receive the processing end signal; The estimated value is subtracted from the time difference between the time point when the processing end signal is received and the time point when the audio signal is sent to determine the processing time of the audio signal.
5. A method for determining the time taken to process an audio signal, It is characterized in that Applied to a music client, the method includes: Sending a processing start signal to the target microphone device; the processing start signal enables the target microphone device to collect sound signals, process the collected sound signals into audio signals, add trigger information to the audio signals, and send the audio signals carrying the trigger information to the music client; Receiving an audio signal carrying the trigger information sent by the target microphone device; The duration of the audio signal processing by the target microphone device is determined according to the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information.
6. The method according to claim 5, It is characterized in that The processing start signal is a sound signal with a target frequency, and sending the processing start signal to the target microphone device includes: A sound signal having the target frequency is played to the target microphone device through the sound producing device of the terminal device where the music client is located, so that the target microphone device executes the following steps: analyzing the frequency of the sound signal collected by the sound pickup device provided in the target microphone device itself, and when the analyzed frequency contains the target frequency, determining that the processing start signal is received.
7. The method according to claim 6, It is characterized in that Playing a sound signal having the target frequency to a target microphone device through a sound producing device of a terminal device where the music client is located includes: When the target microphone device collects the user's singing voice, a sound signal having a target frequency other than the human voice frequency is played through the sound producing device of the terminal device where the music client is located.
8. The method according to claim 7, It is characterized in that When the target microphone device collects the user's singing voice, a sound signal having a target frequency other than the human voice frequency is played through the sound device of the terminal device where the music client is located, including: Get the playback interval duration; During the process of the target microphone device collecting the user's singing voice, the sound signal having the target frequency other than the human vocal frequency is played at intervals according to the playing interval length through the sound producing device of the terminal device where the music client is located.
9. The method according to claim 5, It is characterized in that The method further comprises: determining a Bluetooth connection to be used for negotiation with the target microphone device; If the Bluetooth connection used for negotiation is a Bluetooth connection for transmitting audio signals, negotiating trigger information with the target microphone device when establishing a Bluetooth connection for transmitting audio signals with the target microphone device; If the Bluetooth connection used for negotiation is a low-power Bluetooth connection, then at any time point before or after the Bluetooth connection for transmitting the audio signal is established, the low-power Bluetooth connection is used to negotiate trigger information with the target microphone device.
10. The method according to claim 5, It is characterized in that Determining the processing time of the audio signal according to the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information includes: determining an estimate of how long it takes the target microphone device to receive the processing start signal; The estimated value is subtracted from the time difference between the time point of sending the processing start signal and the time point of receiving the audio signal carrying the trigger information to determine the processing time of the audio signal.
11. A terminal device, It is characterized in that The terminal device runs a music client, and when the music client executes a computer program through a processor, it implements the method described in any one of claims 1 to 10.
12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
