Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In the embodiment of the present invention, audio file be can include but is not limited to: the files such as song, snatch of song.Subtitle file
It can include but is not limited to: the files such as the lyrics, lyrics segment.One audio file can correspond to a subtitle file.One subtitle
File can be arranged by least one character simple sentence sequence, and by taking song A as an example, the corresponding subtitle file of song A can be indicated such as
Under:
[641,770], [641,20] a1[661,60] a2[721,170] a3[891,200] a4[1091,70] a5[1161,
180]a6[1341,20] a7[1361,50] a8
[1541,180], [1541,20] b1[1561,50] b2[1611,20] b3[1631,30] b4[1661,0] b5[1661,
10]b6[1671,20] b7[1701,30] b8
[1871,730], [1871,60] c1[1931,100] c2[2031,110] c3[2141,200] c4[2341,70] c5
[2411,60] c6[2471,50] c7[2421,80] c8
……
In the corresponding subtitle file of above-mentioned song A, such as " a1a2a3a4a5a6a7a8”、“b1b2b3b4b5b6b7b8”、
“c1c2c3c4c5c6c7c8" can be respectively used to indicate a character simple sentence, " [] " before each character simple sentence is corresponding for describing
The time attribute of character simple sentence, unit time are usually ms, such as: above-mentioned [641,770] are for describing character simple sentence
“a1a2a3a4a5a6a7a8" time attribute, " 641 " therein indicate character simple sentence " a1a2a3a4a5a6a7a8" at the beginning of,
" 770 " indicate character simple sentence " a1a2a3a4a5a6a7a8" duration, it is assumed that song A totally 5 minutes, character simple sentence
“a1a2a3a4a5a6a7a8" then sung since 641ms, continuing 770ms terminates to sing.In each character simple sentence, each character it
Preceding " [] " is used to describe the time attribute of corresponding character, and the unit time is usually ms, such as: above-mentioned [641,20] are used
In description character " a1" time attribute, " 641 " therein indicate character " a1" at the beginning of, " 20 " indicate character " a1"
Duration.According to the sequencing of time started, it may be determined that the sequence for each character simple sentence that subtitle file includes, such as: root
According to the description of the corresponding subtitle file of above-mentioned song A, character simple sentence " a1a2a3a4a5a6a7a8" it is first character simple sentence;Character
Simple sentence " b1b2b3b4b5b6b7b8" it is second character simple sentence;Character simple sentence " c1c2c3c4c5c6c7c8" it is third character simple sentence,
And so on.Wherein, character simple sentence " a1a2a3a4a5a6a7a8" and character simple sentence " b1b2b3b4b5b6b7b8" it is character simple sentence
“c1c2c3c4c5c6c7c8" first character simple sentence, character simple sentence " b1b2b3b4b5b6b7b8" and character simple sentence
“c1c2c3c4c5c6c7c8" it is character simple sentence " a1a2a3a4a5a6a7a8" in rear character simple sentence, and so on.Further, character
Simple sentence " a1a2a3a4a5a6a7a8" it is character simple sentence " b1b2b3b4b5b6b7b8" adjacent first character simple sentence;Character simple sentence
“b1b2b3b4b5b6b7b8" it is character simple sentence " a1a2a3a4a5a6a7a8" it is adjacent in rear character simple sentence, and so on.
One audio file can be divided into multiple audio paragraphs, usually have longer pause between audio paragraph,
Longer time interval is usually had between audio paragraph;So, a subtitle file, which can correspond to, is divided into multiple subtitle paragraphs,
There are longer time intervals between subtitle paragraph, that is to say, that exists between the character simple sentence for being included between subtitle paragraph
Longer time interval.The embodiment of the present invention can utilize the time interval feature of the character simple sentence between above-mentioned subtitle paragraph,
It is realized based on the time interval between the character simple sentence in subtitle file and the paragraph of target audio file is divided.
Based on foregoing description, below in conjunction with attached drawing 1- attached drawing 2, to audio-frequency processing method provided in an embodiment of the present invention into
Row is discussed in detail.
It referring to Figure 1, is a kind of flow chart of audio-frequency processing method provided in an embodiment of the present invention;This method may include with
Lower step S101- step S105.
S101, obtains the corresponding subtitle file of target audio file, and the subtitle file is suitable by least one character simple sentence
Sequence composition.
The corresponding subtitle file of one audio file.The subtitle file includes at least one character simple sentence and each character
The key message of simple sentence;The key message of one character simple sentence includes: mark (ID), time started (start_time) and terminates
Time (end_time).In general, multiple audio files, the attribute of each audio file and every can be stored in internet audio library
The corresponding subtitle file of a audio file, wherein the attribute of audio file may include but be not limited to: the audio of audio file is special
Sign, mark of audio file etc..In this step, the corresponding subtitle of target audio file can be obtained from internet audio library
File;Specific acquisition modes may include but be not limited to: can be according to the mark of target audio file, in internet audio library
The corresponding subtitle file of the target audio file is searched, and obtains found subtitle file;Alternatively, target sound can be extracted
The audio frequency characteristics of frequency file are matched with the audio frequency characteristics of the audio file in internet audio library, thus in internet audio
Target audio file is positioned in library, and obtains corresponding subtitle file.
In the embodiment of the present invention, it is assumed that target audio file is song A, and the structure of the corresponding subtitle file of song A can join
See example shown in the present embodiment, it is assumed that the subtitle file is made of a character simple sentence sequence of N (N is positive integer), it is assumed that this is N number of
Character simple sentence is indicated using p (0) to p (N-1), then, p (0) can be used for indicating first character simple sentence
“a1a2a3a4a5a6a7a8", p (1) can be used for indicating second character simple sentence " b1b2b3b4b5b6b7b8", p (2) can be used for indicating
Three character simple sentence " c1c2c3c4c5c6c7c8", and so on, p (N-1) is for indicating n-th character simple sentence.
S102 constructs temporal characteristics sequence, the time according to the time interval between at least one described character simple sentence
Characteristic sequence includes at least one temporal characteristics element.
The temporal characteristics sequence can be used for reflecting the time interval degree between at least one described character simple sentence.This step
In rapid, the time interval between at least one described character simple sentence is calculated first, needs to calculate herein between p (1) and p (0)
Time interval p (1) .start_time-p (0) .end_time;Calculate time interval p (2) .start_ between p (2) and p (1)
time-p(1).end_time;And so on, calculate time interval p (N-1) .start_ between p (N-1) and p (N-2)
time-p(N-2).end_time.Secondly according to the quantity of at least one character simple sentence, sequence and acquisition can be calculated
Time interval construct the temporal characteristics sequence.
According to example shown in the present embodiment, it is assumed that indicate the temporal characteristics sequence using t (n), then when constructed
Between characteristic sequence t (n) altogether include N number of temporal characteristics element, respectively t (0), t (1) ... t (N-1).Wherein, the numerical value of t (0) can
The numerical value for being set as 0, t (1) is used to indicate the time interval between p (1) and p (0);The numerical value of t (2) is for indicating p (2) and p
(1) time interval between;And so on, the numerical value of t (N-1) is used to indicate the time interval between p (N-1) and p (N-2).
S103 adjusts the numerical value of each temporal characteristics element in the temporal characteristics sequence according to default paragraph sum.
The default paragraph sum can be set according to actual segment demand of the user to target audio file.Assuming that using
M (M is positive integer and M > 1) indicates the default paragraph sum, then adjusts the temporal characteristics sequence according to default paragraph sum M
The numerical value purpose of each temporal characteristics element in t (n) is, mention the temporal characteristics sequence t (n) adjusted can just
The corresponding turning point of M subtitle paragraph is got, to realize the actual segment demand to target audio file.
S104 determines section according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Fall transformation period.
The numerical value of each temporal characteristics element in the temporal characteristics sequence t (n) adjusted is able to reflect M subtitle segment
Corresponding turning point is fallen, then, this step can be special according at least one time in the temporal characteristics sequence adjusted
The numerical value for levying element, obtains the beginning and ending time of M subtitle paragraph from subtitle file.
The target audio file is divided into the section of the default paragraph sum according to the paragraph transformation period by S105
It falls.Since audio file is corresponded to each other with subtitle file, then, it is corresponding according to the beginning and ending time of M subtitle paragraph obtained
Ground can carry out paragraph division to the target audio file, obtain M audio paragraph.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
Fig. 2 is referred to, for the flow chart of another audio-frequency processing method provided in an embodiment of the present invention;This method may include
Following steps S201- step S105.
S201, obtains the corresponding subtitle file of target audio file, and the subtitle file is suitable by least one character simple sentence
Sequence composition.
In the embodiment of the present invention, it is assumed that target audio file is song A, and the structure of the corresponding subtitle file of song A can join
See example shown in the present embodiment, it is assumed that the subtitle file is made of a character simple sentence sequence of N (N is positive integer), it is assumed that this is N number of
Character simple sentence is indicated using p (0) to p (N-1), then, p (0) can be used for indicating first character simple sentence
“a1a2a3a4a5a6a7a8", p (1) can be used for indicating second character simple sentence " b1b2b3b4b5b6b7b8", p (2) can be used for indicating
Three character simple sentence " c1c2c3c4c5c6c7c8", and so on, p (N-1) is for indicating n-th character simple sentence.
The step S201 of the present embodiment can be found in the step S101 of embodiment illustrated in fig. 1, and this will not be repeated here.
S202 determines the temporal characteristics element of building temporal characteristics sequence according to the quantity of at least one character simple sentence
Quantity.
The subtitle file is made of a character simple sentence sequence of N (N is positive integer), i.e., at least one described character simple sentence
Quantity is N, then, this step can determine that the quantity of the temporal characteristics element of the temporal characteristics sequence is also N, i.e., the described time
The length of characteristic sequence is N.Assuming that indicate the temporal characteristics sequence using t (n), then constructed temporal characteristics sequence t
It (n) altogether include N number of temporal characteristics element, respectively t (0), t (1) ... t (N-1).
S203 is determined according to the sequence of each character simple sentence at least one described character simple sentence and is constructed the temporal characteristics
The index of each temporal characteristics element of sequence.
The sequence of the N number of character simple sentence of subtitle file is arranged as p (0), p (1) ... p (N-1), it is assumed that the temporal characteristics
In sequence t (n): t (0) corresponding p (0), t (1) is corresponding p (1), and so on, t (N-1) it is corresponding p (N-1).So, the time
The index of t (0) is 1 in characteristic sequence t (n), i.e. first temporal characteristics element;The index of t (1) is 2, i.e. second time spy
Levy element;And so on, the index of t (N-1) is N, i.e. n-th temporal characteristics element.
S204, for any one target character simple sentence at least one described character simple sentence, by the target character list
Time interval between sentence and the adjacent first character simple sentence of the target character simple sentence is set as the target character simple sentence pair
The numerical value for the temporal characteristics element answered.
The concrete processing procedure of this step S204 may include following steps s11-s12:
S11 calculates the time interval between each character simple sentence first character simple sentence adjacent thereto, needs to calculate herein
Time interval p (1) .start_time-p (0) .end_time between p (1) and p (0);Calculate between p (2) and p (1) when
Between be spaced p (2) .start_time-p (1) .end_time;And so on, calculate the time interval between p (N-1) and p (N-2)
p(N-1).start_time-p(N-2).end_time。
S12 sets the time interval for calculating acquisition to the numerical value of corresponding temporal characteristics element;So, settable t (0)
=0, t (1)=p (1) .start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time,
And so on, t (N-1)=p (N-1) .start_time-p (N-2) .end_time.
S205, according to quantity, index and the numerical value of the temporal characteristics element for constructing the temporal characteristics sequence, described in building
Temporal characteristics sequence.
The constructed temporal characteristics sequence is t (n), and t (n) is by N number of temporal characteristics element t (0), t (1) ... t (N-
1) sequence forms, and the numerical value of each temporal characteristics element is t (0)=0, t (1)=p (1) in the temporal characteristics sequence t (n)
.start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, and so on, t (N-1)
=p (N-1) .start_time-p (N-2) .end_time.
The step S202- step S205 of the present embodiment can be the specific refinement step of the step S102 of embodiment illustrated in fig. 1
Suddenly.
S206, the temporal characteristics member of the default paragraph quantity greatest measure that subtracts 1 before being searched from the temporal characteristics sequence
Element.Assuming that M (M is positive integer and M > 1) is used to indicate the default paragraph sum, this step is needed from the temporal characteristics sequence
The temporal characteristics element of M-1 greatest measure before being searched in t (n).
The numerical value of the temporal characteristics element found is adjusted to target value by S207, will be removed in the temporal characteristics sequence
The numerical value of other times characteristic element except the temporal characteristics element found is adjusted to reference value.The target value and described
Characteristic value can be set according to actual needs, and the settable target value of the embodiment of the present invention is 1, and the reference value is 0.
The concrete processing procedure of step S206-S207 can be with are as follows: when traversing each in the temporal characteristics sequence t (n) first
Between characteristic element numerical value, therefrom find the corresponding temporal characteristics element of greatest measure;Exclude the temporal characteristics element found
And then the secondary numerical value for traversing each temporal characteristics element in the temporal characteristics sequence t (n), it is corresponding therefrom to find greatest measure
Temporal characteristics element;Above-mentioned ergodic process is recycled, until finding M-1 greatest measure.It is finally that the time is special
The M-1 greatest measure found in sign sequence t (n) is adjusted to 1, other numerical value are adjusted to 0.
The step S206- step S207 of the present embodiment can be the specific refinement step of the step S103 of embodiment illustrated in fig. 1
Suddenly.Since M subtitle paragraph just corresponds to M-1 paragraph turning point, institute adjusted can be made by step S206- step S207
The corresponding M-1 paragraph turning point of M subtitle paragraph can just be extracted by stating temporal characteristics sequence t (n), to realize to target
The actual segment demand of audio file.
It is corresponding to obtain the temporal characteristics element that numerical value is target value from the temporal characteristics sequence adjusted by S208
Target index.This step needs to obtain the corresponding target index of the temporal characteristics element that numerical value is 1, that is, needs to obtain to be found
M-1 temporal characteristics element index.
S209 positions the character simple sentence of paragraph turnover according to target index in the subtitle file.
Assuming that one of target index is 5, then the character simple sentence that paragraph turnover can be positioned in the subtitle file is
5th character simple sentence, that is to say, that the 5th character simple sentence is the initial position of a subtitle paragraph, i.e., in the described subtitle file
The 1-4 character simple sentence constitutes a subtitle paragraph.Similarly, the character simple sentence of M-1 paragraph turnover can be positioned.
S210 reads paragraph transformation period according to the character simple sentence that the paragraph is transferred from the subtitle file.
Due to having recorded the key message of each character simple sentence in the subtitle file, the beginning including each character simple sentence
Time and end time;This step can read paragraph transformation period from the subtitle file, according to exemplified by the present embodiment
Son, the 1-4 character simple sentence constitutes a subtitle paragraph in the subtitle file, then read paragraph transformation period are as follows:
At the beginning of the end time of 4th character simple sentence and the 5th character simple sentence.
The step S208- step S210 of the present embodiment can be the specific refinement step of the step S104 of embodiment illustrated in fig. 1
Suddenly.It can get the beginning and ending time of M subtitle paragraph according to step S208- step S210.
The target audio file is divided into the section of the default paragraph sum according to the paragraph transformation period by S211
It falls.Since audio file is corresponded to each other with subtitle file, then, it is corresponding according to the beginning and ending time of M subtitle paragraph obtained
Ground can carry out paragraph division to the target audio file, obtain M audio paragraph.
The step S211 of the present embodiment can be found in the step S105 of embodiment illustrated in fig. 1, and this will not be repeated here.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
It is following will in conjunction with attached drawing 3- attached drawing 6, to the structure and function of apparatus for processing audio provided in an embodiment of the present invention into
Row is discussed in detail.It should be noted that device shown in following attached drawing 3- attached drawings 6 can be run in terminal, to be applied
In the above-mentioned attached method shown in Fig. 2 of attached drawing 1- of execution.
Fig. 3 is referred to, is a kind of structural schematic diagram of apparatus for processing audio provided in an embodiment of the present invention;The device can wrap
It includes: acquiring unit 101, construction unit 102, adjustment unit 103, determination unit 104 and segmenting unit 105.
Acquiring unit 101, for obtaining the corresponding subtitle file of target audio file, the subtitle file is by least one
Character simple sentence sequence forms.
The corresponding subtitle file of one audio file.The subtitle file includes at least one character simple sentence and each character
The key message of simple sentence;The key message of one character simple sentence includes: mark (ID), time started (start_time) and terminates
Time (end_time).In general, multiple audio files, the attribute of each audio file and every can be stored in internet audio library
The corresponding subtitle file of a audio file, wherein the attribute of audio file may include but be not limited to: the audio of audio file is special
Sign, mark of audio file etc..It is corresponding that the acquiring unit 101 can obtain target audio file from internet audio library
Subtitle file;Specific acquisition modes may include but be not limited to: can be according to the mark of target audio file, in internet sound
The corresponding subtitle file of the target audio file is searched in frequency library, and obtains found subtitle file;Alternatively, can extract
The audio frequency characteristics of target audio file are matched with the audio frequency characteristics of the audio file in internet audio library, are thus being interconnected
Target audio file is positioned in net audio repository, and obtains corresponding subtitle file.
In the embodiment of the present invention, it is assumed that target audio file is song A, and the structure of the corresponding subtitle file of song A can join
See example shown in the present embodiment, it is assumed that the subtitle file is made of a character simple sentence sequence of N (N is positive integer), it is assumed that this is N number of
Character simple sentence is indicated using p (0) to p (N-1), then, p (0) can be used for indicating first character simple sentence
“a1a2a3a4a5a6a7a8", p (1) can be used for indicating second character simple sentence " b1b2b3b4b5b6b7b8", p (2) can be used for indicating
Three character simple sentence " c1c2c3c4c5c6c7c8", and so on, p (N-1) is for indicating n-th character simple sentence.
Construction unit 102, for constructing temporal characteristics sequence according to the time interval between at least one described character simple sentence
Column, the temporal characteristics sequence includes at least one temporal characteristics element.
The temporal characteristics sequence can be used for reflecting the time interval degree between at least one described character simple sentence.First
The construction unit 102 calculates the time interval between at least one described character simple sentence, needs to calculate p (1) and p (0) herein
Between time interval p (1) .start_time-p (0) .end_time;Calculate the time interval p (2) between p (2) and p (1)
.start_time-p(1).end_time;And so on, calculate the time interval p (N-1) between p (N-1) and p (N-2)
.start_time-p(N-2).end_time.Secondly the construction unit 102 can be according at least one character simple sentence
Quantity, sequence and the time interval building temporal characteristics sequence for calculating acquisition.
According to example shown in the present embodiment, it is assumed that indicate the temporal characteristics sequence using t (n), then when constructed
Between characteristic sequence t (n) altogether include N number of temporal characteristics element, respectively t (0), t (1) ... t (N-1).Wherein, the numerical value of t (0) can
The numerical value for being set as 0, t (1) is used to indicate the time interval between p (1) and p (0);The numerical value of t (2) is for indicating p (2) and p
(1) time interval between;And so on, the numerical value of t (N-1) is used to indicate the time interval between p (N-1) and p (N-2).
Adjustment unit 103, for adjusting the member of each temporal characteristics in the temporal characteristics sequence according to default paragraph sum
The numerical value of element.
The default paragraph sum can be set according to actual segment demand of the user to target audio file.Assuming that using
M (M is positive integer and M > 1) indicates the default paragraph sum, then the adjustment unit 103 is adjusted according to default paragraph sum M
The numerical value purpose of each temporal characteristics element in the temporal characteristics sequence t (n) is, makes the temporal characteristics sequence adjusted
Column t (n) can just extract the corresponding turning point of M subtitle paragraph, to realize the actual segment to target audio file
Demand.
Determination unit 104, for according at least one temporal characteristics element in the temporal characteristics sequence adjusted
Numerical value determine paragraph transformation period.
The numerical value of each temporal characteristics element in the temporal characteristics sequence t (n) adjusted is able to reflect M subtitle segment
Corresponding turning point is fallen, then, the determination unit 104 can be according at least one in the temporal characteristics sequence adjusted
The numerical value of a temporal characteristics element, obtains the beginning and ending time of M subtitle paragraph from subtitle file.
Segmenting unit 105, it is described default for being divided into the target audio file according to the paragraph transformation period
The paragraph of paragraph sum.
Since audio file is corresponded to each other with subtitle file, then, the segmenting unit 105 is according to M word obtained
The beginning and ending time of curtain paragraph accordingly can carry out paragraph division to the target audio file, obtain M audio paragraph.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
Fig. 4 is referred to, is the structural schematic diagram of the embodiment of construction unit shown in Fig. 3;The construction unit 102 can wrap
It includes: quantity determination unit 1001, index determination unit 1002, numerical value setting unit 1003 and sequence construct unit 1004.
Quantity determination unit 1001, for determining building temporal characteristics sequence according to the quantity of at least one character simple sentence
The quantity of the temporal characteristics element of column.
The subtitle file is made of a character simple sentence sequence of N (N is positive integer), i.e., at least one described character simple sentence
Quantity is N, then, the quantity determination unit 1001 can determine the quantity of the temporal characteristics element of the temporal characteristics sequence
For N, i.e., the length of the described temporal characteristics sequence is N.It is assuming that indicate the temporal characteristics sequence using t (n), then constructed
Temporal characteristics sequence t (n) includes N number of temporal characteristics element, respectively t (0), t (1) ... t (N-1) altogether.
Determination unit 1002 is indexed, for the sequence according to each character simple sentence at least one described character simple sentence, is determined
Construct the index of each temporal characteristics element of the temporal characteristics sequence.
The sequence of the N number of character simple sentence of subtitle file is arranged as p (0), p (1) ... p (N-1), it is assumed that the temporal characteristics
In sequence t (n): t (0) corresponding p (0), t (1) is corresponding p (1), and so on, t (N-1) it is corresponding p (N-1).So, the time
The index of t (0) is 1 in characteristic sequence t (n), i.e. first temporal characteristics element;The index of t (1) is 2, i.e. second time spy
Levy element;And so on, the index of t (N-1) is N, i.e. n-th temporal characteristics element.
Numerical value setting unit 1003, any one target character simple sentence for being directed at least one described character simple sentence,
Institute is set by the time interval between the target character simple sentence and the adjacent first character simple sentence of the target character simple sentence
State the numerical value of the corresponding temporal characteristics element of target character simple sentence.
The concrete processing procedure of the numerical value setting unit 1003 may include following A-B:
A, the time interval between each character simple sentence first character simple sentence adjacent thereto is calculated, needs to calculate p herein
(1) time interval p (1) .start_time-p (0) .end_time between p (0);Calculate the time between p (2) and p (1)
It is spaced p (2) .start_time-p (1) .end_time;And so on, calculate the time interval p between p (N-1) and p (N-2)
(N-1).start_time-p(N-2).end_time。
B, the time interval for calculating acquisition is set to the numerical value of corresponding temporal characteristics element;So, settable t (0)=
0, t (1)=p (1) .start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, with
This analogizes, t (N-1)=p (N-1) .start_time-p (N-2) .end_time.
Sequence construct unit 1004, for the quantity according to the temporal characteristics element for constructing the temporal characteristics sequence, rope
Draw and numerical value, constructs the temporal characteristics sequence.
The constructed temporal characteristics sequence is t (n), and t (n) is by N number of temporal characteristics element t (0), t (1) ... t (N-
1) sequence forms, and the numerical value of each temporal characteristics element is t (0)=0, t (1)=p (1) in the temporal characteristics sequence t (n)
.start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, and so on, t (N-1)
=p (N-1) .start_time-p (N-2) .end_time.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
Fig. 5 is referred to, is the structural schematic diagram of the embodiment of adjustment unit shown in Fig. 3;The adjustment unit 103 can wrap
It includes: element searching unit 2001 and numerical value adjustment unit 2002.
Element searching unit 2001, for the maximum that subtracts 1 of default paragraph quantity before being searched from the temporal characteristics sequence
The temporal characteristics element of numerical value.
Assuming that M (M is positive integer and M > 1) is used to indicate the default paragraph sum, the element searching unit 2001 is needed
The temporal characteristics element of M-1 greatest measure before being searched from the temporal characteristics sequence t (n).
The numerical value of numerical value adjustment unit 2002, the temporal characteristics element for will find is adjusted to target value, will be described
The numerical value of other times characteristic element in temporal characteristics sequence in addition to the temporal characteristics element found is adjusted to reference value.
The target value and the characteristic value can be set according to actual needs, and the settable target value of the embodiment of the present invention is
1, the reference value is 0.
The element searching unit 2001 and the concrete processing procedure of the numerical value adjustment unit 2002 can be with are as follows: institute first
The numerical value that element searching unit 2001 traverses each temporal characteristics element in the temporal characteristics sequence t (n) is stated, maximum is therefrom found
The corresponding temporal characteristics element of numerical value;Exclude the temporal characteristics element found and then the secondary traversal temporal characteristics sequence t
(n) numerical value of each temporal characteristics element in therefrom finds the corresponding temporal characteristics element of greatest measure;It recycles above-mentioned traversed
Journey, until finding M-1 greatest measure.The last numerical value adjustment unit 2002 is by the temporal characteristics sequence t (n)
In M-1 greatest measure finding be adjusted to 1, other numerical value are adjusted to 0.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
Fig. 6 is referred to, is the structural schematic diagram of the embodiment of determination unit shown in Fig. 3;The determination unit 104 can wrap
Include: target indexes acquiring unit 3001, positioning unit 3002 and time reading unit 3003.
Target indexes acquiring unit 3001, is target value for obtaining numerical value from the temporal characteristics sequence adjusted
Temporal characteristics element corresponding target index.
According to the example of embodiment illustrated in fig. 5, the target index acquiring unit 3001 needs to obtain the time that numerical value is 1
The corresponding target index of characteristic element, that is, need to obtain the index of M-1 found temporal characteristics element.
Positioning unit 3002, for positioning the character list of paragraph turnover in the subtitle file according to target index
Sentence.
Assuming that one of target index is 5, the positioning unit 3002 then can position paragraph in the subtitle file
The character simple sentence of turnover is the 5th character simple sentence, that is to say, that the 5th character simple sentence is the initial position of a subtitle paragraph,
The 1-4 character simple sentence constitutes a subtitle paragraph in the i.e. described subtitle file.Similarly, M-1 paragraph turnover can be positioned
Character simple sentence.
Time reading unit 3003, the character simple sentence for being transferred according to the paragraph read section from the subtitle file
Fall transformation period.
Due to having recorded the key message of each character simple sentence in the subtitle file, the beginning including each character simple sentence
Time and end time;The time reading unit 3003 from the subtitle file to read paragraph transformation period, according to this
Example shown in embodiment, the 1-4 character simple sentence constitutes a subtitle paragraph in the subtitle file, then read paragraph
Transformation period are as follows: at the beginning of the end time of the 4th character simple sentence and the 5th character simple sentence.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
The embodiment of the invention also discloses a kind of terminal, which can be PC (Personal Computer, individual's meter
Calculation machine), laptop, mobile phone, PAD (tablet computer), car-mounted terminal, the equipment such as intelligent wearable device.It can in the terminal
Including an apparatus for processing audio, the structure and function of the device can be found in the associated description of above-mentioned Fig. 3-embodiment illustrated in fig. 6,
This is not repeated.
In the embodiment of the present invention, can according at least one character simple sentence in the corresponding subtitle file of target audio file it
Between time interval construct temporal characteristics sequence, according to default paragraph sum adjust each time in the temporal characteristics sequence spy
The numerical value of element is levied, and is determined according to the numerical value of at least one temporal characteristics element in the temporal characteristics sequence adjusted
Then the target audio file is divided into the default paragraph sum according to the paragraph transformation period by paragraph transformation period
Paragraph, the audio processing process using the character simple sentence between subtitle paragraph time interval feature, based in subtitle file
Character simple sentence between time interval realize the paragraph of target audio file divided, segment processing efficiency can be promoted, promoted
The intelligence of audio processing.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.