kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
Hi there,
I want the voice recorded in a female voice. Can someone fix this for me?
I found this on Wikipedia
Thanks
I want the voice recorded in a female voice. Can someone fix this for me?
I found this on Wikipedia
Thanks
Code:
Sub TestStringToWavFile()
Dim sP$, sFN$, sStr$, sFP$
sP = ThisWorkbook.Path & "\work\"
sFN = "Mytest.mp3"
sFP = sP & sFN
sStr = "I want you to speak with a female voice"
StringToWavFile sStr, sFP
End Sub
Function StringToWavFile(sIn$, sPath$) As Boolean
Dim fs As New SpFileStream
Dim Voice As New SpVoice
fs.Format.Type = SAFT22kHz16BitMono
fs.Open sPath, SSFMCreateForWrite, False
Set Voice.AudioOutputStream = fs
Voice.Speak sIn, SVSFDefault
fs.Close
Voice.WaitUntilDone (6000)
Set fs = Nothing
Set Voice.AudioOutputStream = Nothing
StringToWavFile = True
End Function
Last edited: