From 3faa7e10d02e604ab6e3c87867cdf6bb46bb4e1c Mon Sep 17 00:00:00 2001 From: 3djc Date: Thu, 4 Oct 2018 17:13:00 +0200 Subject: [PATCH] Improve spanish timer speech --- radio/src/translations/tts_es.cpp | 11 +++-------- radio/util/tts_es.py | 8 ++++---- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/radio/src/translations/tts_es.cpp b/radio/src/translations/tts_es.cpp index 260c7dda3..4161fc462 100644 --- a/radio/src/translations/tts_es.cpp +++ b/radio/src/translations/tts_es.cpp @@ -168,11 +168,9 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT) seconds = -seconds; } - uint8_t ore = 0; uint8_t tmp = seconds / 3600; seconds %= 3600; if (tmp > 0 || IS_PLAY_TIME()) { - ore = tmp; if (tmp > 1) { PLAY_NUMBER(tmp, 0, 0); PUSH_UNIT_PROMPT(UNIT_HOURS, 1); @@ -185,18 +183,15 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT) tmp = seconds / 60; seconds %= 60; - if (tmp > 0 || ore >0) { + if (tmp > 0 ) { if (tmp != 1) { PLAY_NUMBER(tmp, 0, 0); PUSH_UNIT_PROMPT(UNIT_MINUTES, 1); } else { - PUSH_NUMBER_PROMPT(ES_PROMPT_UNA); + PUSH_NUMBER_PROMPT(ES_PROMPT_UN); PUSH_UNIT_PROMPT(UNIT_MINUTES, 0); } - if (seconds > 0) { - PUSH_NUMBER_PROMPT(ES_PROMPT_Y); - } } if (seconds > 0) { @@ -205,7 +200,7 @@ I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT) PUSH_UNIT_PROMPT(UNIT_SECONDS, 1); } else { - PUSH_NUMBER_PROMPT(ES_PROMPT_UNA); + PUSH_NUMBER_PROMPT(ES_PROMPT_UN); PUSH_UNIT_PROMPT(UNIT_SECONDS, 0); } } diff --git a/radio/util/tts_es.py b/radio/util/tts_es.py index e4de3aea4..380d40ace 100755 --- a/radio/util/tts_es.py +++ b/radio/util/tts_es.py @@ -45,9 +45,9 @@ for i, (s, f) in enumerate([("Voltio","volt0"), ("radianes ", "rad0"), ("mililitro", "ml0"), ("onzas", "founce0"), - ("horas", "hour0"), - ("minutos", "minute0"), - ("segundos", "second0"), + ("hora", "hour0"), ("horas", "hour1"), + ("minuto", "minute0"), ("minutos", "minute1"), + ("segundo", "second0"), ("segundos", "second1"), ]): systemSounds.append((s, filename(f, PROMPT_SYSTEM_BASE + 122 + i))) for s, f, a in [("me tienes abandonada", "inactiv", 486), @@ -110,4 +110,4 @@ for i, (s, f) in enumerate([("tren arriba.", "gearup"), ("fase de vuelo 8", "fltmd8"), ("fase de vuelo 9", "fltmd9"), ]): - sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i))) + sounds.append((s, filename(f, PROMPT_CUSTOM_BASE + i))) \ No newline at end of file