How to Speed Up Performance of ISpVoice?2019 Community Moderator ElectionHow do you set, clear, and toggle a single bit?How do I iterate over the words of a string?How can I profile C++ code running on Linux?Hang problem in webControl and SAPI in C#C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?Why does changing 0.1f to 0 slow down performance by 10x?SendInput sends “num8” when I want to send “vk_up” ? How come?Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviationsHow do I stop a delay-loaded DLL from throwing a “missing from your computer” system error?Does the C++ standard allow for an uninitialized bool to crash a program?

How do you justify more code being written by following clean code practices?

DisplayForm problem with pi in FractionBox

Justification failure in beamer enumerate list

CLI: Get information Ubuntu releases

Unfrosted light bulb

Nested Dynamic SOQL Query

Homology of the fiber

Have the tides ever turned twice on any open problem?

PTIJ: Which Dr. Seuss books should one obtain?

Do people actually use the word "kaputt" in conversation?

Do I need an EFI partition for each 18.04 ubuntu I have on my HD?

If I cast the Enlarge/Reduce spell on an arrow, what weapon could it count as?

PTIJ: At the Passover Seder, is one allowed to speak more than once during Maggid?

Determine voltage drop over 10G resistors with cheap multimeter

When should a starting writer get his own webpage?

How are passwords stolen from companies if they only store hashes?

Why is participating in the European Parliamentary elections used as a threat?

Fair way to split coins

Why didn’t Eve recognize the little cockroach as a living organism?

Isn't the word "experience" wrongly used in this context?

Weird lines in Microsoft Word

Print a physical multiplication table

What kind of footwear is suitable for walking in micro gravity environment?

Norwegian Refugee travel document



How to Speed Up Performance of ISpVoice?



2019 Community Moderator ElectionHow do you set, clear, and toggle a single bit?How do I iterate over the words of a string?How can I profile C++ code running on Linux?Hang problem in webControl and SAPI in C#C++11 introduced a standardized memory model. What does it mean? And how is it going to affect C++ programming?Why does changing 0.1f to 0 slow down performance by 10x?SendInput sends “num8” when I want to send “vk_up” ? How come?Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviationsHow do I stop a delay-loaded DLL from throwing a “missing from your computer” system error?Does the C++ standard allow for an uninitialized bool to crash a program?










0















I am trying to build a game menu that reads the highlighted text using ISpVoice and keyboard.



My problem is that there is a delay whenever I change the highlighted text using the keyboard. This only happens when I use ISpVoice.



tts->Speak(myWstring.c_str(), SPF_PURGEBEFORESPEAK | SPF_ASYNC, 0);


I tried the above code but still there is a lag.



tts->Speak(myWstring.c_str(), SPF_ASYNC, 0);


the above code works but I want it to immediate stop whenever I want to change the highlighted text.










share|improve this question






















  • Have you tried calling ISpVoice::Pause() before speaking new text?

    – Remy Lebeau
    Mar 7 at 1:29












  • I tried calling the functions but it resumes only when ISpVoice::Resume() is called. It goes silent if ISpVoice::Pause() is only called.

    – Alzer Casiño
    Mar 7 at 3:08











  • So, Pause()'ing the current voice, Speak()'ing the new text with purge, and then Resume()'ing doesn't work?

    – Remy Lebeau
    Mar 7 at 3:14











  • I tried it. Performance is better but it still lags when the tts almost finishes the sentence.

    – Alzer Casiño
    Mar 7 at 3:22











  • I think it lags when the thread finishes.

    – Alzer Casiño
    Mar 7 at 3:28















0















I am trying to build a game menu that reads the highlighted text using ISpVoice and keyboard.



My problem is that there is a delay whenever I change the highlighted text using the keyboard. This only happens when I use ISpVoice.



tts->Speak(myWstring.c_str(), SPF_PURGEBEFORESPEAK | SPF_ASYNC, 0);


I tried the above code but still there is a lag.



tts->Speak(myWstring.c_str(), SPF_ASYNC, 0);


the above code works but I want it to immediate stop whenever I want to change the highlighted text.










share|improve this question






















  • Have you tried calling ISpVoice::Pause() before speaking new text?

    – Remy Lebeau
    Mar 7 at 1:29












  • I tried calling the functions but it resumes only when ISpVoice::Resume() is called. It goes silent if ISpVoice::Pause() is only called.

    – Alzer Casiño
    Mar 7 at 3:08











  • So, Pause()'ing the current voice, Speak()'ing the new text with purge, and then Resume()'ing doesn't work?

    – Remy Lebeau
    Mar 7 at 3:14











  • I tried it. Performance is better but it still lags when the tts almost finishes the sentence.

    – Alzer Casiño
    Mar 7 at 3:22











  • I think it lags when the thread finishes.

    – Alzer Casiño
    Mar 7 at 3:28













0












0








0








I am trying to build a game menu that reads the highlighted text using ISpVoice and keyboard.



My problem is that there is a delay whenever I change the highlighted text using the keyboard. This only happens when I use ISpVoice.



tts->Speak(myWstring.c_str(), SPF_PURGEBEFORESPEAK | SPF_ASYNC, 0);


I tried the above code but still there is a lag.



tts->Speak(myWstring.c_str(), SPF_ASYNC, 0);


the above code works but I want it to immediate stop whenever I want to change the highlighted text.










share|improve this question














I am trying to build a game menu that reads the highlighted text using ISpVoice and keyboard.



My problem is that there is a delay whenever I change the highlighted text using the keyboard. This only happens when I use ISpVoice.



tts->Speak(myWstring.c_str(), SPF_PURGEBEFORESPEAK | SPF_ASYNC, 0);


I tried the above code but still there is a lag.



tts->Speak(myWstring.c_str(), SPF_ASYNC, 0);


the above code works but I want it to immediate stop whenever I want to change the highlighted text.







c++ winapi sapi






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 23:08









Alzer CasiñoAlzer Casiño

13




13












  • Have you tried calling ISpVoice::Pause() before speaking new text?

    – Remy Lebeau
    Mar 7 at 1:29












  • I tried calling the functions but it resumes only when ISpVoice::Resume() is called. It goes silent if ISpVoice::Pause() is only called.

    – Alzer Casiño
    Mar 7 at 3:08











  • So, Pause()'ing the current voice, Speak()'ing the new text with purge, and then Resume()'ing doesn't work?

    – Remy Lebeau
    Mar 7 at 3:14











  • I tried it. Performance is better but it still lags when the tts almost finishes the sentence.

    – Alzer Casiño
    Mar 7 at 3:22











  • I think it lags when the thread finishes.

    – Alzer Casiño
    Mar 7 at 3:28

















  • Have you tried calling ISpVoice::Pause() before speaking new text?

    – Remy Lebeau
    Mar 7 at 1:29












  • I tried calling the functions but it resumes only when ISpVoice::Resume() is called. It goes silent if ISpVoice::Pause() is only called.

    – Alzer Casiño
    Mar 7 at 3:08











  • So, Pause()'ing the current voice, Speak()'ing the new text with purge, and then Resume()'ing doesn't work?

    – Remy Lebeau
    Mar 7 at 3:14











  • I tried it. Performance is better but it still lags when the tts almost finishes the sentence.

    – Alzer Casiño
    Mar 7 at 3:22











  • I think it lags when the thread finishes.

    – Alzer Casiño
    Mar 7 at 3:28
















Have you tried calling ISpVoice::Pause() before speaking new text?

– Remy Lebeau
Mar 7 at 1:29






Have you tried calling ISpVoice::Pause() before speaking new text?

– Remy Lebeau
Mar 7 at 1:29














I tried calling the functions but it resumes only when ISpVoice::Resume() is called. It goes silent if ISpVoice::Pause() is only called.

– Alzer Casiño
Mar 7 at 3:08





I tried calling the functions but it resumes only when ISpVoice::Resume() is called. It goes silent if ISpVoice::Pause() is only called.

– Alzer Casiño
Mar 7 at 3:08













So, Pause()'ing the current voice, Speak()'ing the new text with purge, and then Resume()'ing doesn't work?

– Remy Lebeau
Mar 7 at 3:14





So, Pause()'ing the current voice, Speak()'ing the new text with purge, and then Resume()'ing doesn't work?

– Remy Lebeau
Mar 7 at 3:14













I tried it. Performance is better but it still lags when the tts almost finishes the sentence.

– Alzer Casiño
Mar 7 at 3:22





I tried it. Performance is better but it still lags when the tts almost finishes the sentence.

– Alzer Casiño
Mar 7 at 3:22













I think it lags when the thread finishes.

– Alzer Casiño
Mar 7 at 3:28





I think it lags when the thread finishes.

– Alzer Casiño
Mar 7 at 3:28












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55033630%2fhow-to-speed-up-performance-of-ispvoice%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55033630%2fhow-to-speed-up-performance-of-ispvoice%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved