Method for reducing voice time delay of karaoke software, electronic equipment and storage medium
By directly mapping recording memory and hardware memory in karaoke software, and monitoring the playback actions of the accompaniment in real time for mixing and alignment, the vocal delay problem is solved, and the Ka song experience and audio processing efficiency are improved.
Patent Information
- Application Number
- CN202510121598.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-02
AI Technical Summary
In existing karaoke software, the delay problem between the input and output of vocals from the microphone is caused by poor singing experience of the user, affecting emotional investment and overall satisfaction.
By detecting the opening of the karaoke software in the operating system, directly map the recording memory and hardware memory, and monitor the playback of the accompaniment, aligning the recording data with the accompaniment music to mix and play the mixing data in real time, reducing the intermediate links of data transmission.
It has achieved the reduction of the vocal delay in the karaoke software, improved the audio processing efficiency and response speed, improved the user's karaoke experience, and made the user's latency feel very low.
Smart Images

Figure CN119920224A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to a method for reducing vocal delay in karaoke software, a control device, an electronic device, and a computer-readable storage medium. Background Art
[0002] Karaoke has become a popular form of entertainment amid the rapid development of multimedia technology. Modern users can not only enjoy singing in traditional karaoke rooms, but also realize the karaoke experience on personal devices through various software applications. However, despite the convenience and low cost advantages provided by software karaoke solutions, they have long faced a key problem: the delay between the human voice from the microphone input to the final output from the speaker. This delay is particularly noticeable in the user's singing experience, and inconsistent delays can greatly affect the user's emotional engagement and overall satisfaction.
[0003] In existing karaoke singing software solutions, vocal delay is a prominent technical challenge. This delay is mainly due to the non-optimization of data processing, transmission and audio processing algorithms. Specifically, when a user sings through a microphone, his or her voice needs to be recorded, processed, mixed with the backing music, and finally played through the speaker. In this process, each link may introduce delay, resulting in a significant time lag in the final audio output relative to the user's actual singing.
[0004] This delay has a significant impact on the user experience. Users may feel that their voices are not in harmony with the accompanying music, which destroys the rhythm and melody of the singing. This may cause users to lose interest in software karaoke solutions and turn to traditional hardware karaoke equipment, even though the latter is more expensive.
[0005] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0006] The main purpose of the present application is to provide a method for reducing the vocal delay of a karaoke software, a control device, an electronic device and a computer-readable storage medium, aiming to reduce the vocal delay when singing karaoke based on the karaoke software.
[0007] To achieve the above object, the present application provides a method for reducing vocal delay in karaoke software, comprising the following steps: When the karaoke software on the operating system is detected to be opened, the recording function of the microphone is turned on; the operating system is responsible for managing the recording and sound playback of the microphone on the board; the recording memory is directly mapped to the underlying hardware memory, and the recording memory is consistent with the playback memory; Monitor the accompaniment playback action based on the karaoke mode on the karaoke software, and obtain the corresponding accompaniment music based on the accompaniment module; wherein the data format and memory set by the accompaniment module are consistent with the data format and memory of the recording; When the user's karaoke action is detected, the microphone recording data is mixed and aligned with the backing music of the karaoke software to generate mixed data; Playback of mix data in real time based on direct mapping between playback memory and underlying hardware memory.
[0008] To achieve the above object, the present application also provides a control device, comprising: The recording module is used to detect that the karaoke software on the operating system is turned on and turn on the recording function of the microphone; the operating system is responsible for managing the recording of the microphone on the board and the playback of the sound; the recording memory is directly mapped to the underlying hardware memory, and the recording memory is consistent with the playback memory; The singing accompaniment module is used to monitor the singing accompaniment playing action based on the karaoke mode on the karaoke software, and obtain the corresponding singing accompaniment music based on the singing accompaniment module; wherein the data format and memory set by the singing accompaniment module are consistent with the data format and memory of the recording; A mixing module is used to mix and align the microphone recording data with the accompaniment music of the karaoke software when detecting the user's karaoke action, and generate mixing data; The playback module is used to play the mixed data in real time based on the direct mapping between the playback memory and the underlying hardware memory.
[0009] To achieve the above-mentioned purpose, the present application also provides an electronic device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the computer program is executed by the processor, the steps of the method for reducing the vocal delay of the karaoke software as described above are implemented.
[0010] To achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for reducing the vocal delay of the karaoke software as mentioned above are implemented.
[0011] The method for reducing the vocal delay of the karaoke software provided by the present application, the control device, the electronic device and the computer-readable storage medium reduce the intermediate links of data transmission by directly mapping the memory, and the data transmission speed is faster and the delay is lower. The real-time detection and response mechanism ensures the timely capture of the user's start singing and pause actions, and improves the response speed of the system. The recording memory is consistent with the playback memory, and the accompaniment music data format and memory are consistent with the recording data, which ensures high efficiency and low error in the data processing process, and the consistent memory management reduces the time overhead of data conversion and improves the overall audio processing efficiency. That is, from microphone recording to mixing data generation, and then to mixing data playback, the whole process ensures low latency through direct mapping and efficient memory management; the real-time playback mechanism ensures that the mixing data can be output in time, so that the user feels very low latency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 This is a schematic diagram of the steps of a method for reducing vocal delay in a karaoke software in an embodiment of the present application; Figure 2 This is a schematic diagram of a control device in an embodiment of the present application; Figure 3 A schematic diagram of the internal structure of an electronic device according to an embodiment of the present application.
[0013] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0014] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0015] In addition, if the descriptions of "first", "second", etc. are involved in this application, they are only used for descriptive purposes (such as for distinguishing the same or similar features), and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0016] Reference Figure 1 In one embodiment, the method for reducing the vocal delay of a karaoke software includes: Step S10, when it is detected that the karaoke software on the operating system is turned on, the recording function of the microphone is turned on; wherein the operating system is responsible for managing the recording of the microphone on the board and the playback of the sound; the recording memory is directly mapped to the underlying hardware memory, and the recording memory is consistent with the playback memory; Step S20, monitoring the accompaniment playing action based on the karaoke mode on the karaoke software, and obtaining corresponding accompaniment music based on the accompaniment module; wherein the data format and memory set by the accompaniment module are consistent with the data format and memory of the recording; Step S30: When a karaoke action of the user is detected, the recording data of the microphone is mixed and aligned with the accompanying music of the karaoke software to generate mixed data; Step S40: Based on the direct mapping between the playback memory and the underlying hardware memory, the audio mixing data is played in real time.
[0017] In this embodiment, the execution terminal of the embodiment may be an electronic device, or may be other equipment or devices (such as a control device) that controls the electronic device.
[0018] As described in step S10, when the user starts the karaoke software, the operating system will detect the opening status of the karaoke software through the application startup event or API call. The detection can be implemented through the background service of the operating system or the communication interface with the karaoke software. The purpose of the detection is to ensure that the recording function will be pre-activated only when the karaoke software is running to avoid unnecessary resource occupation.
[0019] Optionally, the karaoke software is opened by the user and enters the foreground running state. The operating system receives the running signal of the karaoke software and confirms that the karaoke software has been started. After detecting that the karaoke software is opened, the operating system automatically starts the recording function of the microphone.
[0020] The recording function of the microphone is controlled by the audio management module of the operating system (such as the audio service of Windows, the audio system of Android, etc.). After the recording function is started, the microphone starts to capture the sound signals in the environment and converts them into digital audio data.
[0021] Optionally, before starting the recording function, the operating system will check whether the user has granted the karaoke software permission to use the microphone. If the permission is not granted, the operating system will prompt the user to grant the recording permission, or directly turn off the recording function to avoid privacy issues.
[0022] The operating system is responsible for unified management and scheduling of hardware resources, including the microphone (the microphone used by the user) and speakers (or headphones) on the board. The recording and playback functions are controlled by the underlying driver of the operating system to ensure the normal operation of the hardware devices.
[0023] The operating system interacts with the audio hardware on the board (such as audio codecs, digital signal processors, etc.) through the audio driver. When recording, the operating system converts the analog signal captured by the microphone into a digital signal and stores it in the recording memory. When playing, the operating system converts the digital audio signal into an analog signal and outputs it through speakers or headphones.
[0024] The recording memory and the underlying hardware memory are directly mapped, without the need for intermediate layer caching or processing. Direct mapping reduces data transmission delays and ensures the real-time and efficient recording data.
[0025] Optionally, the operating system binds the recording memory area to the underlying hardware memory area through a hardware abstraction layer or by directly interacting with a hardware driver.
[0026] In addition, the structure and data format of the recording memory and playback memory are consistent, ensuring that the recording data can be seamlessly mixed with the playback data. This mechanism reduces the steps of data conversion and processing, further reducing latency.
[0027] Optionally, the recording memory and playback memory use the same audio parameters such as sampling rate, bit rate, number of channels, etc. The storage format of the recording memory and playback memory is also consistent, ensuring that the recorded data can be directly used for playback or mixing processing.
[0028] The core goal of step S10 is to ensure that the recording function can be started quickly and the recording data can be efficiently transmitted and stored through the management of the operating system and the optimization of hardware resources. Specifically, by detecting the opening of the karaoke software, starting the microphone recording function, relying on the hardware management capabilities of the operating system, achieving direct mapping of the recording memory to the hardware memory, and ensuring the consistency of the recording memory and the playback memory, step S10 lays the foundation for the subsequent recording, mixing and playback processes, reduces the human voice delay, and improves the karaoke experience.
[0029] As described in step S20, the system monitors the user operations in the karaoke software in real time, especially the actions related to the accompaniment music. Among them, the monitoring can be implemented through the API interface of the karaoke software or the callback mechanism of the operating system. The purpose of monitoring is to capture the key moment when the user selects the karaoke mode and plays the accompaniment music, so as to obtain the accompaniment music data in time.
[0030] The trigger condition may be detecting that a user in the karaoke software has triggered a singing accompaniment playing action; or detecting a singing accompaniment music playing event, such as an audio decoder starting to process singing accompaniment music data.
[0031] For example, the user selects a singing song in the karaoke software and clicks the "play" or "start singing" button; or, the user selects a karaoke mode (eg, karaoke mode, chorus mode, etc.), and the singing music starts playing.
[0032] The accompaniment module will obtain the accompaniment music data from local storage or remote server according to the user's operation.
[0033] Optionally, the accompaniment music can be pre-stored in the user's device, and the accompaniment module directly reads the local file (such as MP3, WAV and other formats); or, if the accompaniment music is not stored locally, the accompaniment module will download the accompaniment music data from the server via the network; or, in some cases, the accompaniment music can be transmitted to the device in real time in the form of streaming media, and the accompaniment module will decode and play it in real time.
[0034] The music data format processed by the accompaniment module is consistent with the sound data format collected by the recording module. For example, if the recording module uses a 44.1kHz sampling rate, a 16-bit sampling depth, and a dual-channel format, the accompaniment music obtained by the accompaniment module must also use the same format.
[0035] If the data format of the acquired accompaniment music is inconsistent with the data format used for recording, the accompaniment module can first convert the format of the accompaniment music to make it consistent with the format of the recording data.
[0036] The memory structure of the singing module is consistent with the memory structure of the recording module to ensure that the recording data and the singing music data can be seamlessly connected. This can include memory storage layout, data alignment, buffer size, etc.
[0037] Optionally, the accompaniment module interacts with the operating system through a unified audio framework (such as OpenSL ES for Android, DirectSound for Windows, etc.). The accompaniment module allocates an area in the memory for the accompaniment music data that is the same as the recording memory structure to ensure that the data can be quickly aligned and processed.
[0038] The core goal of step S20 is to obtain the accompaniment music data in time by monitoring the user's accompaniment playback action, and prepare for the subsequent mixing alignment. Specifically, by real-time monitoring the accompaniment playback action in the karaoke software, obtaining the accompaniment music locally or remotely, and ensuring that the data format and memory of the accompaniment module are consistent with the recording module, step S20 lays the foundation for the subsequent recording and mixing of the accompaniment music.
[0039] As described in step S30, the system monitors the recording input of the microphone in real time to determine whether the user starts singing. The detection can be achieved by analyzing the volume, frequency characteristics or other audio characteristics of the recording data. The purpose of monitoring is to capture the key moment when the user starts singing so as to perform mixing alignment in time.
[0040] Optionally, when the volume of the microphone recording data reaches a certain threshold (for example, exceeding the ambient noise level), the system will determine that the user has started singing. The system can also confirm whether the user has started singing by analyzing the frequency characteristics of the recording data (such as detecting the human voice frequency range).
[0041] Mix alignment refers to synchronizing the microphone recording data (i.e. the user's voice) with the backing music data in time to ensure that the two can be played at the same time. The purpose of alignment is to eliminate the time delay between the recording data and the backing music, making the mixing effect more natural.
[0042] The mixing process may be to align the recording data and the accompaniment music directly on the time axis, or to mix the recording data and the accompaniment music data in a certain ratio to generate new audio data. The mixing ratio may be adjusted according to the needs of the user, such as the user's voice being dominant or the accompaniment music being dominant (i.e., the recording data and the accompaniment music data are added in proportion according to a preset weight ratio).
[0043] The core goal of step S30 is to generate high-quality mixed data by detecting the user's karaoke action, mixing and aligning the microphone recording data with the backing music. Specifically, by real-time monitoring of the user's singing action, time-aligning the recording data and the backing music, and using an efficient mixing algorithm to generate mixed data, step S30 lays the foundation for subsequent real-time playback, reduces the time delay between the human voice and the backing music, and improves the karaoke experience.
[0044] As described in step S40, the generated audio mixing data is transmitted to the underlying hardware memory through the playback memory and played by the audio output device (such as a speaker or earphone). The playback process is controlled by the audio playback module of the operating system to ensure the real-time transmission of the audio mixing data.
[0045] Direct mapping between playback memory and underlying hardware memory reduces the intermediate links of data transmission and improves the real-time performance and efficiency of playback. The direct mapping mechanism ensures that the mixing data can be quickly transmitted to the audio output device to avoid delays.
[0046] The system will monitor the generation and playback of mixing data in real time to ensure that the mixing data can be output in a timely manner.
[0047] In the above embodiment, the purpose of reducing the human voice delay in the karaoke software is achieved mainly through the following aspects: (1) Direct mapping and consistent memory management: The recording memory is directly mapped to the underlying hardware memory, which reduces the intermediate links in data transmission and improves data transmission efficiency. The recording memory is consistent with the playback memory to ensure the consistency of data format and structure, reducing the overhead of data conversion.
[0048] (2) Real-time detection and response: When the karaoke software is detected to be open, the microphone recording function is immediately turned on to ensure that the sound can be captured in time when the user starts singing. In addition, by monitoring the accompaniment playback action of the karaoke software, the accompaniment music data is obtained in time to ensure that the accompaniment music is synchronized with the user's voice.
[0049] (3) Mix alignment and real-time processing: When the user starts singing, the microphone recording data is time-aligned with the backing music to ensure the time synchronization of the mixed data. The generated mixed data is transmitted to the underlying hardware memory in real time through the direct-mapped playback memory and played by the audio output device, reducing playback delay.
[0050] In this way, by directly mapping the memory, the intermediate links of data transmission are reduced, the data transmission speed is faster, and the latency is lower. The real-time detection and response mechanism ensures the timely capture of the user's start and pause actions, and improves the response speed of the system. The recording memory is consistent with the playback memory, and the accompaniment music data format and memory are consistent with the recording data, which ensures high efficiency and low errors in the data processing process. The consistent memory management reduces the time overhead of data conversion and improves the overall audio processing efficiency. That is, from microphone recording to mixing data generation, and then to mixing data playback, the entire process ensures low latency through direct mapping and efficient memory management; the real-time playback mechanism ensures that the mixing data can be output in time, so that the latency felt by the user is very low.
[0051] In addition, direct memory mapping reduces intermediate processing steps and reduces system resource usage; dynamic adjustment mechanism and real-time monitoring mechanism ensure efficient use of system resources and avoid unnecessary waste of resources. High real-time performance and low latency enhance the user's singing experience, and users can feel a more natural mixing effect.
[0052] In one embodiment, based on the above embodiment, the method for reducing the vocal delay of the karaoke software further includes: Based on big data analysis technology, the rhythm speed of each accompaniment music in the pre-stored music library is analyzed to determine the slice size corresponding to each accompaniment music; If the accompaniment music obtained by the accompaniment module comes from a pre-stored music library, the size of the accompaniment module memory, recording memory and playback memory is adjusted according to the slice size corresponding to the accompaniment music.
[0053] In this embodiment, big data analysis technology is used to perform rhythm analysis on the accompaniment music in the pre-stored music library. The rhythm information of each accompaniment music, such as BPM (beats per minute), beat interval, etc., is extracted through an algorithm.
[0054] Determine the appropriate audio slice size based on the tempo of the accompaniment music. For music with a faster tempo, you can set a smaller slice size to improve the processing refinement; for music with a slower tempo, you can set a larger slice size to reduce processing overhead.
[0055] The determination of the slice size directly affects the efficiency of memory allocation and management. By optimizing the slice size, memory resources can be used more effectively and data processing delays can be reduced.
[0056] If the accompaniment music obtained by the accompaniment module comes from the pre-stored repertoire library, the size of the accompaniment module memory, recording memory and playback memory will be adjusted according to the slice size corresponding to the accompaniment music. That is, when the accompaniment music obtained by the accompaniment module comes from the pre-stored repertoire library, the system will dynamically adjust the size of the relevant memory according to the slice size obtained by pre-analysis of the music, including adjusting the accompaniment module memory, recording memory and playback memory.
[0057] By dynamically adjusting the memory size, the memory resources are matched with the processing requirements of the current accompaniment music, thus avoiding resource waste and improving processing efficiency.
[0058] For example, for music with a faster tempo, increase memory allocation to support finer-grained processing; for music with a slower tempo, appropriately reduce memory allocation to optimize resource utilization.
[0059] The adjusted memory size is kept consistent between the backing module, recording memory, and playback memory, ensuring the consistency of format and structure during data processing. This helps to reduce the time overhead of data conversion and further reduce latency.
[0060] By introducing big data analysis technology, rhythm analysis is performed on the accompaniment music in the pre-stored music library, and the memory size is dynamically adjusted according to the analysis results. This embodiment not only improves the efficiency of memory use, but also makes audio processing more refined, thereby improving the overall user experience.
[0061] In one embodiment, based on the above embodiment, the method for reducing the vocal delay of the karaoke software further includes: According to the historical karaoke data of the current user, the artificial delay factor is analyzed to obtain the delay compensation value; Based on the delay compensation value, each pair of recording data and accompaniment music combination that matches the recording memory and the accompaniment module memory is mixed and aligned.
[0062] In this embodiment, based on the above embodiment, this embodiment further introduces historical karaoke data analysis technology, and determines the delay compensation value by analyzing the user's historical karaoke data, thereby further optimizing the mixing alignment process and reducing the vocal delay.
[0063] Among them, according to the historical karaoke data of the current user, the human delay factor is analyzed to obtain the delay compensation value.
[0064] Optionally, historical karaoke data of the current user is collected, including the user's recording data of different tracks, backing music data, and user operation records.
[0065] Through data analysis technology, the user's vocal delay in different songs is analyzed. Identify the human factors that may cause delays, such as the user's singing habits, operation delays, etc.
[0066] Based on the analysis results, a delay compensation value is calculated to correct the delay problem of the user during the current karaoke session. The delay compensation value can be a fixed value or a dynamically adjusted value, depending on the actual performance of the user and the characteristics of the song.
[0067] Optionally, based on the delay compensation value, each pair of recording data and accompaniment music combination that matches the recording memory and the accompaniment module memory is mixed and aligned. When the user starts singing, the system processes the recording data and the accompaniment music data in real time, and accurately aligns each pair of recording data and accompaniment music combination based on the calculated delay compensation value.
[0068] During the mix alignment process, the system will adjust the recording data on the time axis according to the delay compensation value to ensure that the recording data is accurately synchronized with the backing music. For example, if the delay compensation value is 50 milliseconds, the system will adjust the recording data forward or backward by 50 milliseconds on the time axis to ensure synchronization between the recording and the backing music.
[0069] The adjusted mixing data is generated in real time and transmitted to the underlying hardware memory through the playback memory, and played by the audio output device. The real-time processing mechanism ensures that the mixing data can be output in time, and the latency felt by the user is significantly reduced.
[0070] In this way, not only the efficiency and real-time performance of data transmission are improved through direct mapping of memory and consistent memory management, but also the mixing alignment process is further optimized through historical data analysis and delay compensation mechanism, ensuring that users can get a more natural and smooth mixing effect when singing.
[0071] In one embodiment, based on the above embodiment, the method for reducing the vocal delay of the karaoke software further includes: When the current user's continuous karaoke time is longer than the preset time, a delay compensation value is generated; Based on the delay compensation value, each pair of recording data and accompaniment music combination that matches the recording memory and the accompaniment module memory is mixed and aligned.
[0072] In this embodiment, based on the above embodiment, another method of generating a delay compensation value is proposed. By monitoring the duration of the user's continuous karaoke, and generating a delay compensation value after exceeding a preset duration, the mixing alignment process is further optimized and the vocal delay is reduced.
[0073] Among them, when the current user's continuous karaoke time is longer than the preset time, a delay compensation value is generated.
[0074] Optionally, the system will monitor in real time the duration of the current user's continuous karaoke singing, that is, the length of time from the start of the user's karaoke singing to the current moment.
[0075] When the user's continuous karaoke duration exceeds the preset duration (for example, 30 minutes or longer), the system will trigger the generation mechanism of the delay compensation value.
[0076] Optionally, when the duration of continuous karaoke is greater than the preset duration, the system will generate a delay compensation value based on the current user's karaoke performance and system operating status.
[0077] The delay compensation value may be a value calculated in real time, taking into account the user's current singing tempo, system performance (such as CPU load, memory usage, etc.), and other dynamic factors.
[0078] The delay compensation value is used to correct the delay problems that may occur during long-term karaoke, such as vocal delay caused by fatigue, system processing delay, etc. Based on the delay compensation value, each pair of recording data and accompaniment music combination that matches the recording memory and the accompaniment module memory is mixed and aligned. Once the delay compensation value is generated, the system will accurately align the recorded data with the backing music based on the value.
[0079] Optionally, for each pair of recording data and accompaniment music, the system will adjust the recording data on the time axis according to the delay compensation value to ensure that the recording data and the accompaniment music are accurately synchronized in time.
[0080] The delay compensation value is generally a positive value, indicating that there is a delay in the recorded data relative to the accompaniment music, and the recorded data needs to be adjusted forward on the time axis.
[0081] The adjusted mixing data is generated in real time and transmitted to the underlying hardware memory through the playback memory, and played by the audio output device. The real-time processing mechanism ensures that the mixing data can be output in time, and the latency felt by the user is significantly reduced.
[0082] In this way, by monitoring the duration of users' continuous karaoke sessions and dynamically generating delay compensation values, we can effectively deal with delay issues that may occur during users' long karaoke sessions. At the same time, the alignment mechanism based on the delay compensation value ensures the precise synchronization of the recorded data and the accompaniment music, thereby improving the user's karaoke experience.
[0083] In one embodiment, based on the above embodiment, the step of generating a delay compensation value after the current user's continuous karaoke duration is longer than a preset duration includes: When the current user's continuous karaoke time is longer than the preset time, the current breathing rhythm is analyzed based on the current recording data; Calculate the deviation between the current breathing rhythm and the initial breathing rhythm; If the deviation value is greater than a preset threshold, a delay compensation value is generated.
[0084] In this embodiment, based on the above embodiment, this embodiment describes in detail how to generate a delay compensation value by analyzing the user's breathing rhythm when the user continues to sing karaoke for a longer time than a preset time. This method can more accurately capture the delay changes that may occur when the user sings for a long time, thereby further optimizing the mixing alignment process.
[0085] Optionally, after the user continues to sing karaoke for longer than a preset time (such as 30 minutes), the system starts to analyze the breathing rhythm of the current recording data. Using speech signal processing technology, the breathing signal in the recording data is extracted to analyze the user's breathing frequency and pattern.
[0086] Optionally, the breathing signal is separated from the recorded data through audio filtering and feature extraction techniques. The breathing signal usually appears as low-frequency vibrations and can be extracted through a bandpass filter.
[0087] Optionally, a peak detection or periodicity detection algorithm is used to identify respiratory cycles in the respiratory signal and calculate the respiratory frequency.
[0088] When the user starts singing karaoke, the system records the user's initial breathing rhythm as a reference, and calculates the deviation between the currently detected breathing rhythm and the initial breathing rhythm.
[0089] Optionally, the deviation value may be a percentage change in breathing frequency or a difference in breathing cycles. The deviation value reflects the breathing changes of the user after singing for a long time. The breathing rhythm may change due to fatigue and other reasons, thereby affecting the singing delay.
[0090] Optionally, if the deviation value is greater than a preset threshold, a delay compensation value is generated. The system presets a threshold for respiratory rhythm deviation, such as a respiratory frequency change of more than 10%. When the respiratory rhythm deviation value exceeds the preset threshold, the system generates a corresponding delay compensation value.
[0091] Optionally, the size of the delay compensation value can be adjusted according to the size of the deviation value. For example, the larger the deviation value is, the larger the delay compensation value is.
[0092] The generated delay compensation value is applied to the mixing alignment process to adjust the recording data on the time axis to compensate for the delay change caused by the change of breathing rhythm.
[0093] In this way, through dynamic monitoring and analysis of the user's breathing rhythm, the physiological changes of the user during long-term karaoke can be captured in time, so as to dynamically adjust the delay compensation value to ensure that the recorded data and the backing music are always accurately aligned, thereby improving the user's karaoke experience.
[0094] In one embodiment, based on the above embodiment, the method for reducing the vocal delay of the karaoke software further includes: Based on direct memory access technology, direct data transmission is achieved between various memories.
[0095] In this embodiment, based on the above embodiment, this embodiment introduces direct memory access (DMA) technology to further optimize data transmission efficiency, thereby reducing the vocal delay of the karaoke software. DMA technology allows the system to directly transfer data between memories without CPU intervention, thereby increasing transmission speed and reducing delay.
[0096] Optionally, DMA technology is used to achieve direct data transmission between the recording memory, the accompaniment module memory, the playback memory and the underlying hardware memory. Through the DMA controller, the system can directly transfer data between different memories without the need for transfer through the CPU.
[0097] Data transmission process: After the recording data is collected from the microphone, it is directly transferred to the recording memory through DMA. The recording memory and the accompaniment module memory share data directly through DMA, ensuring the fast alignment of the accompaniment music and the recording data at the memory level. The playback memory obtains the mixing data from the accompaniment module memory and the recording memory through DMA, and directly transfers it to the audio output device.
[0098] In traditional data transmission methods, the CPU needs to participate in the transmission and management of each data packet, which will increase the CPU load and may introduce additional latency. Through DMA technology, the CPU's participation is minimized, the efficiency of data transmission is significantly improved, and the latency is reduced.
[0099] In this way, not only the efficiency of data transmission is improved through DMA technology, but also fast data sharing between memories is achieved through direct memory mapping and consistency management, which further reduces the voice delay and improves the user's karaoke experience.
[0100] In one embodiment, based on the above embodiment, the method for reducing the vocal delay of the karaoke software further includes: The lyrics display is synchronized based on the playback node of the accompaniment music in the mixing data.
[0101] In this embodiment, based on the above embodiment, this embodiment proposes a function of realizing the synchronization of lyrics display based on the playback node of the accompaniment music in the mixed data. This function can further enhance the user's karaoke experience, allowing the user to accurately follow the lyrics while singing, and enhance interactivity and entertainment.
[0102] Optionally, by analyzing the accompaniment music signal in the mixed data, the music playback nodes (such as rhythm changes, lyrics switching, etc.) are identified. According to these playback nodes, the corresponding lyrics are synchronously displayed to ensure that the lyrics accurately correspond to the actual singing content.
[0103] Optionally, in the accompaniment music production stage, a corresponding timestamp is generated for each lyric, indicating the start time of the lyric in the music. These timestamps can be stored in the lyric file and associated with the accompaniment music.
[0104] During playback, the system analyzes the backing music signal in the mixed data in real time and detects the current playback time of the music. According to the detected music playback time, the lyrics with the corresponding timestamp are extracted from the lyrics file and displayed in real time on the interface. This ensures that the lyrics display is synchronized with the actual singing content, and the user can clearly see the lyrics currently being sung.
[0105] To further enhance the user experience, a lyrics highlighting function can be implemented, that is, when the user sings the current lyrics, the corresponding lyrics are highlighted. By analyzing the synchronization of the recording data and the accompaniment music, the lyrics part currently sung by the user is determined and highlighted.
[0106] Optionally, a function is provided for users to adjust the lyrics display, such as advancing or delaying the lyrics display to accommodate different singing speeds or personal preferences.
[0107] The method of this embodiment not only reduces the human voice delay, but also improves the user's interactivity and entertainment through the lyrics synchronization function, making the karaoke experience more complete and rich.
[0108] In addition, refer to Figure 2 In an embodiment of the present application, a control device Z10 is further provided, comprising: The recording module Z11 is used to detect that the karaoke software on the operating system is turned on and turn on the recording function of the microphone; the operating system is responsible for managing the recording of the microphone on the board and the playback of the sound; the recording memory is directly mapped to the underlying hardware memory, and the recording memory is consistent with the playback memory; The singing accompaniment module Z12 is used to monitor the singing accompaniment playing action based on the karaoke mode on the karaoke software, and obtain the corresponding singing accompaniment music based on the singing accompaniment module; wherein the data format and memory set by the singing accompaniment module are consistent with the data format and memory of the recording; The mixing module Z13 is used to mix and align the recording data of the microphone with the accompanying music of the karaoke software when detecting the karaoke action of the user, so as to generate mixing data; The playback module Z14 is used to play the mixed audio data in real time based on the direct mapping between the playback memory and the underlying hardware memory.
[0109] Optionally, the control device Z10 may be a virtual control device (such as a virtual machine) or a physical device (such as a physical device other than an electronic device that can execute the corresponding method).
[0110] In addition, an electronic device is also provided in an embodiment of the present application. The internal structure of the electronic device can be as follows: Figure 3 As shown, it includes a processor, a memory, a communication interface and an input interface connected by a system bus. Among them, the processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database is used to store data called by the computer program. The communication interface is used to communicate data with an external terminal. The input interface is used to receive a signal input by an external device. When the computer program is executed by the processor, a method for reducing the vocal delay of a karaoke software as described in the above embodiment is implemented.
[0111] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the electronic device to which the present application scheme is applied. For example, in some optional embodiments, the electronic device may also include an output interface (not shown in the figure), and the output interface is also connected to the system bus and is used to output corresponding signals to the peripheral device.
[0112] In addition, the present application also proposes a computer-readable storage medium, the computer-readable storage medium includes a computer program, and when the computer program is executed by a processor, the steps of the method for reducing the vocal delay of the karaoke software as described in the above embodiment are implemented. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0113] In summary, the method for reducing the vocal delay of the karaoke software provided in the embodiment of the present application, the control device, the electronic device and the computer-readable storage medium reduce the intermediate links of data transmission by directly mapping the memory, and the data transmission speed is faster and the delay is lower. The real-time detection and response mechanism ensures the timely capture of the user's start singing and pause actions, and improves the response speed of the system. The recording memory is consistent with the playback memory, and the accompaniment music data format and memory are consistent with the recording data, ensuring high efficiency and low error in the data processing process. Consistent memory management reduces the time overhead of data conversion and improves the overall audio processing efficiency. That is, from microphone recording to mixing data generation, and then to mixing data playback, the whole process ensures low latency through direct mapping and efficient memory management; the real-time playback mechanism ensures that the mixing data can be output in time, so that the user feels very low latency.
[0114] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0115] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0116] The above description is only a preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for reducing vocal delay in karaoke software, characterized in that: include: When the karaoke software on the operating system is detected to be opened, the recording function of the microphone is turned on; the operating system is responsible for managing the recording and sound playback of the microphone on the board; the recording memory is directly mapped to the underlying hardware memory, and the recording memory is consistent with the playback memory; Monitor the accompaniment playback action based on the karaoke mode on the karaoke software, and obtain the corresponding accompaniment music based on the accompaniment module; wherein the data format and memory set by the accompaniment module are consistent with the data format and memory of the recording; When the user's karaoke action is detected, the microphone recording data is mixed and aligned with the backing music of the karaoke software to generate mixed data; Playback of mix data in real time based on direct mapping between playback memory and underlying hardware memory.
2. The method for reducing vocal delay in karaoke software according to claim 1, characterized in that: The method for reducing the vocal delay of the karaoke software also includes: Based on big data analysis technology, the rhythm speed of each accompaniment music in the pre-stored music library is analyzed to determine the slice size corresponding to each accompaniment music; If the accompaniment music obtained by the accompaniment module comes from a pre-stored music library, the size of the accompaniment module memory, recording memory and playback memory is adjusted according to the slice size corresponding to the accompaniment music.
3. The method for reducing vocal delay of karaoke software as claimed in claim 1, characterized in that: The method for reducing the vocal delay of the karaoke software also includes: According to the historical karaoke data of the current user, the artificial delay factor is analyzed to obtain the delay compensation value; Based on the delay compensation value, each pair of recording data and accompaniment music combination that matches the recording memory and the accompaniment module memory is mixed and aligned.
4. The method for reducing vocal delay in karaoke software as claimed in claim 1, characterized in that: The method for reducing the vocal delay of the karaoke software also includes: When the current user's continuous karaoke time is longer than the preset time, a delay compensation value is generated; Based on the delay compensation value, each pair of recording data and accompaniment music combination that matches the recording memory and the accompaniment module memory is mixed and aligned.
5. The method for reducing vocal delay in karaoke software as claimed in claim 4, characterized in that: The step of generating a delay compensation value after the current user's continuous karaoke duration is longer than a preset duration includes: When the current user's continuous karaoke time is longer than the preset time, the current breathing rhythm is analyzed based on the current recording data; Calculate the deviation between the current breathing rhythm and the initial breathing rhythm; If the deviation value is greater than a preset threshold, a delay compensation value is generated.
6. The method for reducing vocal delay in karaoke software as claimed in claim 1, characterized in that: The method for reducing the vocal delay of the karaoke software also includes: Based on direct memory access technology, direct data transmission is achieved between various memories.
7. The method for reducing vocal delay in karaoke software as claimed in claim 1, characterized in that: The method for reducing the vocal delay of the karaoke software also includes: The lyrics display is synchronized based on the playback node of the accompaniment music in the mixing data.
8. A control device, characterized in that: include: The recording module is used to detect that the karaoke software on the operating system is turned on and turn on the recording function of the microphone; the operating system is responsible for managing the recording of the microphone on the board and the playback of the sound; the recording memory is directly mapped to the underlying hardware memory, and the recording memory is consistent with the playback memory; The singing accompaniment module is used to monitor the singing accompaniment playing action based on the karaoke mode on the karaoke software, and obtain the corresponding singing accompaniment music based on the singing accompaniment module; wherein the data format and memory set by the singing accompaniment module are consistent with the data format and memory of the recording; A mixing module is used to mix and align the microphone recording data with the accompaniment music of the karaoke software when detecting the user's karaoke action, and generate mixing data; The playback module is used to play the mixed data in real time based on the direct mapping between the playback memory and the underlying hardware memory.
9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method for reducing the vocal delay of the karaoke software as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for reducing vocal delay in a karaoke software as described in any one of claims 1 to 7.