summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-08-15 17:22:52 +0000
committerJens Arnold <amiconn@rockbox.org>2008-08-15 17:22:52 +0000
commit9f8654c5e23c69808d2622c5af86e208054caf2e (patch)
tree5ba6f637db0516d6e4ec6698caf1c95f93f92b34 /tools
parentf6224b786034632f5fb3eabb661e6da2834c3297 (diff)
downloadrockbox-9f8654c5e23c69808d2622c5af86e208054caf2e.tar.gz
rockbox-9f8654c5e23c69808d2622c5af86e208054caf2e.zip
Print the actually selected voice in verbose mode, and try to figure out the vendor from the name for SAPI5 L&H voices if there is no vendor attribute.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18289 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/sapi_voice.vbs16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/sapi_voice.vbs b/tools/sapi_voice.vbs
index 50e923340e..4f411de5e0 100644
--- a/tools/sapi_voice.vbs
+++ b/tools/sapi_voice.vbs
@@ -39,7 +39,7 @@ Const STDERR = 2
39Dim oShell, oArgs, oEnv 39Dim oShell, oArgs, oEnv
40Dim oFSO, oStdIn, oStdOut 40Dim oFSO, oStdIn, oStdOut
41Dim bVerbose, bSAPI4, bList 41Dim bVerbose, bSAPI4, bList
42Dim sLanguage, sVoice, sSpeed, sVendor 42Dim sLanguage, sVoice, sSpeed, sName, sVendor
43 43
44Dim oSpVoice, oSpFS ' SAPI5 voice and filestream 44Dim oSpVoice, oSpFS ' SAPI5 voice and filestream
45Dim oTTS, nMode ' SAPI4 TTS object, mode selector 45Dim oTTS, nMode ' SAPI4 TTS object, mode selector
@@ -103,7 +103,10 @@ If bSAPI4 Then
103 nMode = oTTS.Find(sSelectString) 103 nMode = oTTS.Find(sSelectString)
104 If oTTS.LanguageID(nMode) = nLangID And (sVoice = "" Or _ 104 If oTTS.LanguageID(nMode) = nLangID And (sVoice = "" Or _
105 oTTS.Speaker(nMode) = sVoice Or oTTS.ModeName(nMode) = sVoice) Then 105 oTTS.Speaker(nMode) = sVoice Or oTTS.ModeName(nMode) = sVoice) Then
106 If bVerbose Then WScript.StdErr.WriteLine "Using " & sSelectString 106 sName = oTTS.ModeName(nMode)
107 If bVerbose Then
108 WScript.StdErr.WriteLine "Using " & sName & " for " & sSelectString
109 End If
107 Exit For 110 Exit For
108 Else 111 Else
109 sSelectString = "" 112 sSelectString = ""
@@ -151,7 +154,10 @@ Else ' SAPI5
151 End If 154 End If
152 Set oSpVoice.Voice = oSpVoice.GetVoices(sSelectString).Item(0) 155 Set oSpVoice.Voice = oSpVoice.GetVoices(sSelectString).Item(0)
153 If Err.Number = 0 Then 156 If Err.Number = 0 Then
154 If bVerbose Then WScript.StdErr.WriteLine "Using " & sSelectString 157 sName = oSpVoice.Voice.GetAttribute("Name")
158 If bVerbose Then
159 WScript.StdErr.WriteLine "Using " & sName & " for " & sSelectString
160 End If
155 Exit For 161 Exit For
156 Else 162 Else
157 sSelectString = "" 163 sSelectString = ""
@@ -172,6 +178,10 @@ Else ' SAPI5
172 If Err.Number <> 0 Then 178 If Err.Number <> 0 Then
173 Err.Clear 179 Err.Clear
174 sVendor = "(unknown)" 180 sVendor = "(unknown)"
181 ' Some L&H engines don't set the vendor attribute - check the name
182 If Len(sName) > 3 And Left(sName, 3) = "LH " Then
183 sVendor = "L&H"
184 End If
175 End If 185 End If
176 186
177 ' Filestream object for output 187 ' Filestream object for output