Audio output method and device, electronic device, and storage medium

By acquiring the audio output mode, determining the specified or non-specified channel mode, adjusting the target channel and channel volume, and performing audio stream mixing, sampling rate conversion, and channel splicing, the problem of inflexibility in existing audio output methods is solved, achieving greater flexibility in audio output and improved sound quality.

CN116193192BActive Publication Date: 2026-04-14HAINING ESWIN IC DESIGN CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HAINING ESWIN IC DESIGN CO LTD
Filing Date
2023-03-01
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing audio output methods cannot flexibly adjust the input audio, resulting in a lack of flexibility in the output method.

Method used

By acquiring the audio output mode, determining the specified or non-specified channel mode, adjusting the target channel and channel volume, and performing audio stream mixing, sampling rate conversion, and channel splicing, the flexibility of audio output is achieved.

Benefits of technology

It enables corresponding adjustments to the audio channel based on different output modes, allowing for flexible output of target audio, improved sound quality, and reduced latency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116193192B_ABST
    Figure CN116193192B_ABST
Patent Text Reader

Abstract

The application provides an audio output method and device, electronic equipment and storage medium. The method comprises: obtaining an output mode of first input audio, the output mode comprising a specified channel mode or a non-specified channel mode; in the case that the output mode comprises the specified channel mode, determining a plurality of target channels corresponding to the specified channel mode from all channels of the first input audio; determining a first channel according to the second input audio and the target channel; outputting the first target audio based on the first channel; in the case that the output mode comprises the non-specified channel mode, determining a plurality of second channels corresponding to the non-specified channel mode from all channels of the first input audio; adjusting a current volume corresponding to the second channel to obtain an output volume; and outputting the second target audio based on the output volume. The method can adjust the channels in the input audio based on the output mode of the input audio, thereby flexibly outputting the corresponding target audio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio data processing technology, and in particular to an audio output method, apparatus, electronic device, and storage medium. Background Technology

[0002] In existing audio output methods, the TV terminal can use the audio output channel to directly transmit the audio to be input to the built-in audio playback device of the TV terminal, or use audio output interfaces such as High Definition Multimedia Interface (HDMI) and Universal Serial Bus (USB) to transmit the audio signal in one or more audio output channels to external audio playback devices such as external speakers and Bluetooth headphones, thereby realizing the audio output of the TV terminal.

[0003] However, in the above audio output method, the TV terminal cannot flexibly adjust the input audio, making the entire audio output method inflexible. Summary of the Invention

[0004] This invention provides an audio output method, apparatus, electronic device, and storage medium to overcome the shortcomings of existing audio output methods in terms of flexibility. It enables flexible output of the target audio by adjusting the channels in the input audio according to the output mode of the input audio.

[0005] This invention provides an audio output method, comprising:

[0006] Obtain the output mode of the first audio input, which may be a specified channel mode or a non-specified channel mode;

[0007] When the output mode includes the specified channel mode, multiple target channels corresponding to the specified channel mode are determined from all channels of the first audio to be input; a first channel is determined based on the second audio to be input and the target channel; and a first target audio is output based on the first channel.

[0008] In the case where the output mode includes the non-specified channel mode, multiple second channels corresponding to the non-specified channel mode are determined from all channels of the first audio to be input; the current volume corresponding to the second channel is adjusted to obtain the output volume; and the second target audio is output based on the output volume.

[0009] According to an audio output method provided by the present invention, the number of channels corresponding to the second audio to be input is the same as the number of channels of the target channel. Determining the first channel based on the second audio to be input and the target channel includes: mixing the first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second audio to be input to obtain a mixed audio bitstream; and mixing the channels corresponding to the mixed audio bitstream to obtain the first channel.

[0010] According to an audio output method provided by the present invention, the method of mixing a first audio bitstream corresponding to a target channel and a target audio bitstream corresponding to a second input audio channel to obtain a mixed audio bitstream includes: performing a sampling rate conversion on the first audio bitstream in the target channel to obtain a second audio bitstream, wherein the sampling rate of the second audio bitstream is within a preset sampling rate range; performing a sampling rate conversion on the target audio bitstream in the second input audio channel to obtain a third audio bitstream, wherein the sampling rate of the third audio bitstream is within the preset sampling rate range; and mixing the second audio bitstream and the third audio bitstream to obtain a mixed audio bitstream.

[0011] According to an audio output method provided by the present invention, the method of outputting a first target audio based on a first channel includes at least one of the following: adjusting the first channel using an equalizer to obtain a third channel, and outputting the first target audio based on the third channel; mapping the first channel using a dynamic range controller to obtain a third channel, and outputting the first target audio based on the third channel; determining other channels besides the target channel from all channels; splicing the first channel with the other channels according to a preset channel order to obtain a fourth channel; outputting the first target audio based on the fourth channel; and globally adjusting the volume corresponding to the first channel, and outputting the first target audio based on the adjusted volume.

[0012] The present invention also provides an electronic device, comprising:

[0013] The processor is configured to: acquire an output mode of a first audio input, the output mode including a specified channel mode or a non-specified channel mode; if the output mode includes the specified channel mode, determine multiple target channels corresponding to the specified channel mode from all channels of the first audio input; determine a first channel based on a second audio input and the target channels; output a first target audio based on the first channel; and if the output mode includes the non-specified channel mode, determine multiple second channels corresponding to the non-specified channel mode from all channels of the first audio input.

[0014] The volume adjuster is used to adjust the current volume corresponding to the second channel to obtain the output volume;

[0015] The processor is also used to output a second target audio based on the output volume.

[0016] Optionally, the processor includes: a stream mixer and a channel mixer.

[0017] The stream mixer is used to mix the first audio stream corresponding to the target channel and the target audio stream corresponding to the second input audio channel to obtain a mixed audio stream;

[0018] This channel mixer is used to mix the channels corresponding to the mixed audio bitstream to obtain the first channel.

[0019] Optionally, the processor also includes: an asynchronous sampling rate converter.

[0020] The asynchronous sampling rate converter is used to convert the sampling rate of the first audio bitstream in the target channel to obtain a second audio bitstream, the sampling rate of which is within a preset sampling rate range; and to convert the sampling rate of the target audio bitstream in the channel corresponding to the second audio to be input to obtain a third audio bitstream, the sampling rate of which is within the preset sampling rate range.

[0021] The stream mixer is specifically used to mix the second audio stream and the third audio stream to obtain a mixed audio stream.

[0022] Optionally, the processor includes at least one of an equalizer and a dynamic range controller, and an output unit;

[0023] This equalizer is used to adjust the first channel to obtain the third channel;

[0024] The dynamic range controller is used to map the first channel to obtain the third channel;

[0025] The output device is used to output the first target audio based on the third channel;

[0026] Specifically, the processor is used to determine the channels other than the target channel from all the channels; according to a preset channel order, it concatenates the first channel with the other channels to obtain a fourth channel; and based on the fourth channel, it outputs the first target audio.

[0027] This volume adjuster is specifically used to globally adjust the volume corresponding to the first channel, and output the first target audio based on the adjusted volume.

[0028] The present invention also provides an audio output device, comprising:

[0029] The acquisition module is used to acquire the output mode of the first audio to be input, which includes a specified channel mode or a non-specified channel mode.

[0030] The processing module is configured to: determine multiple target channels corresponding to the specified channel mode from all channels of the first audio to be input when the output mode includes the specified channel mode; determine a first channel based on the second audio to be input and the target channel; output a first target audio based on the first channel; determine multiple second channels corresponding to the non-specified channel mode from all channels of the first audio to be input when the output mode includes the non-specified channel mode; adjust the current volume corresponding to the second channel to obtain an output volume; and output a second target audio based on the output volume.

[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the audio output method as described above.

[0032] The present invention provides an audio output method, apparatus, electronic device, and storage medium that acquires an output mode for a first input audio, wherein the output mode includes a specified channel mode or a non-specified channel mode; when the output mode includes the specified channel mode, it determines multiple target channels corresponding to the specified channel mode from all channels of the first input audio; it determines a first channel based on a second input audio and the target channels; it outputs a first target audio based on the first channel; when the output mode includes the non-specified channel mode, it determines multiple second channels corresponding to the non-specified channel mode from all channels of the first input audio; it adjusts the current volume corresponding to the second channel to obtain an output volume; and it outputs a second target audio based on the output volume. This method addresses the inflexibility of existing audio output methods by enabling flexible output of corresponding target audio by adjusting the channels of the input audio based on its output mode. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0034] Figure 1 This is a flowchart illustrating the audio output method provided by the present invention;

[0035] Figure 2This is a schematic diagram of the structure of the electronic device provided by the present invention;

[0036] Figure 3 This is a schematic diagram of the audio output device provided by the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0038] It should be noted that the execution subject involved in the embodiments of the present invention can be an audio output device or an electronic device, and no specific limitation is made here.

[0039] Optionally, the audio output device may include: headphones and speakers, etc.

[0040] Electronic devices may include: television terminals (TV), computers, mobile terminals, and wearable devices.

[0041] It should be noted that the audio output method involved in the embodiments of the present invention can be set on a system-on-a-chip (SoC) chip in an electronic device. Since the SoC chip can perform parallel data processing, which is superior to units that perform serial data processing, it can effectively improve data processing latency and processing efficiency.

[0042] The embodiments of the present invention will be further described below using an electronic device as an example.

[0043] like Figure 1 The diagram shown is a flowchart of the audio output method provided by the present invention, which may include:

[0044] 101. Obtain the output mode of the first audio to be input.

[0045] The first audio to be input refers to the audio data that will be output through the output interface of the electronic device, and the number of the first audio to be input is at least one.

[0046] The output mode can include specified channel mode or non-specified channel mode.

[0047] The specified channel mode can include a specific channel from the audio multi-channel, which can also be called the target channel. There can be multiple such specific channels, for example, the specified channel mode can include 8 specific channels.

[0048] The non-specified channel mode can include other channels in the above audio multi-channel system besides the specified channel. The number of these other channels is at least one. For example, if there are 24 channels in total, and 8 specific channels are removed, then the number of other channels is 16. In this case, the non-specified channel mode can be called the enhanced audio return channel (eARC) mode.

[0049] After acquiring the first audio input, the electronic device can acquire the output mode of the first audio input.

[0050] Optionally, when there are multiple first audio inputs, the output modes of each first audio input can be the same or different, without specific limitations here.

[0051] For example, the number of first audio inputs is four, namely first audio input A, first audio input B, first audio input C and first audio input D. The output mode of the first audio input A includes a specified channel mode; the output mode of the first audio input B includes a specified channel mode; the output mode of the first audio input C includes a non-specified channel mode; and the output mode of the first audio input D includes a non-specified channel mode.

[0052] Optionally, when there are multiple first audio files to be input, the input format of each first audio file to be input can be the same or different, without specific limitations here.

[0053] The input format can include: Compact Disk (CD) format or Audio Interchange File Format (AIFF), etc.

[0054] This can effectively expand the output scene coverage of the first audio input.

[0055] Optionally, when there are multiple first audio inputs, the electronic device may acquire the output mode of the first audio inputs by: acquiring multiple first audio inputs; preprocessing the first audio inputs to obtain multiple preprocessed first audio inputs, wherein the word length of each preprocessed first audio input is the same; and acquiring the output mode of each preprocessed first audio input.

[0056] After acquiring multiple first audio inputs, the electronic device faces challenges in further processing them due to the varying word lengths of each audio input. Therefore, the electronic device can preprocess these multiple first audio inputs to obtain multiple preprocessed first audio inputs; that is, it can process the word lengths of these multiple first audio inputs to obtain first audio inputs of the same word length. Then, the electronic device can acquire the output modes corresponding to each of these first audio inputs of the same word length.

[0057] Optionally, the electronic device acquiring the output mode of the first audio to be input may include: the electronic device acquiring its current remaining battery power; and the electronic device acquiring the output mode of the first audio to be input when it determines that the current remaining battery power is greater than a preset battery power threshold.

[0058] The current remaining power refers to the remaining power of the power supply device (e.g., battery) in the electronic device.

[0059] Optionally, the preset power threshold can be set before the electronic device leaves the factory or it can be user-defined; no specific limitation is made here.

[0060] After obtaining its current remaining battery level, the electronic device can compare it with a preset battery threshold. If the remaining battery level is greater than the preset threshold, it indicates that the device has sufficient power, and the device can directly obtain the first audio output mode. If the remaining battery level is less than or equal to the preset threshold, it indicates that the device has insufficient power, and the device can output a first prompt message to remind the user to charge the device.

[0061] For example, suppose the preset battery threshold is 20%. The electronic device obtains that its current remaining battery is 30%, which is greater than the preset battery threshold of 20%. At this time, the electronic device can directly obtain the output mode of the first audio input.

[0062] 102. When the output mode includes a specified channel mode, determine multiple target channels corresponding to the specified channel mode from all channels of the first audio to be input; determine the first channel based on the second audio to be input and the target channels; and output the first target audio based on the first channel.

[0063] Among them, the number of channels corresponding to all channels of the first audio to be input is greater than the number of channels of the specific channel and the target channel.

[0064] The number of channels in the first channel is less than or equal to the number of channels in the target channel mentioned above.

[0065] The number of channels corresponding to the second input audio channel is the same as the number of channels of the target channel mentioned above.

[0066] After acquiring the output mode of the first audio to be input, the electronic device can first identify the output mode. If it is determined that the output mode includes a specified channel mode, it can determine all channels of the first audio to be input and identify multiple target channels corresponding to the specified channel mode from all channels. Then, the electronic device acquires the second audio to be input and determines the first channel based on the second audio to be input and the multiple target channels, and then outputs the first target audio, which is a valid channel.

[0067] Optionally, the electronic device may determine multiple target channels corresponding to a specified channel mode from all channels of the first audio input. This may include: when the output mode includes a specified channel mode, the electronic device may determine multiple target channel numbers corresponding to the specified channel mode; the electronic device may determine the channel with the target channel number among all channels as the target channel.

[0068] Different target channels correspond to different target channel numbers. Since each target channel number is different, each target channel is unique.

[0069] Optionally, all channels of the first input audio are arranged in a preset channel order.

[0070] Optionally, the preset channel order can be set before the electronic device leaves the factory or it can be user-defined; no specific limitation is made here.

[0071] After acquiring the output mode of the first audio to be input, the electronic device can first identify the output mode. If it is determined that the output mode includes a specified channel mode, it determines multiple target channel numbers corresponding to the specified channel mode. Then, the electronic device determines the channel number corresponding to each channel in all channels of the first audio to be input. Next, the electronic device determines the channel number that is the same as the target channel number from all these channel numbers, and determines the channel corresponding to the same channel number as the target channel.

[0072] For example, the target channel is numbered 1, 3, and 5, and each channel in the first audio input is numbered 0, 1, 2, 3, 4, and 5. The electronic device determines channel 1, 3, and 5 from these 6 channel numbers and identifies the channels corresponding to channel 1, channel 3, and channel 5 as the target channels.

[0073] In some embodiments, the number of channels corresponding to the second audio input channel is the same as the number of channels of the target channel. The electronic device determines the first channel based on the second audio input channel and the target channel, which may include: the electronic device mixing the first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second audio input channel to obtain a mixed audio bitstream; the electronic device determining the channel corresponding to the mixed audio bitstream from the target channel; and the electronic device mixing the channel corresponding to the mixed audio bitstream to obtain the first channel.

[0074] Audio bitrate refers to the amount of data used by a video or audio file per unit of time.

[0075] After determining multiple target channels corresponding to a specified channel mode from all channels of the first audio to be input, the electronic device can first determine the first audio bitstream corresponding to the target channel and obtain the target audio bitstream of the channel corresponding to the second audio to be input. Since the number of channels of the channel corresponding to the second audio to be input is the same as the number of channels of the target channel, the electronic device can directly mix the first audio bitstream and the target audio bitstream to obtain a mixed audio bitstream, the number of channels in the mixed audio bitstream being less than or equal to the number of channels in the first audio bitstream. Then, the electronic device mixes the channels corresponding to the mixed audio bitstream to obtain a valid first channel, the number of channels in the first channel being less than the number of channels in the target channel, thus effectively improving the sound quality of the target audio.

[0076] It should be noted that the timing of the electronic device acquiring the first audio bitstream and the electronic device acquiring the target audio bitstream is not limited.

[0077] Optionally, if the mixed audio stream overflows, the electronic device can also perform overflow processing on the mixed audio stream to ensure the subsequent normal output of the mixed audio stream.

[0078] In some embodiments, the electronic device mixes the first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second input audio channel to obtain a mixed audio bitstream. This may include: the electronic device performing a sampling rate conversion on the first audio bitstream in the target channel to obtain a second audio bitstream, wherein the sampling rate of the second audio bitstream is within a preset sampling rate range; the electronic device performing a sampling rate conversion on the target audio bitstream in the second input audio channel to obtain a third audio bitstream, wherein the sampling rate of the third audio bitstream is within a preset sampling rate range; and the electronic device mixing the second audio bitstream and the third audio bitstream to obtain a mixed audio bitstream.

[0079] The sampling rate, also known as the sampling frequency or sampling speed, refers to the number of samples extracted per second from the continuous signal corresponding to the audio to be transmitted and used to form a discrete signal. It can be represented by Hertz (Hz).

[0080] The preset sampling rate range refers to the interval formed by the first preset sampling rate threshold and the second preset sampling rate threshold, wherein the first preset sampling rate threshold is less than the second preset sampling rate threshold.

[0081] Optionally, the preset sampling rate range can be set before the electronic device leaves the factory or it can be user-defined; no specific limitation is made here.

[0082] The electronic device performs a sampling rate conversion on the first audio bitstream in the target channel, which can also be called an asynchronous sampling rate conversion (ASRC) on the first audio bitstream in the target channel, to obtain a second audio bitstream. Then, the electronic device performs an asynchronous sampling rate conversion on the target audio bitstream in the corresponding channel of the second input audio to obtain a third audio bitstream. Finally, the electronic device mixes the second audio bitstream and the third audio bitstream to obtain an effective mixed audio bitstream.

[0083] It should be noted that the timing of the electronic device acquiring the second audio stream and the electronic device acquiring the third audio stream is not limited.

[0084] In some embodiments, the electronic device outputs a first target audio based on a first channel, which may include, but is not limited to, at least one of the following implementations:

[0085] Implementation method 1: The electronic device uses an equalizer (EQ) to adjust the first channel to obtain the third channel; the electronic device outputs the first target audio based on the third channel.

[0086] EQ refers to a device that can adjust the audio stream signal in the first channel to compensate and modify the audio stream signal in order to reduce inter-symbol interference. Optionally, the audio stream signal may include high-frequency electrical signals, intermediate-frequency electrical signals and low-frequency electrical signals, etc.

[0087] After acquiring the first channel, the electronic device can use an equalizer (EQ) to adjust the audio bitstream signal in the first channel to obtain the third channel, and effectively output the first target audio based on the third channel.

[0088] Implementation Method 2: The electronic device uses a Dynamic Range Control (DRC) to map the first channel to obtain the third channel; the electronic device outputs the first target audio based on the third channel.

[0089] DRC refers to a technology that can adjust the amplitude of the audio stream signal in the first channel, providing compression and amplification capabilities to the audio stream signal, making the sound louder or softer when the first target audio is output.

[0090] After acquiring the first channel, the electronic device can use a dynamic range controller (DRC) to adjust the amplitude of the audio bitstream signal in the first channel to obtain a third channel, and effectively output the first target audio based on the third channel.

[0091] Implementation method 3: The electronic device determines the channels other than the target channel from all channels; the electronic device splices the first channel with the other channels according to the preset channel order to obtain the fourth channel; the electronic device outputs the first target audio based on the fourth channel.

[0092] Among all the channels mentioned above, the channels other than the target channel can be the second channel in step 103.

[0093] In the process of outputting the first target audio based on the first channel, the electronic device can first determine the other channels besides the target channel from all channels; then, the electronic device splices the first channel with the other channels according to the preset channel order to obtain the spliced ​​channel, and outputs the first target audio completely and effectively based on the spliced ​​channel.

[0094] Implementation method 4: The electronic device outputs the first target audio based on the first channel, which may include: the electronic device globally adjusting the volume corresponding to the first channel, and outputting the first target audio based on the adjusted volume.

[0095] During the process of globally adjusting the volume of the first channel, the electronic device can adjust the volume of each first channel accordingly. The adjustment degree of each first channel can be the same or different. This can reduce the degree of change of volume control in each first channel, thereby outputting the first target audio and effectively preventing the electronic device from having a popping sound when outputting the first target audio later.

[0096] It should be noted that whether it is implementation method 1, implementation method 2, implementation method 3, implementation method 4, or the implementation method obtained by combining at least two of these four implementation methods, the output sound quality of the first target audio can be improved.

[0097] 103. When the output mode includes a non-specified channel mode, determine multiple second channels corresponding to the non-specified channel mode from all channels of the first audio to be input; adjust the current volume of the second channel to obtain the output volume; and output the second target audio based on the output volume.

[0098] Volume refers to the loudness or intensity of an audio signal.

[0099] After acquiring the output mode of the first audio to be input, the electronic device can first identify the output mode. If it is determined that the output mode includes a non-specified channel mode, it can determine all channels of the first audio to be input and identify multiple second channels corresponding to the non-specified channel mode from all channels. Then, the electronic device can adjust the volume of the second channel and output the second target audio based on the adjusted volume of the second channel.

[0100] Optionally, the electronic device adjusts the current volume corresponding to the second channel to obtain the output volume, which can be implemented in one of the following ways, including but not limited to:

[0101] Implementation method 1: The electronic device reduces the current volume corresponding to the second channel to obtain the output volume.

[0102] Since the current volume corresponding to the second channel is relatively high, the electronic device can reduce the current volume corresponding to the second channel to obtain a smaller output volume.

[0103] Implementation method 2: The electronic device increases the current volume corresponding to the second channel to obtain the output volume.

[0104] Since the current volume corresponding to the second channel is relatively low, the electronic device can increase the current volume corresponding to the second channel to obtain a larger output volume.

[0105] Optionally, the electronic device outputs a second target audio based on the second channel after volume adjustment, which may include: the electronic device determining other channels besides the second channel after volume adjustment from all channels; the electronic device splicing the second channel after volume adjustment with the other channels according to a preset channel order to obtain a fifth channel; and the electronic device outputting the second target audio based on the fifth channel.

[0106] Among them, the other channels besides the second channel after adjusting the volume can be the first channel in step 102 or the third channel in step 102, and no specific limitation is made here.

[0107] In the process of outputting the second target audio based on the second channel after volume adjustment, the electronic device can first determine the other channels besides the second channel after volume adjustment from all the channels of the first audio to be input; then, the electronic device splices the second channel after volume adjustment with the other channels according to the preset channel order to obtain the spliced ​​channel, and outputs the second target audio completely and effectively based on the spliced ​​channel.

[0108] Optionally, before step 101, or after step 102, or after step 103, the method may further include: an electronic device acquiring a third audio to be input; the electronic device performing sampling rate conversion, volume control, and channel mixing processing on the third audio to be input to output a third target audio.

[0109] Since audio output channels such as Bluetooth and USB often have high latency, in order to meet the low latency requirement, after acquiring the third audio input, the electronic device can perform sampling rate conversion, volume control and channel mixing processing on the third audio input to effectively reduce the latency problem of the above-mentioned audio output channels, and thus output a third target audio with higher sound quality.

[0110] Optionally, the third audio to be input can be the same as or different from the first audio to be input, and the third audio to be input can be the same as or different from the second audio to be input; no specific limitation is made here.

[0111] In this embodiment of the invention, the output mode of a first audio input is obtained, which includes a specified channel mode or a non-specified channel mode. If the output mode includes a specified channel mode, multiple target channels corresponding to the specified channel mode are determined from all channels of the first audio input. A first channel is determined based on the second audio input and the target channels. A first target audio is output based on the first channel. If the output mode includes a non-specified channel mode, multiple second channels corresponding to the non-specified channel mode are determined from all channels of the first audio input. The current volume corresponding to the second channel is adjusted to obtain the output volume. A second target audio is output based on the output volume. This method addresses the inflexibility of existing audio output methods by adjusting the channels of the audio input based on its output mode, thereby enabling flexible output of the corresponding target audio.

[0112] The electronic device provided by the present invention is described below. The electronic device described below can be referred to in correspondence with the audio output method described above.

[0113] like Figure 2 The diagram shown is a structural schematic of the electronic device provided by the present invention, which may include:

[0114] Processor 201 is configured to acquire an output mode of a first audio input, the output mode including a specified channel mode or a non-specified channel mode; if the output mode includes the specified channel mode, determine multiple target channels corresponding to the specified channel mode from all channels of the first audio input; determine a first channel based on a second audio input and the target channels; output a first target audio based on the first channel; and if the output mode includes the non-specified channel mode, determine multiple second channels corresponding to the non-specified channel mode from all channels of the first audio input.

[0115] Volume adjuster 202 is used to adjust the current volume corresponding to the second channel to obtain the output volume;

[0116] The processor 201 is also used to output a second target audio based on the output volume.

[0117] Optionally, the processor 201 includes: a stream mixer 2011 and a channel mixer 2022.

[0118] The stream mixer 2011 is used to mix the first audio stream corresponding to the target channel and the target audio stream corresponding to the second input audio channel to obtain a mixed audio stream.

[0119] The channel mixer 2022 is used to mix the channels corresponding to the mixed audio bitstream to obtain the first channel.

[0120] Processor 201 also includes: asynchronous sampling rate converter 2013,

[0121] The asynchronous sampling rate converter 2013 is used to convert the sampling rate of the first audio bitstream in the target channel to obtain a second audio bitstream, wherein the sampling rate of the second audio bitstream is within a preset sampling rate range; and to convert the sampling rate of the target audio bitstream in the corresponding channel of the second audio to be input to obtain a third audio bitstream, wherein the sampling rate of the third audio bitstream is within the preset sampling rate range.

[0122] The stream mixer 2011 is specifically used to mix the second audio stream and the third audio stream to obtain a mixed audio stream.

[0123] The processor 201 includes at least one of an equalizer 2014 and a dynamic range controller 2015, and an output device 2016;

[0124] Equalizer 2014 is used to adjust the first channel to obtain the third channel;

[0125] The dynamic range controller 2015 is used to map the first channel to obtain the third channel;

[0126] Outputter 2016 is used to output the first target audio based on the third channel;

[0127] The processor 201 is specifically used to determine the channels other than the target channel from all the channels; to concatenate the first channel with the other channels according to a preset channel order to obtain a fourth channel; and to output the first target audio based on the fourth channel.

[0128] Volume adjuster 202 is used to globally adjust the volume corresponding to the first channel and output the first target audio based on the adjusted volume.

[0129] The audio output device provided by the present invention will be described below. The audio output device described below can be referred to in correspondence with the audio output method described above.

[0130] As shown in Figure 3, this is a schematic diagram of the audio output device provided by the present invention, which may include:

[0131] The acquisition module 301 is used to acquire the output mode of the first audio to be input, which includes a specified channel mode or a non-specified channel mode.

[0132] The processing module 302 is configured to: determine multiple target channels corresponding to the specified channel mode from all channels of the first audio to be input when the output mode includes the specified channel mode; determine a first channel based on the second audio to be input and the target channel; output a first target audio based on the first channel; determine multiple second channels corresponding to the non-specified channel mode from all channels of the first audio to be input when the output mode includes the non-specified channel mode; adjust the current volume corresponding to the second channel to obtain an output volume; and output a second target audio based on the output volume.

[0133] Optionally, the number of channels corresponding to the second audio input channel is the same as the number of channels of the target channel. The processing module 302 is specifically used to mix the first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second audio input channel to obtain a mixed audio bitstream; and to mix the channels corresponding to the mixed audio bitstream to obtain the first channel.

[0134] Optionally, the processing module 302 is specifically used to perform sampling rate conversion on the first audio bitstream in the target channel to obtain a second audio bitstream, wherein the sampling rate of the second audio bitstream is within a preset sampling rate range; to perform sampling rate conversion on the target audio bitstream in the corresponding channel of the second audio to be input to obtain a third audio bitstream, wherein the sampling rate of the third audio bitstream is within the preset sampling rate range; and to mix the second audio bitstream and the third audio bitstream to obtain a mixed audio bitstream.

[0135] Optionally, the processing module 302 is specifically used for at least one of the following: adjusting the first channel using an equalizer to obtain a third channel, and outputting the first target audio based on the third channel; mapping the first channel using a dynamic range controller to obtain at least one of the third channels, and outputting the first target audio based on the third channel; determining other channels besides the target channel from all the channels; splicing the first channel with the other channels according to a preset channel order to obtain a fourth channel; outputting the first target audio based on the fourth channel; and globally adjusting the volume corresponding to the first channel, and outputting the first target audio based on the adjusted volume.

[0136] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an audio output method provided by the methods described above. The method includes: acquiring an output mode of a first input audio, the output mode including a specified channel mode or a non-specified channel mode; if the output mode includes the specified channel mode, determining a plurality of target channels corresponding to the specified channel mode from all channels of the first input audio; determining a first channel based on a second input audio and the target channels; outputting a first target audio based on the first channel; if the output mode includes the non-specified channel mode, determining a plurality of second channels corresponding to the non-specified channel mode from all channels of the first input audio; adjusting the current volume corresponding to the second channel to obtain an output volume; and outputting a second target audio based on the output volume.

[0137] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An audio output method, characterized in that, include: Obtain the output mode of the first audio to be input, wherein the output mode includes a specified channel mode or a non-specified channel mode; When the output mode includes the specified channel mode, multiple target channels corresponding to the specified channel mode are determined from all channels of the first audio to be input. The first channel is determined based on the second audio input and the target channel; Based on the first channel, output the first target audio; When the output mode includes the non-specified channel mode, a plurality of second channels corresponding to the non-specified channel mode are determined from all channels of the first audio to be input. Adjust the current volume corresponding to the second channel to obtain the output volume; Based on the output volume, output the second target audio. The number of channels corresponding to the second audio input channel is the same as the number of channels of the target channel. Determining the first channel based on the second audio input channel and the target channel includes: The first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second input audio channel are mixed to obtain a mixed audio bitstream; The channels corresponding to the mixed audio bitstream are mixed to obtain the first channel.

2. The method according to claim 1, characterized in that, The step of mixing the first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second input audio channel to obtain a mixed audio bitstream includes: The sampling rate of the first audio bitstream in the target channel is converted to obtain the second audio bitstream, and the sampling rate of the second audio bitstream is within the preset sampling rate range; The sampling rate of the target audio stream in the channel corresponding to the second audio input is converted to obtain a third audio stream, wherein the sampling rate of the third audio stream is within the preset sampling rate range. The second audio stream and the third audio stream are mixed to obtain a mixed audio stream.

3. The method according to any one of claims 1-2, characterized in that, The step of outputting the first target audio based on the first channel includes at least one of the following: The first channel is adjusted using an equalizer to obtain a third channel, and the first target audio is output based on the third channel. as well as, The first channel is mapped using a dynamic range controller to obtain a third channel, and the first target audio is output based on the third channel. as well as, Identify the channels other than the target channel from all the channels mentioned above; According to a preset channel order, the first channel is spliced ​​with the other channels to obtain the fourth channel; based on the fourth channel, the first target audio is output; as well as, The volume of the first channel is adjusted globally, and the first target audio is output based on the adjusted volume.

4. An electronic device, characterized in that, include: A processor is configured to acquire the output mode of a first audio input, the output mode including a specified channel mode or a non-specified channel mode. When the output mode includes the specified channel mode, multiple target channels corresponding to the specified channel mode are determined from all channels of the first audio to be input. The first channel is determined based on the second audio input and the target channel; Based on the first channel, output the first target audio; When the output mode includes the non-specified channel mode, a plurality of second channels corresponding to the non-specified channel mode are determined from all channels of the first audio to be input. The volume adjuster is used to adjust the current volume corresponding to the second channel to obtain the output volume. The processor is also configured to output a second target audio based on the output volume; The processor includes: a stream mixer and a channel mixer. The stream mixer is used to mix the first audio stream corresponding to the target channel and the target audio stream corresponding to the second input audio channel to obtain a mixed audio stream; The channel mixer is used to mix the channels corresponding to the mixed audio bitstream to obtain the first channel.

5. The electronic device according to claim 4, characterized in that, The processor also includes: an asynchronous sampling rate converter. The asynchronous sampling rate converter is used to convert the sampling rate of the first audio bitstream in the target channel to obtain a second audio bitstream, wherein the sampling rate of the second audio bitstream is within a preset sampling rate range; and to convert the sampling rate of the target audio bitstream in the channel corresponding to the second audio to be input to obtain a third audio bitstream, wherein the sampling rate of the third audio bitstream is within the preset sampling rate range. The stream mixer is specifically used to mix the second audio stream and the third audio stream to obtain a mixed audio stream.

6. The electronic device according to any one of claims 4-5, characterized in that, The processor includes at least one of an equalizer and a dynamic range controller, and an output unit; The equalizer is used to adjust the first channel to obtain the third channel; The dynamic range controller is used to map the first channel to obtain the third channel; The output device is used to output the first target audio based on the third channel; The processor is specifically configured to determine, from all channels except the target channel, other channels; concatenate the first channel with the other channels according to a preset channel order to obtain a fourth channel; and output the first target audio based on the fourth channel. The volume adjuster is specifically used to globally adjust the volume corresponding to the first channel, and output the first target audio based on the adjusted volume.

7. An audio output device, characterized in that, include: The acquisition module is used to acquire the output mode of the first audio to be input, wherein the output mode includes a specified channel mode or a non-specified channel mode; The processing module is configured to determine, when the output mode includes the specified channel mode, multiple target channels corresponding to the specified channel mode from all channels of the first audio to be input; The first channel is determined based on the second audio input and the target channel; Based on the first channel, output the first target audio; When the output mode includes the non-specified channel mode, a plurality of second channels corresponding to the non-specified channel mode are determined from all channels of the first audio to be input. Adjust the current volume corresponding to the second channel to obtain the output volume; Based on the output volume, output the second target audio. The number of channels corresponding to the second input audio channel is the same as the number of channels of the target channel. The processing module is specifically used for: The first audio bitstream corresponding to the target channel and the target audio bitstream corresponding to the second input audio channel are mixed to obtain a mixed audio bitstream; The channels corresponding to the mixed audio bitstream are mixed to obtain the first channel.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the audio output method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Finite sound source multi-channel sound field system and sound field analogy method

    CN101001485A

  • Television audio device and method

    CN103873797A