Here is AutoIt Script sample script:
#AutoIt3Wrapper_Icon=tango-icon-theme-0.8.1\16x16\actions\media-record.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; http://tango.freedesktop.org/Icon_Metaphors
Dim $i
Func ConvertTextToWAV($asFN)
Dim $text, $oSPV, $oSPSTRM, $WAV
$oSPV = ObjCreate('SAPI.SpVoice')
$oSPSTRM = ObjCreate('SAPI.SpFileStream')
$text = FileRead($asFN)
$WAV = StringReplace($asFN, '.txt', '.wav')
If FileExists($WAV) Then FileDelete($WAV)
$oSPSTRM.Open($WAV, 3, False)
$oSPV.AudioOutputStream = $oSPSTRM
$oSPV.Speak($text)
$oSPSTRM.Close
EndFunc ;==>TextToWAV
For $i = 1 To $cmdline[0]
ConvertTextToWAV($cmdline[$i])
Next
No comments:
Post a Comment