Jump to content

SR and TTS


Recommended Posts

  • 3 weeks later...

Help! I need function which will start/end SR or speech text. Is that possible?

i542

download voiceflux pro for SR.. actual file is... VoiceFluxPro_Setup_en_3.1.114.exe

might be a new version. This is a standalone and you wont need autoit for SR but search the forums for some coding .

Also...Search forums for _Talk functions and speech. Plenty of help in there!!!

Link to comment
Share on other sites

Help! I need function which will start/end SR or speech text. Is that possible?

i542

Don't know about complete screen reader functionality, but the following was generated by following conversations in the forum on SAPI:

; ==> Commented out other voices not present by default
; _Speak("My name is Microsoft Mary. Rate is negative ten.", -10, 100, "Microsoft Mary")
; Sleep(1000)
; _Speak("My name is Microsoft Mike. Rate is zero.", 0, 100, "Microsoft Mike")
; Sleep(1000)
_Speak("My name is Microsoft Sam. Rate is ten.", 10, 100, "Microsoft Sam")
Sleep(1000)
; _Speak("My name is Microsoft Mary. Volume is thirty three.", 0, 33, "Microsoft Mary")
; Sleep(1000)
; _Speak("My name is Microsoft Mike. Volume is sixty seven.", 0, 67, "Microsoft Mike")
;Sleep(1000)
_Speak("My name is Microsoft Sam. Volume is one hundred.", 0, 100, "Microsoft Sam")

; ---------------------------
;   Function _Speak()
;       Voice text reader using native SAPI
;   Call with _Speak($sText, $iRate, $iVol, $sVoice) where:
;       $sText = The text to read
;       $iRate = (optional) the rate at which to read, 10=fastest, 0=normal (default), -10=slowest
;       $iVol = Volume from 0 to 100 (default = 100, full)
;       $sVoice = Name of the voice to use, by default only "Microsoft Sam" is loaded,
;           optional voices like "Microsoft Mary" or "Microsoft Mike" may be present
;   On success returns 1
;   On fail returns 0 and:
;       @Error = 1, parameter error
;       @Error = 2, object creation error
;       @Error = 3, speaking error
; ---------------------------
Func _Speak($sText, $iRate = 1, $iVol = 100, $sVoice = "Microsoft SAM")
    If IsString($sText) And IsNumber($iRate) And $iVol <= 100 And IsString($sVoice) Then
        Local $objSpeech = ObjCreate ("Sapi.SpVoice")
        If @error = 0 Then
            $ObjSpeech.Voice = $objSpeech.GetVoices ("Name=" & $sVoice).Item (0)
            $objSpeech.Rate = $iRate
            $objSpeech.Volume = $iVol
            $objSpeech.Speak ($sText)
            If @error = 0 Then
                Return 1
            Else
                Return SetError(3, 0, 0)
            EndIf
        Else
            Return SetError(2, 0, 0)
        EndIf
    Else
        Return SetError(1, 0, 0)
    EndIf
EndFunc   ;==>_Speak

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...