mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-12 00:46:50 +00:00
[1.36]
espeak_Key(key_name) If key_name is a single character, it speaks the character name. Otherwise it speaks key_name as a text string. This is the same behaviour as <say-as interpret-as="tts:key"> Fix: SAPI5 was restricted to 360 wmp. Now the top speed (390 wpm) is allowed. Fix error in phoneme translation data for mbrola "cr1" Croation voice. *_list files: Allow word groups which have no phoneme translation, so that just attributes can be set. The words are considered as a single hyphenated word. Fix: $textmode in *_list files, allow replacement by a word which is also translated in the *_list file. lang=pl: many additions to pl_rules, pl_list git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@165 d46cf337-b52f-0410-862d-fd96e6ae7743
This commit is contained in:
@@ -187,11 +187,11 @@ Dictionary pl_dict
|
||||
@- a E E~ i O O~ u
|
||||
y
|
||||
|
||||
* ; b c C d d; dZ
|
||||
dz; f g h j k l m
|
||||
n N n^ p r s S S;
|
||||
t t; tS ts ts; v w x
|
||||
z Z Z;
|
||||
* : ; b c C d d;
|
||||
dZ dz; f g h j k l
|
||||
m n N n^ p r s S
|
||||
s; S; t t; tS ts ts; tS;
|
||||
v w x z Z Z;
|
||||
|
||||
|
||||
Dictionary ru_dict
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ _, k0m@
|
||||
_- h,aIf@n
|
||||
_. d0t
|
||||
_: koUl@n
|
||||
_; sEmIk'oUl0n
|
||||
_; sEmIk'oUl@n
|
||||
_< ElaNg@L
|
||||
_= i:kw@Lz
|
||||
_> A@aNg@L
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ j Zi
|
||||
k ka
|
||||
l El
|
||||
m Em
|
||||
n En
|
||||
//n En // in fr_rules
|
||||
ñ $accent
|
||||
o o
|
||||
ô $accent
|
||||
@@ -113,7 +113,7 @@ _` aks'A~_gR'av
|
||||
_{ uvR_akOlad
|
||||
_| baR
|
||||
_} f'ERm_akOl'ad
|
||||
|
||||
² pw^is'A~s||d'Y
|
||||
|
||||
|
||||
// numeric
|
||||
|
||||
+4
-2
@@ -227,7 +227,7 @@
|
||||
flig) en (t_ A~ // affligent
|
||||
Vflig) en (t_ // infligent (verbe)
|
||||
Xig) en (t_ // figent, pigent
|
||||
oblig) en (t_ A~ // obligent, d‚sobligent
|
||||
oblig) en (t_ A~ // obligent, d�sobligent
|
||||
Voblig) en (t_ // obligent (verbe)
|
||||
|
||||
man) en (t_ A~ // permanent
|
||||
@@ -730,6 +730,7 @@ _) half _^_en
|
||||
|
||||
|
||||
.group n
|
||||
_) n (_ En
|
||||
n n // une
|
||||
nn n
|
||||
ng (_ N
|
||||
@@ -738,7 +739,7 @@ _) half _^_en
|
||||
|
||||
A) ng (_ N // parking meeting
|
||||
nn n // panne
|
||||
|
||||
_) n (_° nymero
|
||||
|
||||
|
||||
.group o
|
||||
@@ -1208,6 +1209,7 @@ C) te (_ t@- // patte
|
||||
¥ i;En
|
||||
£ livR
|
||||
° d@gRe
|
||||
_n_) ° // n°
|
||||
± pl'yz_'u_mw'E~
|
||||
× myltip@-lj'e_p'aR
|
||||
÷ diviz'e_p'aR
|
||||
|
||||
@@ -62,6 +62,10 @@ _rng kYR2
|
||||
_stk a:thu:za:S
|
||||
_tld tildE
|
||||
|
||||
// characters
|
||||
_#9 tAb
|
||||
_#32 so:kYz
|
||||
|
||||
|
||||
// Abbreviations
|
||||
km kilo:me:tER2
|
||||
|
||||
+929
-92
File diff suppressed because it is too large
Load Diff
+780
-70
File diff suppressed because it is too large
Load Diff
+8
-6
@@ -111,7 +111,7 @@ _" 'abRi;'asp&||d'upl&s#
|
||||
// numeric
|
||||
//********
|
||||
|
||||
?1 _0 z'Eru
|
||||
?1 _0 z'E*u
|
||||
?2 _0 z'E*U
|
||||
?1 _1 'um
|
||||
?2 _1 'uN
|
||||
@@ -147,7 +147,7 @@ _15 k'iNzy
|
||||
?2_2X v'iNtSi
|
||||
_3X tr'iNt&
|
||||
|
||||
?1_4X kw&r'eNt&
|
||||
?1_4X kw&*'eNt&
|
||||
?2_4X kwa*'eINt&
|
||||
_5X siNkw'eINt&
|
||||
?1_6X sys'eINt&
|
||||
@@ -186,6 +186,9 @@ _dpt _v'irgul&
|
||||
_0Z2 seNt'Ezim& // 100ths
|
||||
_0Z3 mil'Ezim& // 1000ths
|
||||
|
||||
// not roman numbers
|
||||
vi vi
|
||||
|
||||
|
||||
// ABBREVIATIONS
|
||||
//**************
|
||||
@@ -206,7 +209,7 @@ cpuc $abbrev
|
||||
dpoc $abbrev
|
||||
ecg $abbrev
|
||||
edp $abbrev
|
||||
?1 etc ,ets'Et:r&
|
||||
?1 etc ,ets'Et:*&
|
||||
?2 etc ,ets'Ete*&
|
||||
hiv $abbrev
|
||||
(http ://) ag,atete'pe_
|
||||
@@ -598,8 +601,7 @@ jogos $alt
|
||||
// Open [E]
|
||||
nela n'El&
|
||||
nessa n'Es&
|
||||
?1 era 'Er&
|
||||
?2 era 'E*&
|
||||
era 'E*&
|
||||
|
||||
abacaxi abakaSi
|
||||
axé aSE
|
||||
@@ -628,7 +630,7 @@ roxo x'oSU
|
||||
?1 download d'a,wnl'oud
|
||||
?1 end 'end
|
||||
?1 escape Sk'eIpy
|
||||
?1 explorer ,ekspl'O:r&r-
|
||||
?1 explorer ,ekspl'O:*&r-
|
||||
?2 Explorer ekspl'O*er
|
||||
?1 eyes 'aiz
|
||||
?1 frame fr'eImy
|
||||
|
||||
+2
-4
@@ -580,10 +580,8 @@
|
||||
_) r (_ 'Exe
|
||||
_) r (_\$ xe'aU // currency
|
||||
r r
|
||||
?1 A) r (A r
|
||||
?2 A) r (A *
|
||||
?1 A) r (_A r
|
||||
?2 A) r (_A *
|
||||
A) r (A *
|
||||
A) r (_A *
|
||||
rr x
|
||||
C) r (A R // for "pt-pt" [R] is the same as [r]
|
||||
_) r x
|
||||
|
||||
+10
-6
@@ -3,7 +3,6 @@
|
||||
|
||||
<head>
|
||||
<title>eSpeak</title>
|
||||
<meta name="GENERATOR" content="Quanta Plus">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body>
|
||||
@@ -36,11 +35,16 @@ The following markup tags and attributes are recognised:<p>
|
||||
</ul>
|
||||
<p><b><say-as></b>
|
||||
<ul>
|
||||
<li>interpret-as="characters"
|
||||
<li>interpret-as="characters" format="glyphs"
|
||||
<li>interpret-as="tts:key"
|
||||
<li>interpret-as="tts:char"
|
||||
<li>interpret-as="tts:digits"
|
||||
<li>interpret-as="characters"<p>
|
||||
The names of the characters are spoken.
|
||||
<li>interpret-as="characters" format="glyphs"<p>
|
||||
As "characters", but upper-case letters are prefixed with "Capital".
|
||||
<li>interpret-as="tts:key"<p>
|
||||
If the text is only one character, the name of the character is spoken, including punctuation characters. If the text is more than one character, it is spoken as words.
|
||||
<li>interpret-as="tts:char"<p>
|
||||
The name of the character is spoken, including punctuation characters.
|
||||
<li>interpret-as="tts:digits"<p>
|
||||
The digits are spoken individually.
|
||||
</ul>
|
||||
<p><b><mark></b> name
|
||||
<p><b><s></b>
|
||||
|
||||
@@ -16,6 +16,7 @@ volume 16
|
||||
0 g- NULL 0 NULL
|
||||
0 @- NULL 0 NULL
|
||||
0 * NULL 0 r
|
||||
0 r* NULL 0 NULL
|
||||
|
||||
0 I NULL 0 i
|
||||
0 U NULL 0 u
|
||||
@@ -24,8 +25,14 @@ volume 16
|
||||
0 & NULL 0 a
|
||||
0 A NULL 0 a
|
||||
0 @ NULL 0 e
|
||||
0 @2 NULL 0 e
|
||||
0 aI NULL 60 a j
|
||||
0 iI NULL 60 i j
|
||||
0 a: NULL 0 a
|
||||
0 e: NULL 0 e
|
||||
0 i: NULL 0 i
|
||||
0 o: NULL 0 o
|
||||
0 u: NULL 0 u
|
||||
|
||||
0 tS; NULL 0 tS'
|
||||
0 dZ; NULL 0 dZ'
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// use mbrola de6 German voice for "grc" (Ancient Greek)
|
||||
|
||||
|
||||
0 i NULL 0 i:
|
||||
0 e NULL 0 e:
|
||||
0 E NULL 0 E:
|
||||
0 a NULL 0 a:
|
||||
0 a/ NULL 0 a:
|
||||
0 O NULL 0 O
|
||||
0 o NULL 0 o:
|
||||
0 y NULL 0 Y
|
||||
|
||||
0 aI NULL 60 a: j
|
||||
0 EI NULL 70 E: j
|
||||
0 OI NULL 70 O j
|
||||
0 oI NULL 60 o: j
|
||||
0 yI NULL 60 Y j
|
||||
0 aU NULL 0 aU
|
||||
0 eU NULL 60 e: w
|
||||
0 EU NULL 70 E: w
|
||||
0 OU NULL 70 O w
|
||||
|
||||
0 l/ NULL 0 l
|
||||
0 f NULL 0 pf
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
volume 32
|
||||
|
||||
// CR1 doesn't like same phonemes twice
|
||||
0 e E 5 e _
|
||||
0 s s 5 s _
|
||||
0 ? k 5 k _
|
||||
0 t t 5 t _
|
||||
0 m m 5 m _
|
||||
0 n n 5 n _
|
||||
0 p p 5 p _
|
||||
0 l/ l 5 l _
|
||||
|
||||
0 l/2 NULL 0 l
|
||||
0 l/ NULL 0 l
|
||||
0 r/ NULL 0 r
|
||||
0 r- NULL 0 r
|
||||
0 l- NULL 0 l
|
||||
0 w/ NULL 0 w
|
||||
0 j/ NULL 0 j
|
||||
2 ; i 0 NULL
|
||||
0 ; NULL 0 NULL
|
||||
0 - NULL 0 NULL
|
||||
0 g- NULL 0 NULL
|
||||
0 @- NULL 0 NULL
|
||||
0 * NULL 0 r
|
||||
|
||||
0 a NULL 0 V
|
||||
0 E NULL 0 e
|
||||
0 i NULL 0 I
|
||||
0 o NULL 0 Q
|
||||
0 O NULL 0 Q
|
||||
0 u NULL 0 U
|
||||
|
||||
0 n^ NULL 0 nY
|
||||
0 ? NULL 0 k
|
||||
0 S NULL 60 s j
|
||||
0 v NULL 0 f
|
||||
0 R NULL 0 r
|
||||
0 x NULL 0 h
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[Setup]
|
||||
AppName=eSpeak
|
||||
AppVerName=eSpeak version 1.34
|
||||
AppVerName=eSpeak version 1.36
|
||||
AppCopyright=Licensed under GNU General Public License version 3. (See file License.txt for details).
|
||||
WindowVisible=yes
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
[Setup]
|
||||
AppName=eSpeakEdit
|
||||
AppVerName=eSpeakEdit version 1.34
|
||||
AppVerName=eSpeakEdit version 1.36
|
||||
DefaultDirName={pf}\eSpeak
|
||||
DefaultGroupName=eSpeak
|
||||
OutputBaseFilename=setup_espeakedit
|
||||
|
||||
+12
-10
@@ -6,7 +6,7 @@ INCDIR=$(PREFIX)/usr/include/espeak
|
||||
LIBDIR=$(PREFIX)/usr/lib
|
||||
DATADIR=$(PREFIX)/usr/share/espeak-data
|
||||
|
||||
RELEASE = 1.35
|
||||
RELEASE = 1.36
|
||||
BIN_NAME = speak
|
||||
BIN2_NAME = espeak
|
||||
LIB_NAME = libespeak.so
|
||||
@@ -30,12 +30,14 @@ AUDIO = portaudio
|
||||
|
||||
ifeq ($(AUDIO),pulseaudio)
|
||||
WAVE=wave_pulse.cpp
|
||||
LIB_AUDIO=pulse
|
||||
USE_AUDIO=USE_PULSEAUDIO
|
||||
LIB_AUDIO=-lpulse
|
||||
USE_AUDIO=-DUSE_PULSEAUDIO
|
||||
else ifeq ($(AUDIO),portaudio)
|
||||
WAVE=wave.cpp
|
||||
LIB_AUDIO=-lportaudio
|
||||
USE_AUDIO=-DUSE_PORTAUDIO
|
||||
else
|
||||
WAVE=wave.cpp
|
||||
LIB_AUDIO=portaudio
|
||||
USE_AUDIO=USE_PORTAUDIO
|
||||
endif
|
||||
|
||||
speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
|
||||
@@ -51,24 +53,24 @@ libespeak_SOURCES = speak_lib.cpp compiledict.cpp dictionary.cpp intonation.cpp
|
||||
|
||||
SRCS1=$(speak_SOURCES)
|
||||
OBJS1=$(patsubst %.cpp,%.o,$(SRCS1))
|
||||
LIBS1=-lstdc++ -l$(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
|
||||
LIBS1=-lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
|
||||
|
||||
SRCS2=$(libespeak_SOURCES)
|
||||
OBJS2=$(patsubst %.cpp,x_%.o,$(SRCS2))
|
||||
LIBS2=-lstdc++ -l$(LIB_AUDIO) -lpthread
|
||||
LIBS2=-lstdc++ $(LIB_AUDIO) -lpthread
|
||||
|
||||
SRCS3 = espeak.cpp
|
||||
OBJS3=$(patsubst %.cpp,%.o,$(SRCS3))
|
||||
LIBS3=-lstdc++ -L . -lespeak
|
||||
|
||||
CXXFLAGS=-O2 -D$(USE_AUDIO)
|
||||
CXXFLAGS=-O2
|
||||
|
||||
|
||||
all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
|
||||
mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
||||
$(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -pedantic -I. -c -fno-exceptions $<
|
||||
|
||||
$(BIN_NAME): $(OBJS1)
|
||||
$(CXX) -o $@ $(OBJS1) $(LIBS1)
|
||||
@@ -79,7 +81,7 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME)
|
||||
|
||||
|
||||
x_%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -Wall -fpic -pedantic \
|
||||
$(CXX) $(CXXFLAGS) $(USE_AUDIO) -Wall -fpic -pedantic \
|
||||
-I. -D LIBRARY -c -fno-exceptions $< -o x_$*.o
|
||||
|
||||
$(LIB_NAME): $(OBJS2)
|
||||
|
||||
+1
-1
@@ -721,7 +721,7 @@ void Translator::SetSpellingStress(char *phonemes, int control, int n_chars)
|
||||
|
||||
if(control == 4)
|
||||
c = phonPAUSE; // pause after each character
|
||||
if(((count % 3) == 0) || (control == 4))
|
||||
if(((count % 3) == 0) || (control > 2))
|
||||
c = phonPAUSE_SHORT; // pause following a primary stress
|
||||
else
|
||||
continue; // remove marker
|
||||
|
||||
+1
-1
@@ -1979,7 +1979,7 @@ f_input = f_in; // for GetC etc
|
||||
c2 = ' ';
|
||||
}
|
||||
|
||||
if((sayas_mode == 0x14) && (c1 <= 0x20))
|
||||
if((c1 <= 0x20) && ((sayas_mode == SAYAS_SINGLE_CHARS) || (sayas_mode == SAYAS_KEY)))
|
||||
{
|
||||
c1 += 0xe000; // move into unicode private usage area
|
||||
}
|
||||
|
||||
+12
-1
@@ -612,9 +612,20 @@ espeak_ERROR sync_espeak_Synth_Mark(unsigned int unique_identifier, const void *
|
||||
void sync_espeak_Key(const char *key)
|
||||
{//==================================
|
||||
// symbolic name, symbolicname_character - is there a system resource of symbolic names per language?
|
||||
int letter;
|
||||
int ix;
|
||||
|
||||
ix = utf8_in(&letter,key,0);
|
||||
if(key[ix] == 0)
|
||||
{
|
||||
// a single character
|
||||
sync_espeak_Char(letter);
|
||||
return;
|
||||
}
|
||||
|
||||
my_unique_identifier = 0;
|
||||
my_user_data = NULL;
|
||||
Synthesize(0, key,0); // for now, just say the key name as passed
|
||||
Synthesize(0, key,0); // speak key as a text string
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -318,7 +318,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;
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@
|
||||
#include "translate.h"
|
||||
#include "wave.h"
|
||||
|
||||
const char *version_string = "1.35 07.Mar.08";
|
||||
const char *version_string = "1.36 09.Mar.08";
|
||||
const int version_phdata = 0x013400;
|
||||
|
||||
int option_device_number = -1;
|
||||
|
||||
@@ -534,7 +534,7 @@ SetLengthMods(tr,3); // all equal
|
||||
tr->langopts.max_initial_consonants = 7; // for example: wchrzczony :)
|
||||
tr->langopts.numbers=0x1009 + 0x4000;
|
||||
tr->langopts.numbers2=0x40;
|
||||
tr->langopts.param[LOPT_COMBINE_WORDS] = 2 + 0x100; // combine 'nie' (marked with $alt2) with some 1-syllable words (marked with $alt)
|
||||
tr->langopts.param[LOPT_COMBINE_WORDS] = 4 + 0x100; // combine 'nie' (marked with $alt2) with some 1-syllable (and 2-syllable) words (marked with $alt)
|
||||
SetLetterVowel(tr,'y');
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -637,6 +637,7 @@ int Translator::TranslateWord(char *word1, int next_pause, WORD_TAB *wtab)
|
||||
int prefix_flags = 0;
|
||||
int confirm_prefix;
|
||||
int spell_word;
|
||||
int stress_bits;
|
||||
int emphasize_allcaps = 0;
|
||||
int wflags = wtab->flags;
|
||||
int wmark = wtab->wmark;
|
||||
@@ -684,6 +685,37 @@ int Translator::TranslateWord(char *word1, int next_pause, WORD_TAB *wtab)
|
||||
else
|
||||
{
|
||||
found = LookupDictList(&word1, phonemes, dictionary_flags, FLAG_ALLOW_TEXTMODE, wtab); // the original word
|
||||
if(dictionary_flags[0] & FLAG_TEXTMODE)
|
||||
{
|
||||
stress_bits = dictionary_flags[0] & 0x7f;
|
||||
found = LookupDictList(&word1, phonemes, dictionary_flags2, 0, wtab); // the text replacement
|
||||
if(dictionary_flags2[0]!=0)
|
||||
{
|
||||
dictionary_flags[0] = dictionary_flags2[0];
|
||||
dictionary_flags[1] = dictionary_flags2[1];
|
||||
if(stress_bits != 0)
|
||||
{
|
||||
// keep any stress information from the original word
|
||||
dictionary_flags[0] = (dictionary_flags[0] & ~0x7f) | stress_bits;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if((found==0) && (dictionary_flags[0] & FLAG_SKIPWORDS))
|
||||
{
|
||||
// grouped words, but no translation. Join the words with hyphens.
|
||||
wordx = word1;
|
||||
ix = 0;
|
||||
while(ix < dictionary_skipwords)
|
||||
{
|
||||
if(*wordx == ' ')
|
||||
{
|
||||
*wordx = '-';
|
||||
ix++;
|
||||
}
|
||||
wordx++;
|
||||
}
|
||||
}
|
||||
|
||||
// if textmode, LookupDictList() replaces word1 by the new text and returns found=0
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
/* dictionary flags, word 1 */
|
||||
// bits 0-3 stressed syllable, 7=unstressed
|
||||
// bits 0-3 stressed syllable, bit 6=unstressed
|
||||
#define FLAG_SKIPWORDS 0x80
|
||||
#define FLAG_PREPAUSE 0x100
|
||||
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ int wcmdq_tail=0;
|
||||
|
||||
// pitch,speed,
|
||||
int embedded_default[N_EMBEDDED_VALUES] = {0,50,170,100,50, 0,0, 0,170,0,0,0,0,0};
|
||||
static int embedded_max[N_EMBEDDED_VALUES] = {0,0x7fff,360,300,99,99,99, 0,360,0,0,0,0,4};
|
||||
static int embedded_max[N_EMBEDDED_VALUES] = {0,0x7fff,400,300,99,99,99, 0,360,0,0,0,0,4};
|
||||
|
||||
#define N_CALLBACK_IX N_WAV_BUF-2 // adjust this delay to match display with the currently spoken word
|
||||
int current_source_index=0;
|
||||
|
||||
Reference in New Issue
Block a user