mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-23 03:55:46 +00:00
[1.44.02]
Fix: crash with very long numbers. Very long nubers ( > 14 digits) now spoken as individual digits. Fix: bracket was interfering with recognizing last-word in a clause. Lang=el fix: all words were spoken as individual letters. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@252 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -14,7 +14,7 @@ awareness of its features, patience and attention to detail. Wikipedia is a goo
|
||||
<a href="http://en.wikipedia.org/wiki/Vowel">http://en.wikipedia.org/wiki/Vowel</a>
|
||||
<P>
|
||||
In many cases it should be fairly easy to add a rough implementation of a new language, hopefully
|
||||
enough to be intelligible.<br>
|
||||
enough to be intelligible.<p>
|
||||
After that it's a gradual process of improvement to:
|
||||
<ul>
|
||||
<li>Make the spelling-to-phoneme translation rules more accurate, including the position of stressed
|
||||
|
||||
+15
-7
@@ -89,8 +89,8 @@ If neither -f nor --stdin is given, then the text input is taken from "text word
|
||||
<p>
|
||||
<dt>
|
||||
<strong>-s <integer></strong><br>
|
||||
<dd>Sets the speed in words-per-minute (approximate values for the default English voice, others may differ slightly). The default value is 170. I generally use a faster speed
|
||||
of 190. Range 80 to 390. Larger value are rounded down to the maximum.
|
||||
<dd>Sets the speed in words-per-minute (approximate values for the default English voice, others may differ slightly). The default value is 175. I generally use a faster speed
|
||||
of 200. Range 80 to 450. Larger value are rounded down to the maximum.
|
||||
<p>
|
||||
<dt>
|
||||
<strong>-b <integer></strong><br>
|
||||
@@ -128,7 +128,7 @@ others.
|
||||
<p>
|
||||
<dt>
|
||||
<strong>-q</strong><br><dd>
|
||||
Quiet. No sound is generated. This may be useful with the -x option.
|
||||
Quiet. No sound is generated. This may be useful with options such as -x and --pho.
|
||||
<p>
|
||||
<dt>
|
||||
<strong>-v <voice filename>[+<variant>]</strong><br>
|
||||
@@ -152,7 +152,7 @@ Some languages may need additional dictionary data, see <a href="languages.html"
|
||||
<dt>
|
||||
<strong>-x</strong><br>
|
||||
<dd>The phoneme mnemonics, into which the input text is translated, are
|
||||
shown on stdout.
|
||||
written to stdout.
|
||||
<p>
|
||||
<dt>
|
||||
<strong>-X</strong><br>
|
||||
@@ -174,19 +174,27 @@ Compile the pronunciation rule and dictionary lookup data from their source file
|
||||
<dd>
|
||||
The same as <strong>--compile</strong>, but source line numbers from the *_rules file are included. These are included in the rules trace when the <strong>-X</strong> option is used.
|
||||
<p>
|
||||
<dt><strong>--ipa</strong><br>
|
||||
<dd>
|
||||
Writes phonemes to stdout, using the International Phonetic Alphabet (IPA).
|
||||
<p>
|
||||
<dt><strong>--path [="<directory path>"]</strong><br>
|
||||
<dd>
|
||||
Specifies the directory which contains the espeak-data directory.
|
||||
<p>
|
||||
<dt><strong>--pho</strong><br>
|
||||
<dd>
|
||||
When used with an mbrola voice (eg. -v mb-en1), it writes mbrola phoneme data (.pho file format) to stdout. This includes the mbrola phoneme names with duration and pitch information, in a form which is suitable as input to this mbrola voice. The --phonout option can be used to write this data to a file.
|
||||
<p>
|
||||
<dt><strong>--phonout [="<filename>"]</strong><br>
|
||||
<dd>
|
||||
If specified, mbrola phoneme data, and also the output from -x and -X options is written to this file, rather than stdout.
|
||||
If specified, the output from -x, -X, --ipa, and --pho options is written to this file, rather than to stdout.
|
||||
<p>
|
||||
<dt><strong>--punct [="<characters>"]</strong><br>
|
||||
<dd>
|
||||
Speaks the names of punctuation characters when they are encountered in the text. If <characters> are given, then only those listed punctuation characters are spoken, eg. <code> --punct=".,;?"</code>
|
||||
<p>
|
||||
<dt><strong>--split [="<minutes>"]</strong><br>
|
||||
<dt><strong>--split [=<minutes>]</strong><br>
|
||||
<dd>
|
||||
Used with <strong>-w</strong>, it starts a new WAV file every <code><minutes></code> minutes, at the next sentence boundary.
|
||||
<p>
|
||||
@@ -195,7 +203,7 @@ Used with <strong>-w</strong>, it starts a new WAV file every <code><minutes&
|
||||
<dd>Lists the available voices.<br>
|
||||
If =<language code> is present then only those voices which are suitable for that language are listed.<br>
|
||||
<code>--voices=mbrola</code> lists the voices which use mbrola diphone voices. These are not included in the default <code>--voices</code> list<br>
|
||||
<code>--voices=variant</code> lists the voice variants (voice modifiers).<br>
|
||||
<code>--voices=variant</code> lists the available voice variants (voice modifiers).<br>
|
||||
|
||||
</dl>
|
||||
<p> <hr>
|
||||
|
||||
+19
-7
@@ -251,14 +251,18 @@ Note, that matching characters in the <pre> part do not affect the syllabl
|
||||
<td><strong>N</strong></td>
|
||||
<td>Only use this rule if the word is not a retranslation after removing a suffix.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>T</strong></td>
|
||||
<td>Only use this rule if the word in found in the *_list file with the <b>$alt</b> attribute.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>#</strong></td>
|
||||
<td>(English specific) change the next "e" into a special character "E"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>$w_alt<br>$w_alt2<br>$w_alt3</strong></td>
|
||||
<td>Only use this rule if the word is found in the *_list file with the <b>$alt</b>, <b>$alt2</b> or <b>$alt3</b> attribute respectively.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>$p_alt<br>$p_alt2<br>$p_alt3</strong></td>
|
||||
<td>Only use this rule if the part-word, up to and including the pre and match parts of this rule, is found in the *_list file with the <b>$alt</b>, <b>$alt2</b> or <b>$alt3</b> attribute respectively.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</ul>
|
||||
@@ -275,7 +279,7 @@ eg.
|
||||
</pre>
|
||||
S and P must be at the end of the <post> string.
|
||||
<p>
|
||||
S<number> may be followed by additonal letters (eg. S2ei ). Some of these are probably specific to English, but similar functions could be used for other languages.
|
||||
S<number> may be followed by additonal letters (eg. S2ei ). Some of these are probably specific to English, but similar functions could be made for other languages.
|
||||
|
||||
<ul><table>
|
||||
<tbody>
|
||||
@@ -488,9 +492,13 @@ A word (or group of words) may be given one or more flags, either instead of, or
|
||||
<td>$hasdot</td>
|
||||
<td>Use this pronunciation if the word is followed by a dot. (This attribute also implies $dot).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$sentence</td>
|
||||
<td>The rule only applies if the clause includes end-of-sentence (i.e. it is not terminated by a comma). For example, "$atend $sentence" means that the rule only applies at the end of a sentence.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$abbrev</td>
|
||||
<td>This has two meanings.<br> 1. If there is no phoneme string: Speak the word as individual letters, even if it contains a vowel (eg. "abc" should be spoken as "a" "b" "c").<br>2. If there is a phoneme string: This word is capitalized because it is an abbreviation and capitalization does indicate emphasis (if the "emphasize all-caps" is on).</td>
|
||||
<td>This has two meanings.<br> 1. If there is no phoneme string: Speak the word as individual letters, even if it contains a vowel (eg. "abc" should be spoken as "a" "b" "c").<br>2. If there is a phoneme string: This word is capitalized because it is an abbreviation and capitalization does not indicate emphasis (if the "emphasize all-caps" is on).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
@@ -499,9 +507,13 @@ A word (or group of words) may be given one or more flags, either instead of, or
|
||||
<tr>
|
||||
<td>$accent</td>
|
||||
<td>Used for the pronunciation of a single alphabetic character. The character name is spoken as the base-letter name plus the accent (diacritic) name. eg. It can be used to specify that "â" is spoken as "a" "circumflex".</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$combine</td>
|
||||
<td>This word is treated as though it is combined with the following word with a hyphen. This may be subject to fuither conditions for certain languages.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>$alt $alt2</td>
|
||||
<td>$alt $alt2 $alt3</td>
|
||||
<td>These are language specific. Their use should be described in the language's **_list file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+3
-1
@@ -41,9 +41,11 @@ eSpeak can be used as a front-end for Mbrola diphone voices.
|
||||
<h3><A href="add_language.html">Adding a Language</A></h3>
|
||||
How to add or improve a language.
|
||||
<h3><A href="phonemes.html">Phonemes</A></h3>
|
||||
The list of phoneme mnemonics, for use in the Pronunciation Dictionary.
|
||||
The list of phoneme mnemonics for English, for use in the Pronunciation Dictionary.
|
||||
<h3><A href="phontab.html">Phoneme Tables</A></h3>
|
||||
The tables of the phonemes used by each language, with their properties and sound production.
|
||||
<h3><A href="intonation.html">Intonation</A></h3>
|
||||
Different intonation "tunes" may be defined for different languages for clauses which end in full-stop, comma, question-mark, and exclamation-mark.
|
||||
<h3><A href="speak_lib.h">eSpeak Libary API</A></h3>
|
||||
API definition and header file for a shared library version of eSpeak.
|
||||
<h3><A href="ssml.html">Markup tags</A></h3>
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>eSpeak: Phoneme tables</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<A href="docindex.html">Back</A>
|
||||
<hr>
|
||||
<h2>INTONATION</h2>
|
||||
<hr>
|
||||
In eSpeak's standard intonation model, a "tune" is applied to each clause depending on its punctuation. Other intonation models may be used for some languages, such as tone languages.
|
||||
<p>
|
||||
Named tunes are defined in the text file: <b><code>phsource/intonation</code></b>. This file must be compiled for use by eSpeak by using the espeakedit program, using the menu option: <b><code>Compile -> Compile intonation data</code></b>.
|
||||
<h3>Clauses</h3>
|
||||
The tunes which are used for a language can be specified by using a <b><code>tunes</code></b> statement in a voice file in <b><code>espeak-data/voices</code></b>. eg:
|
||||
<p>
|
||||
<code>tunes s1 c1 q1 e1</code>
|
||||
<p>
|
||||
It's parameters are four tune names which are used for clauses which end in:
|
||||
<ol>
|
||||
<li>Full-stop.
|
||||
<li>Comma.
|
||||
<li>Question mark.
|
||||
<li>Exclamation mark.
|
||||
</ol>
|
||||
<p>
|
||||
A clause consists of the following parts:
|
||||
<ul>
|
||||
<li>Pre-head.<br>These are any unstressed syllables before the first stressed syllable.
|
||||
<p>
|
||||
<li>Head.<br>This is the part from the first stressed syllable up to the last syllable before the nucleus.
|
||||
<p>
|
||||
<li>Nucleus.<br>This is stressed syllable which is the focus of the clause. eSpeak chooses the last stressed syllable of the clause.
|
||||
<p>
|
||||
<li>Tail.<br>These are the syllables after the nucleus.
|
||||
</ul>
|
||||
<p>
|
||||
<h3>Tune definitions</h3>
|
||||
Here is an example tune definition from the file <b><code>phsource/intonation</code></b>.
|
||||
<p>
|
||||
<pre>
|
||||
tune s1
|
||||
prehead 46 57
|
||||
headenv fall 16
|
||||
head 4 80 55 -8 -5
|
||||
headextend 0 63 38 13 0
|
||||
nucleus fall 70 18 24 12
|
||||
nucleus0 fall 64 8
|
||||
endtune
|
||||
</pre>
|
||||
<p>
|
||||
It contains:
|
||||
<dl>
|
||||
<dt><strong>tune</strong> <tune name>
|
||||
<dd>
|
||||
Starts the definition of a tune. The <b><code>tune name</code></b> can be used in a <b><code>tunes</code></b> statements in voice files.
|
||||
<p>
|
||||
<dt><strong>endtune</strong> <tune name>
|
||||
<dd>
|
||||
Ends the definition of a tune.
|
||||
<p>
|
||||
<dt><strong>prehead</strong> <start pitch> <end pitch>
|
||||
<dd>
|
||||
Gives the pitch path for any series of unstressed syllables before the first stressed syllable.
|
||||
<p>
|
||||
<dt><strong>headenv</strong> <envelope> <height>
|
||||
<dd>
|
||||
Gives the pitch envelope which is used for stressed syllables in the head (before the nucleus), including <b><code>onset</code></b> and <b><code>headlast</code></b> syllables if these are specified. <b><code>height</code></b> gives a pitch range for the envelope.
|
||||
<p>
|
||||
<dt><strong>head</strong> <steps> <start pitch> <end pitch> <unstressed start> <unstressed end>
|
||||
<dd>
|
||||
<b><code>start pitch</code></b> and <b><code>end pitch</code></b> give a pitch path for the stressed syllables of the head. <b><code>steps</code></b> is the maximum number of stressed syllables for which this applies. If there are additional stressed syllables, then the <b><code>headextend</code></b> statement is used for them.<p>
|
||||
<b><code>unstressed start</code></b> and <b><code>unstressed end</code></b> give a pitch path for unstressed syllables between two stressed syllables. Their values are relative to the pitch of the previous stressed syllable. Values are usually negative, meaning that the unstressed syllables have lower pitch than the previous stressed syllable.
|
||||
|
||||
<p>
|
||||
<dt><strong>headextend</strong> <percentage list>
|
||||
<dd>
|
||||
If the head contains more stressed syllables than is specified by <b><code>steps</code></b>, then <b><code>percentage list</code></b> is used. It contains up to 8 numbers which are used repeatedly for the additional stressed syllables. A value of 0 corresponds to the lower the <b><code>start pitch</code></b> and <b><code>end pitch</code></b> values of the <b><code>head</code></b> statement. 100 corresponds to the higher value. Negative values and values greater than 100 are allowed.
|
||||
<p>
|
||||
<dt><strong>nucleus</strong> <envelope> <top pitch> <bottom pitch> <tail start> <tail end>
|
||||
<dd>
|
||||
This gives the pitch envelope and pitch range of the last stressed syllable of the clause. <b><code>tail start</code></b> and <b><code>tail end</code></b> give a pitch path for the unstressed syllables which are after the last stressed syllable.
|
||||
<p>
|
||||
<dt><strong>nucleus0</strong> <envelope> <top pitch> <bottom pitch>
|
||||
<dd>
|
||||
This is used instead of <b><code>nucleus</code></b> if there are no unstressed syllables after the last stressed syllable. In this case, the pitch changes of the nucleus and the tail and both included in the nucleus.
|
||||
</dl>
|
||||
<p>
|
||||
The following attributes may also be included:
|
||||
<dl>
|
||||
<dt><strong>onset</strong> <pitch> <unstressed start> <unstressed end>
|
||||
<dd>
|
||||
This specifies the pitch for the first stressed syllable of the head. If the <b><code>onset</code></b> statement is present, then the <b><code>head</code></b> statement used for the stressed syllables after the first.
|
||||
<p>
|
||||
<dt><strong>headlast</strong> <pitch> <unstressed start> <unstressed end>
|
||||
<dd>
|
||||
This specifies the pitch for the last stressed syllable of the head (i.e. the stressed syllable before the nucleus).
|
||||
<p>
|
||||
</dl>
|
||||
+12
-17
@@ -49,32 +49,27 @@ directory) into
|
||||
</ol>
|
||||
<h3>Linux Installation</h3>
|
||||
|
||||
I don't think there's a Linux shared library version of Mbrola (equivalent to mbrola.dll), so eSpeak has to pipe phoneme data to the command-line Mbrola.
|
||||
From eSpeak version 1.44 onwards, eSpeak calls the mbrola program directly, rather than passing phoneme data to it using a pipe.
|
||||
<ol>
|
||||
<li>To install the Linux Mbrola binary, download:
|
||||
<a href="http://www.tcts.fpms.ac.be/synthesis/mbrola/bin/pclinux/mbr301h.zip"> http://www.tcts.fpms.ac.be/synthesis/mbrola/bin/pclinux/mbr301h.zip</a>.
|
||||
Unpack the archive, and copy and rename the file: <code>mbrola-linux-i386</code> to
|
||||
Unpack the archive, and copy and rename the file from: <code>mbrola-linux-i386</code> to
|
||||
<code>mbrola</code> somewhere in your executable path (eg. <code>/usr/bin/mbrola</code> ).
|
||||
<p>
|
||||
<li>Get the en1 voice from:
|
||||
<a href="http://www.tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html"> http://www.tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html</a>.
|
||||
Unpack the archive, and copy the "<b>en1</b>" data file (not the whole "en1"
|
||||
directory) somewhere convenient (eg. <code>/usr/share/mbrola/en1</code> ).
|
||||
directory) to <code>/usr/share/mbrola/en1</code>.<p>eSpeak will look for mbrola voices firstly in <code>espeak-data/mbrola</code> and then in <code>/usr/share/mbrola</code>
|
||||
<p>
|
||||
<li>If you use the eSpeak voice "<b>mb-en1</b>" then eSpeak will generate
|
||||
Mbrola phoneme data on its stdout. You can pipe this into Mbrola.
|
||||
<p>
|
||||
<code>espeak -v mb-en1 -f textfile | mbrola -e /usr/share/mbrola/en1 -
|
||||
test.wav</code>
|
||||
<p>
|
||||
will put the Mbrola speech output into a WAV file. Or you can pipe the output from Mbrola through aplay:
|
||||
<p>
|
||||
<code>espeak -v mb-en1 -f textfile | mbrola -e /usr/share/mbrola/en1 - - | aplay -r16000 -fS16</code>
|
||||
<p>
|
||||
The -e option prevents Mbrola from stopping if it finds a combination
|
||||
of phonemes which it doesn't recognise.
|
||||
<p>
|
||||
Some mbrola voices (de5, de6) use a sample rate of 22050 Hz. These need -r22050 rather than -r16000.
|
||||
<li>If you use the eSpeak voice such as "<b>mb-en1</b>" then eSpeak will use the mbrola "en1" voice, eg:<br>
|
||||
<code>espeak -v mb-en1 "Hello world"
|
||||
</code>
|
||||
<p><p>
|
||||
To generate mbrola phoneme data (.pho file) you can use:<br>
|
||||
<code>espeak -v mb-en1 -q --pho "Hello world"</code>
|
||||
<br>or<br>
|
||||
<code>espeak -v mb-en1 -q --pho --phonout=out.pho "Hello world"</code>
|
||||
|
||||
</ol>
|
||||
<h3>Mbrola Voice Files</h3>
|
||||
|
||||
|
||||
+9
-3
@@ -3,6 +3,7 @@
|
||||
|
||||
<head>
|
||||
<title>eSpeak: Phoneme tables</title>
|
||||
<meta name="GENERATOR" content="Quanta Plus">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
@@ -102,6 +103,7 @@ Within the phoneme definition the following lines may occur: ( (V) indicates on
|
||||
<tr><TD><b>rhotic</b></TD><td>(C) An "r" type consonant.</td></tr>
|
||||
<tr><TD><b>unstressed</b></TD><td>(V) This vowel is always unstressed, unless explicitly marked otherwise.</td></tr>
|
||||
<tr><TD><b>nolink</b></TD><td>Prevent any linking from the previous phoneme.</td></tr>
|
||||
<tr><TD><b>nopause</b></TD><td>Used in a <code>liquid</code> or <code>nasal</code> phoneme to prevent eSpeak inserting a short pause if a word starts with this phoneme and the previous word ends with a vowel.</td></tr>
|
||||
<tr><TD><b>trill</b></TD><td>(C) Apply trill to the voicing.</td></tr>
|
||||
</table>
|
||||
</dl>
|
||||
@@ -151,14 +153,18 @@ During the first phase of phoneme interpretation, an instruction which causes a
|
||||
<dt><strong>length</strong> <length>
|
||||
<dd>The relative length of the phoneme, typically about 140 for a short vowel and from 200 to 300 for a long vowel or diphong. A length() instruction is needed for vowels. It is optional for consonants.
|
||||
<p>
|
||||
<dt><strong>ipa</strong> <ipa string>
|
||||
<dd>In many cases, eSpeak makes IPA (International Phonetic Alpbabet) phoneme names automatically from eSpeak phoneme names. If this is not correct, then the phoneme definition can include an <b>ipa</b> instruction to specify the correct IPA name. IPA strings may include non-ascii characters. They may also include characters specified by their character codes in the form U+ followed by 4 hexadecimal digits. For example a string: aU+0303 indicates 'a' with a 'combining tilde'.
|
||||
<p>
|
||||
<dt><strong>WAV</strong>(<wav file>, <amplitude>)
|
||||
<dd> <wav file> is a path to a WAV file (22 kHz, 16 bits, mono) within <code>phsource/</code> which will be played to produce the sound. This method is used for unvoiced consonants. <wavefile> does not include a .WAV filename extension, although the file to which it refers may or may not have one.<br>
|
||||
<amplitude> is optional. It is a percentage change to the amplitude of the WAV file. So, <code>WAV(ufric/s, 50)</code> means: play file 'ufric/s.wav' at 50% amplitude.
|
||||
<p>
|
||||
<dt><strong>FMT</strong>(<vowel file>)
|
||||
<dd><vowel file> is a path to a file (within <code>phsource/</code>) which defines how to generate the sound (a vowel or voiced consonant) from a sequence of formant values. Vowel files are made using the espeakedit program.
|
||||
<dt><strong>FMT</strong>(<vowel file>, <amplitude>)
|
||||
<dd><vowel file> is a path to a file (within <code>phsource/</code>) which defines how to generate the sound (a vowel or voiced consonant) from a sequence of formant values. Vowel files are made using the espeakedit program.<br>
|
||||
<amplitude> is optional. It is a percentage change to the amplitude of the sound which is synthesized from the FMT() instruction.
|
||||
<p>
|
||||
<dt><strong>FMT</strong>(<vowel file>) <strong>addWav</strong>(<wav file>, <amplitude>)
|
||||
<dt><strong>FMT</strong>(<vowel file>, <amplitude>) <strong>addWav</strong>(<wav file>, <amplitude>)
|
||||
<dd>For voiced consonants, a FMT() instruction may be followed by an addWav() instruction. addWav() has the same format as a WAV() instruction, but the WAV file is mixed with the sound which is synthesized from the FMT() instruction.
|
||||
<p>
|
||||
<dt><strong>VowelStart</strong>(<vowel file>, <length adjust>)
|
||||
|
||||
+26
-12
@@ -1,7 +1,7 @@
|
||||
#ifndef SPEAK_LIB_H
|
||||
#define SPEAK_LIB_H
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2005 to 2007 by Jonathan Duddington *
|
||||
* Copyright (C) 2005 to 2010 by Jonathan Duddington *
|
||||
* email: jonsd@users.sourceforge.net *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
@@ -26,8 +26,9 @@
|
||||
/*************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define ESPEAK_API_REVISION 3
|
||||
#define ESPEAK_API_REVISION 5
|
||||
/*
|
||||
Revision 2
|
||||
Added parameter "options" to eSpeakInitialize()
|
||||
@@ -35,6 +36,11 @@ Revision 2
|
||||
Revision 3
|
||||
Added espeakWORDGAP to espeak_PARAMETER
|
||||
|
||||
Revision 4
|
||||
Added flags parameter to espeak_CompileDictionary()
|
||||
|
||||
Revision 5
|
||||
Added espeakCHARS_16BIT
|
||||
*/
|
||||
/********************/
|
||||
/* Initialization */
|
||||
@@ -44,12 +50,13 @@ Revision 3
|
||||
typedef enum {
|
||||
espeakEVENT_LIST_TERMINATED = 0, // Retrieval mode: terminates the event list.
|
||||
espeakEVENT_WORD = 1, // Start of word
|
||||
espeakEVENT_SENTENCE, // Start of sentence
|
||||
espeakEVENT_MARK, // Mark
|
||||
espeakEVENT_PLAY, // Audio element
|
||||
espeakEVENT_END, // End of sentence
|
||||
espeakEVENT_MSG_TERMINATED, // End of message
|
||||
espeakEVENT_PHONEME // Phoneme, if enabled in espeak_Initialize()
|
||||
espeakEVENT_SENTENCE = 2, // Start of sentence
|
||||
espeakEVENT_MARK = 3, // Mark
|
||||
espeakEVENT_PLAY = 4, // Audio element
|
||||
espeakEVENT_END = 5, // End of sentence or clause
|
||||
espeakEVENT_MSG_TERMINATED = 6, // End of message
|
||||
espeakEVENT_PHONEME = 7, // Phoneme, if enabled in espeak_Initialize()
|
||||
espeakEVENT_SAMPLERATE = 8 // internal use, set sample rate
|
||||
} espeak_EVENT_TYPE;
|
||||
|
||||
|
||||
@@ -224,6 +231,7 @@ int UriCallback(int type, const char *uri, const char *base);
|
||||
#define espeakCHARS_UTF8 1
|
||||
#define espeakCHARS_8BIT 2
|
||||
#define espeakCHARS_WCHAR 3
|
||||
#define espeakCHARS_16BIT 4
|
||||
|
||||
#define espeakSSML 0x10
|
||||
#define espeakPHONEMES 0x100
|
||||
@@ -315,7 +323,8 @@ extern "C"
|
||||
#endif
|
||||
espeak_ERROR espeak_Key(const char *key_name);
|
||||
/* Speak the name of a keyboard key.
|
||||
Currently this just speaks the "key_name" as given
|
||||
If key_name is a single character, it speaks the name of the character.
|
||||
Otherwise, it speaks key_name as a text string.
|
||||
|
||||
Return: EE_OK: operation achieved
|
||||
EE_BUFFER_FULL: the command can not be buffered;
|
||||
@@ -379,7 +388,8 @@ espeak_ERROR espeak_SetParameter(espeak_PARAMETER parameter, int value, int rela
|
||||
parameter:
|
||||
espeakRATE: speaking speed in word per minute.
|
||||
|
||||
espeakVOLUME: volume in range 0-100 0=silence
|
||||
espeakVOLUME: volume in range 0-200 or more.
|
||||
0=silence, 100=normal full volume, greater values may produce amplitude compression or distortion
|
||||
|
||||
espeakPITCH: base pitch, range 0-100. 50=normal
|
||||
|
||||
@@ -435,6 +445,7 @@ void espeak_SetPhonemeTrace(int value, FILE *stream);
|
||||
value=0 No phoneme output (default)
|
||||
value=1 Output the translated phoneme symbols for the text
|
||||
value=2 as (1), but also output a trace of how the translation was done (matching rules and list entries)
|
||||
value=3 as (1), but produces IPA rather than ascii phoneme names
|
||||
|
||||
stream output stream for the phoneme symbols (and trace). If stream=NULL then it uses stdout.
|
||||
*/
|
||||
@@ -442,13 +453,16 @@ void espeak_SetPhonemeTrace(int value, FILE *stream);
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
void espeak_CompileDictionary(const char *path, FILE *log);
|
||||
void espeak_CompileDictionary(const char *path, FILE *log, int flags);
|
||||
/* Compile pronunciation dictionary for a language which corresponds to the currently
|
||||
selected voice. The required voice should be selected before calling this function.
|
||||
|
||||
path: The directory which contains the language's '_rules' and '_list' files.
|
||||
'path' should end with a path separator character ('/').
|
||||
log: Stream for error reports and statistics information. If log=NULL then stderr will be used.
|
||||
|
||||
flags: Bit 0: include source line information for debug purposes (This is displayed with the
|
||||
-X command line option).
|
||||
*/
|
||||
/***********************/
|
||||
/* Voice Selection */
|
||||
@@ -497,7 +511,7 @@ const espeak_VOICE **espeak_ListVoices(espeak_VOICE *voice_spec);
|
||||
The list is terminated by a NULL pointer
|
||||
|
||||
If voice_spec is NULL then all voices are listed.
|
||||
If voice spec is give, then only the voices which are compatible with the voice_spec
|
||||
If voice spec is given, then only the voices which are compatible with the voice_spec
|
||||
are listed, and they are listed in preference order.
|
||||
*/
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ eSpeak can speak HTML text directly, or text containing both SSML and HTML marku
|
||||
Any unrecognised tags are ignored.<p>
|
||||
The following tags case a sentence break.<br>
|
||||
<b><br>
|
||||
<dd>
|
||||
<li>
|
||||
<img>
|
||||
<td>
|
||||
@@ -85,5 +86,9 @@ The following tags case a paragraph break.<br>
|
||||
<h4>
|
||||
<hr>
|
||||
</b><p>
|
||||
Text between the following tags is ignored.<br>
|
||||
<b><script> ... </script> <br>
|
||||
<style> ... </style> <br>
|
||||
</b><p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user