Re: SAPI Interrupt in Python?

2020-09-10 Thread AudioGames . net Forum — Developers room : philip_bennefall via Audiogames-reflector


  


Re: SAPI Interrupt in Python?

@4:Yes, absolutely.Kind regards,Philip Bennefall

URL: https://forum.audiogames.net/post/569231/#p569231




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: SAPI Interrupt in Python?

2020-09-10 Thread AudioGames . net Forum — Developers room : Nuno via Audiogames-reflector


  


Re: SAPI Interrupt in Python?

Hi Philip, in C ++, can I use more of  these flags with a binary or (|)?

URL: https://forum.audiogames.net/post/569209/#p569209




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: SAPI Interrupt in Python?

2020-09-09 Thread AudioGames . net Forum — Developers room : philip_bennefall via Audiogames-reflector


  


Re: SAPI Interrupt in Python?

To follow up with some more explanation, the flag you want is:SPF_PURGEBEFORESPEAK    = ( 1L << 1 )To explain this notation in case you haven't come across it before, it's basically saying "take the number 1 and shift it one bit to the left". In binary, this gives you the number 2. In short, the actual value you want to pass if you *only* want this one flag, is 2.Kind regards,Philip Bennefall

URL: https://forum.audiogames.net/post/569181/#p569181




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


Re: SAPI Interrupt in Python?

2020-09-09 Thread AudioGames . net Forum — Developers room : philip_bennefall via Audiogames-reflector


  


Re: SAPI Interrupt in Python?

Here is the relevant Microsoft documentation:https://docs.microsoft.com/en-us/previo … 2(v=vs.85)This bitmask would be the second argument to the speak method.In case you don't know how to find the relevant flag values, here they are. I found these in the C/C++ SDK.enum SPEAKFLAGS    {        SPF_DEFAULT    = 0,        SPF_ASYNC    = ( 1L << 0 ) ,        SPF_PURGEBEFORESPEAK    = ( 1L << 1 ) ,        SPF_IS_FILENAME    = ( 1L << 2 ) ,        SPF_IS_XML    = ( 1L << 3 ) ,        SPF_IS_NOT_XML    = ( 1L << 4 ) ,        SPF_PERSIST_XML    = ( 1L << 5 ) ,        SPF_NLP_SPEAK_PUNC    = ( 1L << 6 ) ,        SPF_PARSE_SAPI    = ( 1L << 7 ) ,        SPF_PARSE_SSML    = ( 1L << 8 ) ,        SPF_PARSE_AUTODETECT    = 0,        SPF_NLP_MASK    = SPF_NLP_SPEAK_PUNC,        SPF_PARSE_MASK    = ( SPF_PARSE_SAPI | SPF_PARSE_SSML ) ,        SPF_VOICE_MASK    = ( ( ( ( ( ( ( SPF_ASYNC | SPF_PURGEBEFORESPEAK )  | SPF_IS_FILENAME )  | SPF_IS_XML )  | SPF_IS_NOT_XML )  | SPF_NLP_MASK )  | SPF_PERSIST_XML )  | SPF_PARSE_MASK ) ,        SPF_UNUSED_FLAGS    = ~SPF_VOICE_MASK    }     SPEAKFLAGS;Hope this helps.Kind regards,Philip Bennefall

URL: https://forum.audiogames.net/post/569178/#p569178




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector


SAPI Interrupt in Python?

2020-09-09 Thread AudioGames . net Forum — Developers room : Ty via Audiogames-reflector


  


SAPI Interrupt in Python?

I have SAPI speaking in this Python application. Like the following. from win32com.client import Dispatchspeak = Dispatch("SAPI.SpVoice")And then for speakingspeak.Speak("text")This is being a bit annoying however, if it queues more than one message, E.G. the user does something that SAPI would have to speak, it is spoken after the first finishes. This gets annoying at times. Are there any workarounds for this? I honestly don't want to be using SAPI, but I found no real relyable TTS option in Python. There's GTTS but that has a delay even before speaking.

URL: https://forum.audiogames.net/post/569114/#p569114




-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector