Online karaoke room implementation method, electronic device and computer-readable storage medium

By matching the client in the virtual room and using loop delay to slow down the audio content, the problem of not being able to realize real-time duet singing with multiple accounts in the existing technology is solved, and the alignment of accompaniment audio and dry audio and the seamless audio are achieved Playback improves user experience.

CN112489611BActive Publication Date: 2024-09-03TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011357963.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-27
Publication Date
2024-09-03
Estimated Expiration
2040-11-27

AI Technical Summary

Technical Problem

Existing technology cannot realize real-time duet singing of multiple accounts, and the asynchronous method in the design of online singing rooms prevents users from singing synchronously.

Method used

By matching the virtual rooms between clients, the loop delay is used to slow down the audio content, ensuring the alignment of the accompaniment audio and dry audio, and achieving seamless playback. The audio content between clients is mixed and sent to achieve Real-time duet.

Benefits of technology

Real-time segmented chorusing of multiple accounts in the virtual room is realized, ensuring the alignment of accompaniment audio and dry audio, achieving seamless audio playback between clients, and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112489611B
    Figure CN112489611B
Patent Text Reader

Abstract

The present application discloses an online karaoke room implementation method, an electronic device, and a computer-readable storage medium, the method comprising: a first client plays a first audio content stored locally in a target playback mode, the actual playback duration of the first audio content being equal to the sum of the theoretical playback duration of the first audio content and a target delay; the target delay being the loop delay between the first client and the second client; during the playback of the first audio content, the first client collects a first dry audio, mixes the first audio content stored locally with the first dry audio into a first target audio, and sends the first target audio to the second client, and the second client plays the first target audio in a normal playback mode; when the playback of the first audio content in the target playback mode ends, the first client plays the second target audio sent by the second client in a normal playback mode. The online karaoke room implementation method provided by the present application realizes real-time duets of multiple accounts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to an online karaoke room implementation method, an electronic device, and a computer-readable storage medium. Background Art

[0002] In the online karaoke room design of the related technology, the chorus of two users is realized in an asynchronous manner, that is, user A first records his own singing part on client A, and then sends the synthesized work to client B, and user B then completes his own singing part on client B to generate the final chorus work.

[0003] It can be seen that in the process of implementing the present invention, the inventors found that there are at least the following problems in the related art: it is impossible to realize real-time duet of multiple accounts. Summary of the invention

[0004] The purpose of this application is to provide an online karaoke room implementation method, an electronic device and a computer-readable storage medium, which realize real-time duets of multiple accounts.

[0005] To achieve the above-mentioned purpose, the first aspect of the present application provides an online karaoke room implementation method, wherein a first account corresponding to a first client and a second account corresponding to a second client are matched to a virtual room, and the method includes:

[0006] The first client plays the first audio content stored locally in a target playback mode, so that the actual playback time of the first audio content is equal to the sum of the theoretical playback time of the first audio content and the target delay; wherein the first audio content is the audio content corresponding to the first account, and the target delay is the loop delay between the first client and the second client;

[0007] During the playback of the first audio content, the first client collects a first dry audio, mixes the locally stored first audio content and the first dry audio into a first target audio, and sends the first target audio to the second client, and the second client plays the first target audio in a normal playback manner;

[0008] When the playing of the first audio content in the target playing mode ends, the first client plays the second target audio sent by the second client in the normal playing mode.

[0009] To achieve the above-mentioned purpose, the second aspect of the present application provides an electronic device, including:

[0010] Memory for storing computer programs;

[0011] The processor is used to implement the steps performed by the first client or the second client in the above-mentioned online karaoke room implementation method when executing the computer program.

[0012] To achieve the above-mentioned purpose, the fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps performed by the first client or the second client in the above-mentioned online karaoke room implementation method are implemented.

[0013] Through the above scheme, it can be known that the present application provides an online karaoke room implementation method, wherein a first account corresponding to a first client and a second account corresponding to a second client are matched to a virtual room, and the method includes: the first client plays the locally stored first audio content according to the target playback mode, so that the actual playback time of the first audio content is equal to the sum of the theoretical playback time of the first audio content and the target delay; wherein, the first audio content is the audio content corresponding to the first account, and the target delay is the loop delay between the first client and the second client; during the playback of the first audio content, the first client collects the first dry sound audio, mixes the locally stored first audio content and the first dry sound audio into the first target audio, and sends the first target audio to the second client, and the second client plays the first target audio in a normal playback mode; when the playback of the first audio content in the target playback mode ends, the first client plays the second target audio sent by the second client in the normal playback mode.

[0014] In the present application, when the first account and the second account are matched to the same virtual room, the first account and the second account can realize real-time segmented chorus in the virtual room, that is, duet mode, wherein the first account corresponds to the first audio content and the second account corresponds to the second audio content. When the first account sings, the accompaniment audio played by the first client is the first audio content stored locally, and the audio played by the second client is the synthesized audio of the first audio content stored by the first client and the collected first dry audio, that is, the first target audio. On the second client side, the alignment of the accompaniment audio and the dry audio is guaranteed. Similarly, when the second account sings, the accompaniment audio played by the second client is the second audio content stored locally, and the audio played by the first client is the synthesized audio of the second audio content stored by the second client and the collected second dry audio, that is, the second target audio. On the first client side, the alignment of the accompaniment audio and the dry audio is guaranteed. Further, the actual playback time of the first audio content on the first client side is equal to the sum of the theoretical playback time of the first audio content and the loop delay between the first client and the second client, that is, the first audio content is slowed down on the first client side, ensuring that the first audio content receives the second target audio sent by the second client at the end of the playback on the first client side, and the first audio content and the second target audio are seamlessly played on the first client side. Similarly, the actual playback time of the second audio content on the second client side is equal to the sum of the theoretical playback time of the second audio content and the loop delay between the first client and the second client, that is, the second audio content is slowed down on the second client side, ensuring that the second audio content receives the first target audio sent by the first client at the end of the playback on the second client side, and the second audio content and the first target audio are seamlessly played on the second client side. It can be seen from this that the online karaoke room implementation method provided by the present application, taking into account the loop delay between the first client and the second client, when the first account and the second account perform real-time duet, the alignment of the accompaniment audio and the dry audio played by the first client and the second client is achieved, and the seamless playback of the audio of the first client and the second client is achieved. The present application also discloses an electronic device and a computer-readable storage medium, which can also achieve the above-mentioned technical effects.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific implementation methods, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the drawings:

[0017] Figure 1 An architecture diagram of an online karaoke room implementation system provided in an embodiment of the present application;

[0018] Figure 2 A flowchart of an online karaoke room implementation method provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of audio transmission and playback provided in an embodiment of the present application;

[0020] Figure 4 A flowchart of another online karaoke room implementation method provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of another audio transmission and playback provided in an embodiment of the present application;

[0022] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0024] In order to facilitate understanding of the online karaoke room implementation method provided by this application, the system used is introduced below. Figure 1 , which shows an architecture diagram of an online karaoke room implementation system provided by an embodiment of the present application, such as Figure 1 As shown, a server 10 and multiple clients 20 are included, and each client 20 is connected to the server 10 via a network.

[0025] Among them, the server 10 is used to create a virtual room and match multiple accounts to the same virtual room. Each virtual room is isolated from each other. The virtual room can be used to simulate a room in a real environment and has the isolation function of a room in a real environment to realize the online karaoke room function in this application. When multiple accounts are matched to the same virtual room, the server 10 establishes an audio link between the client 20 corresponding to each account and the virtual room, that is, accounts matched to the same virtual room can communicate audio through the virtual room.

[0026] The client 20 may include fixed terminals such as PC (Chinese full name: Personal Computer, English full name: Personal Computer) and mobile terminals such as mobile phones. Each client 20 is provided with an audio acquisition device such as a karaoke software, a microphone and an audio output device such as a speaker. The audio acquisition device is used to acquire the dry audio and call audio corresponding to the target song, and the audio output device is used to output the mixed audio of the dry audio and the accompaniment audio and the call audio. The corresponding account is logged in to the karaoke software of the client 20. The audio link between the client 20 corresponding to the account in the upper microphone display state and the virtual room is opened. The client 20 uses the audio link to transmit the collected dry audio to the virtual room. The audio link between the client 20 corresponding to the account in the lower microphone display state and the virtual room is closed. The opening and closing of the audio link between each client 20 and the virtual room does not affect the song playing process.

[0027] The embodiment of the present application discloses a method for realizing an online karaoke room, which realizes real-time duets among multiple accounts.

[0028] See also Figure 2 , a flowchart of an online karaoke room implementation method provided in an embodiment of the present application, such as Figure 2 As shown, including:

[0029] S101: The first client plays the first audio content stored locally according to the target playback mode, so that the actual playback time of the first audio content is equal to the sum of the theoretical playback time of the first audio content and the target delay; wherein the first audio content is the audio content corresponding to the first account, and the target delay is the loop delay between the first client and the second client;

[0030] In this embodiment, the first account corresponding to the first client and the second account corresponding to the second client are matched to the same virtual room, and an audio link is established between the virtual room and the first client corresponding to the first account and the second client corresponding to the second account. The audio link realizes audio transmission between the first client or the second client and the virtual room, and audio communication between the first account and the second account is realized through the virtual room, simulating audio communication in a real environment.

[0031] This embodiment is a duet scene between the first account and the second account. In the duet mode, the first account and the second account are both in the microphone state. The first account and the second account sing different parts of the target song respectively. The first account corresponds to the first audio content, and the second account corresponds to the second audio content. That is, this embodiment also includes: if the first account and the second account are both in the microphone state, the first client determines the first audio content corresponding to the first account, and the second client determines the second audio content corresponding to the second account. In the display interface of the first client and the second client, the lyrics corresponding to the first audio content are displayed in a first preset manner, and the lyrics corresponding to the second audio content are displayed in a second preset manner. For example, the lyrics corresponding to different accounts can be displayed in different colors, and a prompt is given when the singing time of a certain account is about to arrive.

[0032] In a specific implementation, the accompaniment audio played by the first client is the first audio content stored locally, and the actual playback time of the first audio content on the first client side is equal to the sum of the theoretical playback time of the first audio content and the loop delay between the first client and the second client, that is, the first audio content is slowed down on the first client side, ensuring that the first audio content receives the second target audio sent by the second client when the playback on the first client side ends, thereby achieving seamless playback of the first audio content and the second target audio on the first client side.

[0033] For example, the total length of the target song is 180s, the first audio content is 0-30s, 60s-90s, 120s-150s, the second audio content is 30-60s, 90s-120s, 150s-180s, and the loop delay between the first client and the second client is 0.6s. Figure 3 As shown, the black part is the audio content stored locally, the white part is the audio sent to the other party, and the shaded part is the audio sent by the other party. The actual playback time of the first audio content on the first client is 30.6s, and the actual playback time is 0-30.6s, 60.6s-91.2s, and 121.2s-151.8s respectively. The actual playback time of the second audio content on the second client is 30.6s, and the actual playback time is 30.3-60.9s, 90.9s-121.5s, and 151.5s-181.5s respectively. It should be noted that since the last section of the second audio content is the end of the target song, there is no switching of singers afterwards, so the actual playback time is equal to the theoretical playback time.

[0034] As a feasible implementation manner, playing the first audio content stored locally in accordance with the target playback mode includes: determining a first time length of the slow-motion audio content based on a preset slow-motion rate and the target delay, and selecting a first slow-motion audio content of the first time length from the first audio content; playing the first slow-motion audio content stored locally in accordance with the preset slow-motion rate, and playing other audio content except the first slow-motion audio content in the first audio content stored locally in accordance with the original rate.

[0035] In a specific implementation, the first slow-motion audio content of the first time length can be selected from the first audio content for slow motion, so that the actual playback time length of the first audio content is equal to the sum of the theoretical playback time length and the target delay. Preferably, the first slow-motion audio content of the first time length is selected at the end of the first audio content. The tail of the audio content corresponding to each account generally does not need to be sung, so selecting the first slow-motion content at the tail can weaken the user's auditory perception and improve the user experience. It should be noted that the above-mentioned first time length is determined based on the preset slow-motion rate and the target delay between the first client and the second client. The preset slow-motion rate R is determined by an empirical value, R=t1 / (t1+RTT), where t1 is the first time length and RTT is the target delay. Under the premise that R and RTT are known, t1 can be obtained. For example, if R is 0.7 and RTT is 0.6s, then t1 is 1.4s.

[0036] S102: During playback of the first audio content, the first client collects a first dry audio, mixes the locally stored first audio content and the first dry audio into a first target audio, and sends the first target audio to the second client, and the second client plays the first target audio in a normal playback manner;

[0037] In a specific implementation, when the first account sings, the audio played by the second client is the synthesized audio of the first audio content stored by the first client and the first dry audio collected, that is, the first target audio. On the second client side, the alignment of the accompaniment audio and the dry audio is guaranteed.

[0038] It should be noted that the first account can be in ear-monitoring mode or external speaker mode. When in ear-monitoring mode, the first client plays the first target audio through the ear-monitoring, that is, the user can hear the first dry audio of his own singing through the ear-monitoring. When in external speaker mode, the first client plays the accompaniment audio, and after its audio acquisition device acquires the audio, it is necessary to perform echo cancellation processing on the acquired audio to obtain the first dry audio. That is, if the first client is in external speaker mode, the first client acquires the first dry audio, including: the first client acquires audio, and performs echo processing on the audio to obtain the first dry audio.

[0039] S103: When the playing of the first audio content in the target playing mode ends, the first client plays the second target audio sent by the second client in the normal playing mode.

[0040] In a specific implementation, when the second account sings, the accompaniment audio played by the second client is the second audio content stored locally, and the audio played by the first client is the synthesized audio of the second audio content stored by the second client and the collected second dry audio, that is, the second target audio. On the first client side, the alignment of the accompaniment audio and the dry audio is guaranteed. In addition, when the first audio content is played at the end of the first client side, the second target audio sent by the second client is received, and seamless playback of the first audio content and the second target audio is achieved on the first client side.

[0041] It should be noted that this embodiment introduces the situation where the first account switches to the second account for singing, and the situation where the second account switches to the first account for singing is similar to the above, which will not be repeated here.

[0042] In an embodiment of the present application, when the first account and the second account are matched to the same virtual room, the first account and the second account can realize real-time segmented chorus in the virtual room, that is, duet mode, wherein the first account corresponds to the first audio content and the second account corresponds to the second audio content. When the first account sings, the accompaniment audio played by the first client is the first audio content stored locally, and the audio played by the second client is the synthesized audio of the first audio content stored by the first client and the collected first dry audio, that is, the first target audio. On the second client side, the alignment of the accompaniment audio and the dry audio is guaranteed. Similarly, when the second account sings, the accompaniment audio played by the second client is the second audio content stored locally, and the audio played by the first client is the synthesized audio of the second audio content stored by the second client and the collected second dry audio, that is, the second target audio. On the first client side, the alignment of the accompaniment audio and the dry audio is guaranteed. Further, the actual playback time of the first audio content on the first client side is equal to the sum of the theoretical playback time of the first audio content and the loop delay between the first client and the second client, that is, the first audio content is slowed down on the first client side, ensuring that the first audio content receives the second target audio sent by the second client at the end of the playback on the first client side, and the first audio content and the second target audio are seamlessly played on the first client side. Similarly, the actual playback time of the second audio content on the second client side is equal to the sum of the theoretical playback time of the second audio content and the loop delay between the first client and the second client, that is, the second audio content is slowed down on the second client side, ensuring that the second audio content receives the first target audio sent by the first client at the end of the playback on the second client side, and the second audio content and the first target audio are seamlessly played on the second client side. It can be seen from this that the online karaoke room implementation method provided by the embodiment of the present application, taking into account the loop delay between the first client and the second client, when the first account and the second account perform real-time duet, the alignment of the accompaniment audio and the dry audio played by the first client and the second client is achieved, and the seamless playback of the audio of the first client and the second client is achieved.

[0043] The embodiment of the present application discloses a method for realizing an online karaoke room, which realizes pushing chorus audio to a third account.

[0044] See also Figure 4 , a flowchart of another online karaoke room implementation method provided in an embodiment of the present application, such as Figure 4 As shown, including:

[0045] S201: The server splices all the target audios into a composite audio based on the timestamp marked by each received target audio segment; wherein the target audio includes the first target audio sent by the first client and the second target audio sent by the second client;

[0046] In this embodiment, the first client sends the first target audio to the second client through the server, and the second client sends the second target audio to the first client through the server. That is, the server can obtain the first target audio synthesized by the first client and the second target audio synthesized by the second client, and each segment of target audio carries a timestamp. The server can splice the received target audio into a synthesized audio based on the timestamp carried by the target audio.

[0047] S202: When the time length of the spliced ​​synthesized audio is equal to the target time length, the server sends the synthesized audio to the third client corresponding to the third account in the virtual room, so that the third client plays the synthesized audio in the normal playback mode; wherein the target time length is determined based on a first delay and a second delay, the first delay being the delay between the first client and the server, and the second delay being the delay between the second client and the server, and the target time length at least ensures that the server sends the chorus audio uninterruptedly.

[0048] In a specific implementation, the server caches the synthesized audio of the target time length, and sends it to the third client corresponding to the third account with a delay. The third client plays the received synthesized audio in a normal playback mode, thereby pushing the chorus audio to the third account.

[0049] It should be noted that the target time length can be determined based on the delay between the first client and the server and the delay between the second client and the server, which at least ensures that the server can continuously send the chorus audio to the third client. For example, the total length of the target song is 180s, the first audio content is 0-30s, 60s-90s, 120s-150s, the second audio content is 30-60s, 90s-120s, 150s-180s, the first delay between the first client and the server is 0.1s, and the second delay between the second client and the server is 0.2s. Figure 5 As shown, the server receives the target audio at 0.1s, 30.5s, 60.7s, 91.1s, 121.3s, and 151.7s, respectively. It can be seen that the time when the server receives the last segment of the target audio (151.7s) differs from the actual start time of the target audio (150s) by 1.7s, that is, the target time length is 1.7s, and the server needs to cache 1.7s of synthesized audio before starting to transmit it to the third client.

[0050] It can be seen that this embodiment solves the network delay problem between the first client and the server and between the second client and the server by caching the synthesized audio of the target time length on the server and sending it to the third client with a delay, thereby ensuring that the synthesized audio is sent to the third client uninterruptedly. The third client can play the received synthesized audio in a normal playback mode uninterruptedly, thereby realizing the push of the chorus audio to the third account.

[0051] Based on the above embodiment, as a preferred implementation mode, it also includes: the first client and the second client download the accompaniment audio of the target song from the server; if the first account and the second account are both in microphone down state, the first client and the second client each play the locally stored accompaniment audio.

[0052] In a specific implementation, after any account in the virtual room requests a target song, the clients corresponding to all accounts in the virtual room download the accompaniment audio of the target song from the server. After the download is complete, the server determines the playback time and sends it to all clients. All clients start playing the locally stored accompaniment audio at the playback time.

[0053] Based on the above embodiment, as a preferred implementation mode, it also includes: when the first account and the second account are both in the microphone down state, if the first account switches to the microphone up state, the first client collects the first dry sound audio, mixes the locally stored accompaniment audio and the first dry sound audio into a first synthetic audio, and sends it to the second client, and the second client stops playing the locally stored accompaniment audio and starts playing the first synthetic audio.

[0054] In a specific implementation, during the playback of the accompaniment audio of the target song, if the first account switches to the microphone state, the first account is in solo mode. In solo mode, the first client continues to play the locally stored accompaniment audio and starts to collect the first dry audio. The first client mixes the locally stored accompaniment audio and the first dry audio into a first synthesized audio, and sends it to the second client via the server. The second client stops playing the locally stored accompaniment audio and starts playing the received first synthesized audio. In other words, the accompaniment audio and dry audio played by the second client both come from the first client, that is, the first synthesized audio played by the second client is synthesized by the first client, and on the second client side, the alignment of the accompaniment audio and the dry audio is guaranteed.

[0055] Preferably, the second client stops playing the locally stored accompaniment audio and starts playing the first synthesized audio, including: the second client performs a fade-out process on the locally stored accompaniment audio and performs a fade-in process on the first synthesized audio. In a specific implementation, in order to make the switching of audio playback more natural, the audio that needs to be stopped can be faded out, and the audio that needs to be started can be faded in.

[0056] It should be noted that when the first account is in the microphone-up state and the second account is in the microphone-down state, the first account can be in the ear-return mode or the external speaker mode. When in the ear-return mode, the first client plays the first synthesized audio through the ear-return, that is, the user can hear the first dry sound audio of his own singing through the ear-return. When in the external speaker mode, the first client plays the accompaniment audio, and after its audio acquisition device acquires the audio, it is necessary to perform echo cancellation processing on the acquired audio to obtain the first dry sound audio.

[0057] Based on the above embodiment, as a preferred implementation, it also includes: when the first account is in the microphone-on state and the second account is in the microphone-off state, if the first account switches to the microphone-off state, the second client starts to play the locally stored accompaniment audio.

[0058] In a specific implementation, when the first account is in the microphone-on state and the second account is in the microphone-off state, the first synthesized audio sent by the first client to the second client carries progress information. After the first account is off the microphone, both the first account and the second account are in the microphone-off state. The first client continues to play the locally stored accompaniment audio. The second client can determine the resumption time point of the accompaniment audio based on the received progress information, and continue to play the locally stored accompaniment audio from the resumption time point.

[0059] On the basis of the above embodiment, as a preferred implementation manner, it also includes: when the first account is in the upper microphone state and the second account is in the lower microphone state, if the first account switches to the lower microphone state and then the second account switches to the upper microphone state, the second client collects the second dry sound audio, mixes the locally stored accompaniment audio and the second dry sound audio into a second synthetic audio, and sends it to the first client, and the first client stops playing the locally stored accompaniment audio and starts playing the second synthetic audio.

[0060] In the specific implementation, after the first account goes offline, the second account goes online, realizing the function of different accounts singing the same target song. After the second account goes online, the second client collects the second dry audio, mixes the locally stored accompaniment audio and the second dry audio into a second synthesized audio, and sends it to the first client via the server. The first client stops playing the locally stored accompaniment audio and starts playing the received second synthesized audio. The solo mode of the second account is similar to the solo mode of the first account described above, and will not be repeated here.

[0061] On the basis of the above embodiment, as a preferred implementation mode, it also includes: when the first account and the second account are both in the microphone state, if the second account switches to the microphone state during its own singing time period, the first client starts to play the locally stored accompaniment audio, the first client collects the first dry sound audio, mixes the locally stored accompaniment audio and the first dry sound audio into a first synthetic audio, and sends it to the second client, and the second client stops playing the locally stored accompaniment audio and starts playing the first synthetic audio.

[0062] In a specific implementation, when both the first account and the second account are in the microphone state, that is, the first account and the second account are in duet mode. During the singing time of the first account, the first client plays the locally stored accompaniment audio, and the second client plays the first synthesized audio sent by the first client. If the second account is off the microphone at this time, the first account resumes the solo mode, and the audio played by the first client and the second client does not need to be switched. During the singing time of the second account, the first client plays the second synthesized audio sent by the second client, and the second client plays the locally stored accompaniment audio. If the second account is off the microphone at this time, the first account resumes the solo mode, the first client determines the replay time point according to the progress information of the received second synthesized audio, and starts playing the locally stored accompaniment audio at the replay time point, starts collecting the first dry sound audio, mixes the locally stored accompaniment audio and the first dry sound audio into the first synthesized audio, and sends it to the second client via the server, and the second client stops playing the locally stored accompaniment audio and starts playing the received first synthesized audio.

[0063] This application also provides a server, see Figure 6 , a structural diagram of an electronic device 60 provided in an embodiment of the present application, such as Figure 6 As shown, a processor 61 and a memory 62 may be included.

[0064] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0065] The memory 62 may include one or more computer-readable storage media, which may be non-transitory. The memory 62 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 62 is at least used to store the following computer program 621, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps in the online karaoke room implementation method performed by the first client or the second client side disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 62 may also include an operating system 622 and data 623, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 622 may include Windows, Unix, Linux, etc.

[0066] In some embodiments, the electronic device 60 may further include a display screen 63 , an input / output interface 64 , a communication interface 65 , a sensor 66 , a power supply 67 , and a communication bus 68 .

[0067] certainly, Figure 6 The server structure shown does not constitute a limitation on the server in the embodiment of the present application. In actual applications, the server may include Figure 6 More or fewer components than shown, or combinations of certain components.

[0068] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When the program instructions are executed by a processor, the steps of the online karaoke room implementation method executed by the server in any of the above embodiments are implemented.

[0069] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0070] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for realizing an online karaoke room, wherein: A first account corresponding to the first client and a second account corresponding to the second client are matched to a virtual room, characterized in that: The first client plays the first audio content stored locally in a target playback mode, so that the actual playback time of the first audio content is equal to the sum of the theoretical playback time of the first audio content and the target delay; wherein the first audio content is the audio content corresponding to the first account, and the target delay is the loop delay between the first client and the second client; During the playback of the first audio content, the first client collects a first dry audio, mixes the locally stored first audio content and the first dry audio into a first target audio, and sends the first target audio to the second client through the server, and the second client plays the first target audio in a normal playback manner; When the first audio content is played in the target playback mode, the first client plays the second target audio sent by the second client in the normal playback mode; Wherein, the method further comprises: The server splices all the target audios into a composite audio based on the timestamp marked by each received target audio segment; wherein the target audio includes the first target audio sent by the first client and the second target audio sent by the second client; When the time length of the spliced ​​synthesized audio is equal to the target time length, the server sends the synthesized audio to the third client corresponding to the third account in the virtual room, so that the third client plays the synthesized audio in the normal playback mode; wherein the target time length is the time difference between the time when the server receives the last segment of target audio and the actual start time of the last segment of target audio determined based on the first delay and the second delay, the first delay being the delay between the first client and the server, the second delay being the delay between the second client and the server, and the target time length at least ensures that the server sends the synthesized audio uninterruptedly.

2. The online karaoke room implementation method according to claim 1 is characterized in that: The step of playing the first audio content stored locally in a target playback mode includes: Determine a first time length of the slow-play audio content based on a preset slow-play rate and the target delay, and select a first slow-play audio content of the first time length from the first audio content; The first slow-motion audio content stored locally is played at the preset slow-motion rate, and other audio content except the first slow-motion audio content in the first audio content stored locally is played at the original rate.

3. The method for realizing online karaoke room according to claim 2 is characterized in that: Selecting the first slow-play audio content of the first time length from the first audio content includes: The first slow-play audio content of the first time length is selected at the end of the first audio content.

4. The online karaoke room implementation method according to claim 1 is characterized in that: If the first client is in an external speaker mode, the first client collects a first dry audio, including: The first client collects audio, and performs echo processing on the audio to obtain first dry audio.

5. The online karaoke room implementation method according to claim 1 is characterized in that: Also includes: The first client and the second client download the accompaniment audio of the target song from the server; If the first account and the second account are both in microphone down state, the first client and the second client each play the locally stored accompaniment audio.

6. The online karaoke room implementation method according to claim 1 is characterized in that: Also includes: When both the first account and the second account are in the microphone-off state, if the first account switches to the microphone-on state, the first client collects the first dry audio, mixes the locally stored accompaniment audio and the first dry audio into a first synthesized audio, and sends it to the second client, and the second client stops playing the locally stored accompaniment audio and starts playing the first synthesized audio.

7. The method for realizing online karaoke room according to claim 6, characterized in that: The second client stops playing the locally stored accompaniment audio and starts playing the first synthesized audio, including: The second client performs a fade-out process on the locally stored accompaniment audio, and performs a fade-in process on the first synthesized audio.

8. The online karaoke room implementation method according to claim 1 is characterized in that: Also includes: In the case where the first account is in the microphone-on state and the second account is in the microphone-off state, if the first account switches to the microphone-off state, the second client starts playing the locally stored accompaniment audio.

9. The online karaoke room implementation method according to claim 1 is characterized in that: Also includes: When the first account is in the upper microphone state and the second account is in the lower microphone state, if the second account switches to the upper microphone state after the first account switches to the lower microphone state, the second client collects the second dry sound audio, mixes the locally stored accompaniment audio and the second dry sound audio into a second synthesized audio, and sends it to the first client, and the first client stops playing the locally stored accompaniment audio and starts playing the second synthesized audio.

10. The online karaoke room implementation method according to claim 1, characterized in that: Before playing the first audio content stored locally in the target playback mode, the method further includes: If both the first account and the second account are in microphone status, the first client determines the first audio content corresponding to the first account, and the second client determines the second audio content corresponding to the second account.

11. The online karaoke room implementation method according to claim 1, characterized in that: Also includes: When both the first account and the second account are in the microphone state, if the second account switches to the microphone-off state during its own singing time period, the first client starts to play the locally stored accompaniment audio, the first client collects the first dry sound audio, mixes the locally stored accompaniment audio and the first dry sound audio into a first synthesized audio, and sends it to the second client, and the second client stops playing the locally stored accompaniment audio and starts playing the first synthesized audio.

12. An electronic device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps performed by the first client or the second client in the online karaoke room implementation method as described in any one of claims 1 to 11 when executing the computer program.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps performed by the first client or the second client in the online karaoke room implementation method as described in any one of claims 1 to 11 are implemented.