Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to stop my program untill espeak ends speaking? #123

Open
rezaee opened this issue May 11, 2018 · 0 comments
Open

How to stop my program untill espeak ends speaking? #123

rezaee opened this issue May 11, 2018 · 0 comments

Comments

@rezaee
Copy link

rezaee commented May 11, 2018

Let's consider I have a for(;;) loop, it gets a new string by every iteration, and passes it to system("espeak") like this:


for(;;)
{
   string str = getNewString();
   string str2 = "espeak '" +str+ "'";
   system(str2.c_str());
}

But when the first str passes to espeak it starts to say it, but before it ends the speaking, for loop runs again and passes a new string and it crashes.

I am looking a way, my program pauses the for loop untill the espeak done! Is it possible? How?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant