Welcome to GotSpeech.NET Sign in | Join | Help

Clearing the Cache on the Speech Server with a Script

When I am doing testing and changes on the Speech Server instead of my local development box I want to hear the changes that I make right away on the next test call.  You can clear cached resources through the MMC plug in but it involves several right clicks to clear both the SES and TAS.  Here is a little script that will clear the cache of both the SES and TAS of the localhost.  Just put the following script in a clearcache.vbs file then create a clearcache.bat file and call the .vbs file by calling cscript.exe vbfile.vbs. Then you can just double click on the clearcache.bat file and your cache is cleared!  To find other helpful Speech Server WMI scripts just look in the MSS.chm file and search for WMI.

 

clearcache.vbs:

strHostname = "localhost"

' Create an instance of the SES class.

Set objSpeechServer = GetObject("winmgmts:\\" & strHostname & "\root\MSS:SES=@")

' Call the method. intValue = objSpeechServer.InvalidateCache ' Display the return value. WScript.Echo intValue strHostname = "localhost" ' Create an instance of the TAS class. Set objSpeechServer = GetObject("winmgmts:\\" & strHostname & "\root\MSS:TAS=@")

' Call the method. intValue = objSpeechServer.InvalidateCache ' Display the return value. WScript.Echo intValue

clearcache.bat

cscript.exe clearcache.vbs

Technorati Tags:
Published Sunday, August 27, 2006 9:40 PM by brandontyler
Filed under:

Comments

# re: Clearing the Cache on the Speech Server with a Script

Thanks for posting this -- I'm all for less clicking!
Wednesday, August 30, 2006 1:17 PM by Chris Jansen
Anonymous comments are disabled