summaryrefslogtreecommitdiff
path: root/navit/speech/android/speech_android.c
diff options
context:
space:
mode:
Diffstat (limited to 'navit/speech/android/speech_android.c')
-rw-r--r--navit/speech/android/speech_android.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/navit/speech/android/speech_android.c b/navit/speech/android/speech_android.c
index b76c2c3e9..fb0574166 100644
--- a/navit/speech/android/speech_android.c
+++ b/navit/speech/android/speech_android.c
@@ -36,7 +36,14 @@ struct speech_priv {
static int speech_android_say(struct speech_priv *this, const char *text) {
char *str=g_strdup(text);
jstring string;
- int i;
+ char *tok = str;
+
+ /* Replace hyphens with white spaces, or some Android speech SDK will pronounce "hyphen" */
+ while (*tok) {
+ if (*tok=='-')
+ *tok=' ';
+ tok++;
+ }
string = (*jnienv)->NewStringUTF(jnienv, str);
dbg(lvl_debug,"enter %s",str);