~ubuntu-branches/ubuntu/trusty/espeak/trusty

« back to all changes in this revision

Viewing changes to src/speak.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault, Luke Yelavich, Mario Lang, Nicolas Boulenguez, Samuel Thibault
  • Date: 2011-01-30 20:41:59 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130204159-l034urxudcsruok8
Tags: 1.44.05-1
[ Luke Yelavich ]
* debian/copyright: update
* Update manpage to add command-line flags and fix some errors

[ Mario Lang ]
* New upstream version (Closes: Bug#594872)

[ Nicolas Boulenguez ]
* Made the html docs a subdir.
* Referenced it in doc-base.
* Correct syntax in manpage.
* Separate common paragraph of each description, to ease translations.
* Remove empty postinst and postrm.
* Add ${misc:Depends} to espeak-data-udeb, update the description to mention
  d-i.
* Use Package-Type instead of XC-Package-Type.

[ Samuel Thibault ]
* debian/copyright: Fix Jonathan's mail.
* debian/control: Add espeak-dbg package.
* debian/rules: Put debugging symbols into espeak-dbg (Closes: Bug#608984).

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
"\t   Amplitude, 0 to 200, default is 100\n"
76
76
"-g <integer>\n"
77
77
"\t   Word gap. Pause between words, units of 10mS at the default speed\n"
 
78
"-k <integer>\n"
 
79
"\t   Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
 
80
"\t   higher values indicate a pitch increase (try -k20).\n"
78
81
"-l <integer>\n"
79
82
"\t   Line length. If not zero (which is the default), consider\n"
80
83
"\t   lines less than this length as end-of-clause\n"
81
84
"-p <integer>\n"
82
85
"\t   Pitch adjustment, 0 to 99, default is 50\n"
83
86
"-s <integer>\n"
84
 
"\t   Speed in words per minute 80 to 390, default is 170\n"
 
87
"\t   Speed in words per minute, 80 to 450, default is 175\n"
85
88
"-v <voice name>\n"
86
89
"\t   Use voice file of this name from espeak-data/voices\n"
87
90
"-w <wave file name>\n"
88
 
"\t   Write output to this WAV file, rather than speaking it directly\n"
 
91
"\t   Write speech to this WAV file, rather than speaking it directly\n"
89
92
"-b\t   Input text encoding, 1=UTF8, 2=8 bit, 4=16 bit \n"
90
93
"-m\t   Interpret SSML markup, and ignore other < > tags\n"
91
94
"-q\t   Quiet, don't produce any speech (may be useful with -x)\n"
92
95
"-x\t   Write phoneme mnemonics to stdout\n"
93
96
"-X\t   Write phonemes mnemonics and translation trace to stdout\n"
94
97
"-z\t   No final sentence pause at the end of the text\n"
95
 
"--stdout   Write speech output to stdout\n"
96
98
"--compile=<voice name>\n"
97
 
"\t   Compile the pronunciation rules and dictionary in the current\n"
 
99
"\t   Compile pronunciation rules and dictionary from the current\n"
98
100
"\t   directory. <voice name> specifies the language\n"
 
101
"--ipa      Write phonemes to stdout using International Phonetic Alphabet\n"
99
102
"--path=\"<path>\"\n"
100
103
"\t   Specifies the directory containing the espeak-data directory\n"
 
104
"--pho      Write mbrola phoneme data (.pho) to stdout or to the file in --phonout\n"
101
105
"--phonout=\"<filename>\"\n"
102
 
"\t   Write output from -x -X commands, and mbrola phoneme data, to this file\n"
 
106
"\t   Write phoneme output from -x -X --ipa and --pho to this file\n"
103
107
"--punct=\"<characters>\"\n"
104
108
"\t   Speak the names of punctuation characters during speaking.  If\n"
105
109
"\t   =<characters> is omitted, all punctuation is spoken.\n"
106
110
"--split=\"<minutes>\"\n"
107
111
"\t   Starts a new WAV file every <minutes>.  Used with -w\n"
 
112
"--stdout   Write speech output to stdout\n"
108
113
"--voices=<language>\n"
109
114
"\t   List the available voices for the specified language.\n"
110
 
"\t   If <language> is omitted, then list all voices.\n"
111
 
"-k <integer>\n"
112
 
"\t   Indicate capital letters with: 1=sound, 2=the word \"capitals\",\n"
113
 
"\t   higher values indicate a pitch increase (try -k20).\n";
 
115
"\t   If <language> is omitted, then list all voices.\n";
114
116
 
115
117
 
116
118
void DisplayVoices(FILE *f_out, char *language);
214
216
}   //  end of DisplayVoices
215
217
 
216
218
 
217
 
 
 
219
void WVoiceChanged(voice_t *wvoice)
 
220
{
 
221
}
218
222
 
219
223
static int OpenWaveFile(const char *path, int rate)
220
224
//=================================================
472
476
                {"stdout",  no_argument,       0, 0x105},
473
477
                {"split",   optional_argument, 0, 0x106},
474
478
                {"path",    required_argument, 0, 0x107},
475
 
                {"phonout", required_argument, 0, 0x108}, 
 
479
                {"phonout", required_argument, 0, 0x108},
 
480
                {"pho",     no_argument,       0, 0x109},
 
481
                {"ipa",     no_argument,       0, 0x10a},
476
482
                {0, 0, 0, 0}
477
483
                };
478
484
 
485
491
        int option_index = 0;
486
492
        int c;
487
493
        int value;
488
 
        int speed=170;
 
494
        int speed=175;
489
495
        int ix;
490
496
        char *optarg2;
491
497
        int amp = 100;     // default
702
708
                        }
703
709
                        break;
704
710
 
 
711
                case 0x109:  // --pho
 
712
                        option_mbrola_phonemes = 16;
 
713
                        break;
 
714
 
 
715
                case 0x10a:  // --ipa
 
716
                        option_phonemes = 3;
 
717
                        break;
 
718
 
705
719
                default:
706
720
                        exit(0);
707
721
                }