mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-09 09:19:09 +02:00
set_punctuation: Fix punctuation levels values
They do not actually follow the espeak values (and have no reason to, anyway).
This commit is contained in:
parent
98dc103749
commit
fa848f509e
1 changed files with 20 additions and 1 deletions
21
src/espeak.c
21
src/espeak.c
|
|
@ -108,12 +108,31 @@ static espeak_ERROR set_punctuation(struct synth_t *s, int punct,
|
||||||
enum adjust_t adj)
|
enum adjust_t adj)
|
||||||
{
|
{
|
||||||
espeak_ERROR rc;
|
espeak_ERROR rc;
|
||||||
|
espeak_PUNCT_TYPE espeak_punct;
|
||||||
|
|
||||||
if (adj == ADJ_DEC)
|
if (adj == ADJ_DEC)
|
||||||
punct = -punct;
|
punct = -punct;
|
||||||
if (adj != ADJ_SET)
|
if (adj != ADJ_SET)
|
||||||
punct += s->punct;
|
punct += s->punct;
|
||||||
rc = espeak_SetParameter(espeakPUNCTUATION, punct, 0);
|
|
||||||
|
switch (punct) {
|
||||||
|
case 0:
|
||||||
|
espeak_punct = espeakPUNCT_NONE;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
espeak_punct = espeakPUNCT_SOME;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
/* XXX: approximation */
|
||||||
|
espeak_punct = espeakPUNCT_SOME;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
default:
|
||||||
|
espeak_punct = espeakPUNCT_ALL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = espeak_SetParameter(espeakPUNCTUATION, espeak_punct, 0);
|
||||||
if (rc == EE_OK)
|
if (rc == EE_OK)
|
||||||
s->punct = punct;
|
s->punct = punct;
|
||||||
return rc;
|
return rc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue