Audio channel selection method and apparatus, storage medium, and vehicle

By analyzing the audio sequence output from the audio channels in the vehicle, the channel with the best sound quality is selected for voice playback, which solves the problem of poor audio quality caused by fixed audio channels and improves user experience and sound quality.

CN116225359BActive Publication Date: 2025-11-07HUAWEI DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111477265.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-11-07
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

In existing technologies, the fixed use of vehicle audio channels may not result in optimal audio quality, affecting user experience.

Method used

By sending audio sequences to each audio channel, collecting and analyzing the output audio sequences, the audio channel with the best sound quality is determined, and that channel is selected for playback when acquiring voice services.

Benefits of technology

It improves the sound quality during voice calls, enhances the user experience, and reduces the risk of playback errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225359B_ABST
    Figure CN116225359B_ABST
Patent Text Reader

Abstract

The application relates to an audio channel selection method and device, a storage medium and a vehicle. The method comprises the following steps: sending a first audio sequence to each audio channel, collecting each second audio sequence output by each audio channel; determining one audio channel with the best sound quality corresponding to each second audio sequence according to the second audio sequence; and selecting the one audio channel with the best sound quality to play voice when a voice service is acquired. According to the embodiment of the application, the second audio sequence is collected, and one audio channel with the best sound quality corresponding to the second audio sequence is determined, so that when the voice service is acquired, the one audio channel with the best sound quality can be selected to play voice, the channel currently playing voice is selected according to the audio quality, the sound quality of playing voice can be better when the user makes a voice call on the vehicle, and the experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of audio technology, and in particular to an audio channel selection method and device, a storage medium and a vehicle. BACKGROUND

[0002] With the rapid development of science and technology, vehicles have become an indispensable means of transportation for our travel, and the current requirements for cars are no longer just a means of transportation, but are endowed with more functions. For example, voice calls and audio playback on vehicles, etc. In these scenarios, the better the audio quality, the better the user experience.

[0003] Currently, each audio channel on a vehicle is usually used for a fixed scenario. In this case, the selected audio channel may not be able to make the current audio quality optimal, thereby providing a poor user experience. Therefore, there is an urgent need for an audio channel selection method that can improve audio quality. SUMMARY

[0004] In view of this, an audio channel selection method, device, storage medium and vehicle are proposed.

[0005] In a first aspect, an embodiment of the present application provides an audio channel selection method. The method is used in a vehicle and includes: sending a first audio sequence to each audio channel, collecting a second audio sequence output by each audio channel; determining one audio channel with the best audio quality corresponding to the second audio sequence according to the second audio sequence; and selecting the one audio channel with the best audio quality to play voice when a voice service is acquired.

[0006] According to the embodiments of the present application, by collecting the second audio sequence, one audio channel with the best audio quality corresponding to the second audio sequence is determined. Therefore, when a voice service is acquired, the one audio channel with the best audio quality can be selected to play voice, which realizes selection of a channel to play voice according to audio quality, can make the audio quality better when voice is played when a user makes a voice call on a vehicle, and improves the user experience.

[0007] According to the first aspect, in a first possible implementation manner of the audio channel selection method, determining one audio channel with the best audio quality corresponding to the second audio sequence according to the second audio sequence includes: determining each sample frame by performing framing and windowing on the second audio sequence according to a predetermined frame length and a predetermined frame shift; determining each index value of each audio channel according to the sample frame; and determining one audio channel with the best audio quality corresponding to the second audio sequence according to each index value of each audio channel and a preset weight corresponding to each index value.

[0008] According to the embodiments of the present application, by performing framing and windowing on the second audio sequence, the second audio sequence can be processed to determine the index value, by using the index value and the preset weight corresponding to each index value, the audio channel with the best sound quality corresponding to the second audio sequence can be determined, which can make the sound quality of each second audio sequence determined more accurate, so that the audio channel with better sound quality can be determined, and when the voice service is acquired, the voice played has better sound quality, and the user experience is improved.

[0009] According to the second possible implementation manner of the audio channel selection method, in the first possible implementation manner of the first aspect, the index value includes a first index value, and the method further includes: determining the first index value of each audio channel according to the sampling rate and / or quantization precision of the sample frame.

[0010] According to the embodiments of the present application, by using the sampling rate and / or quantization precision to determine the first index value, the sound quality of each second audio sequence can be more accurately quantified, so that the audio channel with better sound quality can be determined, and when the voice service is acquired, the voice played has better sound quality.

[0011] According to the third possible implementation manner of the audio channel selection method, in the first or second possible implementation manner of the first aspect, the index value includes a second index value, and the method further includes: determining the number of invalid frames in the sample frame, the invalid frame being a frame in which the number of points meeting a preset condition in each sampling point of the sample frame is greater than a predetermined threshold, the point meeting the preset condition being determined according to the amplitude of each sampling point; and determining the second index value of each audio channel according to the number of invalid frames.

[0012] According to the embodiments of the present application, by using the number of invalid frames to determine the second index value, the sound quality of each second audio sequence can be more accurately quantified, so that the audio channel with better sound quality can be determined, and when the voice service is acquired, the voice played has better sound quality.

[0013] According to the fourth possible implementation manner of the audio channel selection method, in the first, second or third possible implementation manner of the first aspect, the index value includes a third index value, and the method further includes: determining the cutoff frequency of each sample frame according to the frequency of the head, the frequency of the tail and the maximum roll-off value of each sample frame, the maximum roll-off value being the difference between the power value of the head and the power value of the tail of the sample frame; and determining the third index value of each audio channel according to the cutoff frequency of each sample frame.

[0014] According to the embodiment of the present application, the third index value is determined by using the cutoff frequency, the quality of the second audio sequence can be quantified more accurately, and thus the audio channel with the best quality can be determined, so that the quality of the played voice is better when the voice service is acquired.

[0015] In a fifth possible implementation of the audio channel selection method according to the first, second, third or fourth possible implementation of the first aspect, the index value includes a fourth index value, and the index value of each audio channel is determined according to the sample frame, including: performing Fourier transform on each sample frame to obtain a transformed sample frame; determining two sub-band signals with the same bandwidth in the positive frequency component according to the transformed sample frame; and determining the fourth index value of each audio channel according to the energy value of the two sub-band signals.

[0016] According to the embodiment of the present application, the fourth index value is determined by using the energy value of the sub-band signal, the quality of the second audio sequence can be quantified more accurately, and thus the audio channel with the best quality can be determined, so that the quality of the played voice is better when the voice service is acquired.

[0017] In a sixth possible implementation of the audio channel selection method according to the first, second, third, fourth or fifth possible implementation of the first aspect, the index value includes a fifth index value, and the index value of each audio channel is determined according to the sample frame, including: performing wavelet transform on each sample frame to obtain a high-frequency component and a low-frequency component of the transformed sample frame; and determining the fifth index value of each audio channel according to the high-frequency component and the low-frequency component.

[0018] According to the embodiment of the present application, the fifth index value is determined by using the high-frequency component and the low-frequency component, the quality of the second audio sequence can be quantified more accurately, and thus the audio channel with the best quality can be determined, so that the quality of the played voice is better when the voice service is acquired.

[0019] In a seventh possible implementation of the audio channel selection method according to the first aspect or the first, second, third, fourth, fifth or sixth possible implementation of the first aspect, one audio channel with the best quality corresponding to the second audio sequence is determined according to the second audio sequence, including: determining whether each audio channel has a fault according to the second audio sequence; and determining one audio channel with the best quality corresponding to the second audio sequence and without the fault.

[0020] According to the embodiment of the present application, by determining whether each audio channel has a fault, the audio channel with the fault can be excluded, so that the risk of playing abnormally is reduced when the voice is played, and thus the experience of the user can be improved.

[0021] In a eighth possible implementation of the method for selecting an audio channel according to the first aspect or the first, second, third, fourth, fifth or sixth possible implementation of the first aspect, the audio channel comprises at least one of a speaker channel, a line-out channel and a universal serial bus (USB) audio channel.

[0022] In this way, an audio channel with better sound quality can be flexibly selected to improve the user experience.

[0023] In a second aspect, an embodiment of the present application provides an audio channel selection device, the device being used in a vehicle, the device comprising: a sending and collecting module configured to send a first audio sequence to each audio channel and collect a second audio sequence output by each audio channel; a determining module configured to determine one audio channel with the best sound quality corresponding to the second audio sequence according to the second audio sequence; and a selecting module configured to select the one audio channel with the best sound quality to play voice when a voice service is acquired.

[0024] In a first possible implementation of the device for selecting an audio channel according to the second aspect, the determining module comprises: dividing and windowing the second audio sequence according to a predetermined frame length and a predetermined frame shift to determine each sample frame; determining each index value of each audio channel according to the sample frame; and determining one audio channel with the best sound quality corresponding to the second audio sequence according to each index value of each audio channel and a preset weight corresponding to each index value.

[0025] In a second possible implementation of the device for selecting an audio channel according to the first possible implementation of the second aspect, the index value comprises a first index value, and the determining each index value of each audio channel according to the sample frame comprises: determining each first index value of each audio channel according to a sampling rate and / or quantization accuracy of the sample frame.

[0026] In a third possible implementation of the device for selecting an audio channel according to the first or second possible implementation of the second aspect, the index value comprises a second index value, and the determining each index value of each audio channel according to the sample frame comprises: determining a number of invalid frames in the sample frame, the invalid frame being a frame in which a number of points meeting a preset condition in each sampling point of the sample frame is greater than a predetermined threshold, the point meeting the preset condition being determined according to an amplitude of each sampling point; and determining each second index value of each audio channel according to the number of invalid frames.

[0027] According to the first, second, or third possible implementation of the second aspect, in a fourth possible implementation of the audio channel selection device, the index value includes a third index value. Determining each index value for each audio channel based on the sample frames includes: determining the cutoff frequency of each sample frame based on the frequency of the header, the frequency of the tail, and the maximum roll-off value, wherein the maximum roll-off value is the difference between the power value of the header and the power value of the tail of the sample frame; and determining each third index value for each audio channel based on the cutoff frequency of each sample frame.

[0028] According to the first, second, third, or fourth possible implementation of the second aspect, in the fifth possible implementation of the audio channel selection device, the index value includes a fourth index value. Determining each index value of each audio channel based on the sample frames includes: performing a Fourier transform on each sample frame to obtain a transformed sample frame; determining two sub-band signals with the same bandwidth in the positive frequency components based on the transformed sample frames; and determining each fourth index value of each audio channel based on the energy values ​​of the two sub-band signals.

[0029] According to the first, second, third, fourth, or fifth possible implementation of the second aspect, in the sixth possible implementation of the audio channel selection device, the index value includes a fifth index value. Determining each index value of each audio channel based on the sample frame includes: performing wavelet transform on each sample frame to obtain the high-frequency and low-frequency components of the transformed sample frame; and determining each fifth index value of each audio channel based on the high-frequency and low-frequency components.

[0030] According to the second aspect or the first, second, third, fourth, fifth or sixth possible implementation of the second aspect, in the seventh possible implementation of the audio channel selection device, the determining module includes: determining whether each audio channel has a fault based on each second audio sequence; and determining an audio channel that has no fault and has the best sound quality corresponding to the second audio sequence.

[0031] According to the second aspect or the first, second, third, fourth, fifth, sixth or seventh possible implementation of the second aspect, in the eighth possible implementation of the audio channel selection device, the audio channel includes at least one of a speaker channel, a line output channel and a Universal Serial Bus (USB) audio channel.

[0032] Thirdly, embodiments of this application provide an audio channel selection device, the device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement one or more of the audio channel selection methods described in the first aspect or various possible implementations of the first aspect when executing the instructions.

[0033] In a fourth aspect, embodiments of the present application provide a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the audio channel selection method of the first aspect or one or more of the possible implementation manners of the first aspect.

[0034] In a fifth aspect, embodiments of the present application provide a terminal device, which can execute the audio channel selection method of the first aspect or one or more of the possible implementation manners of the first aspect.

[0035] In a sixth aspect, embodiments of the present application provide a computer program product comprising computer readable code or a non-transitory computer readable storage medium carrying computer readable code, which when run in an electronic device, causes a processor in the electronic device to execute the audio channel selection method of the first aspect or one or more of the possible implementation manners of the first aspect.

[0036] These and other aspects of the present application will become more fully understood from the following (a few) embodiment descriptions. BRIEF DESCRIPTION OF DRAWINGS

[0037] The accompanying drawings, which are incorporated in and form a part of the specification, illustrate one or more embodiments, features, and aspects of the present application and, together with the description, serve to explain the principles of the present application.

[0038] Figure 1 A schematic diagram showing an application scenario according to an embodiment of the present application.

[0039] Figure 2 A flow chart showing an audio channel selection method according to an embodiment of the present application.

[0040] Figure 3 A flow chart showing an audio channel selection method according to an embodiment of the present application.

[0041] Figure 4a A schematic diagram showing a path corresponding to a LINEOUT channel according to an embodiment of the present application.

[0042] Figure 4b A schematic diagram showing a path corresponding to a USB AUDIO channel according to an embodiment of the present application.

[0043] Figure 4c A schematic diagram showing a path corresponding to a SPK channel according to an embodiment of the present application.

[0044] Figure 5 A flow chart showing an audio channel selection method according to an embodiment of the present application.

[0045] Figure 6 FIG. 1 shows a structural diagram of an audio channel selection device according to an embodiment of the present application.

[0046] Figure 7 FIG. 2 shows a structural diagram of an electronic device 100 according to an embodiment of the present application. DETAILED DESCRIPTION

[0047] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in different drawings represent the same or similar elements. Although various aspects of the embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

[0048] The term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.

[0049] In addition, for the purpose of convenience and brevity, detailed descriptions of well-known functions and structures incorporated in the application will be omitted. It will be appreciated that those skilled in the art will be able to devise various modes of implementing the application without the benefits of these particulars. In some instances, well-known methods, structures, materials, and techniques have not been described in detail in order to avoid obscuring the application.

[0050] With the rapid development of science and technology, vehicles have become an indispensable means of transportation for our travel, and the current requirements for cars are no longer just a means of transportation, but are endowed with more functions. For example, making voice calls, playing audio, etc. on vehicles, in these scenarios, the better the audio quality, the better the user experience.

[0051] Currently, on vehicles, each audio channel is usually used for a fixed scenario, for example, the speaker (SPK) channel in the speaker SPK is only connected with the T-Box, which is used for emergency calls (ECALL); the line output (LINEOUT) channel is only used for breakdown calls (BCALL); the universal serial bus audio (USBAUDIO) channel is only used for voice calls, i.e. bluetooth calls (BTCALL). The audio channel determined by this fixed channel method may not be able to make the current audio quality optimal, thereby giving the user a poor experience. Therefore, there is an urgent need for an audio channel selection method that can improve the audio quality.

[0052] In view of this, the application provides an audio channel selection method. The audio channel selection method can be used in a vehicle. The first audio sequence is sent to each audio channel, and each second audio sequence output by each audio channel is collected. According to each second audio sequence, one audio channel with the best sound quality corresponding to the second audio sequence is determined. When a voice service is acquired, the one audio channel with the best sound quality is selected to play voice. The audio quality of the second audio sequence is detected, the channel currently playing voice is selected according to the audio quality, the sound quality of voice playing is better when a user makes a voice call in the vehicle, and the user experience is improved.

[0053] Figure 1 A schematic diagram of an application scenario according to an embodiment of the application is shown. As shown in the figure, Figure 1 The audio channel selection method can be used in a vehicle. The vehicle can be provided with an electronic control unit (ECU). The ECU can be a vehicle T-Box, a vehicle machine or a combination of the two. The ECU can be used to detect the sound quality of voice played by each audio channel and determine the audio channel with the best sound quality. When a voice service is acquired, the audio channel with the best sound quality is selected to play voice. The vehicle can also be provided with a loudspeaker. The loudspeaker can be connected to the T-Box and / or the vehicle machine. When a voice service is acquired, the loudspeaker plays voice according to the selected audio channel.

[0054] In a possible implementation, the audio channel selection method of the embodiment of the present application can be used in a scenario in which a user makes a voice call on a vehicle. In this scenario, the triggered voice service type can be any one of ECALL, BCALL, and BTCALL, which can be triggered by the user or sent by the base station to determine. According to the triggered voice service type, a corresponding audio channel can be selected. In the prior art, these different voice service types usually have corresponding audio channels for voice playing, for example, ECALL corresponds to the SPK channel, BCALL corresponds to the LINEOUT channel, and BTCALL corresponds to the USB AUDIO channel. According to the method of the embodiment of the present application, the ECU can send a first audio sequence to each audio channel, collect each second audio sequence output by the audio channel, and determine an audio channel with the best sound quality corresponding to the second audio sequence according to the second audio sequence. Thus, if a voice service is obtained, for example, the user makes an ECALL voice call, and it is determined that the LINEOUT channel is the audio channel with the best sound quality among the SPK channel, the LINEOUT channel, and the USB AUDIO channel, the LINEOUT channel corresponding to better sound quality can be selected for voice playing, instead of the original SPK channel corresponding to the ECALL service.

[0055] According to the embodiment of the present application, since the audio channel with the best sound quality is selected for voice playing, the user can hear better voice quality when making a voice call, and the user experience can be improved.

[0056] It should be noted that the present application can also be used in other scenarios of playing voice on a vehicle, and the present application does not limit this.

[0057] Figure 2 A flowchart of an audio channel selection method according to an embodiment of the present application is shown. The method can be used in a vehicle, for example, an ECU on the vehicle, which can include an audio channel selection system, an audio driving system, a codec, and an amplifier (PA). As shown in Figure 2 The method includes the following steps.

[0058] In step S201, the audio channel selection system sends a first audio sequence to each audio channel and collects each second audio sequence output by the audio channel.

[0059] The first audio sequence can be sent to each audio channel every preset time (for example, 30 minutes), or at a preset time point, each second audio sequence output by each audio channel is collected, and the subsequent steps are performed, which are not limited in the present application. Thus, the selection result of the audio channel can be updated, so that the audio channel with the highest sound quality at present can be selected for voice playing when the voice service is acquired.

[0060] The audio channel can include at least one of an SPK channel, a LINEOUT channel, and a USB AUDIO channel. The first audio sequence can be composed of one or more pieces of audio data, the sampling rate and / or quantization accuracy of each piece of audio data can be different, the first audio sequence can be pre-configured in the audio channel selection system, or can be input into the audio channel selection system, the sampling rate and / or quantization accuracy of each piece of audio data can be determined as needed, which is not limited in the present application, and other parameters of each piece of audio data can also be determined as needed, which is also not limited in the present application.

[0061] Each time step S201 is performed, the same first audio sequence can be played to different audio channels, and each second audio sequence output by each audio channel is collected. By detecting the sound quality of each second audio sequence, the audio channel corresponding to the second audio sequence with the best sound quality can be determined. Thus, before the next execution of step S201 and the subsequent steps to update the audio channel selection result, if a voice service is acquired, the audio channel can be selected for voice playing, so that the sound quality of the voice heard by the user can be better.

[0062] In step S202, the audio channel selection system determines one audio channel with the best sound quality corresponding to each second audio sequence according to each second audio sequence.

[0063] In one possible implementation, whether each audio channel has a fault in the process of voice playing can be determined first, so that the audio channel with the fault can be excluded. The process can be referred to Figure 3 :

[0064] Figure 3 A flowchart of an audio channel selection method according to an embodiment of the present application is shown. As shown in Figure 3 , in step S202, the following steps are included:

[0065] In step S301, whether each audio channel has a fault is determined according to each second audio sequence.

[0066] For each audio channel, whether a line fault such as a line disconnection exists in the path corresponding to the audio channel can be determined according to the second audio sequence, so as to determine whether a fault exists in the audio channel. For example, when the second audio sequence is an empty sequence, or the amplitude corresponding to the second audio sequence is much lower than the amplitude of the first audio sequence (for example, the average amplitude is less than 5% of the average amplitude of the first audio sequence), it can be considered that the path corresponding to the audio channel has a line disconnection, that is, the corresponding audio channel has a fault. The way of determining whether a fault exists in each audio channel according to each second audio sequence can also be other manners, which are not limited in the present application.

[0067] For example, the paths corresponding to the SPK channel, the LINEOUT channel, and the USB AUDIO channel can be seen from Figures 4a-4c .

[0068] Figure 4a A schematic diagram of the path corresponding to the LINEOUT channel according to an embodiment of the present application is shown. As shown in Figure 4a , the path corresponding to the LINEOUT channel can include a T-Box, a car machine, a microphone (MIC), an Antenna, and a speaker (SPK), wherein the T-Box can include a digital signal processing (DSP) and a codec (Codec). The arrows in the figure can correspond to the lines in the path, indicating the flow direction of the audio data. After the microphone inputs the audio data, the audio data can be encoded by the Codec and sent to the DSP for processing. After the data is processed by the DSP, it can be sent to the Antenna, which can be used for communication with the base station to realize a call. The DSP can receive the returned audio data and send it to the Codec for decoding and sending to the car machine, which can send it to the speaker for playing, thereby realizing voice communication on the vehicle.

[0069] Figure 4b A schematic diagram of the path corresponding to the USB AUDIO channel according to an embodiment of the present application is shown. As shown in Figure 4bAs shown, in the passage corresponding to the USB AUDIO channel, T-Box, car machine, microphone MIC, Antenna and speaker SPK can be included, wherein T-Box can include digital signal processing DSP, codec and OM module, and the car machine can include codec. The arrows in the figure can correspond to the lines in the passage, indicating the flow direction of the audio data. After the microphone inputs the audio data, the audio data can be encoded by the codec on the T-Box and sent to the DSP for processing, and after the DSP processes the data, the data can be sent to the Antenna. The Antenna can be used to communicate with the baseline to realize the call, obtain the audio data returned in the communication process, and the DSP can receive the returned audio data and send it to the OM module. The OM module can be a process module in the processor of the T-Box, which can be used for data transmission and sending data to the codec on the car machine for decoding. After the codec on the car machine decodes, it is sent to the speaker for playing, thereby realizing the voice call on the vehicle.

[0070] Figure 4c A passage corresponding to the SPK channel is shown according to an embodiment of the application. As shown, Figure 4c In the passage corresponding to the SPK channel, T-Box, microphone MIC, Antenna and speaker SPK can be included, wherein T-Box can include digital signal processing DSP, codec and amplifier PA. The arrows in the figure can correspond to the lines in the passage, indicating the flow direction of the audio data. After the microphone inputs the audio data, the audio data can be encoded by the codec and sent to the DSP for processing, and after the DSP processes the data, the data can be sent to the Antenna. The Antenna can be used to communicate with the baseline to realize the call, obtain the audio data returned in the communication process, and the DSP can receive the returned audio data and send it to the codec for decoding and sending to the amplifier PA, which is sent to the speaker for playing, thereby realizing the voice call on the vehicle.

[0071] If a certain audio channel fails, it can be caused by the disconnection of the line corresponding to one or more arrows in the passage corresponding to the audio channel in the above Figures 4a-4c In one possible implementation, in step S201, the second audio sequence received by the speaker can be collected by the audio channel selection system. For example, as shown in Figure 4a , the second audio sequence sent by the car machine to the speaker can be collected; as shown in Figure 4b , the second audio sequence sent by the codec on the car machine to the speaker can be collected; as shown in Figure 4c , the second audio sequence sent by the amplifier to the speaker can be collected.

[0072] Step S302, determining that there is no fault and one audio channel corresponding to the second audio sequence is optimal in sound quality.

[0073] In this way, the audio channel with fault can be excluded, so that the risk of playing abnormity is reduced when voice playing is performed, thereby the experience of the user can be improved.

[0074] In a possible implementation, in the process of determining one audio channel corresponding to the second audio sequence which is optimal in sound quality, the indicator values of the second audio sequence can also be determined to determine the sound quality of each second audio sequence, so as to determine the audio channel corresponding to the second audio sequence which is optimal in sound quality. The process can refer to Figure 5 .

[0075] Figure 5 A flow chart of an audio channel selection method according to an embodiment of the present application is shown. As shown in Figure 5 , step S202 includes:

[0076] Step S501, according to a predetermined frame length and a predetermined frame shift, the second audio sequence is framed and windowed to determine each sample frame.

[0077] The predetermined frame length and frame shift can be set as needed, and the frame shift can be used to avoid too large signal change between adjacent two sample frames. By windowing, the signal of each sample frame obtained after the second audio sequence is framed can become continuous, and each sample frame can exhibit the characteristics of a periodic function, which is convenient for subsequent processing to determine the indicator value.

[0078] Step S502, according to the sample frame, the indicator value of each audio channel is determined.

[0079] Each audio channel can have a corresponding indicator value, and the indicator value can be used to indicate the sound quality of the corresponding second audio sequence.

[0080] In a possible implementation, the indicator value includes a first indicator value, and step S502 includes: according to the sampling rate and / or quantization accuracy of the sample frame, the first indicator value of each audio channel is determined.

[0081] The third indicator value can be determined according to the average value of the sampling rate and / or the average value of the quantization accuracy of each sample frame corresponding to the second audio sequence. The higher the average value of the sampling rate and / or the average value of the quantization accuracy of each sample frame in the second audio sequence, the higher the first indicator value of the corresponding audio channel.

[0082] In a possible implementation, the first index value of the corresponding audio channel can be determined according to the sampling rate and / or quantization accuracy of each sample frame. For example, the average value of the sampling rate and the average value of the quantization accuracy of each sample frame in each second audio sequence can be calculated. For the calculated sampling rate, 10 points are full marks, 2 points are given if the sampling rate is below 8k, 4 points are given if the sampling rate is between 8k and 16k, and so on. For the calculated quantization accuracy, 3 points are given if the quantization accuracy is 8 bits, 6 points are given if the quantization accuracy is 16 bits, and so on. The score corresponding to the sampling rate and the score corresponding to the quantization accuracy are added and divided by 2 (or can be weighted and added and then divided by 2), and the score of the second audio sequence can be obtained. The score can be taken as the first index value of the audio channel corresponding to the second audio sequence.

[0083] In a possible implementation, the index value includes a second index value, and step S502 includes: determining the number of invalid frames in the sample frame, and determining the second index value of each audio channel according to the number of invalid frames.

[0084] For example, the sample points meeting the preset condition in each sample frame can be sample points whose amplitudes are all greater than 0.9 in at least three adjacent sample points in the sample frame. The predetermined threshold value can be determined as needed. In this way, it can be determined whether the sample frame contains too much noise, so that the sample frame containing too much noise can be taken as an invalid frame.

[0085] For example, the sample points meeting the preset condition in each sample frame can be sample points whose amplitudes are all greater than 0.9 in at least three adjacent sample points in the sample frame. The predetermined threshold value can be determined as needed. In this way, it can be determined whether the sample frame contains too much noise, so that the sample frame containing too much noise can be taken as an invalid frame.

[0086] For example, the sample points meeting the preset condition in each sample frame can be sample points whose amplitudes are all greater than 0.9 in at least three adjacent sample points in the sample frame. The predetermined threshold value can be determined as needed. In this way, it can be determined whether the sample frame contains too much noise, so that the sample frame containing too much noise can be taken as an invalid frame.

[0087] In a possible implementation, the second index value of the corresponding audio channel can be determined according to the number of invalid frames in the sample frame. For example, 10 points are full marks, 10 points are given if the number of invalid frames is 0, 9 points are given if the number of invalid frames is 1 to 10, 8 points are given if the number of invalid frames is 10 to 20, and so on. The score can be taken as the second index value of the audio channel corresponding to the second audio sequence.

[0088] In a possible implementation, the index value includes a third index value, and step S502 includes: determining the cutoff frequency of each sample frame according to the frequency of the head, the frequency of the tail and the maximum roll-off value of each sample frame; and determining the third index value of each audio channel according to the cutoff frequency of each sample frame.

[0089] The maximum roll-off value is the difference between the power value of the head of the sample frame and the power value of the tail of the sample frame, where the head of the sample frame can refer to the first sampling point in the sample frame or a set number of the first sampling points, and the tail of the sample frame can refer to the last sampling point in the sample frame or a set number of the last sampling points. The cutoff frequency can be the frequency corresponding to the sampling point at which the power suddenly decreases or slowly decreases to a preset threshold value as the frequency of the head of the sample frame and the frequency of the tail of the sample frame increase, and the preset threshold value can be determined according to the maximum roll-off value (for example, 80% of the maximum roll-off value). Two cutoff frequencies can be determined for the head and the tail of the sample frame, respectively, and the average of the two cutoff frequencies is taken as the cutoff frequency of the sample frame.

[0090] The third index value corresponding to the audio channel can be determined according to the average of the cutoff frequencies of the sample frames corresponding to the second audio sequence. The third index value of the corresponding audio channel can be higher as the average of the cutoff frequencies of the sample frames in the second audio sequence is higher.

[0091] In a possible implementation, the cutoff frequencies of the sample frames can be scored to determine the third index value of the corresponding audio channel. For example, the average of the cutoff frequencies of the sample frames in each second audio sequence can be calculated, and for the calculated average of the cutoff frequencies, 10 points can be taken as full score, 10 points can be given if the cutoff frequency is 3400Hz to 3100Hz, 9 points can be given if the cutoff frequency is 3100Hz to 2800Hz, and so on. The score can be taken as the third index value of the audio channel corresponding to the second audio sequence.

[0092] In a possible implementation, the index value includes a fourth index value, and the step S502 includes: performing Fourier transform on each sample frame to obtain a transformed sample frame; determining two sub-band signals with the same bandwidth in the positive frequency component according to the transformed sample frame; and determining each fourth index value of each audio channel according to the energy values of the two sub-band signals.

[0093] For a certain transformed sample frame, two sub-band signals with the same bandwidth can be randomly selected from the positive frequency component. The difference between the energy values of the two sub-band signals can be calculated, and the fourth index value of the corresponding audio channel can be determined according to the average of the energy value differences of the sample frames corresponding to the second audio sequence.

[0094] The fourth index value of the corresponding audio channel can be greater as the average of the energy value differences of the sample frames in the second audio sequence is greater.

[0095] In a possible implementation, the difference values of the sample frames can be scored to determine the fourth index value of the corresponding audio channel. For example, the average value of the difference values of the sample frames in each second audio sequence can be calculated, and for the calculated average value, the difference values of the energy values correspond to preset intervals, and if the difference values of the energy values are in the preset interval corresponding to the upper limit value and the lower limit value, the higher the score is, and the score can be taken as the fourth index value of the audio channel corresponding to the second audio sequence.

[0096] In a possible implementation, the index value includes a fifth index value, and the step S502 includes: performing wavelet transform on the sample frames to obtain high-frequency components and low-frequency components of the transformed sample frames; and determining the fifth index value of each audio channel according to the high-frequency components and the low-frequency components.

[0097] The threshold values corresponding to the high-frequency components and the low-frequency components can be set respectively, the high-frequency components can be components with a frequency higher than a preset threshold in the transformed sample frames, and the low-frequency components can be components with a frequency lower than the preset threshold in the transformed sample frames. For a certain transformed sample frame, the sum of all high-frequency components can be obtained to obtain a high-frequency total amount, and the sum of all low-frequency components can be obtained to obtain a low-frequency total amount, and the difference between the high-frequency total amount and the low-frequency total amount is determined. The average value of the difference between the high-frequency total amount and the low-frequency total amount of the sample frames corresponding to the second audio sequence can be used to determine the fifth index value of the corresponding audio channel.

[0098] The average value of the difference between the high-frequency total amount and the low-frequency total amount of the sample frames in the second audio sequence can be greater, and the fifth index value of the corresponding audio channel can be greater.

[0099] In a possible implementation, the difference values of the sample frames can be scored to determine the fifth index value of the corresponding audio channel. For example, the average value of the difference values of the sample frames in each second audio sequence can be calculated, and for the calculated average value, the difference values of the energy values correspond to preset intervals, and if the difference values of the energy values are in the preset interval corresponding to the upper limit value and the lower limit value, the higher the score is, and the score can be taken as the fifth index value of the audio channel corresponding to the second audio sequence.

[0100] In a possible implementation, the index value includes a fifth index value, and the step S502 includes: performing wavelet transform on the sample frames to obtain high-frequency components and low-frequency components of the transformed sample frames; and determining the fifth index value of each audio channel according to the high-frequency components and the low-frequency components.

[0101] The weight can be preset as required. For a certain audio channel, each index value (for example, at least one of the first to fifth index values described above) and its corresponding preset weight can be multiplied to obtain a total score. The second audio sequence corresponding to the highest total score can be selected as the second audio sequence with the best sound quality, and the audio channel corresponding to the second audio sequence is determined.

[0102] According to the embodiments of the present application, the sound quality of the second audio sequence is determined by using the index value and the corresponding weight, which can make the sound quality of each determined second audio sequence more accurate, so as to determine the audio channel with better sound quality, so that the voice quality played when the voice service is obtained is better, and the user experience is improved.

[0103] In a possible implementation, the weight can be set to 0.2. A calculation method of the total score z can be seen from formula (1):

[0104] z = 0.2x + 0.2y + 0.2c + 0.2v + 0.2b formula (1)

[0105] Wherein, x, y, c, v, b can represent the first index value, the second index value, the third index value, the fourth index value and the fifth index value respectively.

[0106] In a possible implementation, if it is judged whether the audio channel has a fault, when determining the total score z, a parameter n can be multiplied on the basis of formula (1). When the corresponding audio channel has a fault, the value of n is 0, otherwise, the value of n is 1, so as to exclude the audio channel with a fault. See formula (2):

[0107] z = n * (0.2x + 0.2y + 0.2c + 0.2v + 0.2b) formula (2)

[0108] After determining the audio channel with the best sound quality, the audio channel selection system can send the result to the audio driving system. The audio driving system can configure the codec and the PA according to the result, and the corresponding audio channel, so that when the voice service is obtained subsequently, the audio channel can be selected for voice playing.

[0109] Step S203, the audio channel selection system selects the audio channel with the best sound quality for voice playing when the voice service is obtained.

[0110] For example, if it is determined in step S202 that the LINEOUT channel is the channel with the best sound quality corresponding to the second audio sequence, then when a voice service (such as an ECALL service) is acquired, the LINEOUT channel can be selected for voice playing. The voice service can be a voice notification sent by a base station to a vehicle, or a response returned by another party in a call with a user on the vehicle (for example, it can be a voice service received from an Antenna antenna in the application scenario of Figure 4a , Figure 4b , Figure 4c If steps S201 and S202 are re-executed 30 minutes later, the selection result of the audio channel is updated, and it is determined in step S202 that the SPK channel is the channel with the best sound quality corresponding to the second audio sequence, then after that, in step S203, when a voice service is acquired, the SPK channel can be selected for voice playing. Until the next time the selection result of the audio channel is updated.

[0111] The path for voice playing using each audio channel can refer to the above Figures 4a-4c .

[0112] Figure 6 A structural diagram of an audio channel selection apparatus according to an embodiment of the present application is shown. The apparatus is used in a vehicle, as shown in Figure 6 The apparatus includes:

[0113] A sending and collecting module 601 is configured to send a first audio sequence to each audio channel, and collect each second audio sequence output by each audio channel.

[0114] A determining module 602 is configured to determine one audio channel with the best sound quality corresponding to the second audio sequence according to each second audio sequence.

[0115] A selecting module 603 is configured to select the one audio channel with the best sound quality to play a voice when a voice service is acquired.

[0116] According to the embodiments of the present application, by collecting the second audio sequence, one audio channel with the best sound quality corresponding to the second audio sequence is determined, so that when a voice service is acquired, the one audio channel with the best sound quality can be selected for voice playing. The channel for current voice playing is selected according to the audio quality, so that the sound quality of voice playing is better when a user makes a voice call on a vehicle, and the user experience is improved.

[0117] In a possible implementation, the audio channel includes at least one of a speaker channel, a LINEOUT channel, and a universal serial bus (USB) audio channel.

[0118] Therefore, an audio channel with better sound quality can be flexibly selected to improve user experience.

[0119] In a possible implementation, the determining module comprises: determining whether each audio channel is faulty according to each second audio sequence; and determining one audio channel corresponding to each second audio sequence and having the best sound quality and no fault.

[0120] According to the embodiments of the present application, by determining whether each audio channel is faulty, an audio channel with fault can be excluded, so that the risk of playing abnormally is reduced when playing voice, and thus user experience can be improved.

[0121] In a possible implementation, the determining module comprises: performing framing and windowing on the second audio sequence according to a predetermined frame length and a predetermined frame shift to determine each sample frame; determining each index value of each audio channel according to the sample frame; and determining one audio channel corresponding to each second audio sequence and having the best sound quality according to each index value of each audio channel and a preset weight corresponding to each index value.

[0122] According to the embodiments of the present application, by performing framing and windowing on the second audio sequence, the second audio sequence can be processed to determine the index value, and by using the index value and the preset weight corresponding to each index value, one audio channel corresponding to each second audio sequence and having the best sound quality can be determined, so that the sound quality of each second audio sequence determined is more accurate, and thus one audio channel with better sound quality can be determined, and the sound quality of played voice is better when the voice service is acquired, and user experience is improved.

[0123] In a possible implementation, the index value comprises a first index value, and the determining each index value of each audio channel according to the sample frame comprises: determining each first index value of each audio channel according to a sampling rate and / or quantization precision of the sample frame.

[0124] According to the embodiments of the present application, by using the sampling rate and / or quantization precision to determine each first index value, the sound quality of each second audio sequence can be more accurately quantified, and thus one audio channel with better sound quality can be determined, and the sound quality of played voice is better when the voice service is acquired.

[0125] In a possible implementation, the index value comprises a second index value, and the determining each index value of each audio channel according to the sample frame comprises: determining a number of invalid frames in the sample frame, the invalid frame being a frame in which a number of points meeting a preset condition in each sampling point of the sample frame is greater than a predetermined threshold, and the point meeting the preset condition being determined according to an amplitude of each sampling point; and determining each second index value of each audio channel according to the number of invalid frames.

[0126] According to the embodiment of the present application, by using the number of invalid frames to determine the second index value, the quality of the second audio sequence can be quantified more accurately, so that the audio channel with better quality can be determined, and when the voice service is acquired, the voice played has better quality.

[0127] In a possible implementation, the index value includes a third index value, and the method for determining the index value of each audio channel according to the sample frame includes: determining a cutoff frequency of each sample frame according to a frequency of a head portion, a frequency of a tail portion and a maximum roll-off value of each sample frame, the maximum roll-off value being a difference between a power value of the head portion and a power value of the tail portion of the sample frame; and determining the third index value of each audio channel according to the cutoff frequency of each sample frame.

[0128] According to the embodiment of the present application, by using the cutoff frequency to determine the third index value, the quality of the second audio sequence can be quantified more accurately, so that the audio channel with better quality can be determined, and when the voice service is acquired, the voice played has better quality.

[0129] In a possible implementation, the index value includes a fourth index value, and the method for determining the index value of each audio channel according to the sample frame includes: performing Fourier transform on each sample frame to obtain a transformed sample frame; determining two sub-band signals with the same bandwidth in a positive frequency component according to the transformed sample frame; and determining the fourth index value of each audio channel according to an energy value of the two sub-band signals.

[0130] According to the embodiment of the present application, by using the energy value of the sub-band signal to determine the fourth index value, the quality of the second audio sequence can be quantified more accurately, so that the audio channel with better quality can be determined, and when the voice service is acquired, the voice played has better quality.

[0131] In a possible implementation, the index value includes a fifth index value, and the method for determining the index value of each audio channel according to the sample frame includes: performing wavelet transform on each sample frame to obtain a high-frequency component and a low-frequency component of a transformed sample frame; and determining the fifth index value of each audio channel according to the high-frequency component and the low-frequency component.

[0132] According to the embodiment of the present application, by using the high-frequency component and the low-frequency component to determine the fifth index value, the quality of the second audio sequence can be quantified more accurately, so that the audio channel with better quality can be determined, and when the voice service is acquired, the voice played has better quality.

[0133] Figure 7 A structure diagram of an electronic device 100 according to an embodiment of the present application is shown. As shown in the figure, the electronic device 100 can be the vehicle described above, and perform the method described above. Figure 7 The electronic device 100 can be a vehicle, and perform the method described above.Figures 2-5 The audio channel selection method shown in any one of the above. The electronic device 100 includes at least one processor 1801, at least one memory 1802, at least one communication interface 1803. In addition, the electronic device can also include general components such as antennas, etc., which are not described here in detail.

[0134] The following will be described in detail in combination with Figure 7 The various constituent components of the electronic device 100 will be described in detail.

[0135] The processor 1801 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above program. The processor 1801 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU) and the like. Among them, different processing units can be independent devices, or can be integrated in one or more processors.

[0136] The communication interface 1803 is used to communicate with other electronic devices or communication networks, such as Ethernet, Radio Access Network (RAN), Core Network, Wireless Local Area Networks (WLAN), etc.

[0137] The memory 1802 can be read-only memory (ROM) or other type of static storage devices that can store static information and instructions, random access memory (RAM) or other type of dynamic storage device that can store information and instructions, electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disk storage (including compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), blu-ray discs and the like), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory can exist in the form of standalone, connected to the processor through a bus, or integrated with the processor.

[0138] The memory 1802 is configured to store application program codes for implementing the above solutions, and the processor 1801 is configured to control the execution of the application program codes.

[0139] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0140] The embodiments of the present application provide an audio channel selection device, including a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions.

[0141] The embodiments of the present application provide a non-volatile computer readable storage medium, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the above method.

[0142] The embodiments of the present application provide a terminal device, which can execute the above method.

[0143] The embodiments of the present application provide a computer program product, including computer readable code or non-volatile computer readable storage medium carrying computer readable code, when the computer readable code is executed in the processor of the electronic device, the processor in the electronic device executes the above method.

[0144] Computer readable storage media can be tangible storage devices that can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer readable storage media include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital video disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium can be any tangible storage device that can retain and store instructions for use by an instruction execution device.

[0145] Computer readable program instructions or code can be downloaded to a starting device, to another computer or device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A remote server can store software programs, code or programs designed to carry out the processes described herein and provide the software to the user device(s) either for processing or installing. A remote server can transmits the software programs, code or programs to the user device(s) over the network. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.

[0146] Computer readable program instructions for carrying out operations of the present application can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.

[0147] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0148] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or nonvolatile memory, or a suitable combination of the different types of computer readable storage media. The computer readable program instructions can also be downloaded to a computer, other programmable data processing apparatus, or other device from a computer readable storage medium or to an external computer or external storage device via a data signal that can be transmitted for example via a wired medium or a wireless medium such as the Internet or Wireless Application Protocol (WAP) signaling.

[0149] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0150] The flow diagrams and the block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical functions (s). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts.

[0151] It is also important to note that each of the boxes in the block diagrams and / or flowchart illustrations, and combinations of boxes in the block diagrams and / or flowchart illustrations, can be implemented by hardware, for example, circuitry or an ASIC (Application Specific Integrated Circuit), or can be implemented by a combination of hardware and software, such as firmware or the like.

[0152] Although the present application has been described in connection with various embodiments thereof, it will be understood that other modifications can be made by those skilled in the art to the application described herein without departing from the scope of the application as defined by the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. A single processor or other unit can fulfil the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. The reference signs in the claims should not be construed as limiting the scope of the application.

[0153] Having described various embodiments of the application, it is to be understood that the above description is meant not to limit and not to encompass all of the possible embodiments. Many modifications and variations of this application can be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. Use of the terms "preferably," "preferred," "desired," etc., are intended to present a choice between one embodiment and another, and are not intended to limit the context in which the terms are used. The choice of terms is intended to best explain the principle, practical application or improvement over the technology in the field that the various embodiments are directed to, or to enable others skilled in the art to understand the various embodiments disclosed herein.

Claims

1. A method of audio channel selection, characterized by, The method is used for a vehicle, and the method comprises: sending a first audio sequence to each audio channel, collecting a second audio sequence output by each audio channel, the audio channel being associated with a plurality of voice service types; determining an audio channel with the best sound quality corresponding to the second audio sequence according to the second audio sequence; when a voice service is acquired, selecting the audio channel with the best sound quality to play the voice, the audio channel with the best sound quality being associated with the acquired voice service or other voice service types different from the acquired voice service, the voice service type including any one of emergency call ECALL, breakdown call BCALL and Bluetooth call BTCALL in a vehicle scene, and the audio channel including at least one of a speaker channel, a line output channel and a universal serial bus USB audio channel.

2. The method of claim 1, wherein, The method comprises: frame dividing and windowing the second audio sequence according to a predetermined frame length and a predetermined frame shift to determine each sample frame; determining each index value of each audio channel according to the sample frame; determining the audio channel with the best sound quality corresponding to the second audio sequence according to each index value of each audio channel and a preset weight corresponding to each index value.

3. The method of claim 2, wherein, The index value includes a first index value, and the method comprises: determining each first index value of each audio channel according to a sampling rate and / or quantization accuracy of the sample frame.

4. The method according to claim 2 or 3, characterized in that, The index value includes a second index value, and the method comprises: determining the number of invalid frames in the sample frame, the invalid frame being a frame in which the number of points meeting a preset condition is greater than a predetermined threshold, the point meeting the preset condition being determined according to the amplitude of each sampling point of the sample frame; determining each second index value of each audio channel according to the number of invalid frames.

5. The method of claim 2, wherein, The index value includes a third index value, and the method comprises: determining the cutoff frequency of each sample frame according to the frequency of the head, the frequency of the tail and the maximum roll-off value of each sample frame, the maximum roll-off value being the difference between the power value of the head and the power value of the tail of the sample frame; determining each third index value of each audio channel according to the cutoff frequency of each sample frame.

6. The method of claim 2, wherein, The index value includes a fourth index value, and the method comprises: performing Fourier transform on each sample frame to obtain a transformed sample frame; determining two sub-band signals with the same bandwidth in the positive frequency component according to the transformed sample frame; determining each fourth index value of each audio channel according to the energy value of the two sub-band signals.

7. The method of claim 2, wherein, The index value includes a fifth index value, and the method comprises: performing wavelet transform on each sample frame to obtain high-frequency components and low-frequency components of the transformed sample frame; determining each fifth index value of each audio channel according to the high-frequency components and the low-frequency components.

8. The method of claim 1, wherein, According to each second audio sequence, determine one audio channel corresponding to the second audio sequence which has the best sound quality, comprising: According to each second audio sequence, determine whether each audio channel has a fault; Determine one audio channel which has no fault and has the best sound quality corresponding to the second audio sequence.

9. An audio channel selection device, characterized by The device is used for a vehicle, and the device comprises: A sending collection module, configured to send a first audio sequence to each audio channel, and collect each second audio sequence output by each audio channel, wherein the audio channel is associated with a plurality of voice service types; A determination module, configured to determine one audio channel corresponding to each second audio sequence which has the best sound quality according to each second audio sequence; A selection module, configured to select the one audio channel which has the best sound quality to play voice when a voice service is acquired, wherein the one audio channel which has the best sound quality is associated with the acquired voice service or other voice service types different from the acquired voice service, and the type of the voice service comprises at least one of emergency call ECALL, breakdown call BCALL, and Bluetooth call BTCALL in a vehicle scene, and the audio channel comprises at least one of a speaker channel, a line output channel, and a universal serial bus USB audio channel.

10. An audio channel selection device, characterized by Comprise: A processor; A memory for storing processor-executable instructions; When the processor is configured to execute the instructions, the method in any one of claims 1-8 is implemented.

11. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions are executed by the processor to implement the method in any one of claims 1-8.

12. A computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in an electronic device, a processor in the electronic device performs the method in any one of claims 1-8.

13. A vehicle characterized by comprising: The vehicle comprises a processor, and the processor is used to execute the method in any one of claims 1-8.

Citation Information

Patent Citations

  • Music file tone quality detecting method and device

    CN104966518A

  • Method and device for selecting audio channel and terminal

    CN105657154A

  • Vehicle-based voice processing method, voice processor and vehicle-mounted processor

    CN112599133A