-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
macOS: speak() doesn't work and libraries aren't copied over #16
Comments
Hi, our voice over implementation requires that a window be shown in order to produce speech. This is a limitation of Apple's API and not something we can easily work around in the short term. Can you please try showing a window first and make sure it displays before speaking text? |
don't use voiceover for speech output, queueing isn't working there because apple is apple |
You can see src/macos.mm to see how we got around that lack of queuing issue, it works in all basic scenarios where several speech events are sent in a constant stream. The fix we applied does not of course make it work entirely E. only queued events within 10ms of each other can speak properly, but it is actually enough to be quite usable in most games that don't just randomly speak things. I wouldn't even use that accept apparently AVSpeech broke whatever option lets you use the user's current voice over settings. We still plan to wrap AVSpeech (just have not gotten to it yet), however we want to keep voice over support working which will give users the option of their current VO settings with slightly broken speech queuing, or else not use their screen reader settings while having working non-interrupting speech events by selecting AVSpeech. So in short, neither are ideal. The result is that we plan to implement both, but have only gotten around to one of them so far. |
I don't know C/C++ so I can't help. |
That is not helpful without extra information, an example, something. Creating a window on macOS has worked for everybody thus far. What didn't work, creating a window or speaking with VO? Was the window showing on screen by the time the text spoke?
This of course won't work because the window can't even show before the application exits. Thus, are you speaking text from within the context of a game E. showing a window and speaking in response to a keypress or something? |
I also add wait to wait 5 ms, I use it in the main context, without any key presses |
Yeah that's why, the VO speech really does only work in a game context. You need to actually open a loop and wait for the window to focus, then and only then will VO speak text. The window will absolutely not appear within 5ms after the show_window call, not even 100ms after. You need to create a loop and wait for the user to press escape, then you can speak. As an example, right now if I run stw on macos, the main menu text is not spoken because the main menu launches before VO registers the existence of the new window. Once VO tells me that I'm in the Survive the Wild window though, I can then safely up and down arrow through my main menu and get consistent speech. |
Here, does this break for you in any way? I apologize for any compilation errors as I wrote the code specifically for the issue here.
|
|
ah ah ok |
@patricus3 LOL, I think that @samtupy said stw for MakOS as an example for you to understand the point, There is currently no STW for MakOs. |
We can talk about anything stw beta related outside of NVGT's github issues as: 1, that could quickly get off topic and 2, if you ask for the stw beta and I give it to you, others will do the same and soon loads of people will be asking for a beta that I have obviously chosen to not release yet. Thanks for the interest though, I'm certainly excited to get to a release ready point with that! |
hi.
I tried to use nvgt and wrote some code, just for testing purposes, everything compiles fine, I can't run it until I put necessary libraries into the folder though, and also there's an issue with the speak() function.
The text was updated successfully, but these errors were encountered: