From 5434dd0f31a91e1e2bf00d0f096ec50d534e11fe Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 29 May 2014 12:13:34 +0200 Subject: [PATCH] Avoid SR (as for State Route or Strada Regionale) be pronounced as "Senior" in English tts voice --- OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java | 2 +- OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index 3aab902085..32a1687ad1 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -171,7 +171,7 @@ public class TestVoiceActivity extends SherlockActivity { addButton(ll, "Prepare to turn slighlty left after 850m then bear right", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_LEFT_SL, 850, street(p, "")).then().bearRight(street(p, ""))); addButton(ll, "After 1050m turn sharply left onto 'Hauptstrasse'", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT_SH, 1050, street(p, "Hauptstrasse"))); addButton(ll, "Turn left onto 'Main Street'", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT, street(p, "Main Street"))); - addButton(ll, "Prepare to turn right after 320m onto 'Mini'", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_RIGHT, 320, street(p, "Mini")) ); + addButton(ll, "Prepare to turn right after 320m onto 'SR 80'", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_RIGHT, 320, street(p, "SR 80")) ); addButton(ll, "After 370m turn slightly right onto 'F23' 'Main Street'", builder(p).turn(AbstractPrologCommandPlayer.A_RIGHT_SL, 370, street(p, "Main street", "F23"))); addButton(ll, "Turn sharply right onto 'Main Street' then bear left", builder(p).turn(AbstractPrologCommandPlayer.A_RIGHT_SH, street(p, "Main Street")).then().bearLeft(street(p, ""))); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index 1118ab7d4d..b4ae85b932 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -487,6 +487,9 @@ public class VoiceRouter { if ((player != null) && (!"de".equals(player.getLanguage()))){ pn = pn.replace("\u00df", "ss"); // helps non-German tts voices to pronounce German Strasse (=street) } + if ((player != null) && ("en".equals(player.getLanguage()))){ + pn = pn.replace("SR", "S R"); // Avoid SR (as for State Route or Strada Regionale) be pronounced as "Senior" in English tts voice + } } return pn; }