PageRenderTime 5ms CodeModel.GetById 2ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/native/external/espeak/docs/analyse.html

http://eyes-free.googlecode.com/
HTML | 69 lines | 42 code | 27 blank | 0 comment | 0 complexity | ebb2f213ad00e1e5a3aa3520b83fe57e MD5 | raw file
 1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 2<html>
 3
 4<head>
 5  <title></title>
 6  <meta name="GENERATOR" content="Quanta Plus">
 7  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 8</head>
 9<body>
10<A href="docindex.html">Back</A>
11<hr>
12<h2>ANALYSIS</h2>
13<hr>
14(Further notes are needed)
15<p>
16Recordings of spoken words and phrases can be analysed to try and make eSpeak match a language more closely.
17
18Unlike most other (larger and better quality) synthesizers, eSpeak's data is not produced directly from recorded sounds.  To use an analogy, it's like a drawing or sketch compared with a photograph. Or vector graphics compared with a bitmap image.  It's smaller, less accurate, with less subtlety, but it can sometimes show some aspects of the picture more clearly than a more accurate image.
19
20<h4>Recording Sounds</h4>
21Recordings should be made while speaking slowly, clearly, and firmly and loudly (but not shouting).  Speak about half a metre from the microphone.  Try to avoid background noise and hum interference from electrical power cables.
22
23
24<h4>Praat</h4>
25I use a modified version of the praat program (<a href="www.praat.org">www.praat.org</a>) to view and analyse both sound recordings and output from eSpeak.  The modification adds a new function (<code>Spectrum->To_eSpeak</code>) which analysis a voiced sound and produces a file which can be loaded into espeakedit.  Details of the modification are in the <code>"praat-mod"</code> directory in the espeakedit package. 
26
27The analysis contains a sequence of frames, one per cycle at the speech's fundamental frequency.  Each frame is a short time spectrum, together with praat's estimation of the f1 to f5 formant frequencies at the time of that cycle.
28
29I also use Praat's <code>New->Record_mono_sound</code> function to make sound recordings.
30
31<h3>Vowels and Diphthongs</h3>
32<h4>Analysing a Recording</h4>
33
34Make a recording, with a male voice, and trim it in Praat to keep just the required vowel sound.  Then use the new <code>Spectrum->To_eSpeak</code> modification (this was named <code>To_Spectrogram2</code> in earlier versions) to analyse the sound.  It produces a file named <code>"spectrum.dat"</code>.
35
36Load the <code>"spectrum.dat"</code> file into espeakedit.  Espeakedit has two Open functions, <code>File->Open</code> and <code>File->Open2</code>.  They are the same, except that they remember different paths.  I generally use <code>File->Open2</code> for reading the <code>"spectrum.dat"</code> file.
37
38The data is displayed in espeakedit as a sequence of spectrum frames (see <a href="editor.html">editor.html</a>).
39
40<h4>Tone Quality</h4>
41
42It can be difficult to match the tonal quality of a new vowel to be compatible with existing vowel files.  This is determined by the relative heights and widths of the formant peaks.  These vary depending on how the recording was made, the microphone, and the strength and tone of the voice.  Also the positions of the higher peaks (F3 upwards) can vary depending on the characteristics of the speaker's voice.  Formant peaks correspond to resonances within the mouth and throat, and they depend on its size and shape.  With a female voice, all the formants (F1 upwards) are generally shifted to higher frequencies.
43
44For these reasons, it's best to use a male voice, and to use its analysed spectra only as guidance.  Rather than construct formant-peaks entirely to match the analysed data, instead copy keyframes from a similar existing vowel.  Then make small adjustments to match the position of the F1, F2, F3 formant peaks and hopefully produce the required vowel sound.
45
46<h4>Using an Existing Vowel File</h4>
47
48Choose a similar vowel file from <code>phsource/vowel</code> and open it into espeakedit.  It may be useful to use <code>phsource/vowel/vowelchart</code> as a map to show how vowel files compare with each other.  You can select a keyframe from the vowel file and use CTRL-C and CTRL-V to copy the green formant peaks onto a frame of the new spectrum sequence.  Then adjust the peaks to match the new frame.  Press F1 to hear the sound of the formant peaks in the selected frame.
49
50The F0 peak is provided in order to adjust the correct balance of low frequencies, below the F1 peak.  If the sound is too muffled, or conversely, too "thin", try adjusting the amplitude or position of the F0 peak.
51
52
53<h4>Length and Amplitude</h4>
54
55Use an existing vowel file as a guide for how to set the amplitude and length of the keyframes.  At the right of each keyframe, its length is shown in mS and under that is its relative (RMS) amplitude.
56
57The second keyframe should be marked with a red marker (use CTRL-M to toggle this).  This divides the vowel into the front-part (with one frame), and the rest.
58
59Use F2 to play the sound of the new vowel sequence.  It will also produce a WAV file (the default name is speech.wav) which you can read into praat to see whether it has a sensible shape.
60
61
62<h4>Using the New Vowel</h4>
63
64Make a new directory (eg. vwl_xx) in phsource for your new vowels.  Save the spectrum sequence with a name which you have chosen for it.
65
66You can then edit the phoneme file for your language (eg. phsource/ph_xxx), and change a phoneme to refer to your new vowel file. Then do <code>Data->Compile_Phoneme_Data</code> from espeakedit's menubar to re-compile the phoneme data.
67
68</body>
69</html>