Field of the Invention
The present invention generally relates to speech synthesis and, more particularly, to a speech synthesis process and system wherein the durations of speeches may be varied conveniently with the quality of their phonetic characteristics maintained high.
Prior Art
The speaking speed or duration of natural speech may vary due to various factors. For example, the duration of a spoken sentence as a whole may be extended or reduced according to speaking tempo. Also, the durations of certain phrases and words may be locally extended or reduced according to linguistic constraints such as structures, meanings and contents, etc., of sentences. Further, the durations of syllables may be extended or reduced according to the number of syllables spoken in one breathing interval. Therefore, it is necessary to control the durations of speeches in order to obtain synthesized speech of high quality, namely similar to natural speech.
In the prior art, there have been proposed two techniques for controlling the duration of speech. In one of the techniques, synthesis parameters in certain portions are removed or repeated while, in the other, periods of synthesis frames are varied. (Periods of analysis frames are fixed). These techniques are described in Japanese Published Unexamined Patent Application No. 50- 62,709, for example. The above-mentioned technique of removing and repeating synthesis parameters requires the finding of contant vowel portions by inspection and setting them as variable portions beforehand, thus requiring complicated operations. Further, as the duration of a speech varies, the phonetic characteristics also changes since the dynamic features of articulatory organs transform. For example, the formants of vowels are generally neutralized as the duration of a speech is reduced. In the first noted prior technique, it is impossible to reflect such changes in synthesized speeches.
In the other prior technique of varying the periods of synthesis frames, all the portions of a speech are extended or reduced uniformly. Since ordinary speeches comprise portions which are individually extended or reduced remarkably or slightly, such a prior technique would generate quite unnaturally synthesized speeches. Of course, this prior technique cannot reflect the above-stated changes of the phonetic characteristics in synthesized speeches.
Summary of the Invention
As a consequence of the foregoing difficulties in the prior art, it is an object of the present invention to provide a speech synthesis process and system wherein the durations of synthesis units (e.g., phonemes, syllables, words, etc.) for speech synthesis may be varied conveniently with the quality of their phonetic characteristics being maintained high.
In order to accomplish the above object, in the present invention, a plurality of speeches extending over different durations obtaine for a synthesis unit are analyzed, respectively, and a plurality of resultant analysis data are interpolated to be used for speech synthesis.
More specifically, a speech to be synthesized, extending over a target duration, comprises a plurality of variable period-length frames, each corresponding, one-to-one, to frames of a first set of basic analysis data (referring to as first data portions). Also, the frames of the first basic analysis data (the first data portions) and frames of a second basic analysis data (second data portions) are matched based on their acoustic characteristics. That is, each of the variable period-length frames of the speech to be synthesized is matched wiht a predetermined portion of the first basic analysis data (a first data portion) and a predetermined portion of the second basic analysis data (a second data portion). The period lengths of the varible period-length frames of the speech to be synthesized are determined buy interpolating the period lengths of the corresponding portions of the first and second basic analysis data. The synthesis parameters of the variable period-length frames of the speech to be synthesized are determined by interpolating the synthesis parameters of the corresponding portions of the first and second basic analysis data.
Additional sets of analysis data may be employed to correct the period lengths and synthesis parameters of the variable period length frames of the speech to be synthesized.
Further, a synthesized speech of higher quality can be obtained by analyzing a speech spoken at a standard speed to obtain the origin for interpolation, which is either the first or second basic analysis data.
It is possible to match the first basic analysis data with the second basic analysis data with relatively few calculations by employing a dynamic programming.
Brief Description of the Drawings
FIG. 1 shows a block diagram illustrating a system for executing a first embodiment of the present invention, as a whole.
FIG. 2 shows a flow chart for explaining the processing performed by the system in FIG. 1.
FIGS. 3 through 8 show diagrams for explaining the processing illustrated in FIG. 2.
FIG. 9 shows a block diagram illustrating another convenient system which may be replaced for the system in FIG. 1.
FIG. 10 shows a diagram for explaining a modification of the first embodiment.
FIG. 11 shows a flow chart for explaining the processing performed in the modification.
FIG. 12 shows a diagram illustrating another modification of the first embodiment.
Description of Preferred Embodiments
Referring now to the drawings, the present invention will be explained more in detail with reference to an embodiment thereof applied to the Japanese text-to-speech synthesis by rules. The text-to-speech synthesis performs an automaitc speech synthesis from any input text and generally includes four stages of (1) inputting a text, (2) analyzing a sentence, (3) synthesizing a speech, and (4) outputting the speech. In stage (2), phonetic data and prosodic data are determined with reference to a Kanji-Kana conversion dictionary and a prosodic rule dictionary. In stage (3), snythesis parameters are sequentially read out with reference to a parameter file. In this embodiment, wherein one synthesized speech is generated from two input speeches, as will be stated later, a composite parameter file is employed. This will be described later in more detail.
As synthesis units for speech synthesis, 101 Japanese syllables are used.
FIG. 1 illustrates a system for realizing an embodiment of the process of the present invention, as a whole. In FIG. 1, a workstation 1 for inputting a Japanese text can perform Japanese processings such as Kanji-Kana conversions. The workstation 1 is connected through a line 2 to a host computer 3 to which auxiliary storage 4 is connected. Most of the procedures in this embodiment, which can be realized with software executed by the host computer 3, are illustrated in blocks indicating the functions performed. The functions in these blocks are detailed in FIG. 2. In the blocks of FIGS. 1 and 2, like portions are illustrated with like numbers.
Further, to the host computer 3, a personal computer 6 is connected through a line 5. An A/D-D/A converter 7 is connected to the personal computer 6. To the converter 7, a microphone 8 and a speaker 9 are connected. The personal computer 6 executes routines for driving the A/D conversions and D/A conversions.
In the above configuration, when a speech is input into the microphone 8, the input speech is A/D converted, under the control of the personal computer 6, and then supplied to the host computer 3. A speech analysis function 10, 11 in the host computer 3 analysis digitized speech data for each of a plurality of analysis frame periods T.sub.0 ; generates synthesis parameters; and stores them into the storage 4. This is shown with lines 1.sub.1 and 1.sub.2 in FIG. 3. With respect to the lines 1.sub.1 and 1.sub.2, the analysis frame periods are shown as T.sub.0 and the synthesis parameters are shown as P.sub.i and q.sub.j. In this embodiment, line spectrum pair parameters are employed as synthesis parameters, although formant parameters, PARCOR coefficients, and so on may also be employed.
A parameter train for a speech to be synthesized is shown with a line 1.sub.3 in FIG. 3. The period lengths T.sub.1 -T.sub.m of M synthesis frames shown are variables and the synthesis parameters are shown as r.sub.i. The parameter train will be explained later more in detail. The synthesis parameters of the parameter train are sequentially supplied to a speech synthesis function 17 in the host computer 3 and digital speech data representing the speech to be synthesized is supplied to the converter 7 through the personal computer 6. The converter 7 converts the digital speech data to analogue speech data under the control of the personal computer 6 to generate a synthesized speech through the speaker 9. FIG. 2 illustrates the steps of this embodiment as a whole. In FIG. 2, a parameter file is first established. Namely, a speech obtained by speaking one of the synthesis units (e.g. one of the 101 Japanese syllables) at a low speed is analyzed (Step 10). The resultant analysis data comprises M consecutive frames, each having the frame period T.sub.0, for example, as shown with the line 1.sub.1 in FIG. 3. The duration t.sub.0 of the analysis data for the synthesis unit is (M.times.T.sub.0). Next, a speech obtained by speaking the same synthesis unit at a higher speed is analyzed (Step 11). The resultant analysis data comprises N consecutive frames, each having the frame period T.sub.0, for example, as shown with the line 1.sub.2 in FIG. 3. The duration t.sub.1 of the analysis data for the synthesis unit is (N.times.T.sub.0). Then, the analysis data in the line 1.sub.1 and 1.sub.2 are matched by Dynamic Programming (DP) matching (Step 12).
As illustrated in FIG. 4, a path P which has the smallest cumulative distance between the frames is obtained by the DP matching, and the frames in the lines 1.sub.1 and 1 .sub.2 are matched in accordance with the path P. In practice, the DP matching can move only in two directions, as illustrated in FIG. 5. Since one of the frames in the speech spoken at the lower speed should not correspond to more than one of the frames in the speech spoken at the higher speed, such a matching is prohibited by the rules illustrated in FIG. 5.
Thus, similar frames have been matched between the lines 1.sub.1 and 1.sub.2, as illustrated in FIG. 3. Namely, p.sub.1 .rarw..fwdarw.q.sub.1, p.sub.2 .rarw..fwdarw.q.sub.2, p.sub.3 .rarw..fwdarw.q.sub.2 . . . have been matched as similar frames. A plurality of frames in the line 1.sub.1 may correspond to one frame in the line 1.sub.2. In such a case, the frame in the line 1.sub.2 is equally divided into portions and each of said portions is deemed to correspond to each of said plurality of frames in the line 1.sub.1. For example, in FIG. 3, the second frame and the third frame in the line 1.sub.1 correspond to respective half portions of the second frame in the line 1.sub.2. As a result, the M frames in the line 1.sub.1 correspond to M period portions in the line 1.sub.2, respectively. It is apparent that these period portions do not always have the same period lengths.
The speech to be synthesized, extending over a duration t between the durations t.sub.0 and t.sub.1, is shown with the line 1.sub.3 in FIG. 3. This speech to be synthesized comprises M frames, each corresponding to one frame in the line 1.sub.1 and to one period portion in the line 1.sub.2. Accordingly, each of the frames in the speech to be synthesized has a period length interpolated between the period length of the corresponding one frame in the line 1.sub.1, i.e., T.sub.0, and the period length of the corresponding one period portion in the line 1.sub.2. The synthesis parameters r.sub.i of each of the frames are parameters interpolated between the corresponding synthesis parameters p.sub.i and q.sub.i.
After the DP matching, a period length variation .DELTA.T.sub.i and a parameter variation .DELTA.p.sub.i of each of the frames are obtained (Step 13). The period length variation .DELTA.T.sub.i indicates a variation from the period length of the "i"th frame in the line 1.sub.1, (i.e., T.sub.0, to the period length of the period portion in the line 1.sub.2 corresponding to the "6"th frame in the line 1.sub.1. In FIG. 3, .DELTA.T.sub.2 is shown as an example thereof. When the frame in the line 1.sub.2 corresponding to the "i"th frame in the line 1.sub.1 is denoted as the "j"th frame in the line 1.sub.2, .DELTA.T.sub.i may be expressed as ##EQU1## where n.sub.j denotes the number of frames in the line 1.sub.1 corresponding to the "j"th frame in the line 1.sub.2.
When the duration t of the speech to be synthesized is expressed by linear interpolation between t.sub.0 and t.sub.1, with t.sub.0 selected as the origin for interpolation, the following expression may be obtained.
where 0.ltoreq.x.ltoreq.1. The x in the above expression is hereinafter referred to as an interpolation variable. As the interpolation variable approaches 0, the duration t approaches the origin for interpolation. Expressed in terms of the interpolation variable x and the variation .DELTA.T.sub.i, the period length T.sub.i of each of the frames in the speech to be synthesized is interpolated as:
Where T.sub.0 is a frame period selected as the origin for interpolation. Thus, by obtaining .DELTA.T.sub.i, the period length T.sub.i of each of the frames in a speech to be synthesized, extending over any duration between t.sub.i through t.sub.0 can be obtained.
On the other hand, the parameter variation .DELTA.p.sub.i is (p.sub.i -q.sub.j ) and the synthesis parameters r.sub.i of each of the frames in the speech to be synthesized may be obtained by the following expression.
Accordingly, by obtaining .DELTA.p.sub.i, the synthesis parameters r.sub.i of each of the frames in a speech to be synthesized, extending over any duration of length between t.sub.1 through t.sub.0, can be obtained.
The variations .DELTA.T.sub.i and .DELTA.p.sub.i thus obtained are stored into the auxiliary storage 4 together with p.sub.i with a format such as illustrated in FIG. 7. The above processing is performed for each of the synthesis units for speech synthesis in order to form a composite parameter file.
With the parameter file formed, the text-to-speech synthesis is ready to be started, and a text is input (Step 14). The text is input at the work-station 1 and the text data is transferred to the host computer 3, as stated before. A sentence analysis function 15 in the host computer 3 performs Kanji-Kana conversions, determinations of prosodic parameters, and determinations of durations of synthesis units. This is illustrated in the following Table 1 showing the flow chart of the function and a specific example thereof. In this example, the duration of each of a number of phonemes (consonants and vowels) is firat obtained and then the duration of a syllable, i.e., a synthesis unit, is obtained by summing up all the durations of the phonemes.
Thus, with the duration of each of the synthesis units in the text obtained by the sentence analysis function, the period length and synthesis parameters of each of the frames are next to be interpolated for each of the synthesis units (Step 16), as illustrated in detail in FIG. 6. Namely, an interpolation variable x is first obtained. Since t=t.sub.0 +x (t.sub.1 -t.sub.0 ), the following expression is obtained (Step 161). ##EQU2##
From the above expression, it can be seen to what extent each of the synthesis units is near to the origin for interpolation. Next, the period length T.sub.i and the synthesis parameter r.sub.i of each of the frames in each of the synthesis units are obtained from the following expressions, respectively, with reference to the parameter file (Step 162 and 163).
Thereafter, a speech is synthesized based on the period length T.sub.i and the synthesis parameters r.sub.i (Step 17 in FIG. 2). The speech synthesis function is represented schematically in FIG. 8. Namely, a speech model is considered to include a sound source 18 and a filter 19. Signals indicating whether a sound is voiced (pulse train) or unvoiced (white noise) (indicated with U and V, respectively) are supplied as sound source control data, and line spectrum pair parameters, etc., are supplied as filter control data.
As a result of the above processing, speeches of a text, for example shown in Table 1, are synthesized and spoken through the speaker 9.
The following Tables 2 through 5 show, as an example, the processing of the syllable "WA" extending over a duration of 172 ms. Namely, Table 2 shows the analysis of the speech of the syllable "WA" having the analysis frame period of 10 ms and extending over the duration of 200 ms (a speech spoken at a lower speed), and Table 3 shows the analysis of the speech of the syllable "WA" having the same frame period and extending over the duration of 150 ms (a speech spoken at a higher speed). Table 4 shows the correspondence between these speeches by DP mathcing. A portion of the parameter file for the syllable "WA" prepared according to Tables 2 through 4 is shown in Table 5. (The line spectrum parameters.). Table 5 shows also the period length and synthesis parameters (the first parameters) of each of the frames in the speech of the syllable "WA" extending over the duration of 172 ms.
In Table 5, p.sub.i, .DELTA.p.sub.i, q.sub.j, and r.sub.i are shown only as to the first parameters.
While the present embodiment has been explained above with respect to an example employing the system illustrated in FIG. 1, it is of course possible to realize the present invention with a small system by employing a signal processing board 20 as illustrated in FIG. 9. In the example illustrated in FIG. 9, a workstation 1A performs the functions of editing a sentence, analyzing the sentence, calculating variations, interpolatio, etc. In FIG. 9, the portions having the functions equivalent to those illustrated in FIG. 1 are illustrated with the same reference numbers. The detailed explanation of this example is omitted here.
Next, two modifications of the above-stated embodiment will be explained.
In one of the modifications, training of the parameter file is discussed. It is noted that errors occur when such training is not performed. FIG. 10 illustrates the relations between synthesis parameters and durations. In FIG. 10, to generate the synthesis parameters r.sub.i from the parameters p.sub.i for the speech spoken at the lower speed and the parameters q.sub.j for the speech spoken at the higher speed, interpolation is performed by using a line OA.sub.1, as shown with a broken line (a). Similarly, to generate synthesis parameters r.sub.i ' from (i) parameters s.sub.k for another speech spoken at another higher speed (extending over a duration t.sub.2) and the (ii) parameters p.sub.i, interpolation is performed by using a line OA.sub.2, as shown with a broken line (b). Apparently, the synthesis parameters r.sub.i and r.sub.i ' are different from each other. This is due to the errors, etc., caused in matching by the DP matching.
In this modification, the synthesis parameters r.sub.i are now generated by using a line OA' which is obtained by averaging the lines OA.sub.1 and OA.sub.2, so that there would be a high probability that the errors of the lines OA.sub.1 and OA.sub.2 would be offset by each other, (e.g. by adding line OA.sub.1 to line OA.sub.2) as seen from FIG. 10. According to FIG. 10, it is observed that t.sub.1 is replaced by t.sub.1 ', q.sub.j is replaced by q.sub.j ', and a new r.sub.i is set along line OA' at time t. Although the training is performed once in the example shown in FIG. 10, it is obvious that additional training would result in smaller errors, as in this modification.
FIG. 11 illustrates the procedures in this modification, with portions similar to those in FIG. 2 illustrated with similar numbers. Similar steps are not explained here in detail.
In FIG. 11, the parameter file is updated in Step 21, and the necessity of training is judged in Step 22 so that the Steps 11, 12, and 21 would be repeated when needed.
Although, in Step 21, .DELTA.T.sub.i `l and .DELTA.p.sub.i are obtained according to the following expressions, ##EQU3## it is obvious that a processing similar to the Steps in FIG. 2 is performed since .DELTA.T.sub.i =0 and .DELTA.p.sub.i =0 in the initial stage. When the values after a training corresponding to those before a training ##EQU4## are denoted, respectively, with apostrophes attached thereto, as ##EQU5## the following expressions are obtained (See FIG. 10). ##EQU6##
Accordingly, when the values after the training correspond to those before the training, .DELTA.p.sub.i and .DELTA.T.sub.i, are denoted as .DELTA.p.sub.i ' and .DELTA.T.sub.i ', respectively, the following expressions are obtained. ##EQU7##
Further, when an interpolation variable after the training is denoted as x', the following expressions are obtained. ##EQU8##
In Step 21 in FIG. 11, apostrophe's are omitted, and k and s are replaced with j and q, respectively.
With regard to the othe modification, it is noted that, in the above-stated basic embodiment, the parameters obtained by analyzing the speech spoken at the lower speed are used as the origin for interpolation. Therefore, a speech to be synthesized at a speaking speed near that of the speech spoken at the lower speed would be of high quality since parameters near the origin.
For interpolation can be employed. On the other hand, the higher the speaking speed of a speech to be synthesized is, the more the quality would be deteriorated. For improving the quality of a synthesized speech parameters obtained by analyzing a speech spoken at such a speed as is used most frequently (this speed is hereinafter referred to as "a standard speed") are used as the origin for interpolation. Accordingly, when a speech is at a speaking speed higher than the standard speed, is to be synthesized, the abovestated embodiment itself may be applied thereto by employing the parameters obtained by analyzing the speech spoken at the standard speed as the origin for interpolation.
On the other hand, in synthesizing a speech at a speaking speed lower than the standard speed, a plurality of frames in the speech spoken at the lower speed may correspond to one frame in the speech spoken at the standard speed, as illustrated in FIG. 12, and in such a case, the average of the parameters of the plurality of frames is employed as the end for interpolation on the side of the speech spoken at the lower speed.
More specifically, when the duration of the speech spoken at the standard speed is denoted as t.sub.0 (t.sub.0 =MT.sub.0 ) and the duration of the speech spoken at the lower speed is denoted as t.sub.1 (t.sub.1 =NT.sub.0, N >M), the parameters of each of the M frames in the speech to be synthesized, extending over the duration t (t.sub.0 .ltoreq.t .ltoreq.t.sub.1), is obtained. (See FIG. 12.) When t =t.sub.0 +x (t.sub.1 -t.sub.0 ), the duration T.sub.i and the synthesis parameters r.sub.i of the "i"th frame are respectively expressed as ##EQU9## where p.sub.i denotes the parameters of the "i"th frame in the speech spoken at the standard speed, q.sub.j denotes the parameters of the "j"th frame in the speech spoken at the lower speed, J.sub.i denotes a set of the frames in the speech spoken at the lower speed corresponding to the "i" th frame in the speech spoken at the standard speed, and n.sub.i denotes the number of elements of J.sub.i.
Thus, by determining uniquely the parameters of each of the frames in the speech spoken at the lower speed, corresponding to each of the frames in the speech spoken at the standard speed, in accordance with the expression. ##EQU10## it is possible to determine the parameters for a speech to be synthesized at a lower speed than the standard speed by interpolation. Of course, it is also possible to perform the trainings of the parameters in this case.
As explained above, the present invention obtains a synthesized speech extending over a variable duration by interpolating the synthesis parameters obtained by analyzing speeches spoken at different speeds. The processing of the interpolation is convenient and can add the characteristics of the original synthesis parameters. Therefore, according to the present invention, it is possible to obtain a synthesized speech extending over a variable duration conveniently without deteriorating the phonetic characteristics. Further, since training is possbile, the quality of the synthesized speech can be further improved as required. The present invention can be applied to any language. The parameter file may be provided as a package.