x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Running SAPI on separate thread

Hi guys I am working on a POC for a VR retail store and AI assistant. It is my first time programming for Rift with UE4 and I am having difficulties working out how to run the actor that speaks through SAPI at the begging of the program in a separate thread. Basically what is happening is when the actor loads, SAPI says a few words but it basically freezes the thread, so there is a white screen whilst the speaking happens, and then it loads the rest of the program once the speaking stops. Code can be found below and also a video of it happening.

Would be really cool if someone can point me to docs / examples on how to resolve this or can offer any advice, thanks in advance guys.

https://www.youtube.com/watch?v=tiImtJB7Py4

https://github.com/iotJumpway/Oculus-Examples/blob/master/Rift/vrAIretail/Source/vrAIretail/TOA.h https://github.com/iotJumpway/Oculus-Examples/blob/master/Rift/vrAIretail/Source/vrAIretail/TOA.cpp

Product Version: UE 4.19
Tags:
more ▼

asked Sep 03 '18 at 08:53 PM in C++ Programming

avatar image

AdamMiltonBarker
1 1

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I solved the blocking issue very easily in the end :D I wrapped the SAPI code in a function and used the following one liner (Where welcome is the custom SAPI function), now there is an issue where the speech is only coming out of the laptop and not the headset, will update this post once I solve that.

 // Called when the game starts or when spawned
 void ATOA::BeginPlay()
 {
     Super::BeginPlay();
     TFuture<void> A = Async<void>(EAsyncExecution::Thread, welcome);
 }
more ▼

answered Sep 03 '18 at 11:38 PM

avatar image

AdamMiltonBarker
1 1

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question