Audio mixing test method, device, equipment and storage medium
By generating audio with different preset frequencies, recording and separating the audio from the playback device, and using filters to automatically test the audio mixing effect, the problem of low manual testing efficiency is solved, and efficient and accurate audio mixing test is achieved.
Patent Information
- Application Number
- CN202210493132.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-05-07
AI Technical Summary
In the prior art, audio mixing testing relies on manual testing, with low testing efficiency and cannot achieve automated and accurate testing.
By generating audio with different preset frequencies, the audio output of the recording and playback device is performed, audio separation and comparison are performed, and the mixing audio is separated using filters to automatically test the audio mixing effect of the playback device.
It realizes automated, scientific and accurate audio mixing tests, improves testing efficiency, and provides specifications and standards for audio mixing tests.
Smart Images

Figure CN114724590B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of audio processing technology, and in particular to an audio mixing test method, device, equipment and storage medium. Background Art
[0002] With the rapid development of automotive electronics technology, the complexity of car computer functions is also increasing. Among them, car computer voice, multimedia, and navigation, as the core functions of car computers, can greatly improve the user experience. Correspondingly, higher requirements are also placed on the testing and verification of their functions. Mixing test of various audio types is an important link.
[0003] The audio mixing strategy prioritizes all audio sources throughout the vehicle based on their needs or importance, and then rationally and effectively outputs them according to the preset mixing strategy. When multiple audio sources are playing simultaneously, the system reduces the volume of lower-priority audio sources based on their audio type and the corresponding mixing strategy.
[0004] like Figure 1 As shown in the figure, taking navigation voice and multimedia music playback as an example, the navigation voice has high priority and the multimedia music has low priority. During music playback, after the navigation voice is interrupted, the navigation voice plays at normal volume and the music volume is reduced. After the navigation voice ends, the music volume returns to the original volume.
[0005] Traditional audio mixing tests mainly rely on the built-in applications of the car system (such as music playback applications, Baidu Maps car version, etc.) to play various audios simultaneously. After the car system mixes the audio and plays it through external speakers, the human ear judges whether the various audios are mixed successfully. It relies entirely on manual testing and cannot achieve automated testing, resulting in low testing efficiency. Summary of the Invention
[0006] The present invention provides an audio mixing test method, apparatus, device and storage medium, which solve the problem of low test efficiency caused by manual testing of audio mixing effects, and realize scientific and accurate testing of the audio mixing effects of playback devices in an automated manner, thereby improving the efficiency of audio mixing testing and providing a standard for audio mixing testing.
[0007] According to one aspect of the present invention, a frequency mixing test method is provided, comprising:
[0008] generating audio frequencies of at least two different preset frequencies;
[0009] Recording the audio files played sequentially by the playback device to obtain the original playback audio files;
[0010] Mixing the audio recordings played by the playback device to obtain mixed playback audio;
[0011] Performing audio separation on the mixed playback audio to obtain at least two target playback audios;
[0012] Each of the original playback audios is compared with the corresponding target playback audio to determine an audio mixing test result of the playback device.
[0013] Furthermore, the audios played sequentially by the pair of playback devices are recorded separately to obtain the original playback audios, including:
[0014] Controlling the audio players of the playback devices in sequence to play corresponding audio according to first playback parameters; the first playback parameters include the audio file, audio type, and preset volume corresponding to each of the audio;
[0015] The audio storage device connected to the audio output terminal of the playback device stores the audios sequentially outputted by the audio output terminal of the playback device to obtain the original playback audios.
[0016] Furthermore, the mixing and playing of the audio recordings by the playback device to obtain mixed playback audio includes:
[0017] Controlling each of the audio playback applications of the playback device to simultaneously play corresponding audio according to second playback parameters; the second playback parameters include an audio file, an audio type, a priority corresponding to the audio type, and a preset volume corresponding to the priority;
[0018] The mixed audio output from the audio output terminal of the playback device is stored in an audio storage device connected to the audio output terminal of the playback device to obtain the mixed playback audio.
[0019] Furthermore, controlling each of the audio playback applications of the playback device to simultaneously play corresponding audio according to the corresponding second playback parameter includes:
[0020] If the priority of the audio type played by the audio playback application is the highest priority, the audio in the corresponding audio file is played at the first preset volume;
[0021] If the priority of the audio type played by the audio playback application is not the highest priority, the audio in the corresponding audio file is played at a second preset volume; the second preset volume is lower than the first preset volume.
[0022] Furthermore, the step of performing audio separation on the mixed playback audio to obtain at least two target playback audios includes:
[0023] Using at least two preset filters to filter the mixed playback audio to obtain at least two target playback audios;
[0024] The preset filters include at least two of the following: a low-pass filter, a high-pass filter, a band-pass filter, and a band-stop filter.
[0025] Furthermore, the comparing each of the original playback audio and the corresponding target playback audio to determine the audio mixing test result of the playback device includes:
[0026] Comparing the waveform parameters of each of the original playback audio and the corresponding target playback audio respectively;
[0027] If each of the waveform parameters meets the preset conditions, it is determined that the audio mixing effect of the playback device passes the test.
[0028] Furthermore, the preset conditions include: a first preset condition and a second preset condition;
[0029] If the priority of the audio type of the original played audio is the highest priority, the waveform parameters satisfy the first preset condition that: the waveform similarity is greater than a similarity threshold, and the ratio of the waveform peaks is within a first preset range;
[0030] If the priority of the audio type of the original played audio is not the highest priority, the second preset condition satisfied by the waveform parameters is: the waveform similarity is greater than the similarity threshold, and the ratio of the waveform peaks is greater than the peak threshold; wherein the peak threshold is less than the lower limit threshold of the first preset range.
[0031] According to another aspect of the present invention, there is provided an audio mixing test device, comprising:
[0032] An audio generation module, configured to generate audio of at least two different preset frequencies;
[0033] A first recording module, configured to record the audio files played sequentially by the playback device to obtain the original playback audio files;
[0034] A second recording module is used to mix the audio recordings played by the playback device to obtain mixed playback audio;
[0035] An audio separation module, configured to separate the mixed playback audio to obtain at least two target playback audios;
[0036] The audio comparison module is used to compare each of the original playback audio and the corresponding target playback audio to determine the audio mixing test result of the playback device.
[0037] According to another aspect of the present invention, an electronic device is provided, comprising:
[0038] at least one processor; and
[0039] a memory communicatively connected to the at least one processor; wherein,
[0040] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the audio mixing test method according to any embodiment of the present invention.
[0041] According to another aspect of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, which are used to enable a processor to implement the audio mixing test method according to any embodiment of the present invention when executed.
[0042] The technical solution of the embodiment of the present invention generates at least two audios with different preset frequencies; records the audios played sequentially by the playback device separately to obtain the original playback audios; records the audios mixed and played by the playback device to obtain the mixed playback audios; performs audio separation on the mixed playback audio to obtain at least two target playback audios; and compares the original playback audios with the corresponding target playback audios to determine the audio mixing test results of the playback device. This solves the problem of low test efficiency caused by manual testing of audio mixing effects, achieves the scientific and accurate testing of the audio mixing effects of the playback device in an automated manner, improves the efficiency of the audio mixing test, and provides a standard for the audio mixing test.
[0043] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 It is a schematic diagram of the audio mixing principle;
[0046] Figure 2 This is a flow chart of an audio mixing test method provided according to the first embodiment of the present invention;
[0047] Figure 3 This is a flow chart of an audio mixing test method provided according to a second embodiment of the present invention;
[0048] Figure 4This is a flowchart of an audio mixing test method provided according to a third embodiment of the present invention;
[0049] Figure 5 is a flowchart of an exemplary audio mixing test method provided by the present invention;
[0050] Figure 6 and Figure 7 It is a schematic diagram comparing the waveforms of the original playback audio and the target playback audio;
[0051] Figure 8 2 is a schematic structural diagram of an audio mixing test device provided according to a fourth embodiment of the present invention;
[0052] Figure 9 The figure is a schematic diagram of the structure of an electronic device for implementing the audio mixing test method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0054] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0055] Example 1
[0056] Figure 2 A flowchart of an audio mixing test method is provided for the first embodiment of the present invention. This embodiment is applicable to the case of testing the audio mixing effect of a playback device. The method can be performed by an audio mixing test device. The audio mixing test device can be implemented in the form of hardware and / or software. The audio mixing test device can be configured in an electronic device. Figure 2 As shown, the method includes:
[0057] S110: Generate audio of at least two different preset frequencies.
[0058] Specifically, different audio frequencies can be used to represent different types of audio. For example, audio of a first preset frequency can be used to represent multimedia music, while audio of a second preset frequency can be used to represent navigation speech. Considering that the playback frequency range supported by the speaker of the playback device and the auditory frequency range are 20 Hz-20,000 Hz, the frequencies of the at least two audio frequencies can be set between 20 Hz-20,000 Hz. The generated audio is a sine wave with the preset frequency.
[0059] For example, the sampling rate of the generated audio is set to 16 kHz and the duration is set to 15 seconds. If two preset frequencies are generated, the preset frequencies can be 500 Hz and 1000 Hz; if three preset frequencies are generated, the preset frequencies can be 500 Hz, 1000 Hz, and 1500 Hz. The method for generating the audio can be: defining standard sine waves of at least two preset frequencies using the Python third-party library numpy, and saving them as corresponding audio files using the Python third-party library wave.
[0060] S120: Record the audio files played sequentially by the playback device to obtain the original playback audio files.
[0061] The playback device may be a device with an audio playback function, such as a car computer or a mobile terminal, and the embodiment of the present invention does not impose any limitation on this.
[0062] Specifically, a playback device plays each pre-generated audio sound in sequence, and each audio sound played by the playback device is recorded to obtain the original playback audio corresponding to each audio sound. The original playback audio refers to the generated audio sound, which is the audio sound actually played by the playback device and is used to achieve the actual playback effect of the playback device. It may have a certain waveform difference from the generated audio sound. Each original playback audio sound is also a sine wave with a preset frequency.
[0063] Exemplarily, the method of using a playback device to play each pre-generated audio in sequence may be: calling the audio playback application in the playback device to play the corresponding audio, and setting the parameters of the audio playback. The method of recording each audio played by the playback device may be to use independent playback devices and recording devices to achieve audio playback and audio recording, such as the audio player and recorder in the car computer, and the recorder records the sound played by the speaker of the audio player. It may also be that the playback device and recording device are connected to each other or integrated to achieve audio playback and audio recording, and the recording device is connected to the audio output terminal of the playback device to record the sound output by the audio output terminal. The recording device may be, for example, a sound card in a playback device with a recording function or a connected external sound card.
[0064] S130: Mix the audio recordings played by the playback device to obtain mixed playback audio.
[0065] Specifically, multiple audio playback applications in a playback device are called, each audio playback application is caused to simultaneously play multiple audios within a period of time according to set playback parameters, and the audios mixed and played by the playback device are recorded. The method of recording the audios mixed and played by the playback device can be the same as the method of recording each audio played by the playback device separately.
[0066] It should be noted that the embodiment of the present invention does not limit the execution order of step S120 and step S130. Step S120 may be executed first, then step S130; or step S130 may be executed first, then step S120. The playback device used in step S120 and step S130 should be the same.
[0067] S140: Perform audio separation on the mixed playback audio to obtain at least two target playback audios.
[0068] Specifically, the mixed audio is played by mixing audio of different preset frequencies. The mixed audio is subjected to audio frequency separation to obtain target audio corresponding to each audio. Each target audio is also a sine wave with a preset frequency. The target audio is the audio obtained by separating the mixed audio of the playback device.
[0069] Exemplarily, the audio separation method may be to filter the mixed playback audio using filters with different pass frequencies to obtain target playback audio corresponding to each audio.
[0070] S150: Compare each original playback audio with the corresponding target playback audio to determine an audio mixing test result of the playback device.
[0071] Specifically, the audio mixing strategy works by reducing the volume of different audio types based on actual needs. Therefore, based on the audio mixing strategy of the playback device, the waveforms of each original audio source and the corresponding target audio source can be compared to determine the audio mixing test result of the playback device.
[0072] Exemplarily, the audio mixing test result may be a pass or fail; or the audio mixing test result may be graded into multiple levels, with the audio mixing test result level corresponding to the waveform comparison result between each original playback audio and the corresponding target playback audio.
[0073] The technical solution of the embodiment of the present invention generates at least two audios with different preset frequencies; records each audio played in sequence by a playback device to obtain each original playback audio; records each audio mixed and played by the playback device to obtain mixed playback audio; performs audio separation on the mixed playback audio to obtain at least two target playback audios; compares each original playback audio with the corresponding target playback audio to determine the audio mixing test result of the playback device, thereby solving the problem of low test efficiency due to reliance on manual testing of audio mixing effects, realizing scientific and accurate testing of the audio mixing effects of playback devices in an automated manner, improving the efficiency of audio mixing testing, and providing a standard for audio mixing testing.
[0074] Example 2
[0075] Figure 3 This is a flowchart of an audio mixing test method provided in the second embodiment of the present invention. This embodiment further refines step S120 and step S130 in the above embodiment, wherein step S120 may include: step S220 and step S230; step S130 may include: step S240 and step S250. Figure 3 As shown, the method includes:
[0076] S210: Generate audio of at least two different preset frequencies.
[0077] S220: Control the audio player of the playback device in sequence to play the corresponding audio according to the first playback parameter; the first playback parameter includes the audio file, the audio type, and the preset volume.
[0078] The audio file "file" is the file corresponding to the audio at the preset frequency. It can be the audio file itself or the audio file referenced by its name and storage path. The audio type "audioType" can be multimedia music, navigation voice, call voice, or alarm sound. The preset volume "volume" can be set based on the actual application of the playback device and user needs. The preset volume can be a set value or a set range.
[0079] Specifically, the playback device is controlled in sequence to call the corresponding audio playback application according to the audio type corresponding to the audio, and the input audio file is played at a preset volume.
[0080] For example, the preset volume is set to 20, the preset frequency of the first audio is 1000HZ, and the audio type is multimedia music; the preset frequency of the second audio is 500HZ, and the audio type is navigation, then the playback device is controlled to call the multimedia music application to play the 1000HZ audio at a volume of 20. After the playback is completed, the playback device is controlled to call the navigation application to play the 500HZ audio at a volume of 20.
[0081] S230: The audio storage device connected to the audio output terminal of the playback device stores the audios sequentially outputted from the audio output terminal of the playback device to obtain original playback audios.
[0082] Specifically, the audio storage device is connected to the audio output terminal of the playback device, so that the audio storage device stores the audios sequentially outputted by the audio output terminal of the playback device in step S220 to obtain the original playback audios.
[0083] For example, a storage and playback device is used to store 1000 Hz audio output from an audio output terminal of a playback device to obtain a first original playback audio. Then, a storage and playback device is used to store 500 Hz audio output from an audio output terminal of the playback device to obtain a second original playback audio. The original playback audio can be saved as original playback audio files, such as audio_1000hz.wav and audio_500hz.wav, which are used to represent audio with a preset frequency of 1000 Hz and audio with a preset frequency of 500 Hz, respectively.
[0084] S240. Control each audio playback application of the playback device to simultaneously play corresponding audio according to corresponding second playback parameters; the second playback parameters include an audio file, an audio type, a priority corresponding to the audio type, and a preset volume corresponding to the priority.
[0085] Specifically, an audio mixing strategy prioritizes all audio sources based on their needs or importance, and then outputs them scientifically and rationally according to a preset mixing strategy. Therefore, by setting the audio type, priority, and volume for each audio source, the playback device can control the playback volume based on the priority of the audio source.
[0086] Optionally, controlling the audio playback applications of the playback device to simultaneously play corresponding audio according to the corresponding second playback parameters includes:
[0087] If the priority of the audio type played by the audio playback application is the highest priority, the audio in the corresponding audio file is played at the first preset volume;
[0088] If the priority of the audio type played by the audio playback application is not the highest priority, the audio in the corresponding audio file is played at a second preset volume; the second preset volume is lower than the first preset volume.
[0089] For example, if the preset frequency of the first audio is 1000 Hz and the audio type is multimedia music; the preset frequency of the second audio is 500 Hz and the audio type is navigation; the priority corresponding to multimedia music is first priority, and the priority corresponding to navigation is second priority; the preset volume corresponding to the first priority is 20; and the preset volume corresponding to the second priority is 6. If the multimedia music application of the playback device is controlled to play the first audio, and the navigation application of the playback device is controlled to play the second audio during the same time period, then if the mixing function of the playback device is normal, the 1000 Hz audio will be played at a volume of 20, and the 500 Hz audio will be played at a volume of 6, which is reduced from 20.
[0090] It should be noted that the preset volumes set for each audio track can be the same or different when playing them separately. However, when mixing audio tracks, the preset volumes are determined based on the priority of the audio types, so lower-priority audio tracks are played at lower volumes. Therefore, setting the same preset volume for each audio track will make subsequent comparisons more obvious.
[0091] S250: The audio storage device connected to the audio output terminal of the playback device stores the mixed audio output by the audio output terminal of the playback device to obtain the mixed playback audio.
[0092] Specifically, an audio storage device is connected to an audio output terminal of a playback device so that the audio storage device stores the mixed playback audio of each audio output terminal of the playback device in step S240. The mixed playback audio can be saved as a mixed playback audio file, such as audio_mixed.wav, which is used to represent the mixed audio of the audio of each preset frequency.
[0093] S260: Perform audio separation on the mixed playback audio to obtain at least two target playback audios.
[0094] S270: Compare each original playback audio with the corresponding target playback audio to determine an audio mixing test result of the playback device.
[0095] The technical solution of the embodiment of the present invention generates at least two audios with different preset frequencies; sequentially controls the audio player of the playback device to play the corresponding audio according to a first playback parameter, the first playback parameter including the audio file, the audio type and the preset volume; stores the audio outputted sequentially from the audio output end of the playback device through an audio storage device connected to the audio output end of the playback device to obtain the original playback audio; controls the audio playback applications of the playback device to simultaneously play the corresponding audio according to the corresponding second playback parameter, the second playback parameter including the audio file, the audio type, the priority corresponding to the audio type and the preset volume corresponding to the priority; performs audio separation on the mixed playback audio to obtain at least two target playback audios; compares the original playback audio with the corresponding target playback audio respectively to determine the audio mixing test result of the playback device, thereby solving the problem of low test efficiency due to manual testing of the audio mixing effect, realizing scientific and accurate testing of the audio mixing effect of the playback device in an automated manner, improving the efficiency of the audio mixing test, and providing a standard for the audio mixing test.
[0096] Optionally, at least two preset filters are used to filter the mixed playback audio to obtain at least two target playback audios; wherein the preset filters include at least two of the following: a low-pass filter, a high-pass filter, a band-pass filter, and a band-stop filter.
[0097] Specifically, a preset filter with appropriate parameters is selected according to the preset frequency of the generated audio to filter the mixed playback audio to obtain the target playback audio corresponding to each audio.
[0098] For example, the signal.filtfilt method of the third-party Python library scipy is used to design a filter for filtering. For the mixed playback audio obtained by mixing 1000 Hz audio and 500 Hz audio, a high-pass filter is used to filter the mixed playback audio to obtain the target playback audio corresponding to the 1000 Hz audio, and a low-pass filter is used to filter the mixed playback audio to obtain the target playback audio corresponding to the 500 Hz audio. The target playback audio obtained after filtering can be stored as a target playback audio file, such as audio_highpass.wav and audio_lowpass.wav, which are used to represent the target playback audio of 1000 Hz obtained by high-pass filtering and the target playback audio of 500 Hz obtained by low-pass filtering, respectively.
[0099] By designing multiple audios of specific frequencies for playback and recording and selecting appropriate filters, the mixed playback audio is automatically separated into independent target playback audios of different volumes and frequencies, achieving a good separation effect and solving the problem of using original audio for separation, which causes multiple audio types to be difficult to separate and the effect to be poor.
[0100] Optionally, the preset filter is designed based on a Butterworth filter.
[0101] Specifically, you can choose a Butterworth filter to design a preset filter. After testing and verification, the Butterworth filter can achieve a good filtering effect on the mixed audio playback. By setting the parameters of the Butterworth filter, you can get a Butterworth low-pass filter, a Butterworth high-pass filter, a Butterworth band-pass filter, and a Butterworth band-stop filter.
[0102] The Butterworth filter is an infinite impulse response filter (IIR filter). The differential equation of the IIR digital filter is:
[0103]
[0104] Where: x(n) sequence is the signal sequence before filtering; y(n) is the signal sequence after filtering; a and b are coefficients.
[0105] For example, for a mixed audio playback, 1000HZ audio is mixed with 500HZ audio; the filter parameters are selected as a filter order of 10 and a cutoff frequency of 600HZ. According to the above order and cutoff frequency, the coefficients b and a of the Butterworth filter can be calculated by the signal.butter method using the Python third-party library scipy.
[0106] Example 3
[0107] Figure 4 This is a flowchart of an audio mixing test method provided by the third embodiment of the present invention. This embodiment further refines step S150 in the above embodiment. Figure 4 As shown, the method includes:
[0108] S310: Generate audio of at least two different preset frequencies.
[0109] S320: Record the audio files played sequentially by the playback device to obtain the original playback audio files.
[0110] S330: Mix and play the audio recordings of the audios played by the playback device to obtain mixed playback audio.
[0111] S340: Perform audio separation on the mixed playback audio to obtain at least two target playback audios.
[0112] S350: Compare waveform parameters of each original playback audio with the corresponding target playback audio.
[0113] The waveform parameters may include a waveform peak ratio and waveform similarity. The waveform peak ratio is the ratio of the peak values of the sine wave waveforms of the original audio and the corresponding target audio. The waveform similarity is the similarity between the waveforms of the original audio and the corresponding target audio.
[0114] S360: If each waveform parameter meets the preset conditions, it is determined that the audio mixing effect of the playback device passes the test.
[0115] Specifically, waveform similarity is compared to determine whether the waveform of the target audio separated from the mixed audio has changed compared to the original audio recorded separately. A comparison of the peak-to-peak ratios is used to determine whether the volume of the target audio separated from the mixed audio has changed compared to the original audio recorded separately. If the waveform parameters meet the preset conditions, the audio mixing effect of the playback device is deemed to meet the requirements in terms of both waveform form and volume, and the audio mixing effect of the playback device is determined to have passed the test.
[0116] The technical solution of the embodiment of the present invention is to generate audios of at least two different preset frequencies; record the audios played sequentially by the playback device to obtain the original playback audios; record the audios mixed and played by the playback device to obtain the mixed playback audios; perform audio separation on the mixed playback audio to obtain at least two target playback audios; compare the waveform parameters of the original playback audios and the corresponding target playback audios; if the waveform parameters meet the preset conditions, it is determined that the audio mixing effect of the playback device has passed the test. By comparing the original playback audios before mixing and the separated target playback audios after mixing, it is possible to more accurately determine whether the mixing effect meets expectations, thereby meeting the requirements of automated testing.
[0117] Optionally, the preset condition includes: a first preset condition and a second preset condition;
[0118] If the priority of the audio type of the original played audio is the highest priority, the waveform parameters satisfy the first preset condition that: the waveform similarity is greater than the similarity threshold, and the ratio of the waveform peaks is within a first preset range;
[0119] If the priority of the audio type of the original played audio is not the highest priority, the second preset condition satisfied by the waveform parameters is: the waveform similarity is greater than the similarity threshold, and the ratio of the waveform peaks is greater than the peak threshold; wherein the peak threshold is less than the lower limit threshold of the first preset range.
[0120] The similarity threshold, the peak threshold, and the upper and lower thresholds of the first preset range can all be set according to actual needs.
[0121] Specifically, the basic requirement for mixed audio is to reduce the volume of audio with lower priority, but not to change the waveform of the audio, which is used to indicate that the audio quality and content do not change, and only the volume is reduced. Accordingly, a first preset condition is set to stipulate that the waveform similarity between the original playback audio corresponding to the highest priority audio type and the corresponding target playback audio is greater than a similarity threshold and the ratio of the waveform peaks is within a first preset range, that is, the waveform shape remains basically unchanged, and the volume also remains basically unchanged. A second preset condition is set to stipulate that the waveform similarity between the original playback audio corresponding to the non-highest priority audio type and the corresponding target playback audio is greater than a similarity threshold and the ratio of the waveform peaks is greater than a peak threshold; wherein the peak threshold is less than the lower threshold of the first preset range, that is, the waveform shape remains basically unchanged, and the volume is reduced to the preset volume.
[0122] For example, for the original audio played with the highest priority, the first preset condition is: waveform similarity greater than 0.99, and 0.95 < waveform peak value of the original audio played / waveform peak value of the target audio played < 1.05. For the original audio played with a lower priority, the second preset condition is: waveform similarity greater than 0.99, and the waveform peak value of the original audio played / waveform peak value of the target audio played > 2.5.
[0123] For example, cosine similarity can be used as waveform similarity. The formula for calculating the cosine similarity of two waveforms is:
[0124]
[0125] Where A and B are two n-dimensional vectors, representing the original audio and the corresponding target audio, respectively, and cos is the cosine similarity between the original and target audio. A = [A1, A2, ..., Ai, ..., An], and B = [B1, B2, ..., Bi, ..., Bn]. The peak value of an audio waveform is calculated using the Python library NumPy to obtain all extreme points in the waveform and calculate their average.
[0126] In a specific embodiment, Figure 5As shown, with the car computer as the playback device, the audio type corresponding to the 500HZ audio is set to low priority, and the audio type corresponding to the 1000HZ audio is set to high priority. The first preset condition is set as follows: the waveform similarity is greater than 0.99, and 0.95<the ratio of the waveform peaks<1.05; the second preset condition is set as follows: the waveform similarity is greater than 0.99, and the ratio of the waveform peaks>2.5. The specific steps of the audio mixing test method provided in the embodiment of the present invention include: first, generating 500HZ audio and 1000HZ audio; secondly, recording the 500HZ audio and 1000HZ audio broadcasted by the car computer in sequence to obtain the original playback audio 1 and the original playback audio 2, and recording the 500HZ audio and 1000HZ audio mixed and broadcasted by the car computer to obtain the mixed playback audio. The mixed audio is then filtered using a low-pass filter and a high-pass filter designed based on the Butterworth filter, respectively, to separate the mixed audio into target audio 1 corresponding to original audio 1 and target audio 2 corresponding to original audio 2. Finally, the waveforms of original audio 1 and target audio 1 are compared, and the waveforms of original audio 2 and target audio 2 are compared. If the waveform similarity between original audio 1 and target audio 1 exceeds a similarity threshold and the ratio of their waveform peaks exceeds a peak threshold, and the waveform similarity between original audio 2 and target audio 2 exceeds a similarity threshold and the ratio of their waveform peaks exceeds a first preset range, the test concludes and the vehicle-mounted audio mixing effect passes the test; otherwise, the test concludes and the vehicle-mounted audio mixing effect fails the test.
[0127] Figure 6 is a schematic diagram comparing the waveforms of the original audio 1 and the target audio 1. Figure 6 The waveform similarity and waveform peak ratio of the time domain waveforms of the 500Hz original playback audio 1 and the 500Hz target playback audio 1 obtained by low-pass filtering are calculated. The waveform similarity is 0.9999957 and the waveform peak ratio is 3.0765, which meets the second preset condition, indicating that the waveform shape of the target playback audio 1 is basically unchanged compared with the original playback audio 1, and only the volume is reduced.
[0128] Figure 7 is a schematic diagram comparing the waveforms of the original audio 1 and the target audio 1. Figure 7 The waveform similarity and waveform peak ratio of the time domain waveform of the original playback audio 2 at 1000 Hz and the target playback audio 2 obtained by high-pass filtering are calculated. The waveform similarity is 0.9999671 and the waveform peak ratio is 1.05402, which meets the first preset condition. This shows that the waveform shape and volume of the target playback audio 2 are basically unchanged compared with the original playback audio 2. Therefore, by Figure 6 and Figure 7 The waveform comparison results shown can confirm that the mixing effect of the car computer meets the basic requirements of mixing and passes the test.
[0129] Example 4
[0130] Figure 8 This is a structural diagram of a mixed audio test device provided by the fourth embodiment of the present invention. Figure 8 As shown, the apparatus includes: an audio generation module 410, a first recording module 420, a second recording module 430, an audio separation module 440 and an audio comparison module 450;
[0131] The audio generation module 410 is configured to generate audio of at least two different preset frequencies;
[0132] A first recording module 420 is configured to record the audio files played sequentially by the playback device to obtain the original playback audio files;
[0133] A second recording module 430 is configured to mix the audio recordings played by the playback device to obtain mixed playback audio;
[0134] An audio separation module 440 is configured to perform audio separation on the mixed playback audio to obtain at least two target playback audios;
[0135] The audio comparison module 450 is configured to compare each of the original playback audio and the corresponding target playback audio to determine an audio mixing test result of the playback device.
[0136] Optionally, the first recording module 420 includes:
[0137] a first audio playback unit, configured to sequentially control the audio player of the playback device to play corresponding audio according to first playback parameters; the first playback parameters including the audio file, audio type, and preset volume corresponding to each audio;
[0138] The first audio storage unit is configured to store the audios sequentially outputted from the audio output terminal of the playback device to obtain the original playback audios via an audio storage device connected to the audio output terminal of the playback device.
[0139] Optionally, the second recording module 430 includes:
[0140] a second audio playback unit, configured to control the audio playback applications of the playback device to simultaneously play corresponding audio according to second playback parameters; the second playback parameters including an audio file, an audio type, a priority corresponding to the audio type, and a preset volume corresponding to the priority;
[0141] The second audio storage unit is used to store the mixed audio output by the audio output terminal of the playback device to obtain the mixed playback audio through the audio storage device connected to the audio output terminal of the playback device.
[0142] Optionally, the second audio playback unit is specifically configured to:
[0143] If the priority of the audio type played by the audio playback application is the highest priority, the audio in the corresponding audio file is played at the first preset volume;
[0144] If the priority of the audio type played by the audio playback application is not the highest priority, the audio in the corresponding audio file is played at a second preset volume; the second preset volume is lower than the first preset volume.
[0145] Optionally, the audio separation module 440 is specifically configured to:
[0146] Using at least two preset filters to filter the mixed playback audio to obtain at least two target playback audios;
[0147] The preset filters include at least two of the following: a low-pass filter, a high-pass filter, a band-pass filter, and a band-stop filter.
[0148] Optionally, the audio comparison module 450 is specifically configured to:
[0149] Comparing the waveform parameters of each of the original playback audio and the corresponding target playback audio respectively;
[0150] If each of the waveform parameters meets the preset conditions, it is determined that the audio mixing effect of the playback device passes the test.
[0151] Optionally, the preset condition includes: a first preset condition and a second preset condition;
[0152] If the priority of the audio type of the original played audio is the highest priority, the waveform parameters satisfy the first preset condition that: the waveform similarity is greater than a similarity threshold, and the ratio of the waveform peaks is within a first preset range;
[0153] If the priority of the audio type of the original played audio is not the highest priority, the second preset condition satisfied by the waveform parameters is: the waveform similarity is greater than the similarity threshold, and the ratio of the waveform peaks is greater than the peak threshold; wherein the peak threshold is less than the lower limit threshold of the first preset range.
[0154] The audio mixing test device provided in the embodiment of the present invention can execute the audio mixing test method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0155] Example 5
[0156] Figure 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0157] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0158] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0159] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any other suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the audio mixing test method.
[0160] In some embodiments, the audio mix test method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the audio mix test method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the audio mix test method in any other suitable manner (e.g., via firmware).
[0161] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0162] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0163] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0164] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0165] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0166] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0167] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0168] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. An audio mixing test method, characterized in that: include: generating audio frequencies of at least two different preset frequencies; Recording the audio files played sequentially by the playback device to obtain the original playback audio files; Mixing the audio recordings played by the playback device to obtain mixed playback audio; Using filters with different pass frequencies to perform audio separation on the mixed playback audio to obtain at least two target playback audios; Comparing each of the original playback audio and the corresponding target playback audio respectively to determine the audio mixing test result of the playback device; The comparing each of the original playback audio and the corresponding target playback audio to determine the audio mixing test result of the playback device includes: Comparing the waveform parameters of each of the original playback audio and the corresponding target playback audio respectively; If the waveform parameters meet the preset conditions, it is determined that the audio mixing effect of the playback device passes the test; The preset conditions include: a first preset condition and a second preset condition; If the priority of the audio type of the original played audio is the highest priority, the waveform parameters satisfy the first preset condition that: the waveform similarity is greater than a similarity threshold, and the ratio of the waveform peaks is within a first preset range; If the priority of the audio type of the original played audio is not the highest priority, the second preset condition satisfied by the waveform parameters is: the waveform similarity is greater than the similarity threshold, and the ratio of the waveform peaks is greater than the peak threshold; wherein the peak threshold is less than the lower limit threshold of the first preset range.
2. The method according to claim 1, characterized in that The step of recording the audios played sequentially by the playback device to obtain the original playback audios comprises: Controlling the audio players of the playback devices in sequence to play corresponding audio according to first playback parameters; the first playback parameters include the audio file, audio type, and preset volume corresponding to each of the audio; The audio storage device connected to the audio output terminal of the playback device stores the audios sequentially outputted by the audio output terminal of the playback device to obtain the original playback audios.
3. The method according to claim 1, characterized in that The mixing and playing of the audio recordings by the playback device to obtain mixed playback audio includes: Controlling each audio playback application of the playback device to simultaneously play corresponding audio according to second playback parameters; the second playback parameters include an audio file, an audio type, a priority corresponding to the audio type, and a preset volume corresponding to the priority; The mixed audio output from the audio output terminal of the playback device is stored in an audio storage device connected to the audio output terminal of the playback device to obtain the mixed playback audio.
4. The method according to claim 3, characterized in that The controlling each audio playback application of the playback device to simultaneously play corresponding audio according to the corresponding second playback parameter includes: If the priority of the audio type played by the audio playback application is the highest priority, the audio in the corresponding audio file is played at the first preset volume; If the priority of the audio type played by the audio playback application is not the highest priority, the audio in the corresponding audio file is played at a second preset volume; the second preset volume is lower than the first preset volume.
5. The method according to claim 1, wherein The step of performing audio separation on the mixed playback audio to obtain at least two target playback audios includes: Using at least two preset filters to filter the mixed playback audio to obtain at least two target playback audios; The preset filters include at least two of the following: a low-pass filter, a high-pass filter, a band-pass filter, and a band-stop filter.
6. An audio mixing test device, characterized in that: include: An audio generation module, configured to generate audio of at least two different preset frequencies; A first recording module, configured to record the audio files played sequentially by the playback device to obtain the original playback audio files; A second recording module is used to mix the audio recordings played by the playback device to obtain mixed playback audio; An audio separation module, configured to separate the mixed playback audio using filters with different pass frequencies to obtain at least two target playback audios; An audio comparison module, configured to compare each of the original playback audio with the corresponding target playback audio, and determine an audio mixing test result of the playback device; The audio comparison module is specifically used to: Comparing the waveform parameters of each of the original playback audio and the corresponding target playback audio respectively; If the waveform parameters meet the preset conditions, it is determined that the audio mixing effect of the playback device passes the test; The preset conditions include: a first preset condition and a second preset condition; If the priority of the audio type of the original played audio is the highest priority, the waveform parameters satisfy the first preset condition that: the waveform similarity is greater than a similarity threshold, and the ratio of the waveform peaks is within a first preset range; If the priority of the audio type of the original played audio is not the highest priority, the second preset condition satisfied by the waveform parameters is: the waveform similarity is greater than the similarity threshold, and the ratio of the waveform peaks is greater than the peak threshold; wherein the peak threshold is less than the lower limit threshold of the first preset range.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so as to enable the at least one processor to perform the audio mixing test method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the audio mixing test method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Vehicle-mounted multimedia sound mixing logic function detection system and method
CN111107479A
Method and device for audio mixing, and terminal apparatus
WO2021051742A1