Audio recording method and device, equipment and storage medium

By detecting the first frame playback moment of background audio and writing voice audio from that moment, the problem of the misalignment of the voice and accompaniment during playback of recorded audio files is solved, and the audio-visual effect is improved.

CN119541564APending Publication Date: 2025-02-28BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311119315.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

When a user records a song through a singing application, due to interference such as acquisition delay, startup delay, playback delay and playback start delay, the recorded audio files are not aligned with the accompaniment during playback, and the audio-visual effect is poor.

Method used

By detecting the first frame playback moment of background audio, the file writing operation is performed on the collected voice audio starting from this moment to obtain the audio recording file to ensure that the recorded audio is synchronized with the background audio.

Benefits of technology

The recorded audio and background audio are aligned, improving the audio-visual effect of the recorded audio files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119541564A_ABST
    Figure CN119541564A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an audio recording method and device, equipment and a storage medium. In response to the triggered recording operation, starting to collect voice audio; detecting a first frame playing moment of the background audio; wherein the first frame playing moment is the first frame playing moment of the background audio; and starting from the playing moment of the first frame, executing a file writing operation on the collected voice audio to obtain an audio recording file. According to the audio recording method provided by the embodiment of the invention, the file writing operation is executed on the collected voice audio from the first frame playing moment of the background audio to obtain the audio recording file, so that the recorded audio can be aligned with the background audio, and the audio-visual effect of the recorded audio file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of data processing technology, and in particular to an audio recording method, device, equipment and storage medium. Background Art

[0002] When a user records a song in a singing application (Application, APP), the singing APP plays background music (also called accompaniment), and the user sings along with the background music. The APP records the user's singing and obtains the recorded audio file. Due to interference such as acquisition delay, acquisition start delay, playback delay and playback start delay, there will be a problem of aligning the human voice with the accompaniment, resulting in poor audio-visual effect when the recorded audio file is played. Summary of the invention

[0003] The embodiments of the present disclosure provide an audio recording method, apparatus, device and storage medium, which synchronize the recorded voice audio with the background audio and improve the audio-visual effect of the recorded audio file.

[0004] In a first aspect, an embodiment of the present disclosure provides an audio recording method, comprising:

[0005] In response to the triggered recording operation, start collecting voice audio;

[0006] Detecting the first frame playback time of the background audio; wherein the first frame playback time is the time when the first frame of the background audio is played;

[0007] Starting from the first frame playback moment, a file writing operation is performed on the collected voice audio to obtain an audio recording file.

[0008] In a second aspect, the present disclosure also provides an audio recording device, characterized in that it includes:

[0009] A voice and audio collection start module is used to start collecting voice and audio in response to a triggered recording operation;

[0010] A first frame playing time detection module is used to detect the first frame playing time of the background audio; wherein, the first frame playing time is the time when the first frame of the background audio is played;

[0011] The file writing operation execution module is used to execute the file writing operation on the collected voice audio starting from the first frame playback moment to obtain the audio recording file.

[0012] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0013] one or more processors;

[0014] a storage device for storing one or more programs,

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the audio recording method as described in the embodiment of the present disclosure.

[0016] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the audio recording method as described in the embodiment of the present disclosure.

[0017] The embodiments of the present disclosure disclose an audio recording method, apparatus, device and storage medium, which start collecting voice audio in response to a triggered recording operation; detect the time when the first frame of background audio is played; wherein the time when the first frame is played is the time when the first frame of background audio is played; and from the time when the first frame is played, perform a file write operation on the collected voice audio to obtain an audio recording file. The audio recording method provided by the embodiments of the present disclosure performs a file write operation on the collected voice audio from the time when the first frame of background audio is played to obtain an audio recording file, ensures that the recorded audio and the background audio can be aligned, and improves the audio-visual effect of the recorded audio file. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0019] Figure 1 is a flowchart of an audio recording method provided by an embodiment of the present disclosure;

[0020] Figure 2 is a timing diagram of an audio recording method provided by an embodiment of the present disclosure;

[0021] Figure 3 is a structural schematic diagram of an audio recording device provided by an embodiment of the present disclosure;

[0022] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0026] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0027] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0030] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0031] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0032] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0033] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0034] Figure 1 This is a flow chart of an audio recording method provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to the situation of recording audio. The method can be performed by an audio recording device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0035] like Figure 1 As shown, the method includes:

[0036] S110, in response to the triggered recording operation, start collecting voice audio.

[0037] In this application scenario, when the user records a song through a singing APP, the user selects the song to sing along and clicks the record button. The singing APP plays background music (also called accompaniment), and the user sings along with the background music. The APP collects and saves the sound of the user's singing, thereby obtaining a recorded audio file.

[0038] Among them, starting to collect voice audio can be understood as starting the functional components required for collecting voice audio, so that the terminal can collect voice audio and obtain audio frames.

[0039] In this embodiment, after starting the capture of audio and before detecting the time when the first frame of background audio is played, the following steps are also included: when the number of frames of the collected voice audio reaches a set number and / or the duration of the collected voice audio reaches a set duration, starting to play the background audio.

[0040] The set number and set duration can be determined by the performance of the acquisition device. In this application scenario, after the acquisition device is started, the first certain number of audio frames or the first certain duration of audio frames collected may be blank frames. In order to ensure the audio-visual effect of the recorded audio file, this part of the blank frames needs to be shielded. Therefore, when the number of frames of the collected audio reaches the set number and / or the duration of the collected voice audio reaches the set duration, the background audio is started.

[0041] Among them, starting to play background audio can be understood as starting the functional components required for playing audio, so that the terminal device can play background audio.

[0042] S120, detecting the playing time of the first frame of the background audio.

[0043] The first frame playing time may be understood as the time when the first frame of the background audio is played, that is, the time when the first frame of the background audio is decoded and played through the speaker.

[0044] In this embodiment, the process of detecting the time when the first frame of the background audio is played may be: detecting the time when the first frame of the background audio is played; and determining the time as the time when the first frame of the background audio is played.

[0045] In this application scenario, after the playback function is started, there is a delay of tens to hundreds of milliseconds between the start of the playback function and the first frame of the background audio being played, because the functional components required for playback need to be started and the background audio needs to be decoded and processed. Specifically, the time when the first frame of the background audio is played is detected in real time, and the time is determined as the first frame playback time of the background audio.

[0046] S130, starting from the first frame playback time, perform a file write operation on the collected voice audio to obtain an audio recording file.

[0047] The method of performing a file writing operation on the collected voice audio to obtain the audio recording file may be: writing the collected voice audio from the memory to the disk to obtain the audio recording file. In this embodiment, the terminal first stores the collected voice audio in the memory, and then writes the audio in the memory to the disk to obtain the audio recording file. If the audio in the memory is not written to the disk, the audio recording file cannot be obtained, and the collected voice audio will be released from the memory.

[0048] In this embodiment, since there will be a delay of tens to hundreds of milliseconds from starting the playback to playing the first frame, in order to reduce the deviation between the recorded audio and the background audio, starting from the moment corresponding to the first frame of the background audio, the collected voice audio is written from the memory to the disk, and the voice audio frames collected before this moment are discarded.

[0049] Optionally, after performing a write file operation on the collected voice audio and before obtaining the audio recording file, the following steps are also included: in response to a triggered stop recording operation, stop playing the background audio and stop collecting the voice audio.

[0050] When the user finishes singing a song or wants to stop recording, the stop recording button in the recording interface is triggered; or, when the accompaniment of a song is finished playing, the APP actively triggers the stop recording operation. When the stop recording operation is detected, the background audio is stopped from playing and the voice audio is stopped from collecting, that is, the playback function and the collection function are turned off. After stopping the recording, the recorded audio file is obtained.

[0051] Based on the above embodiments, Figure 2 is a timing diagram of an audio recording method in an embodiment of the present disclosure, such as Figure 2 As shown, the method includes the following steps in chronological order:

[0052] 1. Respond to the recording operation and start collecting voice and audio; 2. Wait for the first frame to be collected; 3. Wait for the number of frames of the collected voice and audio to reach the set number or the duration to reach the set duration; 4. Start the collection to complete; 5. Start playing the background audio; 6. Wait until the first frame is played; 7. Return to start the playback to complete; 8. Start writing files to the collected voice and audio; 9. Respond to the stop recording operation; 10. Stop collecting and stop playing; 11. Recording is complete.

[0053] Optionally, after obtaining the audio recording file, the following steps are also included: aligning the first frame of the audio in the audio recording file with the first frame of the background audio; synthesizing the audio in the aligned audio recording file and the background audio to obtain the target audio file.

[0054] Among them, aligning the first frame of the audio in the audio recording file with the first frame of the background audio can be understood as aligning the audio in the audio recording file with the background audio to ensure that the collected voice audio and background audio are synchronized when the target audio file is played.

[0055] Specifically, the method of aligning the first frame of the audio in the audio recording file with the first frame of the background audio can be: aligning the first frame of the voice audio in the audio recording file and the first frame of the background audio with the set time starting point.

[0056] Among them, the set time starting point can be time 0, which is a relative time and a set starting point timestamp. In this embodiment, the first frame of the audio in the audio recording file is aligned with the set time starting point, and the first frame of the background audio is aligned with the set time starting point, thereby achieving the alignment of the first frame of the recorded audio with the first frame of the background audio. Optionally, the way to align the first frame of the audio in the audio recording file with the first frame of the background audio can also be: take the timestamp corresponding to the first frame of the audio in the audio recording file as the time starting point, and then align the first frame of the background audio with the time starting point, thereby achieving the alignment of the first frame of the recorded audio with the first frame of the background audio; or, take the timestamp corresponding to the first frame of the background audio as the time starting point, and then align the first frame of the audio in the audio recording file with the time starting point, thereby achieving the alignment of the first frame of the recorded audio with the first frame of the background audio. In this embodiment, the first frame of the recorded audio is aligned with the first frame of the background audio based on the time starting point, which can ensure the accuracy of the alignment.

[0057] Optionally, in response to a triggered recording operation, starting to collect voice audio can be understood as: in response to a recording operation during the singing of a target song, starting to collect voice audio; accordingly, detecting the first frame playback time of the background audio can be understood as: detecting the first frame playback time of the background audio of the target song; accordingly, starting from the first frame playback time, performing a file write operation on the collected voice audio to obtain an audio recording file, including: starting from the first frame playback time, performing a file write operation on the collected voice audio to obtain an audio recording file corresponding to the singing.

[0058] The solution of this embodiment can be applied to the scenario where the user sings through a singing APP. The user first selects the target song, then clicks the record button, the APP starts collecting voice audio, when the number of frames of the collected voice audio reaches the set number and / or the duration of the collected voice audio reaches the set duration, the background audio of the target song is started to play, and when the first frame playback time of the background audio of the target song is detected, starting from the first frame playback time, the collected voice audio is written to a file to obtain the audio recording file corresponding to the singing. Finally, the first frame of the audio in the audio recording file is aligned with the first frame of the background audio, and the audio and background audio in the aligned audio recording file are synthesized to obtain the target audio file. The obtained target audio file contains the audio sung by the user and the background audio of the target song.

[0059] The technical solution of the disclosed embodiment starts collecting voice audio in response to a triggered recording operation; detects the first frame playback time of the background audio; and performs a file write operation on the collected voice audio starting from the first frame playback time to obtain an audio recording file. The audio recording method provided by the disclosed embodiment writes the collected voice audio to a file starting from the first frame playback time when the background audio is played to obtain an audio recording file, thereby ensuring that the recorded audio and the background audio can be aligned, and improving the audio-visual effect of the recorded audio file.

[0060] Figure 3 A schematic diagram of the structure of an audio recording device provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the device comprises:

[0061] The voice and audio collection starting module 310 is used to start collecting voice and audio in response to a triggered recording operation;

[0062] The first frame playing time detection module 320 is used to detect the first frame playing time of the background audio; wherein the first frame playing time is the time when the first frame of the background audio is played;

[0063] The file writing operation execution module 330 is used to execute the file writing operation on the collected voice audio starting from the first frame playback time to obtain the audio recording file.

[0064] Optionally, it also includes: a background audio playback start module, which is used to:

[0065] When the number of frames of the collected voice audio reaches a set number and / or the duration of the collected voice audio reaches a set duration, the background audio is started to play.

[0066] Optionally, the file write operation execution module 330 is further used to:

[0067] Write the collected voice audio from memory to disk to obtain an audio recording file.

[0068] Optionally, it also includes: a stop recording module, which is used to:

[0069] In response to the triggered stop recording operation, the background audio is stopped from playing and the voice audio is stopped from being collected.

[0070] Optionally, it also includes: an alignment module, used for:

[0071] Align the first frame of the audio in the audio recording file with the first frame of the background audio;

[0072] The audio in the aligned audio recording file and the background audio are synthesized to obtain a target audio file.

[0073] Optionally, the alignment module is also used to:

[0074] Align the first frame of the audio in the audio recording file and the first frame of the background audio to the set start time.

[0075] Optionally, the voice audio collection start module 310 is further used to:

[0076] In response to a recording operation during singing of a target song, starting to collect voice audio;

[0077] Optionally, the first frame playback time detection module 320 is further used to:

[0078] Detect the first frame playback time of the background audio of the target song;

[0079] Optionally, the file write operation execution module 330 is further used to:

[0080] Starting from the moment the first frame is played, a file write operation is performed on the collected voice audio to obtain the audio recording file corresponding to the singing.

[0081] The audio recording device provided in the embodiments of the present disclosure can execute the audio recording method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0082] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0083] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 , which shows an electronic device (eg, Figure 4 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0084] like Figure 4As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0085] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0087] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0088] The electronic device provided in the embodiment of the present disclosure and the audio recording method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0089] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the audio recording method provided by the above embodiment is implemented.

[0090] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0091] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0092] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0093] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device:

[0094] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: starts collecting voice audio in response to a triggered recording operation; detects the first frame playback time of the background audio; and starting from the first frame playback time, performs a file write operation on the collected voice audio to obtain an audio recording file.

[0095] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0097] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0098] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0099] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0100] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0101] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0102] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. An audio recording method, characterized in that: include: In response to the triggered recording operation, start collecting voice audio; Detecting the first frame playback time of the background audio; wherein the first frame playback time is the time when the first frame of the background audio is played; Starting from the first frame playback moment, a file writing operation is performed on the collected voice audio to obtain an audio recording file.

2. The method according to claim 1, characterized in that After starting to collect voice audio and before detecting the first frame playback time of background audio, it also includes: When the number of frames of the collected voice audio reaches a set number and / or the duration of the collected voice audio reaches a set duration, the background audio is started to be played.

3. The method according to claim 1, characterized in that Write the collected audio to a file to obtain the audio recording file, including: Write the collected voice audio from memory to disk to obtain an audio recording file.

4. The method according to claim 2, characterized in that: After writing the collected voice audio to a file and before obtaining the audio recording file, the following steps are also included: In response to the triggered stop recording operation, the background audio is stopped from being played and the voice audio is stopped from being collected.

5. The method according to claim 1, characterized in that: After obtaining the audio recording file, it also includes: Aligning the first frame of the audio in the audio recording file with the first frame of the background audio; The audio in the aligned audio recording file and the background audio are synthesized to obtain a target audio file.

6. The method according to claim 5, characterized in that Aligning the first frame of the audio in the audio recording file with the first frame of the background audio, including: The first frame of the audio in the audio recording file and the first frame of the background audio are both aligned with the set time starting point.

7. The method according to claim 1, characterized in that In response to the triggered recording operation, the voice audio collection is started, including: In response to a recording operation during singing of a target song, starting to collect voice audio; Detect the first frame playback time of the background audio, including: Detecting the first frame playing time of the background audio of the target song; Starting from the first frame playback moment, a file writing operation is performed on the collected voice audio to obtain an audio recording file, including: Starting from the moment the first frame is played, a file writing operation is performed on the collected voice audio to obtain an audio recording file corresponding to the singing.

8. An audio recording device, characterized in that: include: A voice and audio collection start module is used to start collecting voice and audio in response to a triggered recording operation; A first frame playing time detection module is used to detect the first frame playing time of the background audio; wherein, the first frame playing time is the time when the first frame of the background audio is played; The file writing operation execution module is used to execute the file writing operation on the collected voice audio starting from the first frame playback moment to obtain the audio recording file.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the audio recording method as described in any one of claims 1-7.

10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to perform the audio recording method according to any one of claims 1 to 7 when executed by a computer processor.