You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sorry for I just have a little knowledge about both Python and win32 API.
but I had tried the old PYTTS package and some other code from google, and finnaly can save the wav file, by editing the pyttsx/drivers/sapi5.py as the following:
insert a line self._stream = win32com.client.Dispatch('SAPI.SpFileStream') after self._tts = win32com.client.Dispatch('SAPI.SPVoice') to create a file stream .
and in the function say , add some code around self._tts.Speak(unicode(text), 19) :
it worked, but, my python script never stopped, just suspended, I had try to edit the say function and runAndWait function, failed with my poor knowledge,
maybe somebody can help me?
or maybe some other way to record the tts 's output to wav or mp3 files---I tried to record by pyaudio, but it always recorded the microphone directly.
The text was updated successfully, but these errors were encountered:
I have found a ugly way to record in windows(tested in windows xp), you can see it in the https://github.com/hick/pyttsx 。
if the output wav file is not full, try to modify some code in pyttsx/drivers/sapi5.py, just search this string: "if you wav file is not full, change 5 in the line below to small number for more time to loop"
sorry for I just have a little knowledge about both Python and win32 API.
but I had tried the old PYTTS package and some other code from google, and finnaly can save the wav file, by editing the pyttsx/drivers/sapi5.py as the following:
insert a line
self._stream = win32com.client.Dispatch('SAPI.SpFileStream')
afterself._tts = win32com.client.Dispatch('SAPI.SPVoice')
to create a file stream .and in the function
say
, add some code aroundself._tts.Speak(unicode(text), 19)
:it worked, but, my python script never stopped, just suspended, I had try to edit the
say
function andrunAndWait
function, failed with my poor knowledge,maybe somebody can help me?
or maybe some other way to record the tts 's output to wav or mp3 files---I tried to record by pyaudio, but it always recorded the microphone directly.
The text was updated successfully, but these errors were encountered: