Code: Select all
spVoice1 := ComObjCreate("SAPI.SpVoice")
spVoice1.Volume := 100
spVoice1.Rate := -3
spVoice1.Voice := spVoice1.GetVoices().Item(0) ; Voice 1
spVoice1.AllowAudioOutputFormatChangesOnNextSet := 1
spVoice2 := ComObjCreate("SAPI.SpVoice")
spVoice2.Volume := 50
spVoice2.Rate := 1
spVoice2.Voice := spVoice2.GetVoices().Item(4) ; Voice 2
spVoice2.AllowAudioOutputFormatChangesOnNextSet := 1
; works fine:
SpVoice1.Speak("This is the voice of Brian.")
SpVoice2.Speak("This is the voice of Sally.")
strWav := "Test.wav"
spStream := ComObjCreate("SAPI.SpFileStream")
SpStream.Open(strWav,3,1) ; Error