Audio file re-recording method, device and storage medium
Provided are an audio file re-recording method and device, and a storage medium. The method includes: determining first time, the first time being start time of a recorded clip to be re-recorded in an audio file; playing a first recorded clip that has been recorded, the first recorded clip using the first time as end time in the audio file; upon arrival of the first time, collecting first voice data of a user to obtain a second recorded clip; and processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file.
1. An audio file re-recording method performed at a terminal having one or more processors and memory storing a plurality of program instructions be executed by the one or more processors, the method comprising:
determining a first time, the first time being a start time of a recorded clip to be re-recorded in an audio file;
playing a first recorded clip in the audio file that has been recorded, the first recorded clip using the first time as an end time in the audio file, and collecting second voice data of a user in the process of playing the first recorded clip that has been recorded to obtain a third recorded clip;
upon arrival of the first time, collecting first voice data of the user to obtain a second recorded clip and using the second recorded clip and the third recorded clip as recorded clips recorded this time; and
processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file, wherein the processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file further comprises:
acquiring a first sound spectrum corresponding to the first recorded clip, and acquiring a second sound spectrum corresponding to the second recorded clip;
determining, from the first sound spectrum, a flat start point and a second time corresponding to the flat start point in the audio file;
determining, from the second sound spectrum, a rising start point and a third time corresponding to the rising start point in the audio file;
using the second time as a start time to select a fourth recorded clip from the recorded clips recorded this time;
using the third time as an end time to select a fifth recorded clip from the recorded clips recorded last time, the recorded clips recorded last time consisting of the recorded clip to be re-recorded and the first recorded clip; and
processing the fourth recorded clip and the fifth recorded clip to obtain the re-recorded audio file;
wherein the second time is earlier than the first time, and the first time is earlier than the third time.
2. The method according to claim 1 , wherein the processing the fourth recorded clip and the fifth recorded clip to obtain the re-recorded audio file comprises:
comparing a sound spectrum corresponding to the fourth recorded clip with a sound spectrum corresponding to the fifth recorded clip;
acquiring a first target sound spectrum from the sound spectrum corresponding to the fourth recorded clip, and acquiring a second target sound spectrum from the sound spectrum corresponding to the fifth recorded clip, the first target sound spectrum and the second target sound spectrum having the same start time and end time; and
fitting the first target sound spectrum and the second target sound spectrum so that the fourth recorded clip and the fifth recorded clip are spliced together to obtain the re-recorded audio file.
3. The method according to claim 1 , further comprising:
playing a corresponding accompaniment file in the process of playing recorded clips that have been recorded and recording the recorded clips.
4. A terminal having one or more processors, memory coupled to the one or more processors, and a plurality of program instructions stored in the memory that, when executed by the one or more processors, cause the electronic apparatus to perform the following operations:
determining a first time, the first time being a start time of a recorded clip to be re-recorded in an audio file;
playing a first recorded clip in the audio file that has been recorded, the first recorded clip using the first time as an end time in the audio file, and collecting second voice data of a user in the process of playing the first recorded clip that has been recorded to obtain a third recorded clip;
upon arrival of the first time, collecting first voice data of the user to obtain a second recorded clip and using the second recorded clip and the third recorded clip as recorded clips recorded this time; and
processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file, wherein the processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file further comprises:
acquiring a first sound spectrum corresponding to the first recorded clip, and acquiring a second sound spectrum corresponding to the second recorded clip;
determining, from the first sound spectrum, a flat start point and a second time corresponding to the flat start point in the audio file;
determining, from the second sound spectrum, a rising start point and a third time corresponding to the rising start point in the audio file;
using the second time as a start time to select a fourth recorded clip from the recorded clips recorded this time;
using the third time as an end time to select a fifth recorded clip from the recorded clips recorded last time, the recorded clips recorded last time consisting of the recorded clip to be re-recorded and the first recorded clip; and
processing the fourth recorded clip and the fifth recorded clip to obtain the re-recorded audio file;
wherein the second time is earlier than the first time, and the first time is earlier than the third time.
5. The terminal according to claim 4 , wherein the operation of processing the fourth recorded clip and the fifth recorded clip to obtain the re-recorded audio file comprises:
comparing a sound spectrum corresponding to the fourth recorded clip with a sound spectrum corresponding to the fifth recorded clip;
acquiring a first target sound spectrum from the sound spectrum corresponding to the fourth recorded clip, and acquiring a second target sound spectrum from the sound spectrum corresponding to the fifth recorded clip, the first target sound spectrum and the second target sound spectrum having the same start time and end time; and
fitting the first target sound spectrum and the second target sound spectrum so that the fourth recorded clip and the fifth recorded clip are spliced together to obtain the re-recorded audio file.
6. The terminal according to claim 4 , wherein the operations further comprise:
playing a corresponding accompaniment file in the process of playing recorded clips that have been recorded and recording the recorded clips.
7. A non-transitory computer readable storage medium storing a plurality of program instructions in connection with an electronic apparatus having one or more processors, wherein the plurality of program instructions, when executed by the one or more processors, cause the electronic apparatus to perform the following operations:
determining a first time, the first time being a start time of a recorded clip to be re-recorded in an audio file;
playing a first recorded clip in the audio file that has been recorded, the first recorded clip using the first time as an end time in the audio file, and collecting second voice data of a user in the process of playing the first recorded clip that has been recorded to obtain a third recorded clip;
upon arrival of the first time, collecting first voice data of the user to obtain a second recorded clip and using the second recorded clip and the third recorded clip as recorded clips recorded this time; and
processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file, wherein the processing the first recorded clip and the second recorded clip to obtain a re-recorded audio file further comprises:
acquiring a first sound spectrum corresponding to the first recorded clip, and acquiring a second sound spectrum corresponding to the second recorded clip;
determining, from the first sound spectrum, a flat start point and a second time corresponding to the flat start point in the audio file;
determining, from the second sound spectrum, a rising start point and a third time corresponding to the rising start point in the audio file;
using the second time as a start time to select a fourth recorded clip from the recorded clips recorded this time;
using the third time as an end time to select a fifth recorded clip from the recorded clips recorded last time, the recorded clips recorded last time consisting of the recorded clip to be re-recorded and the first recorded clip; and
processing the fourth recorded clip and the fifth recorded clip to obtain the re-recorded audio file;
wherein the second time is earlier than the first time, and the first time is earlier than the third time.
8. The non-transitory computer readable storage medium according to claim 7 , wherein the operation of processing the fourth recorded clip and the fifth recorded clip to obtain the re-recorded audio file comprises:
comparing a sound spectrum corresponding to the fourth recorded clip with a sound spectrum corresponding to the fifth recorded clip;
acquiring a first target sound spectrum from the sound spectrum corresponding to the fourth recorded clip, and acquiring a second target sound spectrum from the sound spectrum corresponding to the fifth recorded clip, the first target sound spectrum and the second target sound spectrum having the same start time and end time; and
fitting the first target sound spectrum and the second target sound spectrum so that the fourth recorded clip and the fifth recorded clip are spliced together to obtain the re-recorded audio file.
9. The non-transitory computer readable storage medium according to claim 7 , wherein the operations further comprise:
playing a corresponding accompaniment file in the process of playing recorded clips that have been recorded and recording the recorded clips.