Audio playing method, charging box, audio playing system and storage medium
The charging case mixes audio from multiple audio source devices to generate target audio, which is then sent to the head-mounted playback device. This solves the interference problem during wireless connection and improves audio playback quality and battery life.
Patent Information
- Application Number
- CN202510923045.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-10-21
AI Technical Summary
When a headset is wirelessly connected to multiple audio source devices, the audio being played may interfere with each other, affecting audio playback quality.
The charging case acquires multiple audio files to be played, mixes them to generate the target audio, and then sends it to the head-mounted playback device for playback.
It improves audio transmission quality, reduces audio stuttering and interference, extends the battery life of head-mounted playback devices, and enhances the auditory experience.
Smart Images

Figure CN120825652A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal control technology, and in particular to an audio playback method, a charging box, an audio playback system, and a computer-readable storage medium. Background Art
[0002] In related technologies, head-mounted playback devices can wirelessly connect to multiple audio source devices to receive and play audio from each source device. Due to limited wireless bandwidth, head-mounted playback devices can connect to multiple audio source devices at different time slots and receive multiple audio sources simultaneously. However, multiple audio sources may interfere with each other during reception, affecting audio playback quality. Summary of the Invention
[0003] In order to overcome the problems existing in the related art, an exemplary embodiment of the present disclosure provides an audio playback method, which is applied to a charging box connected to multiple audio source devices and a head-mounted playback device. The method includes: based on the connection between the multiple audio source devices, obtaining multiple audios to be played; mixing the multiple audios to be played to obtain target audio; based on the wireless connection between the head-mounted playback device, sending the target audio to the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
[0004] In some embodiments, mixing multiple audios to be played to obtain target audio includes: determining the audio type of each audio to be played respectively; and mixing the multiple audios to be played based on the audio type to obtain the target audio.
[0005] In some embodiments, based on the audio type, multiple audios to be played are mixed to obtain the target audio, including: in response to the audio type being a data type, decoding each audio to be played separately to obtain multiple decoded data; mixing the multiple decoded data to obtain mixed data; encoding the mixed data to obtain the target audio.
[0006] In some embodiments, mixing processing is performed on multiple decoded data to obtain mixed data, including: determining a target sampling rate; resampling processing is performed on the multiple decoded data based on the target sampling rate to obtain multiple intermediate audio signals; and superimposing processing is performed on the multiple intermediate audio signals to obtain mixed data.
[0007] In some embodiments, determining the target sampling rate includes: determining reference data from a plurality of decoded data; and determining the target sampling rate according to a signal sampling rate of the reference data.
[0008] In some embodiments, based on a target sampling rate, a plurality of decoded data are resampled to obtain a plurality of intermediate audio signals, including: determining an actual sampling rate of the decoded data; determining a sampling rate change ratio based on a ratio between the actual sampling rate and the target sampling rate; and resampling the decoded data based on the sampling rate change ratio to obtain intermediate audio signals corresponding to the decoded data.
[0009] In some embodiments, the sampling rate change ratio is determined based on the ratio between the actual sampling rate and the target sampling rate, including: determining the cache amount of decoded data; in response to the cache amount being equal to the target value, determining the ratio as the sampling rate change ratio; in response to the cache amount being greater than the target value, increasing the ratio based on the target step size to obtain the sampling rate change ratio; in response to the cache amount being less than the target value, reducing the ratio based on the target step size to obtain the sampling rate change ratio.
[0010] In some embodiments, based on the audio type, multiple audios to be played are mixed to obtain a target audio, including: in response to there being multiple audio types, determining a target audio type according to the audio type of each audio to be played; based on the target audio type, adjusting the audio type of the audio to be played that is different from the target audio type to obtain a corresponding adjusted audio to be played; and mixing the adjusted audio to be played and the audio to be played of the target audio type to obtain the target audio.
[0011] In some embodiments, based on a wireless connection with a head-mounted playback device, the target audio is sent to the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio, including: based on a Bluetooth connection with the head-mounted playback device, the target audio is sent to the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
[0012] In some embodiments, the connection method between the audio source device is a wireless connection or a wired connection, and is the same as or different from the connection method between any two audio source devices; the signal type of the audio to be played is stereo audio, mono audio or multi-channel audio, and the signal type of any two audio to be played is the same or different.
[0013] In a second aspect, the present disclosure provides a charging box, comprising: an acquisition module for acquiring multiple audios to be played based on the connection with multiple audio source devices; a processing module for mixing the multiple audios to be played to obtain target audio; and a wireless connection module for sending the target audio to the head-mounted playback device based on the wireless connection with the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
[0014] In a third aspect, the present disclosure provides an audio playback system, comprising: multiple audio source devices, each of which is used to provide an audio to be played; a charging box, connected to each audio source device, respectively, the charging box is used to obtain each audio to be played, mix all the audio to be played, and send the target audio obtained after the mixing process; a head-mounted playback device, wirelessly connected to the charging box, for receiving the target audio and playing audio based on the target audio.
[0015] In some embodiments, the connection method between the charging box and the audio source device is a wireless connection or a wired connection; the connection method between the charging box and any two audio source devices is the same or different.
[0016] In some embodiments, the wireless connection between the head-mounted playback device and the charging box is a Bluetooth connection.
[0017] In some embodiments, the signal type of the audio to be played is stereo audio, mono audio, or multi-channel audio, and the signal types of any two audio to be played are the same or different.
[0018] In a fourth aspect, the present disclosure provides a computer-readable storage medium, which stores the following program, and the program is used to execute the audio playback method provided by any of the above aspects.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0020] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: According to the audio playback method provided by the present disclosure, the audio to be played provided by multiple audio source devices is mixed and processed through the charging box, and the audio to be played from different audio source devices can be transmitted according to a unified standard, thereby enhancing the audio transmission quality to reduce audio freezes, interruptions or mutual interference, so that the head-mounted playback device can effectively improve the audio playback quality and auditory effect when playing audio based on the received target audio.
[0021] Moreover, in the present disclosure, the audio to be played sent by multiple audio source devices is first obtained and mixed by the charging box, and then played by the head-mounted playback device based on the target audio obtained after the mixing process, so that in the scenario where multiple audio to be played are played through the head-mounted playback device, the head-mounted playback device only needs to receive one target audio for audio playback, which can not only greatly reduce the processing power consumption of the head-mounted playback device and extend the battery life of the head-mounted playback device, but also help to improve the audio playback quality and enhance the user's listening experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The present disclosure may be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which:
[0023] Figure 1 This is a flowchart illustrating an audio playback method according to an exemplary embodiment of the disclosure;
[0024] Figure 2 is a flowchart illustrating another audio playback method according to an exemplary embodiment of the disclosure;
[0025] Figure 3 1 is a schematic diagram of a charging box according to an exemplary embodiment of the present disclosure;
[0026] Figure 4 The present invention is a schematic diagram showing a framework of an audio playback system according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0027] The specific embodiments of the present disclosure will be described below. It should be noted that in the specific description of these embodiments, in order to provide a concise description, this specification cannot provide a detailed description of all the features of the actual embodiments. It should be understood that in the actual implementation of any embodiment, just as in the process of any engineering project or design project, in order to achieve the specific goals of the developer and to meet system-related or business-related restrictions, various specific decisions are often made, and this will also change from one embodiment to another. In addition, it is also understandable that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the content disclosed by this disclosure, some design, manufacturing or production changes based on the technical content disclosed by this disclosure are just conventional technical means and should not be understood as the content of this disclosure being insufficient.
[0028] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the usual meanings understood by persons of ordinary skill in the technical field to which this disclosure belongs. The words "first", "second" and similar terms used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "one" or "a" do not indicate a quantity limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" mean that the elements or objects appearing before "include" or "comprises" cover the elements or objects listed after "include" or "comprises" and their equivalents, and do not exclude other elements or objects. Words such as "connect" or "connected" and similar terms are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.
[0029] In the related art, a head-mounted playback device can be connected to multiple audio source devices through a wireless connection to receive the audio to be played sent by each audio source device for audio playback. For example, taking the wireless connection as a Bluetooth connection, a true wireless headset can receive audio to be played from multiple audio source devices through a Bluetooth one-to-two or one-to-three method. Among them, Bluetooth one-to-two means that the true wireless headset establishes a Bluetooth connection with two audio source devices at the same time, and receives the audio signals of each audio source device at the same time through the Bluetooth connection. Bluetooth one-to-three means that the true wireless headset establishes a Bluetooth connection with three audio source devices at the same time, and receives the audio signals of each audio source device at the same time through the Bluetooth connection.
[0030] Due to limited wireless bandwidth, headsets can connect to multiple audio source devices at different timeslots and receive multiple audio streams simultaneously. However, these multiple audio streams may interfere with each other during reception, affecting audio playback quality.
[0031] To solve the above problems, the present disclosure provides an audio playback method, which is applied to a charging box connected to multiple audio source devices and a head-mounted playback device. Figure 1 As shown, the audio playing method may include the following steps:
[0032] Step S110: Acquire multiple audios to be played based on the connections with multiple audio source devices.
[0033] A source device is a device that provides the audio to be played. It can be a physical device, such as a smartphone, tablet, laptop, or TV. It can also be a virtual device, such as a server or cloud.
[0034] In some examples, the connection between the charging box and the sound source device is a wireless connection or a wired connection. If the connection between the charging box and the sound source device is a wireless connection, the charging box can establish a wireless connection with the sound source device through cellular mobile communication (Cellular Mobile Communication) or a specified communication protocol. For example, the specified communication protocol may include but is not limited to: WIFI, Digital Living Network Alliance (DLNA), Airplay or Bluetooth protocol. If the connection between the charging box and the sound source device is a wired connection, a wired connection can be made through a data transmission interface. For example, the data transmission interface may include but is not limited to interfaces such as USB, typeC or 3.5mm audio plug. Among them, in order to improve the convenience of audio transmission, the connection method between the charging box and any two sound source devices is the same or different. That is, the connection between the charging box and each sound source device can be established in the same way to improve the connection efficiency, or it can be established in different ways to improve the flexibility of the connection.
[0035] By connecting the charging box to multiple audio source devices, the audio transmission channel can be clarified, so that the charging box can obtain the audio to be played provided by each audio source device. The audio content included in the audio to be played may include but is not limited to: music, podcasts, novels, radio programs, etc., which can be determined according to actual needs and are not limited here. The signal type of the audio to be played is stereo audio, mono audio or multi-channel audio. The signal types of any two audios to be played are the same or different, which can improve the flexibility of obtaining the audio to be played.
[0036] Step S120 , performing mixing processing on the multiple audios to be played to obtain target audio.
[0037] In order to enhance the quality of audio playback, the received multiple audios to be played are mixed so that the audios to be played from different audio source devices can be transmitted according to a unified standard, so that when the audio is subsequently played based on the target audio obtained after the mixing process, the overall performance and auditory effect of the audio playback can be effectively improved. For example, through mixing, the volume of multiple audios to be played can be adjusted to an appropriate level to ensure that all audio elements can be played clearly. Through mixing, multiple audios to be played can be processed such as audio equalization, compression, and limiting, thereby optimizing the sound quality, reducing noise and distortion, and helping to improve the overall auditory experience of subsequent audio playback. Through mixing, the sense of space and layering can be enhanced so that different sound elements can be more distinct in the auditory space. Alternatively, through mixing, the audio rhythm of multiple audios to be played can be unified to achieve synchronous playback. It should be noted that the above-mentioned improvements obtained through mixing are only for example, and the specific effects achieved after mixing may include but are not limited to the above-mentioned examples.
[0038] Step S130: Based on the wireless connection with the head-mounted playback device, the target audio is sent to the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
[0039] The connection between the charging box and the head-mounted playback device is a wireless connection. This connection allows the positional relationship between the charging box and the head-mounted playback device to be relatively flexible, which helps improve the flexibility of the user in using the head-mounted playback device. The head-mounted playback device may include but is not limited to true wireless headphones (True Wireless Stereo, TWS headphones), wireless headphones, or smart glasses. Among them, the wireless headphones may be in-ear, semi-in-ear, or open-ear headphones.
[0040] Through the wireless connection between the charging box and the head-mounted playback device, the audio transmission channel between the charging box and the head-mounted playback device can be clearly defined, and the target audio obtained after mixing processing can be sent to the head-mounted playback device, which can ensure the transmission effectiveness of the target audio and enable the head-mounted playback device to play audio based on the target audio. In addition, because the target audio is obtained after mixing processing in the charging box and then played through the head-mounted playback device, the operation of processing multiple audios to be played by the head-mounted playback device can be saved, thereby effectively reducing the power consumption of the head-mounted playback device and helping to extend the battery life of the head-mounted playback device.
[0041] According to the audio playback method provided by the present invention, the audio to be played provided by multiple audio source devices is mixed and processed through the charging box, so that the audio to be played from different audio source devices can be transmitted according to a unified standard, thereby enhancing the audio transmission quality to reduce audio freezes, interruptions or mutual interference, so that when the head-mounted playback device plays audio based on the received target audio, it can effectively improve the audio playback quality and auditory effect.
[0042] Moreover, in the present disclosure, the audio to be played sent by multiple audio source devices is first obtained and mixed by the charging box, and then played by the head-mounted playback device based on the target audio obtained after the mixing process, so that in the scenario where multiple audio to be played are played through the head-mounted playback device, the head-mounted playback device only needs to receive one target audio for audio playback, which can not only greatly reduce the processing power consumption of the head-mounted playback device and extend the battery life of the head-mounted playback device, but also help to improve the audio playback quality and enhance the user's listening experience.
[0043] In some embodiments, as Figure 2 As shown, the above step S120 may include the following steps:
[0044] Step S121 : determining the audio type of each audio to be played.
[0045] Since multiple audio source devices can be different, the audio types of the transmitted audio to be played can be different during audio transmission. The audio type can be a data type or a signal type. For example, the data type can include but is not limited to the following types: Pulse Code Modulation (PCM), Advanced Audio Coding (AAC), or MP3. The signal type can include but is not limited to the following types: stereo audio, mono audio, multi-channel audio, or surround sound.
[0046] Different processing methods may be used for mixing audios of different audio types to be played. Therefore, to ensure the effectiveness of the mixing process, the audio type of each audio to be played is determined separately.
[0047] Step S122: Based on the audio type, multiple audios to be played are mixed to obtain target audio.
[0048] Based on the audio type, the processing method used for mixing multiple audio files to be played can be determined. For example, if the audio type is a data type, when mixing multiple audio files to be played, the mixing process can be performed through codecs to ensure that the mixing process meets the format requirements of data transmission. If the audio type is a signal type, when mixing multiple audio files to be played, the mixing process can be performed through channel merging to ensure that the mixing process meets the format requirements of signal transmission.
[0049] Targeted mixing processing based on audio type can improve processing efficiency and effectiveness, increase the efficiency of obtaining target audio, and then effectively reduce delays when subsequently transmitting the target audio, thereby improving the continuity and stability of audio playback.
[0050] In some embodiments, the above step S122 may include the following steps:
[0051] Step a1: In response to the audio type being a data type, each audio to be played is decoded to obtain a plurality of decoded data.
[0052] In response to the audio type being the data type, it indicates that each audio to be played is processed in a digital signal transmission manner during audio transmission.
[0053] In order to restore the original audio signal of each audio to be played, each audio to be played is decoded to obtain decoded data of each audio to be played.
[0054] Step a2: performing mixing processing on the plurality of decoded data to obtain mixed data.
[0055] Mixing is performed on multiple decoded data to harmoniously combine all audio elements in the decoded data, thereby obtaining reliable mixed data. Mixing may include, but is not limited to, adjusting the following parameters: volume, balance, equalization, and other audio effects.
[0056] In some embodiments, the process of determining the mixing data may be as follows:
[0057] Step a21, determining the target sampling rate.
[0058] The target sampling rate can be considered as the sampling rate used by the target audio to be finally output. Since the encoding method, sampling rate, and bit rate of each audio to be played may be different, the sampling rate of each audio to be played may also be different after decoding. In the case of different sampling rates, multiple decoded data cannot be mixed by simple superposition. Therefore, in order to ensure the smooth progress of the mixing process, the target sampling rate is determined so that the sampling rate of each decoded data can be kept consistent, which helps to improve the efficiency of the mixing process. For example, the target sampling rate can be 44.1kHz, 48kHz, etc.
[0059] In some examples, to improve the efficiency of determining the target sampling rate, reference data can be determined from multiple decoded data; and the target sampling rate can be determined based on the signal adoption rate of the reference data. That is, by determining the target sampling rate based on the signal adoption rate of one of the decoded data, the target sampling rate can be quickly determined, which in turn helps to promote the process of resampling processing and reduce the transmission delay of the target audio, thereby helping to ensure the smoothness and quality of audio playback based on the target audio by the head-mounted playback device. In addition, by determining the target sampling rate based on the signal adoption rate of one of the reference data, the power consumption and processing time required for the resampling processing can be reduced, thereby helping to save the power consumption of the charging box and helping to extend the service life of the charging box.
[0060] In other examples, the target sampling rate can be a specified sampling rate so that the sampling rate of the target audio obtained after mixing processing can meet the audio playback requirements of the head-mounted playback device, thereby helping to reduce interruptions or freezes and ensure the continuity of audio playback.
[0061] Step a22: resampling the plurality of decoded data based on the target sampling rate to obtain a plurality of intermediate audio signals.
[0062] To ensure that the sampling rate of each decoded data reaches the target sampling rate, resampling is performed based on the target sampling rate to convert the original sampling rate of each decoded data to the target sampling rate, thereby obtaining an intermediate audio signal corresponding to each decoded data. The resampling method used may include, but is not limited to, linear interpolation, cubic interpolation, etc.
[0063] In some embodiments, step a22 may include the following steps:
[0064] Step a221, determining the actual sampling rate of the decoded data.
[0065] To make the adjustment process more targeted and effective, the actual sampling rate of the decoded data is determined to avoid over-adjustment or under-adjustment, which helps to ensure the efficiency of the resampling process. The decoded data can be decoded data of any one of the multiple audio files to be played.
[0066] Step a222: determining a sampling rate change ratio based on a ratio between the actual sampling rate and the target sampling rate.
[0067] In order to convert the actual sampling rate of the decoded data into the target sampling rate, the ratio between the actual sampling rate and the target sampling rate is determined, and the sampling rate change ratio for converting the actual sampling rate into the target sampling rate is determined based on the ratio.
[0068] In some examples, to ensure the reliability of the sampling rate change ratio, the sampling rate change ratio can be determined based on the amount of decoded data buffered. If the buffer is sufficient, the number of intermediate audio signals output after resampling the decoded data can meet the target sampling rate, and subsequent audio playback can be guaranteed even if no new audio data is received for a period of time due to wireless channel interference or other reasons. If the buffer is excessive, the number of intermediate audio signals output after resampling the decoded data can meet the target sampling rate, but the integrity of the audio playback may be affected due to the excessive amount of unsampled decoded data buffered. For example, if the amount of audio data to be buffered is too large and the allocated buffer space is insufficient, the buffered audio data may be lost. If the buffer is insufficient, the number of intermediate audio signals output after resampling the decoded data cannot meet the target sampling rate if no new audio data is received for a period of time due to wireless channel interference or other reasons. If the mixing process is continued, the consistency of the subsequent audio playback may be affected.
[0069] Therefore, to obtain a reliable sampling rate change ratio, the cache size of the current decoded data is first determined. A target value is pre-set. This target value can be understood as a standard for measuring whether the cache size of the decoded data is sufficient. The target value can be a specific numerical value, a specified numerical range, or a value based on duration. For example, if it is a specific numerical value, the target value can be 1000, 1500, or 2000. If it is a specified numerical range, the target value can be [1000, 1010], [1500, 1506], or [2000, 2015]. If it is a value based on duration, the target value can be 30ms, 40ms, or 50ms, or [30ms, 31ms], [40ms, 40.5ms], or [50ms, 50.25ms]. The duration can be the ratio between the cache size and the actual sampling rate.
[0070] In response to the cache amount being equal to the target value, it is considered that the cache amount of the decoded data can meet the target sampling rate, and the ratio can be directly used as the sampling rate change ratio for adjusting the actual change rate. In response to the cache amount being greater than the target value, it indicates that the cache amount of the decoded data is excessive. Therefore, the ratio can be increased based on the target step size to increase the number of resamplings performed per unit clock within an allowable range, thereby obtaining a suitable sampling rate change ratio. In response to the cache amount being less than the target value, it indicates that the cache amount of the decoded data is insufficient. Therefore, the ratio can be decreased based on the target step size to reduce the number of resamplings performed per unit clock within an allowable range, thereby obtaining a suitable sampling rate change ratio.
[0071] In some examples, the relationship between the sampling rate change ratio and the ratio between the actual sampling rate and the target sampling rate can be expressed by the following expression:
[0072] r1_real = R1_ref + step * d1, where R1_ref is the ratio of the actual sampling rate to the target sampling rate, r1_real is the sampling rate change ratio, and step represents the single adjustment step size, for example, step = 0.001, 0.002, or 0.005. If the current decoded data buffer is equal to the target value, the sampling rate change ratio is the same as the ratio between the actual sampling rate and the target sampling rate, d1 = 0. If the current decoded data buffer is greater than the target value, the sampling rate change is increased by the step size, d1 = 1. If the current decoded data buffer is less than the target value, the sampling rate change is decreased by the step size, d1 = -1.
[0073] Alternatively, the relationship between the sampling rate change ratio and the ratio between the actual sampling rate and the target sampling rate can be expressed by the following expression:
[0074] r1_adapt=r1_adapt+step1*d1;
[0075] r1_real=r1_adapt+step2*d1.
[0076] The initial value of r1_adapt is R1_ref, where R1_ref is the ratio between the actual sampling rate and the target sampling rate, r1_real is the ratio within the allowable error range, r1_adapt is the sampling rate change ratio, and step1 represents the single adjustment step size between the actual and target sampling rates. For example, step1 = 0.00001, 0.00002, or 0.00005. step2 represents the single adjustment step size for the sampling rate change ratio. For example, step2 = 0.0001, 0.0002, or 0.0005. If the current decoded data buffer size is equal to the target value, the sampling rate change ratio is the same as the ratio between the actual and target sampling rates, and d1 = 0. If the current decoded data buffer size is greater than the target value, the sampling rate change ratio is increased by the step size, and d1 = 1. If the current decoded data buffer size is less than the target value, the sampling rate change ratio is decreased by the step size, and d1 = -1.
[0077] Step a223 : resampling the decoded data based on the sampling rate change ratio to obtain an intermediate audio signal corresponding to the decoded data.
[0078] The sampling rate change ratio can be used to alter the data used to sample the decoded data per unit clock. Therefore, if the sampling rate change ratio is reliable, resampling the decoded data can ensure that the resulting intermediate audio signal meets the requirements for data resampling at the target sampling rate. This can reduce distortion and phase issues that may arise during the subsequent mixing process, helping to ensure the quality of the target audio and a more natural and clear audio playback experience.
[0079] Step a23: performing superposition processing on the multiple intermediate audio signals to obtain mixed audio data.
[0080] Since the sampling rates of the intermediate audio signals are all the target sampling rates, multiple intermediate audio signals can be superimposed to obtain the required mixed data through superposition processing, thereby ensuring that the mixed data has a more natural and balanced auditory effect during subsequent audio playback.
[0081] By performing mixing processing in the above manner, the consistency of the audio format can be guaranteed, so that the processing process of the mixed data can be applied to a variety of head-mounted playback devices and audio playback standards, and is more applicable.
[0082] In some optional application scenarios, taking the sampling rate change ratio r1 = 0.5 as an example, the multiple decoded data may be a1, a2, a3, a4, a5, .... After resampling, the intermediate audio signals corresponding to the decoded data may be: b1 = a1; b2 = (a1 + a2) / 2; b3 = a2, b4 = (a2 + a3) / 2; b5 = a3; b6 = (a3 + a4) / 2; b7 = a4; .... Alternatively, the intermediate audio signals may be obtained using other interpolation methods, such as b4 = (a1 + 3*a2 + 3*a3 + a4) / 8; b6 = (a2 + 3*a3 + 3*a4 + a5) / 8.
[0083] In the present disclosure, there is no limitation on the method of superposition processing. For example, the decoded data may be upsampled M times (for example, M times may be 32, 64, 128, 256, or 512 times) and pre-processed with a low-pass filter, and then the desired mixed data may be obtained based on the sampling rate change ratio.
[0084] Step a3: Encode the mixed audio data to obtain the target audio.
[0085] The obtained mixed data is encoded so that the data structure of the obtained target audio can meet the requirements of the data transmission protocol between the charging box and the head-mounted playback device, thereby ensuring the transmission quality and effectiveness of the target audio.
[0086] The mixing process performed in the above manner can ensure the conversion of the audio from the originally encoded audio to be played to the final target audio, and can effectively improve the audio quality and auditory effect when the audio is finally played.
[0087] In some further embodiments, the above step S122 may include the following steps:
[0088] Step b1: in response to there being multiple audio types, determining a target audio type according to the audio type of each audio to be played;
[0089] Step b2: adjusting the audio type of the to-be-played audio that is different from the target audio type based on the target audio type, to obtain the corresponding adjusted audio type to be played;
[0090] Step b3: Mixing the adjusted audio to be played and the audio to be played of the target audio type to obtain the target audio.
[0091] Specifically, if there are multiple audio types, it means that in the process of obtaining multiple audios to be played, the audio types provided by each audio source device are inconsistent. This situation may be caused by the different types of audio source devices or the data storage formats corresponding to the audio to be played. In order to ensure the quality and effect of audio playback, the target audio type is determined according to the audio type of each audio to be played. For example, the audio type with the largest number of audios to be played can be used as the target audio type, and then when the same audio type is used subsequently, the number of data adjustments can be reduced, which helps to save power consumption and extend the battery life of the charging box. Alternatively, it can be determined based on the audio types supported by the head-mounted playback device to ensure that the target audio after subsequent adjustment can be successfully received and played by the head-mounted playback device to ensure the needs of audio playback.
[0092] Adjusting multiple audio files that are not of the target audio type to be played so that the audio types of all the audio files are of the target audio type or closer to the target audio type. Mixing the adjusted audio files with the audio files of the target audio type to be played can make the audio content of the mixed target audio more balanced and harmonious, thereby effectively improving the quality of the target audio, ensuring the audio playback effect, and helping to enhance the user's hearing effect and user experience.
[0093] In some embodiments, the above step S110 may include: based on the Bluetooth connection between the head-mounted playback device, sending the target audio to the head-mounted playback device, so that the head-mounted playback device plays the audio based on the target audio. The Bluetooth protocol based on the Bluetooth connection may include but is not limited to: classic Bluetooth, low-power Bluetooth, LEA or HDT protocols. Among them, HDT stands for "Higher Data Throughput" in Bluetooth technology. LEA is Bluetooth LE Audio (LE Audio is low-power audio), which is a new generation of Bluetooth audio standard designed based on the Bluetooth Low Energy (BLE) architecture.
[0094] The communication module in the head-mounted playback device is generally a Bluetooth module. By connecting the charging box to the head-mounted playback device through Bluetooth, the head-mounted playback device can obtain target audio corresponding to multiple audios to be played sent based on multiple wireless connections without changing the module layout and communication protocol of the head-mounted playback device itself. This not only improves the flexibility of obtaining the audio to be played, but also reduces the audio data processing volume of the head-mounted playback device, saves power consumption, reduces latency, and extends battery life, thereby helping to improve the user experience.
[0095] In some optional application scenarios, the process of playing audio through the charging box can be as follows:
[0096] Identify multiple audio source devices and establish connections between the multiple audio source devices and the charging box. The connection can be wireless or wired, and the connection method between the charging box and any two audio source devices can be the same or different.
[0097] Establish a Bluetooth connection between the charging box and the head-mounted playback device. The charging box may be a charging box used to charge the head-mounted playback device.
[0098] In a scenario where audio playback is required, take the head-mounted playback device as a true wireless headset as an example.
[0099] The charging box can obtain multiple audios to be played based on the connection with each audio source device, and then mix the multiple audios to be played to mix the audios to be played obtained from different communication links into one target audio, and then send the obtained target audio to the true wireless headset.
[0100] The true wireless earphones play audio based on the received target audio.
[0101] Based on the same inventive concept, the present disclosure also provides a charging box. Figure 3 As shown, the charging box 200 may include:
[0102] An acquisition module 210 is configured to acquire multiple audio files to be played based on connections with multiple audio source devices;
[0103] The processing module 220 is used to mix the multiple audios to be played to obtain the target audio;
[0104] The wireless connection module 230 sends the target audio to the head-mounted playback device based on the wireless connection with the head-mounted playback device, so that the head-mounted playback device plays the audio based on the target audio.
[0105] Regarding the charging box in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method and will not be elaborated here.
[0106] In some optional application scenarios, the acquisition module 210 may include a wireless communication module and a data transmission interface for data transmission. The wireless communication module is used to establish a wireless connection with the audio source device, and the data transmission interface is used to establish a wired connection with the audio source device. The wireless connection module 230 may include a Bluetooth module for establishing a Bluetooth connection with a head-mounted playback device.
[0107] Based on the same inventive concept, the present disclosure also provides an audio playback system. Figure 4 As shown, the audio playback system 300 may include:
[0108] Multiple audio source devices 310, each of which is used to provide an audio to be played;
[0109] The charging box 320 is connected to each audio source device 310 respectively. The charging box 320 is used to obtain each audio to be played, mix all the audio to be played, and send the target audio obtained after the mixing process;
[0110] The head-mounted playback device 330 is wirelessly connected to the charging box 320 and is used to receive target audio and play audio based on the target audio.
[0111] In some embodiments, the connection method between the charging box 320 and the audio source device 310 is a wireless connection or a wired connection; the connection method between the charging box 320 and any two audio source devices 310 is the same or different.
[0112] In some embodiments, the wireless connection between the head-mounted playback device 330 and the charging box 320 is a Bluetooth connection.
[0113] In some embodiments, the signal type of the audio to be played is stereo audio, mono audio, or multi-channel audio, and the signal types of any two audio to be played are the same or different.
[0114] Regarding the audio playback system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0115] Based on the same inventive concept, the present disclosure further provides a computer-readable storage medium, which stores the following program, which is used to execute the audio playback method of any of the aforementioned embodiments.
[0116] This disclosure uses specific terms to describe the embodiments of the present disclosure. For example, "one embodiment," "an embodiment," and / or "some embodiments" refer to a certain feature, structure, or characteristic associated with at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that "one embodiment," "an embodiment," or "an alternative embodiment" mentioned twice or more in different places in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the present disclosure may be appropriately combined.
[0117] In the context of this disclosure, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not intended to refer to the singular but may include the plural. Generally speaking, the terms "comprise" and "include" only indicate the inclusion of the steps and elements specifically identified, and these steps and elements do not constitute an exclusive list. A method or apparatus may also include other steps or elements.
[0118] Similarly, it should be noted that, in order to simplify the presentation of this disclosure and thereby facilitate understanding of one or more application embodiments, the foregoing descriptions of the embodiments of this disclosure sometimes combine multiple features into a single embodiment, figure, or description thereof. However, this disclosure method does not mean that the disclosed subject matter requires more features than the claimed features. In fact, the features of an embodiment may be fewer than all the features of a single disclosed embodiment.
[0119] The basic concepts have been described above. It will be apparent to those skilled in the art that the above disclosure is merely illustrative and does not constitute a limitation of the present disclosure. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and revisions to the present disclosure. Such modifications, improvements, and revisions are suggested in the present disclosure and remain within the spirit and scope of the embodiments of the present disclosure.
Claims
1. An audio playback method, applied to a charging box connected to multiple audio source devices and a head-mounted playback device, the method comprising: Based on the connection with the plurality of audio source devices, obtaining a plurality of audios to be played; Mixing the plurality of audios to be played to obtain a target audio; Based on the wireless connection with the head-mounted playback device, the target audio is sent to the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
2. The audio playback method according to claim 1, wherein: The mixing process of the plurality of audios to be played to obtain a target audio comprises: Determining the audio type of each of the audios to be played; Based on the audio type, a plurality of the to-be-played audios are mixed to obtain a target audio.
3. The audio playback method according to claim 2, wherein: The mixing process of the plurality of to-be-played audios based on the audio type to obtain the target audio includes: In response to the audio type being a data type, decoding each of the to-be-played audios to obtain a plurality of decoded data; Performing mixing processing on the plurality of decoded data to obtain mixed data; The mixed audio data is encoded to obtain the target audio.
4. The audio playback method according to claim 3, wherein: The mixing process is performed on the plurality of decoded data to obtain mixed data, comprising: Determine the target sampling rate; resampling the plurality of decoded data based on the target sampling rate to obtain a plurality of intermediate audio signals; The multiple intermediate audio signals are superimposed to obtain the mixed audio data.
5. The audio playback method according to claim 4, wherein: Determining the target sampling rate includes: determining reference data from the plurality of decoded data; The target sampling rate is determined according to the signal sampling rate of the reference data.
6. The audio playback method according to claim 4 or 5, wherein: The resampling process is performed on the plurality of decoded data based on the target sampling rate to obtain a plurality of intermediate audio signals, including: determining an actual sampling rate of the decoded data; determining a sampling rate change ratio based on a ratio between the actual sampling rate and the target sampling rate; Based on the sampling rate change ratio, the decoded data is resampled to obtain the intermediate audio signal corresponding to the decoded data.
7. The audio playback method according to claim 6, wherein: The determining of the sampling rate change ratio based on the ratio between the actual sampling rate and the target sampling rate includes: Determining a buffer size of the decoded data; In response to the buffer amount being equal to the target value, determining the ratio to be the sampling rate change ratio; In response to the buffer size being greater than the target value, increasing the ratio based on the target step size to obtain the sampling rate change ratio; In response to the buffer size being smaller than the target value, the ratio is reduced based on the target step size to obtain the sampling rate change ratio.
8. The audio playback method according to claim 2, wherein: The mixing process of the plurality of to-be-played audios based on the audio type to obtain the target audio includes: In response to the plurality of audio types, determining a target audio type according to the audio type of each of the to-be-played audios; Based on the target audio type, adjusting the audio type of the to-be-played audio that is different from the target audio type to obtain the corresponding adjusted audio to be played; The adjusted audio to be played and the audio to be played of the target audio type are mixed to obtain the target audio.
9. The audio playback method according to claim 1, wherein: The step of transmitting the target audio to the head-mounted playback device based on the wireless connection with the head-mounted playback device, so that the head-mounted playback device plays the audio based on the target audio, includes: Based on the Bluetooth connection with the head-mounted playback device, the target audio is sent to the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
10. The audio playback method according to claim 1 or 9, wherein: The connection mode between the audio source device and the audio source device is wireless or wired, and is the same as or different from the connection mode between any two audio source devices; The signal type of the audio to be played is stereo audio, mono audio or multi-channel audio, and the signal types of any two audios to be played are the same or different.
11. A charging box, comprising: An acquisition module, configured to acquire multiple audios to be played based on connections with multiple audio source devices; A processing module, configured to mix the plurality of audios to be played to obtain a target audio; The wireless connection module sends the target audio to the head-mounted playback device based on the wireless connection with the head-mounted playback device, so that the head-mounted playback device plays audio based on the target audio.
12. An audio playback system, comprising: Multiple audio source devices, each of which is used to provide an audio to be played; A charging box is connected to each of the audio source devices, and is used to obtain each of the audio to be played, mix all of the audio to be played, and send the target audio obtained after the mixing process; A head-mounted playback device is wirelessly connected to the charging box and is used to receive the target audio and play audio based on the target audio.
13. The audio playback system according to claim 12, wherein: The connection between the charging box and the audio source device is a wireless connection or a wired connection; The connection method between the charging box and any two of the audio source devices is the same or different.
14. The audio playback system according to claim 12 or 13, wherein: The wireless connection between the head-mounted playback device and the charging box is a Bluetooth connection.
15. The audio playback system according to claim 14, wherein: The signal type of the audio to be played is stereo audio, mono audio or multi-channel audio, and the signal types of any two audios to be played are the same or different. 16 . A computer-readable storage medium storing the following program, wherein the program is used to execute the audio playback method according to claim 1 .