Vehicle-mounted music identification method and device, electronic equipment and storage medium
By prioritizing music playback events in the vehicle system and using an external audio chip to obtain clear audio, the problem of low music recognition accuracy in the vehicle environment is solved, achieving higher recognition accuracy and user experience.
Patent Information
- Application Number
- CN202410656806.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-06
AI Technical Summary
In the vehicle environment, it is difficult for existing technology to capture clear song audio clips, resulting in low accuracy of music recognition, especially in the case of noisy environment and multi-audio playback.
By dividing vehicle audio events into front row events and full vehicle events, set music playback events as the first priority, other audio events as the second priority, abort the second priority events to ensure that music playback is not interrupted, and use external Set the audio chip to obtain the reference sound of the rear sound zone, and compare it with the preset audio database to improve the recognition accuracy.
It effectively avoids recording interference, ensures the accuracy and user experience of music recognition, and provides purer target audio to improve recognition results.
Smart Images

Figure CN118606512A
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control, and in particular to a method, device, electronic device and storage medium for vehicle-mounted music recognition. Background Art
[0002] In the in-car entertainment system, the song recognition function allows passengers to identify the name, artist and other information of a song through the in-car system when they hear a song. This function usually relies on music recognition technology, that is, comparing the captured audio clips with the reference audio in the database to find matches. However, it is difficult to capture clear song audio clips when implementing the song recognition function in an in-car environment.
[0003] In related technologies, when it is impossible to directly obtain the initial audio data, most solutions use environmental recording. However, there are many types of audio played in the vehicle and the environment may be noisy. This recording method will cause recording interference, thereby affecting the accuracy of music recognition. Summary of the Invention
[0004] In view of the shortcomings of the related technologies mentioned above, the present application provides a method, device, electronic device and storage medium for in-vehicle music recognition to solve the technical problem of low recognition accuracy caused by recording interference in in-vehicle music recognition.
[0005] The present application provides a method for in-vehicle music recognition, which includes: in response to a music recognition instruction, obtaining an audio event currently being played by a vehicle; dividing the audio event into a front-row event and a full-vehicle event based on the sound zone of the audio event, wherein the sound zone includes a front-row sound zone and a rear-row sound zone; setting the priority of the music playback event in all front-row events and full-vehicle events to the first priority, and setting the priority of other audio events in the full-vehicle event to the second priority, wherein the other audio events include other audio events in the full-vehicle event except the music playback event; if the audio event currently being played by the vehicle includes an audio event with a first priority and an audio event with a second priority, terminating the audio event with the second priority and keeping playing the audio event with the first priority; receiving a reference sound in the rear-seat sound zone of the vehicle, and using the rear-seat sound zone reference sound as the target audio, and comparing the target audio with a preset audio database to obtain a comparison result.
[0006] In one embodiment of the present application, dividing the audio event into a front row event and a full-vehicle event based on the sound zone of the audio event includes: if the sound zone of the audio event is the front row sound zone, then the audio event is determined as a front row event; if the sound zone of the audio event is the front row sound zone and the rear row sound zone, then the audio event is determined as a full-vehicle event, and the full-vehicle event includes at least a music playback event.
[0007] In one embodiment of the present application, terminating the audio event with the second priority and keeping playing the audio event with the first priority includes: terminating other audio events in the whole vehicle event except the music playback event, so that the music playback event is the only whole vehicle event currently playing in the vehicle; keeping the front row event and the music playback event continuing to play.
[0008] In one embodiment of the present application, receiving the rear sound zone reference sound of a vehicle and using the rear sound zone reference sound as the target audio includes: mapping the audio data uploaded by the external audio chip into eight channels, the eight channels including a driver's seat recording channel, a passenger's seat recording channel, a left rear recording channel, a right rear recording channel, a driver's seat reference sound channel, a passenger's seat reference sound channel, a left rear reference sound channel and a right rear reference sound channel; using the audio data mapped from the left rear reference sound channel and the right rear reference sound channel as the rear sound zone reference sound.
[0009] In one embodiment of the present application, the rear sound zone reference sound of the vehicle is received, and the rear sound zone reference sound is used as the target audio, further comprising: the external audio chip mixes the audio data to be played in each sound zone based on the preset mixing formula to obtain mixed audio data corresponding to each sound zone, and the sound zones include the main driver's sound zone, the passenger driver's sound zone, the left rear sound zone and the right rear sound zone; the mixed audio data corresponding to the main driver's sound zone is used as the main driver's reference sound, the mixed audio data corresponding to the passenger driver's sound zone is used as the passenger driver's reference sound, the mixed audio data corresponding to the left rear sound zone is used as the left rear reference sound, and the mixed audio data corresponding to the right rear sound zone is used as the right rear reference sound; the left rear reference sound and the right rear reference sound are uploaded as the rear sound zone reference sounds to the vehicle's onboard system through the left rear reference sound channel and the right rear reference sound channel, so that the vehicle system receives the rear sound zone reference sound of the vehicle and uses the rear sound zone reference sound as the target audio.
[0010] In one embodiment of the present application, after taking the rear sound zone reference sound as the target audio, it also includes: before performing a comparison based on the target audio in a preset audio database to obtain a comparison result, obtaining a new target audio every preset waiting time, and performing a comparison based on the new target audio in the preset audio database to obtain a comparison result, until the number of comparisons is greater than the preset number threshold or the comparison result is a successful comparison; if the number is greater than the preset number threshold and the comparison result is a failed comparison, then the failed comparison result is returned; if the comparison result is a successful comparison, then the successful comparison result and the target song are returned, and the comparison result includes the target song.
[0011] In one embodiment of the present application, obtaining a comparison result based on comparing the target audio in a preset audio database includes: comparing the audio features of the target audio with the audio features of the song information in the preset audio database to obtain comparison results for each song information, wherein the preset audio database includes multiple song information and audio features corresponding to the song information; performing a similarity score on each of the comparison results, and sorting the comparison results according to the similarity score, wherein the sorting includes arranging the comparison results from high to low based on the similarity score to obtain a song sort list; and returning the song sort list to the user.
[0012] An embodiment of the present application further provides an in-vehicle music recognition device, comprising: an event acquisition module for acquiring an audio event currently being played by a vehicle in response to a music recognition instruction; an event classification module for classifying the audio event into a front-row event and a full-vehicle event based on a sound zone of the audio event, wherein the sound zone includes a front-row sound zone and a rear-seat sound zone; a priority setting module for setting the priority of the music playback event in all front-row events and full-vehicle events to a first priority, and setting the priority of other audio events in the full-vehicle event to a second priority, wherein the other audio events include other audio events in the full-vehicle event other than the music playback event; a priority arbitration module for terminating the audio event with the second priority and continuing to play the audio event with the first priority if the audio event currently being played by the vehicle includes an audio event with a first priority and an audio event with a second priority; and a song comparison and recognition module for receiving a reference sound in the rear-seat sound zone of the vehicle, and using the reference sound in the rear-seat sound zone as a target audio, and performing a comparison based on the target audio in a preset audio database to obtain a comparison result.
[0013] An embodiment of the present application also provides an electronic device, which includes: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the in-vehicle music recognition method as described in any of the above embodiments.
[0014] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor of a computer, the computer is caused to execute the in-vehicle music recognition method as described in any of the above embodiments.
[0015] Beneficial effects of the present application: The embodiments of the present application provide a method, device, electronic device, and storage medium for in-vehicle music recognition, the method comprising: obtaining audio events in response to a music recognition instruction; dividing the audio events into front-row events and whole-vehicle events based on the sound zones of the audio events; setting the priority of all front-row events to the first priority; setting the priority of music playback events in the whole-vehicle events to the first priority; setting the priority of other audio events in the whole-vehicle events to the second priority; and setting a higher priority for important front-row events and music playback events, thereby ensuring that music playback is not interrupted during the music recognition process and that important front-row events are not missed; pausing audio events with the second priority and maintaining the first priority. By pausing the second priority audio events, the rear-seat sound zone of the vehicle only processes music playback events, thereby ensuring the purity of the target audio; receiving a rear-seat sound zone reference sound of the vehicle and using the rear-seat sound zone reference sound as the target audio, the rear-seat sound zone reference sound being uploaded from an external audio chip; and comparing the target audio with a preset audio database to obtain a comparison result, thereby avoiding recording interference to obtain a purer target audio and improving the accuracy of music recognition of the target audio.
[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 1 is a schematic diagram of an implementation environment of an in-vehicle music recognition method according to an exemplary embodiment of the present application;
[0018] Figure 2 This is a flow chart of a method for in-vehicle music recognition shown in an exemplary embodiment of the present application;
[0019] Figure 3 This is a song search flow chart of in-vehicle music recognition shown in an exemplary embodiment of the present application;
[0020] Figure 4is a block diagram of an in-vehicle music recognition device shown in an exemplary embodiment of the present application;
[0021] Figure 5 It is a structural diagram of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0022] The following describes the embodiments of the present application through specific examples. Those skilled in the art can easily understand the other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.
[0023] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0024] It should be noted that in this application, "first," "second," and the like are merely used to distinguish similar objects, and do not limit the order or precedence of similar objects. The variations of "including," "having," and the like indicate that the scope of the subject of the term is not exclusive, in addition to the examples shown in the term.
[0025] It should be understood that the various numbers, step numbers, and other reference numerals in this application are provided for ease of description and are not intended to limit the scope of this application. The order of reference numerals in this application does not necessarily imply a specific order of execution; the order of execution of each process is determined by its function and inherent logic.
[0026] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0027] First of all, it is important to understand that when SOC plays audio events, it cannot process the audio data in a more sophisticated manner, such as rendering special sound effects. Although some SOCs have built-in audio chips, the cost is relatively high and their performance is not as good as that of external audio chips. Therefore, the audio event playback solution used in most vehicles still requires the use of the on-board system (SOC) and the external audio chip (DSP). The two work together to play audio events. SOC usually integrates multiple functional modules, including microprocessors, memory, I / O interfaces, etc., which are used to process and control various systems and devices in the vehicle. During the audio event playback process, SOC OC is generally responsible for decoding audio data, managing the playback and stop of audio events, etc., while DSP is responsible for receiving audio data from SOC or radio, processing and playing it, including frequency response control of audio signals, such as treble and bass gain adjustment, thereby improving the sound quality and listening experience of the audio. DSP can also achieve some special sound effects, such as surround sound, thereby enhancing the three-dimensional sense and immersiveness of the audio. DSP can also modify and process audio data, such as eliminating noise, enhancing audio details, etc., thereby improving the clarity and audibility of the audio. In addition, DSP is also used for recording and uploading recording data and reference sounds of each sound zone to SOC. Based on the setting of the external DSP audio chip, when the user turns on the song recognition function, if the song is played by the APP on the car system, the audio data of the song is input to the DSP through the car system. At this time, the audio data of the song can be obtained through the car system for identification. However, when the song played is the audio data of the radio (such as FM / AMDAB, etc.), instead of being directly processed by the system main chip (SOC), these audio data are played directly by the radio through the external audio chip. Since the music data has not passed through the car system at this time, and the song recognition function is in the car system, it is difficult for the car system to directly obtain the audio data of the song for music recognition. The existing solution generally adopts the method of ambient recording, recording the ambient sound through DSP, and then uploading it to the car system for song recognition. However, this method is susceptible to recording interference and has a great impact on the search results.
[0028] In order to solve the above problems, the embodiments of the present application respectively propose an in-vehicle music recognition method, an in-vehicle music recognition device, an electronic device, a computer-readable storage medium and a computer program product, which will be described in detail below.
[0029] See also Figure 1 , Figure 1This is a schematic diagram of an implementation environment of an in-vehicle music recognition method shown in an exemplary embodiment of the present application, wherein the implementation environment includes an in-vehicle system, a radio, a microphone, a speaker and a DSP external audio chip, wherein the in-vehicle system includes a recording management module, a channel mapping module, a focus arbitration module and a playback management module, and the DSP external audio chip is connected to the radio, the microphones of each sound zone and the speakers of each sound zone, wherein the recording management module is used to classify the recording data and reference sounds uploaded by the DSP according to their purpose for use by various functions, and a new module for listening to and identifying songs is added on the basis of the recording management module of the basic in-vehicle system to receive the reference sounds of the rear sound zone for music recognition; the channel mapping module is used to receive the audio data uploaded by the DSP and copy and divert the uploaded audio data for simultaneous use by various functional modules of the recording management module; the focus arbitration module is used to set the priority of each audio event. When music recognition is performed, low-priority audio events will be paused and high-priority audio events will continue to play; the playback management is used to control the pause and play of audio events. In this embodiment, the in-vehicle system functions include a music APP function, a voice assistant function, a song recognition function and an instrument function. The music APP function is used to trigger music playback events, the voice assistant function is used to trigger voice assistant events, the song recognition function is used to perform music recognition, and the instrument function is used to trigger instrument prompt events.
[0030] In one embodiment of the present application, the microphone includes a main driver's sound zone microphone, a passenger driver's sound zone microphone, a left rear sound zone microphone and a right rear sound zone microphone, and the speaker includes a main driver's sound zone speaker (left front sound zone speaker), a passenger driver's sound zone speaker (right front sound zone speaker), a left rear sound zone speaker and a right rear sound zone speaker.
[0031] In one embodiment of the present application, the DSP external audio chip uploads 4 channels of reference sound and 4 channels of microphone recording to the vehicle system.
[0032] See also Figure 2 , Figure 2 This is a flow chart of a method for identifying in-vehicle music according to an exemplary embodiment of the present application. Figure 1 The implementation environment shown is as follows. The method may also be applicable to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0033] like Figure 2 As shown, in an exemplary embodiment, the in-vehicle music recognition method includes at least steps S210 to S250, which are described in detail as follows:
[0034] Step S210 , in response to the music recognition instruction, obtaining the audio event currently being played by the vehicle.
[0035] In one embodiment of the present application, when a user clicks a song recognition function button or a user inputs a voice command such as "What song is playing now" through voice, the click command of the function button or the voice command input by the user is regarded as input into the vehicle system (SOC) as a music recognition command. The vehicle system responds to the music recognition command and obtains the audio event currently playing in the vehicle.
[0036] In one embodiment of the present application, audio events include but are not limited to music playback events, voice broadcasts, voice call events, and instrument panel prompt events.
[0037] Step S220 , classifying the audio event into a front row event and a full vehicle event based on the audio zone of the audio event, where the audio zone includes a front row audio zone and a rear row audio zone.
[0038] In one embodiment of the present application, the front sound zone includes a main driver's sound zone and a secondary driver's sound zone, and the rear sound zone includes a left rear sound zone and a right rear sound zone.
[0039] In one embodiment of the present application, audio events are divided into front-row events and whole-vehicle events based on the sound zone of the audio event, including: if the sound zone of the audio event is the front-row sound zone, the audio event is determined as a front-row event; if the sound zone of the audio event is the front-row sound zone and the rear-row sound zone, the audio event is determined as a whole-vehicle event, and the whole-vehicle event includes at least a music playback event.
[0040] In one embodiment of the present application, voice call events and instrument panel prompt events are played using the front row sound zone, so the voice call events and instrument panel prompt events are determined as front row events; voice broadcast events and music playback events are played using the front row sound zone and the rear row sound zone, then the voice broadcast events and music playback events are determined as full vehicle events.
[0041] Step S230, setting the priority of the music playing event in all front row events and all vehicle events to the first priority, and setting the priority of other audio events in all vehicle events to the second priority, where other audio events include other audio events in all vehicle events except the music playing event.
[0042] In one embodiment of the present application, if an audio event only occupies the front row sound zone when played, the audio event is determined to be a front row event. Front row events are generally more important audio events. If the playback of the front row event is terminated, it is likely to have a greater impact on the user experience, so the priority of all front row events in the audio event is set to the first priority.
[0043] In one embodiment of the present application, if an audio event occupies the front sound zone and the rear sound zone when played, the audio event is determined to be a vehicle-wide event. The vehicle-wide event is generally an entertainment event. If the playback of the vehicle-wide event is terminated, it will have little impact on the user experience. Therefore, when the vehicle performs music recognition, the priority of the vehicle-wide events other than the music playback event in the audio event is set to the second priority, and the priority of the music playback event is set to the first priority, so that the only vehicle-wide event allowed to be played when the vehicle performs music recognition is the music playback event, that is, when the vehicle performs music recognition, only the music playback event occupies the rear sound zone when played.
[0044] In one embodiment of the present application, if the front row events currently played by the vehicle include a voice call event and a dashboard prompt event, the priority of the voice call event is set to the first priority, and the priority of the dashboard prompt event is set to the first priority.
[0045] In one embodiment of the present application, if the vehicle-wide events currently being played include a music playback event and a voice announcement event, the priority of the music playback event is set to the first priority, and the priority of the voice announcement event is set to the second priority.
[0046] Step S240 : If the audio event currently being played by the vehicle includes an audio event with a first priority and an audio event with a second priority, the audio event with the second priority is terminated, and the audio event with the first priority is kept playing.
[0047] In one embodiment of the present application, if the audio event currently being played by the vehicle includes an audio event with a first priority level and an audio event with a second priority level, the audio event with a second priority level is terminated, and the audio event with a first priority level is maintained in playback, including: pausing other audio events in the vehicle-wide event except the music playback event, so that the music playback event is the only vehicle-wide event currently being played by the vehicle; and keeping the front row event and the music playback event playing.
[0048] In one embodiment of the present application, if the audio event currently being played by the vehicle does not include an audio event with a second priority, maintaining the playback priority of the audio event with a first priority includes: maintaining the continued playback of the front row event and the music playback event, and at this time only the music playback event occupies the rear row sound zone.
[0049] In one embodiment of the present application, if the vehicle's current audio events include voice broadcast, music playback, voice calls and instrument prompts, the second-priority audio event will be paused first, that is, the voice broadcast playback will be stopped, and the first-priority audio event playback will be maintained, that is, the voice calls and instrument prompts will be maintained. Because voice calls and instrument prompts are front-row events, only the front-row sound zone is used, and the rear-row sound zone will not be affected. Stopping the voice broadcast event prevents the voice broadcast event from interfering with the rear-row sound zone when obtaining the target audio, thereby ensuring that the music playback is uninterrupted while obtaining pure rear-row reference sound as the target audio without missing important front-row events.
[0050] Step S250 , receiving a reference sound of a rear sound zone of a vehicle, and using the reference sound of the rear sound zone as a target audio, performing a comparison in a preset audio database based on the target audio to obtain a comparison result.
[0051] In one embodiment of the present application, a rear sound zone reference sound of a vehicle is received, and the rear sound zone reference sound is used as the target audio. The rear sound zone reference sound is uploaded from an external audio chip, including: mapping the uploaded audio data of the external audio chip into eight channels, the eight channels including a driver's seat recording channel, a passenger's seat recording channel, a left rear recording channel, a right rear recording channel, a driver's seat reference sound channel, a passenger's seat reference sound channel, a left rear reference sound channel and a right rear reference sound channel; and using the audio data mapped from the left rear reference sound channel and the right rear reference sound channel as the rear sound zone reference sound.
[0052] In one embodiment of the present application, a rear sound zone reference sound of a vehicle is received, and the rear sound zone reference sound is used as the target audio. The rear sound zone reference sound is uploaded from an external audio chip and also includes: the external audio chip mixes the audio data to be played in each sound zone based on a preset mixing formula to obtain mixed audio data corresponding to each sound zone, and the sound zones include a main driver's seat sound zone, a co-driver's seat sound zone, a left rear sound zone and a right rear sound zone; the mixed audio data corresponding to the main driver's seat sound zone is used as the main driver's seat reference sound, the mixed audio data corresponding to the co-driver's seat sound zone is used as the co-driver's seat reference sound, the mixed audio data corresponding to the left rear sound zone is used as the left rear reference sound, and the mixed audio data corresponding to the right rear sound zone is used as the right rear reference sound; the left rear reference sound and the right rear reference sound are uploaded as the rear sound zone reference sounds to the vehicle's onboard system through the left rear reference sound channel and the right rear reference sound channel, so that the vehicle system receives the rear sound zone reference sound of the vehicle and uses the rear sound zone reference sound as the target audio.
[0053] In one embodiment of the present application, the reference sound of the vehicle system is generally used for noise reduction. The principle of noise reduction is to use the noise reduction algorithm to compare the ambient sound with the reference sound to obtain the real human voice after removing the vehicle computer sound. Therefore, when the DSP plays music, it sends the sound to the corresponding speaker while mixing all the sounds and dividing them into 4 sound zones according to the direction (main driver sound zone, co-driver sound zone, left rear sound zone and right rear sound zone) to obtain the reference sound of each sound zone. Then the external audio chip DSP will return the microphone recording data and the reference sound to the vehicle system together. In this application, the existing reference sound uploading method is borrowed, that is, the reference sound is uploaded through the DSP recording channel, but the reference sound in this application is not used for noise reduction, but for identifying the target audio for music recognition.
[0054] In one embodiment of the present application, the mapping channel of the external audio chip DSP to the vehicle system is divided into 8 channels, corresponding to the main driver recording channel, the co-driver recording channel, the left rear recording channel and the right rear recording channel respectively. Each type of audio event returns audio data of different channels. For example, the voice broadcast event returns all audio data of 8 channels, and the voice call event returns audio data of 2 channels, including the main driver recording channel and the main driver reference sound channel. When performing music recognition in this embodiment, audio data of 2 channels is returned, including the left rear reference sound and the right rear reference sound.
[0055] In one embodiment of the present application, when playing each audio event, the external audio chip DSP inputs the audio data to be played into the speakers of each sound zone and mixes the audio data to be played in each sound zone. If a sound zone is provided with n speakers, and the corresponding audio data to be played transmitted to each speaker are S1, S2, ..., and Sn respectively, the preset mixing formula includes:
[0056] Sref = (S1+S2+…+Sn) / n Formula (1)
[0057] Among them, Sref is the mixed audio data of a certain sound zone, S1, S2... and Sn are the audio data to be played corresponding to each speaker in the certain sound zone, and n represents the total number of speakers in the certain sound zone.
[0058] In one embodiment of the present application, after taking the reference sound of the rear sound zone as the target audio, it also includes: before performing a comparison based on the target audio in a preset audio database to obtain a comparison result, obtaining a new target audio every preset waiting time, and performing a comparison based on the new target audio in the preset audio database to obtain a comparison result, until the number of comparisons is greater than the preset number threshold or the comparison result is a successful comparison; if the number is greater than the preset number threshold and the comparison result is a failed comparison, then the failed comparison result is returned; if the comparison result is a successful comparison, then the successful comparison result and the target song are returned, and the comparison result includes the target song.
[0059] In one embodiment of the present application, a preset waiting time is set (for example, a new target audio is acquired every 0.5 seconds or 1 second), a preset number threshold is set (for example, recognition is attempted 5 times or 10 times, etc.), and a preset audio database is prepared, which contains a large amount of song audio feature data. It should be understood that the preset audio database in this embodiment can be local or on a server accessed through the network.
[0060] In one embodiment of the present application, a new target audio is captured from an external audio chip every preset waiting time, and feature information of the target audio (such as spectrum, MFCCs and melody line, etc.) is extracted. The extracted feature information is compared with the song features in a preset audio database, and an efficient search algorithm (such as hash-based search, tree structure search, etc.) is used to accelerate the speed of matching. If a matching song is found and the matching degree is higher than a preset threshold, the matching is considered successful and a successful matching result is returned. If no matching song is found, or the matching degree is lower than the preset threshold, the next loop is entered, and the song matching search based on the new target audio is repeated until the preset number threshold is reached. If the song is successfully identified before the preset number threshold is reached, the loop is exited immediately and the result is returned. If the matching is still not successful after reaching the preset number threshold, a failed matching result is returned.
[0061] In one embodiment of the present application, the comparison result (comparison success or comparison failure) and relevant information of the song (such as song name, singer, etc.) are returned to the user as the comparison result.
[0062] In one embodiment of the present application, obtaining a comparison result based on comparing the target audio in a preset audio database includes: comparing the audio features of the target audio with the audio features of the song information in the preset audio database to obtain comparison results for each song information, the preset audio database includes multiple song information and audio features corresponding to the song information; performing a similarity score on each comparison result, and sorting the comparison results according to the similarity score, the sorting including arranging the comparison results from high to low based on the similarity score to obtain a song sort list; and returning the song sort list to the user.
[0063] In one embodiment of the present application, audio features are extracted from the target audio, and the audio features include musical characteristics such as time domain, frequency domain, rhythm, harmony, and melody. Feature extraction can use an audio analysis algorithm, such as Fourier transform or Mel frequency cepstral coefficients, to compare the audio features of the target audio with the audio features of each song in a preset audio database. The comparison method includes calculating the similarity, distance, or correlation between the features, and calculating a similarity score for each comparison result. The higher the score, the more similar the audio features of the target audio are to a song in the preset audio database. The comparison results are sorted from high to low according to the similarity score, that is, the most similar songs are ranked at the front. The sorting results form a song sorting list. Based on the song sorting list, the top-ranked songs are selected as music recognition results. The top-ranked song can be selected as the music recognition result, or the top-ranked songs can be selected as the music recognition result, and the music recognition result is fed back to the user.
[0064] See Figure 3 , Figure 3 This is a song search flowchart for in-vehicle music recognition shown in an exemplary embodiment of the present application. In another embodiment of the present application, the song search process also includes obtaining target audio as music recognition audio after starting music recognition, searching the target audio on the server through the network, and obtaining the search results as music recognition results.
[0065] In one embodiment of the present application, the vehicle-mounted system uploads the target audio to the server via the network. After receiving the target audio, the server extracts the features of the target audio, compares the audio features of the target audio with the song features in the server, obtains the comparison results, and sends the comparison results to the vehicle-mounted system.
[0066] See also Figure 4 , Figure 4 This is a block diagram of an in-vehicle music recognition device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown is as follows. The apparatus may also be applicable to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the apparatus is applicable.
[0067] like Figure 4 As shown, the exemplary in-vehicle music recognition device includes an event acquisition module 401 , an event classification module 402 , a priority setting module 403 , a priority arbitration module 404 and a comparison and recognition module 405 .
[0068] An event acquisition module 401 is used to acquire an audio event currently being played by the vehicle in response to a music recognition instruction;
[0069] An event classification module 402 is configured to classify audio events into front row events and whole vehicle events based on audio zones of the audio events, wherein the audio zones include a front row audio zone and a rear row audio zone;
[0070] Priority setting module 403, configured to set the priority of the music playing event in all front row events and all vehicle events to the first priority, and set the priority of other audio events in all vehicle events to the second priority, where other audio events include all audio events in all vehicle events except the music playing event;
[0071] a priority arbitration module 404 for terminating the audio event with the second priority and continuing to play the audio event with the first priority if the audio event currently being played by the vehicle includes an audio event with a first priority and an audio event with a second priority;
[0072] The comparison and recognition module 405 is used to receive the reference sound of the rear sound area of the vehicle, and use the reference sound of the rear sound area as the target audio, and compare the target audio with the preset audio database to obtain a comparison result.
[0073] Figure 5 The following is a schematic diagram showing the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application. Figure 5 The computer system 500 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0074] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 503. The CPU 501, ROM 502 and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0075] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 508 including a hard disk; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. Removable media 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 510 as needed, so that computer programs read therefrom can be installed into the storage section 508 as needed.
[0076] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from a removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the various functions defined in the system of the present application are executed.
[0077] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0078] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0079] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.
[0080] Another aspect of the present application provides a computer-readable storage medium storing a computer program for modifying or altering the above embodiments within the spirit and scope of the present application. Therefore, any equivalent modifications or alterations made by a person skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.
Claims
1. A method for identifying in-vehicle music, characterized in that: The vehicle-mounted music recognition method comprises: In response to the music recognition instruction, obtaining an audio event currently played by the vehicle; Dividing the audio event into a front row event and a whole vehicle event based on a sound zone of the audio event, wherein the sound zone includes a front row sound zone and a rear row sound zone; The priority of the music playing event in all front row events and all vehicle events is set to the first priority, and the priority of other audio events in the all vehicle events is set to the second priority, wherein the other audio events include other audio events in the all vehicle events except the music playing event; If the audio event currently being played by the vehicle includes an audio event with a first priority and an audio event with a second priority, terminating the audio event with the second priority and keeping playing the audio event with the first priority; A reference sound of a rear sound zone of a vehicle is received, and the reference sound of the rear sound zone is used as a target audio, and a comparison is performed in a preset audio database based on the target audio to obtain a comparison result.
2. The in-vehicle music recognition method according to claim 1, characterized in that: Dividing the audio event into a front row event and a whole vehicle event based on the sound zone of the audio event includes: If the sound zone of the audio event is the front row sound zone, determining the audio event as a front row event; If the sound zones of the audio event are the front row sound zone and the rear row sound zone, the audio event is determined as a whole-vehicle event, and the whole-vehicle event at least includes a music playing event.
3. The in-vehicle music recognition method according to claim 1, characterized in that: Terminating the audio event with the second priority and keeping playing the audio event with the first priority includes: terminating other audio events in the whole vehicle event except the music playing event, so that the music playing event is the only whole vehicle event currently played by the vehicle; Keep the front row event and the music playing event playing continuously.
4. The in-vehicle music recognition method according to claim 1, characterized in that: Receiving a reference sound of a rear sound zone of a vehicle and using the reference sound of the rear sound zone as a target audio comprises: Mapping the audio data uploaded by the external audio chip into eight channels, wherein the eight channels include a driver's seat recording channel, a co-driver's seat recording channel, a left rear recording channel, a right rear recording channel, a driver's seat reference sound channel, a co-driver's seat reference sound channel, a left rear reference sound channel, and a right rear reference sound channel; The audio data mapped by the left rear reference sound channel and the right rear reference sound channel are used as the rear sound area reference sound.
5. The in-vehicle music recognition method according to claim 4, characterized in that: Receiving a reference sound of a rear sound zone of a vehicle and using the reference sound of the rear sound zone as a target audio, further comprising: The external audio chip mixes the audio data to be played in each sound zone based on the preset mixing formula to obtain mixed audio data corresponding to each sound zone, wherein the sound zones include a main driving sound zone, a secondary driving sound zone, a left rear sound zone, and a right rear sound zone; The mixed audio data corresponding to the main driver's seat sound area is used as the main driver's seat reference sound, the mixed audio data corresponding to the auxiliary driver's seat sound area is used as the auxiliary driver's seat reference sound, the mixed audio data corresponding to the left rear sound area is used as the left rear reference sound, and the mixed audio data corresponding to the right rear sound area is used as the right rear reference sound; The left rear reference sound and the right rear reference sound are uploaded to the vehicle's onboard system as the rear sound zone reference sound through the left rear reference sound channel and the right rear reference sound channel, so that the vehicle system receives the rear sound zone reference sound of the vehicle and uses the rear sound zone reference sound as the target audio.
6. The in-vehicle music recognition method according to claim 1, characterized in that: After taking the back row sound area reference sound as the target audio, the method further includes: Before the target audio is compared in a preset audio database to obtain a comparison, a new target audio is obtained every preset waiting time, and a comparison is performed in the preset audio database based on the new target audio to obtain a comparison result, until the number of comparisons is greater than a preset number threshold or the comparison result is a successful comparison; If the number is greater than the preset number threshold and the comparison result is a comparison failure, a comparison failure result is returned; If the comparison result is successful, the successful comparison result and the target song are returned, and the comparison result includes the target song.
7. The in-vehicle music recognition method according to claim 1, characterized in that: Comparing the target audio in a preset audio database to obtain a comparison result includes: Comparing the audio features of the target audio with the audio features of the song information in the preset audio database to obtain comparison results of each song information, wherein the preset audio database includes a plurality of song information and the audio features corresponding to the song information; Score each of the comparison results according to a similarity score, and sort the comparison results according to the similarity score, wherein the sorting includes arranging the comparison results from high to low based on the similarity score to obtain a song sorting list; The ranked list of songs is returned to the user.
8. A vehicle-mounted music recognition device, characterized in that: The vehicle-mounted music recognition device comprises: An event acquisition module, for acquiring an audio event currently being played by the vehicle in response to a music recognition instruction; An event classification module, configured to classify the audio event into a front row event and a whole vehicle event based on a sound zone of the audio event, wherein the sound zone includes a front row sound zone and a rear row sound zone; A priority setting module, used to set the priority of the music playing event in all front row events and all vehicle events to the first priority, and set the priority of other audio events in the all vehicle events to the second priority, wherein the other audio events include other audio events in the all vehicle events except the music playing event; a priority arbitration module, configured to, if the audio event currently being played by the vehicle includes an audio event with a first priority and an audio event with a second priority, terminate the audio event with the second priority and keep playing the audio event with the first priority; The comparison and recognition module is used to receive the reference sound of the rear sound area of the vehicle, and use the reference sound of the rear sound area as the target audio, and compare the target audio in a preset audio database to obtain a comparison result.
9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the in-vehicle music recognition method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the in-vehicle music recognition method as described in any one of claims 1-7.
Citation Information
Cited By
Audio processing method and system based on vehicle, vehicle, storage medium and product
CN121106044A
