summaryrefslogtreecommitdiffstats
path: root/pico/tts
diff options
context:
space:
mode:
authorCharles Chen <clchen@google.com>2009-07-17 18:02:16 -0700
committerCharles Chen <clchen@google.com>2009-07-17 18:02:16 -0700
commit474a319cfd410d4bbc5c76d0b382348181f499b8 (patch)
treedaeb8ce14d310f276975a8c1aee4b43e5ebfffce /pico/tts
parentde0498d852dc3f1517989ffa06593aa67f8b5d80 (diff)
downloadexternal_svox-474a319cfd410d4bbc5c76d0b382348181f499b8.zip
external_svox-474a319cfd410d4bbc5c76d0b382348181f499b8.tar.gz
external_svox-474a319cfd410d4bbc5c76d0b382348181f499b8.tar.bz2
Workaround to enable the default volume to be adjusted.
Modifying the SSML volume definitions to match the default volume.
Diffstat (limited to 'pico/tts')
-rw-r--r--pico/tts/com_svox_picottsengine.cpp9
-rwxr-xr-xpico/tts/svox_ssml_parser.cpp10
2 files changed, 12 insertions, 7 deletions
diff --git a/pico/tts/com_svox_picottsengine.cpp b/pico/tts/com_svox_picottsengine.cpp
index 5e530b2..ea1b6ea 100644
--- a/pico/tts/com_svox_picottsengine.cpp
+++ b/pico/tts/com_svox_picottsengine.cpp
@@ -455,11 +455,16 @@ static char * doAddProperties( const char * str )
textlen += strlen(PICO_SPEED_CLOSE_TAG);
hasspeed = 1;
}
- if (picoProp_currVolume != PICO_DEF_VOLUME) { /* non-default volume */
+
+ // Always set the volume for now - this is to work around not being able
+ // to change the default volume.
+ // TODO: Fix the underlying problem so that default volume as defined by
+ // PICO_DEF_VOLUME is respected.
+ //if (picoProp_currVolume != PICO_DEF_VOLUME) { /* non-default volume */
textlen += strlen(PICO_VOLUME_OPEN_TAG) + 5;
textlen += strlen(PICO_VOLUME_CLOSE_TAG);
hasvol = 1;
- }
+ //}
/* Compose the property strings. */
data = (char *) malloc( textlen ); /* allocate string */
diff --git a/pico/tts/svox_ssml_parser.cpp b/pico/tts/svox_ssml_parser.cpp
index 38d2f80..cc64d51 100755
--- a/pico/tts/svox_ssml_parser.cpp
+++ b/pico/tts/svox_ssml_parser.cpp
@@ -32,11 +32,11 @@
#define SSML_RATE_FAST "250"
#define SSML_RATE_XFAST "500"
#define SSML_VOLUME_SILENT "0"
-#define SSML_VOLUME_XLOW "20"
-#define SSML_VOLUME_LOW "60"
-#define SSML_VOLUME_MEDIUM "100"
-#define SSML_VOLUME_LOUD "300"
-#define SSML_VOLUME_XLOUD "450"
+#define SSML_VOLUME_XLOW "25"
+#define SSML_VOLUME_LOW "70"
+#define SSML_VOLUME_MEDIUM "250"
+#define SSML_VOLUME_LOUD "350"
+#define SSML_VOLUME_XLOUD "500"
#define SSML_BREAK_NONE "0ms"
#define SSML_BREAK_XWEAK "100ms"
#define SSML_BREAK_WEAK "300ms"