Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
In the embodiment of the present invention, audio file can include but not limited to: the file such as song, snatch of song.Subtitle file can include but not limited to: the files such as the lyrics, lyrics fragment.An audio file may correspond to a subtitle file.A subtitle file can be formed by least one character simple sentence order arrangement, and for song A, the subtitle file that song A is corresponding can be expressed as follows:
[641,770],[641,20]a
1[661,60]a
2[721,170]a
3[891,200]a
4[1091,70]a
5[1161,180]a
6[1341,20]a
7[1361,50]a
8
[1541,180],[1541,20]b
1[1561,50]b
2[1611,20]b
3[1631,30]b
4[1661,0]b
5[1661,10]b
6[1671,20]b
7[1701,30]b
8
[1871,730],[1871,60]c
1[1931,100]c
2[2031,110]c
3[2141,200]c
4[2341,70]c
5[2411,60]c
6[2471,50]c
7[2421,80]c
8
……
In the subtitle file that above-mentioned song A is corresponding, such as " a
1a
2a
3a
4a
5a
6a
7a
8", " b
1b
2b
3b
4b
5b
6b
7b
8", " c
1c
2c
3c
4c
5c
6c
7c
8" expression character simple sentence can be respectively used to, " [] " before each character simple sentence, for describing the time attribute of corresponding character simple sentence, its unit interval is generally ms, such as: above-mentioned [641,770] are for describing character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" time attribute, " 641 " wherein represent character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" start time, " 770 " represent character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" duration, suppose song A totally 5 minutes, character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" then sing from 641ms, lasting 770ms terminates to sing.In each character simple sentence, " [] " before each character, for describing the time attribute of corresponding character, its unit interval is generally ms, such as: above-mentioned [641,20] are for describing character " a
1" time attribute, " 641 " wherein represent character " a
1" start time, " 20 " represent character " a
1" duration.According to the sequencing of start time, the order of each character simple sentence that subtitle file comprises can be determined, such as: according to the description of subtitle file corresponding to above-mentioned song A, character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" be first character simple sentence; Character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8" be second character simple sentence; Character simple sentence " c
1c
2c
3c
4c
5c
6c
7c
8" be the 3rd character simple sentence, by that analogy.Wherein, character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" and character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8" be character simple sentence " c
1c
2c
3c
4c
5c
6c
7c
8" at first character simple sentence, character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8" and character simple sentence " c
1c
2c
3c
4c
5c
6c
7c
8" be character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" at rear character simple sentence, by that analogy.Further, character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" be character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8" adjacent at first character simple sentence; Character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8" be character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8" adjacent at rear character simple sentence, by that analogy.
An audio file can be divided into multiple audio frequency paragraph, usually has longer pause, namely usually have the longer time interval between audio frequency paragraph between audio frequency paragraph; So, a subtitle file may correspond to and is divided into multiple captions paragraph, there is the longer time interval between captions paragraph, that is, there is the longer time interval between the character simple sentence comprised between captions paragraph.The embodiment of the present invention can utilize the time interval feature of the character simple sentence between above-mentioned captions paragraph, realizes dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file.
Based on foregoing description, below in conjunction with accompanying drawing 1-accompanying drawing 2, the audio-frequency processing method that the embodiment of the present invention provides is described in detail.
Referring to Fig. 1, is the process flow diagram of a kind of audio-frequency processing method that the embodiment of the present invention provides; The method can comprise the following steps S101-step S105.
S101, obtains the subtitle file that target audio file is corresponding, and described subtitle file is made up of at least one character simple sentence order.
A corresponding subtitle file of audio file.Described subtitle file comprises the key message of at least one character simple sentence and each character simple sentence; The key message of a character simple sentence comprises: mark (ID), start time (start_time) and end time (end_time).Usually, the subtitle file that multiple audio file, the attribute of each audio file and each audio file are corresponding can be stored in internet audio storehouse, wherein, the attribute of audio file can include but not limited to: the audio frequency characteristics of audio file, mark of audio file etc.In this step, subtitle file corresponding to target audio file can be obtained from internet audio storehouse; Concrete obtain manner can include but not limited to: according to the mark of target audio file, can search the subtitle file that this target audio file is corresponding in internet audio storehouse, and obtains the subtitle file found; Or the audio frequency characteristics that can extract target audio file mates with the audio frequency characteristics of the audio file in internet audio storehouse, localizing objects audio file in internet audio storehouse thus, and obtain corresponding subtitle file.
In the embodiment of the present invention, hypothetical target audio file is song A, the structure of the subtitle file that song A is corresponding can see example shown in the present embodiment, suppose that described subtitle file is made up of the individual character simple sentence order of N (N is positive integer), suppose that this N number of character simple sentence adopts p (0) to represent to p (N-1), so, p (0) can be used for representing first character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8", p (1) can be used for expression second character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8", p (2) can be used for expression the 3rd character simple sentence " c
1c
2c
3c
4c
5c
6c
7c
8", by that analogy, p (N-1) is for representing N number of character simple sentence.
S102, build temporal characteristics sequence according to the time interval between at least one character simple sentence described, described temporal characteristics sequence comprises at least one temporal characteristics element.
Described temporal characteristics sequence can be used for reflecting the time interval degree between at least one character simple sentence described.In this step, first calculate the time interval between at least one character simple sentence described, need to calculate time interval p (1) .start_time-p (0) .end_time between p (1) and p (0) herein; Calculate time interval p (2) .start_time-p (1) .end_time between p (2) and p (1); By that analogy, time interval p (N-1) .start_time-p (N-2) .end_time between p (N-1) and p (N-2) is calculated.The time interval that secondly can obtain according to the quantity of at least one character simple sentence described, order and calculating builds described temporal characteristics sequence.
According to example shown in the present embodiment, suppose to adopt t (n) to represent described temporal characteristics sequence, then constructed temporal characteristics sequence t (n) comprises N number of temporal characteristics element altogether, is respectively t (0), t (1) ... t (N-1).Wherein, the numerical value of t (0) can be set to the numerical value of 0, t (1) for representing the time interval between p (1) and p (0); The numerical value of t (2) is for representing the time interval between p (2) and p (1); By that analogy, the numerical value of t (N-1) is for representing the time interval between p (N-1) and p (N-2).
S103, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment.
Described default paragraph sum can according to the actual segment requirements set of user to target audio file.Suppose to adopt M (M is positive integer and M>1) to represent described default paragraph sum, the numerical value object of each temporal characteristics element then adjusted in described temporal characteristics sequence t (n) according to default paragraph sum M is, make described temporal characteristics sequence t (n) after adjustment just can extract turning point corresponding to M captions paragraph, thus realize the actual segment demand to target audio file.
S104, according to the numerical value determination paragraph transformation period of at least one the temporal characteristics element in the described temporal characteristics sequence after adjustment.
The numerical value of each temporal characteristics element in temporal characteristics sequence t (n) after described adjustment can reflect the turning point that M captions paragraph is corresponding, so, this step according to the numerical value of at least one the temporal characteristics element in the described temporal characteristics sequence after adjustment, can obtain the beginning and ending time of M captions paragraph from subtitle file.
Described target audio Divide File is the paragraph of described default paragraph sum according to described paragraph transformation period by S105.Because audio file and subtitle file are mutually corresponding, so, according to the beginning and ending time of obtained M captions paragraph, paragraph division can be carried out to described target audio file accordingly, obtain M audio frequency paragraph.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
Referring to Fig. 2, is the process flow diagram of the another kind of audio-frequency processing method that the embodiment of the present invention provides; The method can comprise the following steps S201-step S105.
S201, obtains the subtitle file that target audio file is corresponding, and described subtitle file is made up of at least one character simple sentence order.
In the embodiment of the present invention, hypothetical target audio file is song A, the structure of the subtitle file that song A is corresponding can see example shown in the present embodiment, suppose that described subtitle file is made up of the individual character simple sentence order of N (N is positive integer), suppose that this N number of character simple sentence adopts p (0) to represent to p (N-1), so, p (0) can be used for representing first character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8", p (1) can be used for expression second character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8", p (2) can be used for expression the 3rd character simple sentence " c
1c
2c
3c
4c
5c
6c
7c
8", by that analogy, p (N-1) is for representing N number of character simple sentence.
The step S201 of the present embodiment can the step S101 of embodiment shown in Figure 1, is not repeated herein.
S202, determines the quantity of the temporal characteristics element building temporal characteristics sequence according to the quantity of at least one character simple sentence described.
Described subtitle file is made up of the individual character simple sentence order of N (N is positive integer), namely the quantity of at least one character simple sentence described is N, so, this step can determine that the quantity of the temporal characteristics element of described temporal characteristics sequence is also N, and namely the length of described temporal characteristics sequence is N.Suppose to adopt t (n) to represent described temporal characteristics sequence, then constructed temporal characteristics sequence t (n) comprises N number of temporal characteristics element altogether, is respectively t (0), t (1) ... t (N-1).
S203, according to the order of each character simple sentence at least one character simple sentence described, determines the index of each temporal characteristics element building described temporal characteristics sequence.
The order of the N number of character simple sentence of described subtitle file is arranged as p (0), p (1) ... p (N-1), suppose in described temporal characteristics sequence t (n): t (0) corresponding p (0), t (1) corresponding p (1), by that analogy, t (N-1) corresponding p (N-1).So, in described temporal characteristics sequence t (n), the index of t (0) is 1, i.e. first temporal characteristics element; The index of t (1) is 2, i.e. second temporal characteristics element; By that analogy, the index of t (N-1) is N, i.e. N number of temporal characteristics element.
S204, for any one the target character simple sentence at least one character simple sentence described, described target character simple sentence and the adjacent time interval between first character simple sentence of described target character simple sentence are set to the numerical value of temporal characteristics element corresponding to described target character simple sentence.
The concrete processing procedure of this step S204 can comprise the following steps s11-s12:
S11, calculate each character simple sentence and be adjacent time interval between first character simple sentence, need to calculate time interval p (1) .start_time-p (0) .end_time between p (1) and p (0) herein; Calculate time interval p (2) .start_time-p (1) .end_time between p (2) and p (1); By that analogy, time interval p (N-1) .start_time-p (N-2) .end_time between p (N-1) and p (N-2) is calculated.
S12, is set to the numerical value of corresponding temporal characteristics element by the time interval calculating acquisition; So, t (0)=0 can be set, t (1)=p (1) .start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, by that analogy, t (N-1)=p (N-1) .start_time-p (N-2) .end_time.
S205, according to building the quantity of temporal characteristics element of described temporal characteristics sequence, index and numerical value, builds described temporal characteristics sequence.
Constructed described temporal characteristics sequence is t (n), t (n) is by N number of temporal characteristics element t (0), t (1) ... t (N-1) order composition, and the numerical value of each temporal characteristics element is t (0)=0 in described temporal characteristics sequence t (n), t (1)=p (1) .start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, by that analogy, 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 concrete refinement step of step S102 embodiment illustrated in fig. 1.
S206, presets the temporal characteristics element that paragraph quantity subtracts 1 greatest measure from described temporal characteristics sequence before searching.Suppose to adopt M (M is positive integer and M>1) to represent described default paragraph sum, this step needs the temporal characteristics element searching a front M-1 greatest measure from described temporal characteristics sequence t (n).
S207, is adjusted to desired value by the numerical value of the temporal characteristics element found, and the numerical value of the other times characteristic element in described temporal characteristics sequence except the temporal characteristics element found is adjusted to reference value.Described desired value and described eigenwert can set according to actual needs, and it is 1 that the embodiment of the present invention can arrange described desired value, and described reference value is 0.
The concrete processing procedure of step S206-S207 can be: the numerical value first traveling through each temporal characteristics element in described temporal characteristics sequence t (n), therefrom finds the temporal characteristics element that greatest measure is corresponding; After getting rid of the temporal characteristics element found, again travel through the numerical value of each temporal characteristics element in described temporal characteristics sequence t (n), therefrom find the temporal characteristics element that greatest measure is corresponding; Circulate above-mentioned ergodic process, until find M-1 greatest measure.Finally the M-1 found in described temporal characteristics sequence t (n) greatest measure is all adjusted to 1, other numerical value are adjusted to 0.
The step S206-step S207 of the present embodiment can be the concrete refinement step of step S103 embodiment illustrated in fig. 1.Due to M captions paragraph just corresponding M-1 paragraph turning point, described temporal characteristics sequence t (n) after adjustment can be made just can to extract M-1 paragraph turning point corresponding to M captions paragraph through step S206-step S207, thus realize the actual segment demand to target audio file.
S208, from the described temporal characteristics sequence after adjustment, obtain numerical value is the target index that the temporal characteristics element of desired value is corresponding.This step needs to obtain target index corresponding to temporal characteristics element that numerical value is 1, namely needs the index obtaining M-1 the temporal characteristics element found.
S209, locates the character simple sentence of paragraph turnover in described subtitle file according to described target index.
Suppose that one of them target index is 5, the character simple sentence then can locating paragraph turnover in described subtitle file is the 5th character simple sentence, that is, the 5th character simple sentence is the reference position of a captions paragraph, and namely in described subtitle file, 1-4 character simple sentence forms a captions paragraph.In like manner, the character simple sentence of M-1 paragraph turnover can be located.
S210, reads paragraph transformation period according to the character simple sentence that described paragraph is transferred from described subtitle file.
Owing to have recorded the key message of each character simple sentence in described subtitle file, comprise start time and the end time of each character simple sentence; This step can read paragraph transformation period from described subtitle file, according to example shown in the present embodiment, in described subtitle file, 1-4 character simple sentence forms a captions paragraph, and so read paragraph transformation period is: the start time of the end time of the 4th character simple sentence and the 5th character simple sentence.
The step S208-step S210 of the present embodiment can be the concrete refinement step of step S104 embodiment illustrated in fig. 1.The beginning and ending time of M captions paragraph can be obtained according to step S208-step S210.
Described target audio Divide File is the paragraph of described default paragraph sum according to described paragraph transformation period by S211.Because audio file and subtitle file are mutually corresponding, so, according to the beginning and ending time of obtained M captions paragraph, paragraph division can be carried out to described target audio file accordingly, obtain M audio frequency paragraph.
The step S211 of the present embodiment can the step S105 of embodiment shown in Figure 1, is not repeated herein.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
Following general 3-accompanying drawing 6 by reference to the accompanying drawings, describes in detail to the 26S Proteasome Structure and Function of the apparatus for processing audio that the embodiment of the present invention provides.It should be noted that, the shown device of following accompanying drawing 3-accompanying drawing 6 can run in terminal, to be applied to performing the method shown in above-mentioned accompanying drawing 1-accompanying drawing 2.
Referring to Fig. 3, is the structural representation of a kind of apparatus for processing audio that the embodiment of the present invention provides; This device can comprise: acquiring unit 101, construction unit 102, adjustment unit 103, determining unit 104 and segmenting unit 105.
Acquiring unit 101, for obtaining subtitle file corresponding to target audio file, described subtitle file is made up of at least one character simple sentence order.
A corresponding subtitle file of audio file.Described subtitle file comprises the key message of at least one character simple sentence and each character simple sentence; The key message of a character simple sentence comprises: mark (ID), start time (start_time) and end time (end_time).Usually, the subtitle file that multiple audio file, the attribute of each audio file and each audio file are corresponding can be stored in internet audio storehouse, wherein, the attribute of audio file can include but not limited to: the audio frequency characteristics of audio file, mark of audio file etc.Described acquiring unit 101 can obtain subtitle file corresponding to target audio file from internet audio storehouse; Concrete obtain manner can include but not limited to: according to the mark of target audio file, can search the subtitle file that this target audio file is corresponding in internet audio storehouse, and obtains the subtitle file found; Or the audio frequency characteristics that can extract target audio file mates with the audio frequency characteristics of the audio file in internet audio storehouse, localizing objects audio file in internet audio storehouse thus, and obtain corresponding subtitle file.
In the embodiment of the present invention, hypothetical target audio file is song A, the structure of the subtitle file that song A is corresponding can see example shown in the present embodiment, suppose that described subtitle file is made up of the individual character simple sentence order of N (N is positive integer), suppose that this N number of character simple sentence adopts p (0) to represent to p (N-1), so, p (0) can be used for representing first character simple sentence " a
1a
2a
3a
4a
5a
6a
7a
8", p (1) can be used for expression second character simple sentence " b
1b
2b
3b
4b
5b
6b
7b
8", p (2) can be used for expression the 3rd character simple sentence " c
1c
2c
3c
4c
5c
6c
7c
8", by that analogy, p (N-1) is for representing N number of character simple sentence.
Construction unit 102, for building temporal characteristics sequence according to the time interval between at least one character simple sentence described, described temporal characteristics sequence comprises at least one temporal characteristics element.
Described temporal characteristics sequence can be used for reflecting the time interval degree between at least one character simple sentence described.First described construction unit 102 calculates the time interval between at least one character simple sentence described, needs to calculate time interval p (1) .start_time-p (0) .end_time between p (1) and p (0) herein; Calculate time interval p (2) .start_time-p (1) .end_time between p (2) and p (1); By that analogy, time interval p (N-1) .start_time-p (N-2) .end_time between p (N-1) and p (N-2) is calculated.Secondly the time interval that described construction unit 102 can obtain according to the quantity of at least one character simple sentence described, order and calculating builds described temporal characteristics sequence.
According to example shown in the present embodiment, suppose to adopt t (n) to represent described temporal characteristics sequence, then constructed temporal characteristics sequence t (n) comprises N number of temporal characteristics element altogether, is respectively t (0), t (1) ... t (N-1).Wherein, the numerical value of t (0) can be set to the numerical value of 0, t (1) for representing the time interval between p (1) and p (0); The numerical value of t (2) is for representing the time interval between p (2) and p (1); By that analogy, the numerical value of t (N-1) is for representing the time interval between p (N-1) and p (N-2).
Adjustment unit 103, for the numerical value according to each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment.
Described default paragraph sum can according to the actual segment requirements set of user to target audio file.Suppose to adopt M (M is positive integer and M>1) to represent described default paragraph sum, the numerical value object of each temporal characteristics element that then described adjustment unit 103 adjusts in described temporal characteristics sequence t (n) according to default paragraph sum M is, make described temporal characteristics sequence t (n) after adjustment just can extract turning point corresponding to M captions paragraph, thus realize the actual segment demand to target audio file.
Determining unit 104, for the numerical value determination paragraph transformation period according at least one the temporal characteristics element in the described temporal characteristics sequence after adjustment.
The numerical value of each temporal characteristics element in temporal characteristics sequence t (n) after described adjustment can reflect the turning point that M captions paragraph is corresponding, so, described determining unit 104 according to the numerical value of at least one the temporal characteristics element in the described temporal characteristics sequence after adjustment, can obtain the beginning and ending time of M captions paragraph from subtitle file.
Segmenting unit 105, for according to described paragraph transformation period by described target audio Divide File being the paragraph of described default paragraph sum.
Because audio file and subtitle file are mutually corresponding, so, described segmenting unit 105, according to the beginning and ending time of obtained M captions paragraph, can carry out paragraph division to described target audio file accordingly, obtains M audio frequency paragraph.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
Referring to Fig. 4, is the structural representation of the embodiment of the construction unit shown in Fig. 3; This construction unit 102 can comprise: quantity determining unit 1001, index determining unit 1002, numerical value setting unit 1003 and sequence construct unit 1004.
Quantity determining unit 1001, for determining the quantity of the temporal characteristics element building temporal characteristics sequence according to the quantity of at least one character simple sentence described.
Described subtitle file is made up of the individual character simple sentence order of N (N is positive integer), namely the quantity of at least one character simple sentence described is N, so, described quantity determining unit 1001 can determine that the quantity of the temporal characteristics element of described temporal characteristics sequence is also N, and namely the length of described temporal characteristics sequence is N.Suppose to adopt t (n) to represent described temporal characteristics sequence, then constructed temporal characteristics sequence t (n) comprises N number of temporal characteristics element altogether, is respectively t (0), t (1) ... t (N-1).
Index determining unit 1002, for the order according to each character simple sentence at least one character simple sentence described, determines the index of each temporal characteristics element building described temporal characteristics sequence.
The order of the N number of character simple sentence of described subtitle file is arranged as p (0), p (1) ... p (N-1), suppose in described temporal characteristics sequence t (n): t (0) corresponding p (0), t (1) corresponding p (1), by that analogy, t (N-1) corresponding p (N-1).So, in described temporal characteristics sequence t (n), the index of t (0) is 1, i.e. first temporal characteristics element; The index of t (1) is 2, i.e. second temporal characteristics element; By that analogy, the index of t (N-1) is N, i.e. N number of temporal characteristics element.
Numerical value setting unit 1003, for for any one the target character simple sentence at least one character simple sentence described, described target character simple sentence and the adjacent time interval between first character simple sentence of described target character simple sentence are set to the numerical value of temporal characteristics element corresponding to described target character simple sentence.
The concrete processing procedure of described numerical value setting unit 1003 can comprise following A-B:
A, calculate each character simple sentence and be adjacent time interval between first character simple sentence, need to calculate time interval p (1) .start_time-p (0) .end_time between p (1) and p (0) herein; Calculate time interval p (2) .start_time-p (1) .end_time between p (2) and p (1); By that analogy, time interval p (N-1) .start_time-p (N-2) .end_time between p (N-1) and p (N-2) is calculated.
B, be set to the numerical value of corresponding temporal characteristics element by calculating the time interval obtained; So, t (0)=0 can be set, t (1)=p (1) .start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, by that analogy, t (N-1)=p (N-1) .start_time-p (N-2) .end_time.
Sequence construct unit 1004, for according to building the quantity of temporal characteristics element of described temporal characteristics sequence, index and numerical value, builds described temporal characteristics sequence.
Constructed described temporal characteristics sequence is t (n), t (n) is by N number of temporal characteristics element t (0), t (1) ... t (N-1) order composition, and the numerical value of each temporal characteristics element is t (0)=0 in described temporal characteristics sequence t (n), t (1)=p (1) .start_time-p (0) .end_time, t (2)=p (2) .start_time-p (1) .end_time, by that analogy, t (N-1)=p (N-1) .start_time-p (N-2) .end_time.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
Referring to Fig. 5, is the structural representation of the embodiment of the adjustment unit shown in Fig. 3; This adjustment unit 103 can comprise: element searches unit 2001 and numerical value adjustment unit 2002.
Element searches unit 2001, before searching from described temporal characteristics sequence, preset the temporal characteristics element that paragraph quantity subtracts 1 greatest measure.
Suppose to adopt M (M is positive integer and M>1) to represent described default paragraph sum, described element searches the temporal characteristics element that unit 2001 needs to search a front M-1 greatest measure from described temporal characteristics sequence t (n).
Numerical value adjustment unit 2002, for the numerical value of the temporal characteristics found element is adjusted to desired value, is adjusted to reference value by the numerical value of the other times characteristic element in described temporal characteristics sequence except the temporal characteristics element found.Described desired value and described eigenwert can set according to actual needs, and it is 1 that the embodiment of the present invention can arrange described desired value, and described reference value is 0.
The concrete processing procedure that described element searches unit 2001 and described numerical value adjustment unit 2002 can be: first described element searches the numerical value that unit 2001 travels through each temporal characteristics element in described temporal characteristics sequence t (n), therefrom finds the temporal characteristics element that greatest measure is corresponding; After getting rid of the temporal characteristics element found, again travel through the numerical value of each temporal characteristics element in described temporal characteristics sequence t (n), therefrom find the temporal characteristics element that greatest measure is corresponding; Circulate above-mentioned ergodic process, until find M-1 greatest measure.The M-1 found in described temporal characteristics sequence t (n) greatest measure is all adjusted to 1 by last described numerical value adjustment unit 2002, and other numerical value are adjusted to 0.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
Referring to Fig. 6, is the structural representation of the embodiment of the determining unit shown in Fig. 3; This determining unit 104 can comprise: target index acquiring unit 3001, positioning unit 3002 and time reading unit 3003.
Target index acquiring unit 3001 is the target index that the temporal characteristics element of desired value is corresponding for obtaining numerical value from the described temporal characteristics sequence after adjustment.
According to example embodiment illustrated in fig. 5, described target index acquiring unit 3001 needs to obtain target index corresponding to temporal characteristics element that numerical value is 1, namely needs the index obtaining M-1 the temporal characteristics element found.
Positioning unit 3002, for locating the character simple sentence of paragraph turnover in described subtitle file according to described target index.
Suppose that one of them target index is 5, the character simple sentence that described positioning unit 3002 can locate paragraph turnover in described subtitle file is the 5th character simple sentence, that is, 5th character simple sentence is the reference position of a captions paragraph, and namely in described subtitle file, 1-4 character simple sentence forms a captions paragraph.In like manner, the character simple sentence of M-1 paragraph turnover can be located.
Time reading unit 3003, reads paragraph transformation period for the character simple sentence of transferring according to described paragraph from described subtitle file.
Owing to have recorded the key message of each character simple sentence in described subtitle file, comprise start time and the end time of each character simple sentence; Described time reading unit 3003 to read paragraph transformation period from described subtitle file, according to example shown in the present embodiment, in described subtitle file, 1-4 character simple sentence forms a captions paragraph, and so read paragraph transformation period is: the start time of the end time of the 4th character simple sentence and the 5th character simple sentence.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
The embodiment of the invention also discloses a kind of terminal, this terminal can be the equipment such as PC (PersonalComputer, personal computer), notebook computer, mobile phone, PAD (panel computer), car-mounted terminal, intelligent wearable device.Can comprise an apparatus for processing audio in this terminal, the 26S Proteasome Structure and Function of this device see the associated description of above-mentioned Fig. 3-embodiment illustrated in fig. 6, can be not repeated herein.
In the embodiment of the present invention, temporal characteristics sequence can be built according to the time interval between at least one the character simple sentence in subtitle file corresponding to target audio file, according to the numerical value of each temporal characteristics element in the described temporal characteristics sequence of default paragraph sum adjustment, and according to the numerical value determination paragraph transformation period of at least one temporal characteristics element in the described temporal characteristics sequence after adjustment, then be the paragraph of described default paragraph sum by described target audio Divide File according to described paragraph transformation period, this audio processing process utilizes the time interval feature of the character simple sentence between captions paragraph, realize dividing the paragraph of target audio file based on the time interval between the character simple sentence in subtitle file, staging treating efficiency can be promoted, promote the intelligent of audio frequency process.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
Above disclosedly be only present pre-ferred embodiments, certainly can not limit the interest field of the present invention with this, therefore according to the equivalent variations that the claims in the present invention are done, still belong to the scope that the present invention is contained.