~ubuntu-branches/ubuntu/oneiric/espeak/oneiric

« back to all changes in this revision

Viewing changes to src/speak.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Luke Yelavich
  • Date: 2008-08-26 09:37:23 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080826093723-lwblp0nwfd93sggb
Tags: 1.38-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
"\t   =<characters> is omitted, all punctuation is spoken.\n"
102
102
"--split=\"<minutes>\"\n"
103
103
"\t   Starts a new WAV file every <minutes>.  Used with -w\n"
104
 
"--voices=<langauge>\n"
 
104
"--voices=<language>\n"
105
105
"\t   List the available voices for the specified language.\n"
106
106
"\t   If <language> is omitted, then list all voices.\n"
107
107
"-k <integer>\n"
212
212
 
213
213
 
214
214
 
215
 
static void PitchAdjust(int pitch_adjustment)
216
 
{//==========================================
217
 
        int ix, factor;
218
 
 
219
 
        voice->pitch_base = (voice->pitch_base * pitch_adjust_tab[pitch_adjustment])/128;
220
 
 
221
 
        // adjust formants to give better results for a different voice pitch
222
 
        factor = 256 + (25 * (pitch_adjustment - 50))/50;
223
 
        for(ix=0; ix<=5; ix++)
224
 
        {
225
 
                voice->freq[ix] = (voice->freq2[ix] * factor)/256;
226
 
        }
227
 
}  //  end of PitchAdjustment
228
 
 
229
 
 
230
 
 
231
 
 
232
215
static int OpenWaveFile(const char *path, int rate)
233
216
//=================================================
234
217
{
734
717
 
735
718
        if(pitch_adjustment != 50)
736
719
        {
737
 
                PitchAdjust(pitch_adjustment);
 
720
                SetParameter(espeakPITCH,pitch_adjustment,0);
738
721
        }
739
722
        DoVoiceChange(voice);
740
723