A modern, network-enabled music player platform built on Rockbox technology. rockboxd.tsiry-sandratraina.com
rust deno navidrome airplay libadwaita zig mpris snapcast mpd rockbox audio subsonic
2

Configure Feed

Select the types of activity you want to include in your feed.

rbutil: Get rid of all remnants of SAPI4 TTS support

Change-Id: I89cc53e2ebea273752c119e8c63f7eb36b1f22e0

+60 -136
+60 -134
tools/sapi_voice.vbs
··· 37 37 38 38 Dim oShell, oArgs, oEnv 39 39 Dim oFSO, oStdIn, oStdOut 40 - Dim bVerbose, bSAPI4, bList 40 + Dim bVerbose, bList 41 41 Dim bMSSP 42 42 Dim sLanguage, sVoice, sSpeed, sName, sVendor 43 43 44 44 Dim oSpVoice, oSpFS ' SAPI5 voice and filestream 45 - Dim oTTS, nMode ' SAPI4 TTS object, mode selector 46 45 Dim oVoice ' for traversing the list of voices 47 46 Dim nLangID, sSelectString 48 47 ··· 59 58 bVerbose = (oEnv("V") <> "") 60 59 61 60 Set oArgs = WScript.Arguments.Named 62 - bSAPI4 = oArgs.Exists("sapi4") 63 61 bMSSP = oArgs.Exists("mssp") 64 62 bList = oArgs.Exists("listvoices") 65 63 sLanguage = oArgs.Item("language") 66 64 sVoice = oArgs.Item("voice") 67 65 sSpeed = oArgs.Item("speed") 68 66 67 + ' Create SAPI5 object 68 + If bMSSP Then 69 + Set oSpVoice = CreateObject("speech.SpVoice") 70 + Else 71 + Set oSpVoice = CreateObject("SAPI.SpVoice") 72 + End If 73 + If Err.Number <> 0 Then 74 + WScript.StdErr.WriteLine "Error " & Err.Number _ 75 + & " - could not get SpVoice object." _ 76 + & " SAPI 5 not installed?" 77 + WScript.Quit 1 78 + End If 69 79 70 - If bSAPI4 Then 71 - ' Create SAPI4 ActiveVoice object 72 - Set oTTS = WScript.CreateObject("ActiveVoice.ActiveVoice", "TTS_") 73 - If Err.Number <> 0 Then 74 - Err.Clear 75 - Set oTTS = WScript.CreateObject("ActiveVoice.ActiveVoice.1", "TTS_") 76 - If Err.Number <> 0 Then 77 - WScript.StdErr.WriteLine "Error - could not get ActiveVoice" _ 78 - & " object. SAPI 4 not installed?" 79 - WScript.Quit 1 80 - End If 81 - End If 82 - oTTS.Initialized = 1 83 - 84 - If bList Then 85 - ' Just list available voices for the selected language 86 - For Each nLangID in LangIDs(sLanguage) 87 - For nMode = 1 To oTTS.CountEngines 88 - If oTTS.LanguageID(nMode) = nLangID Then 89 - WScript.StdErr.Write oTTS.ModeName(nMode) & "," 90 - End If 91 - Next 80 + If bList Then 81 + ' Just list available voices for the selected language 82 + For Each nLangID in LangIDs(sLanguage) 83 + sSelectString = "Language=" & Hex(nLangID) 84 + For Each oVoice in oSpVoice.GetVoices(sSelectString) 85 + WScript.StdErr.Write oVoice.GetAttribute("Name") & ";" 92 86 Next 93 - WScript.StdErr.WriteLine 94 - WScript.Quit 0 95 - End If 96 - 97 - ' Select matching voice 98 - For Each nLangID in LangIDs(sLanguage) 99 - sSelectString = "LanguageID=" & nLangID 100 - If sVoice <> "" Then 101 - sSelectString = sSelectString & ";Speaker=" & sVoice _ 102 - & ";ModeName=" & sVoice 103 - End If 104 - nMode = oTTS.Find(sSelectString) 105 - If oTTS.LanguageID(nMode) = nLangID And (sVoice = "" Or _ 106 - oTTS.Speaker(nMode) = sVoice Or oTTS.ModeName(nMode) = sVoice) Then 107 - sName = oTTS.ModeName(nMode) 108 - If bVerbose Then 109 - WScript.StdErr.WriteLine "Using " & sName & " for " & sSelectString 110 - End If 111 - Exit For 112 - Else 113 - sSelectString = "" 114 - End If 115 87 Next 116 - If sSelectString = "" Then 117 - WScript.StdErr.WriteLine "Error - found no matching voice for " _ 118 - & sLanguage & ", " & sVoice 119 - WScript.Quit 1 120 - End If 121 - oTTS.Select nMode 122 - 123 - ' Speed selection 124 - If sSpeed <> "" Then oTTS.Speed = sSpeed 125 - 126 - ' Get vendor information 127 - sVendor = oTTS.MfgName(nMode) 128 - 129 - Else ' SAPI5 130 - ' Create SAPI5 object 131 - If bMSSP Then 132 - Set oSpVoice = CreateObject("speech.SpVoice") 133 - Else 134 - Set oSpVoice = CreateObject("SAPI.SpVoice") 135 - End If 136 - If Err.Number <> 0 Then 137 - WScript.StdErr.WriteLine "Error " & Err.Number _ 138 - & " - could not get SpVoice object." _ 139 - & " SAPI 5 not installed?" 140 - WScript.Quit 1 141 - End If 88 + WScript.StdErr.WriteLine 89 + WScript.Quit 0 90 + End If 142 91 143 - If bList Then 144 - ' Just list available voices for the selected language 145 - For Each nLangID in LangIDs(sLanguage) 146 - sSelectString = "Language=" & Hex(nLangID) 147 - For Each oVoice in oSpVoice.GetVoices(sSelectString) 148 - WScript.StdErr.Write oVoice.GetAttribute("Name") & ";" 149 - Next 150 - Next 151 - WScript.StdErr.WriteLine 152 - WScript.Quit 0 92 + ' Select matching voice 93 + For Each nLangID in LangIDs(sLanguage) 94 + sSelectString = "Language=" & Hex(nLangID) 95 + If sVoice <> "" Then 96 + sSelectString = sSelectString & ";Name=" & sVoice 153 97 End If 154 - 155 - ' Select matching voice 156 - For Each nLangID in LangIDs(sLanguage) 157 - sSelectString = "Language=" & Hex(nLangID) 158 - If sVoice <> "" Then 159 - sSelectString = sSelectString & ";Name=" & sVoice 98 + Set oSpVoice.Voice = oSpVoice.GetVoices(sSelectString).Item(0) 99 + If Err.Number = 0 Then 100 + sName = oSpVoice.Voice.GetAttribute("Name") 101 + If bVerbose Then 102 + WScript.StdErr.WriteLine "Using " & sName & " for " & sSelectString 160 103 End If 161 - Set oSpVoice.Voice = oSpVoice.GetVoices(sSelectString).Item(0) 162 - If Err.Number = 0 Then 163 - sName = oSpVoice.Voice.GetAttribute("Name") 164 - If bVerbose Then 165 - WScript.StdErr.WriteLine "Using " & sName & " for " & sSelectString 166 - End If 167 - Exit For 168 - Else 169 - sSelectString = "" 170 - Err.Clear 171 - End If 172 - Next 173 - If sSelectString = "" Then 174 - WScript.StdErr.WriteLine "Error - found no matching voice for " _ 175 - & sLanguage & ", " & sVoice 176 - WScript.Quit 1 104 + Exit For 105 + Else 106 + sSelectString = "" 107 + Err.Clear 177 108 End If 178 - 179 - ' Speed selection 180 - If sSpeed <> "" Then oSpVoice.Rate = sSpeed 109 + Next 110 + If sSelectString = "" Then 111 + WScript.StdErr.WriteLine "Error - found no matching voice for " _ 112 + & sLanguage & ", " & sVoice 113 + WScript.Quit 1 114 + End If 181 115 182 - ' Get vendor information, protect from missing attribute 183 - sVendor = oSpVoice.Voice.GetAttribute("Vendor") 184 - If Err.Number <> 0 Then 185 - Err.Clear 186 - sVendor = "(unknown)" 187 - ' Some L&H engines don't set the vendor attribute - check the name 188 - If Len(sName) > 3 And Left(sName, 3) = "LH " Then 189 - sVendor = "L&H" 190 - End If 116 + ' Speed selection 117 + If sSpeed <> "" Then oSpVoice.Rate = sSpeed 118 + ' Get vendor information, protect from missing attribute 119 + sVendor = oSpVoice.Voice.GetAttribute("Vendor") 120 + If Err.Number <> 0 Then 121 + Err.Clear 122 + sVendor = "(unknown)" 123 + ' Some L&H engines don't set the vendor attribute - check the name 124 + If Len(sName) > 3 And Left(sName, 3) = "LH " Then 125 + sVendor = "L&H" 191 126 End If 192 - 193 - ' Filestream object for output 194 - Set oSpFS = CreateObject("SAPI.SpFileStream") 195 - oSpFS.Format.Type = AudioFormat(sVendor) 196 127 End If 128 + 129 + ' Filestream object for output 130 + Set oSpFS = CreateObject("SAPI.SpFileStream") 131 + oSpFS.Format.Type = AudioFormat(sVendor) 197 132 198 133 Do 199 134 aLine = Split(oStdIn.ReadLine, vbTab, 2) ··· 211 146 aData = Split(aLine(1), vbTab, 2) 212 147 If bVerbose Then WScript.StdErr.WriteLine "Saying " & aData(1) _ 213 148 & " in " & aData(0) 214 - If bSAPI4 Then 215 - oTTS.FileName = aData(0) 216 - oTTS.Speak aData(1) 217 - While oTTS.Speaking 218 - WScript.Sleep 1 219 - Wend 220 - oTTS.FileName = "" 221 - Else 222 - oSpFS.Open aData(0), SSFMCreateForWrite, false 223 - Set oSpVoice.AudioOutputStream = oSpFS 224 - oSpVoice.Speak aData(1) 225 - oSpFS.Close 226 - End If 149 + oSpFS.Open aData(0), SSFMCreateForWrite, false 150 + Set oSpVoice.AudioOutputStream = oSpFS 151 + oSpVoice.Speak aData(1) 152 + oSpFS.Close 227 153 Case "EXEC" 228 154 If bVerbose Then WScript.StdErr.WriteLine "> " & aLine(1) 229 155 oShell.Run aLine(1), 0, true
-1
utils/rbutilqt/base/rbsettings.cpp
··· 74 74 { RbSettings::EncoderPath, ":encoder:/encoderpath", "" }, 75 75 { RbSettings::EncoderOptions, ":encoder:/encoderoptions", "" }, 76 76 { RbSettings::CacheDisabled, "cachedisable", "false" }, 77 - { RbSettings::TtsUseSapi4, "sapi/useSapi4", "false" }, 78 77 { RbSettings::EncoderNarrowBand, ":encoder:/narrowband", "false" }, 79 78 { RbSettings::WavtrimThreshold, "wavtrimthreshold", "500"}, 80 79 { RbSettings::TtsSpeed, ":tts:/speed", "175" },
-1
utils/rbutilqt/base/rbsettings.h
··· 70 70 EncoderComplexity, 71 71 TtsSpeed, 72 72 CacheDisabled, 73 - TtsUseSapi4, 74 73 EncoderNarrowBand, 75 74 EncoderQuality, 76 75 EncoderVolume,