both voice recogniser & textToVoice same time

Home Forums OpenEars both voice recogniser & textToVoice same time

Viewing 11 posts - 1 through 11 (of 11 total)

  • Author
    Posts
  • #1020154
    meVenkatarao
    Participant

    both aren’t working at the same time on iPhone. I read multithreading is handled on openEars, but one is getting blocked.

    #1020161
    Halle Winkler
    Politepix

    Hello,

    Take a look at the sample app for an example of using them both together.

    #1020222
    meVenkatarao
    Participant

    Hi,
    Thanks! I looked at sample code. At a time I guess only one thread can access audio (please let me know correct thing on this). So I am doing text to voice (big one), & in parallel giving voce input; its not working. I was asking can we have those two operations in parallel.

    Thanks,
    Venkat

    #1020224
    Halle Winkler
    Politepix

    I don’t think they should be blocking each other, but OpenEars suspends listening during TTS so that the TTS speech doesn’t become part of the recognized speech. This shouldn’t be the case when using headphones since the isolation of the mic and audio output from each other means there isn’t the same danger of confused recognition. Is that the issue you’re seeing? If not, I guess I’d need a more detailed clarification of exactly what is happening versus what you’re aiming for.

    #1020231
    meVenkatarao
    Participant

    Question from other thread: Then how can I check if its not blocking (taking) main thread? just to if text to voice & voice recognition could be run in parallel.

    #1020235
    meVenkatarao
    Participant

    Requirement: Text To Voice is in progress; user should be able to interrupt by voice while its reading (text to voice)

    1. You said if I put earphones, it would work as required. Am I understanding it correct?
    2. What about in normal state? Cant be put both operations in parallel?

    Thanks,
    Venkat

    #1020236
    Halle Winkler
    Politepix

    It shouldn’t be necessary to check this because they run in parallel. Can you take a look at my previous reply and describe in more depth what the symptom is that makes it seem like they are blocking each other? Speech recognition in OpenEars is 100% multithreaded and it doesn’t do anything on mainThread but start and send notifications. FliteController may do synthesis on mainThread but that only accounts for the moment of synthesis – all the playback is asynchronous. NeatSpeech doesn’t even do the synthesis on mainThread. So I’d need a bit more information about what the situation you are seeing is that seems like everything is blocking – is it the UI being frozen, and if so, under which circumstances, or is it one of the OpenEars elements not being responsive, and if so, which one and under which circumstances? Or is this because recognition suspends during speech for the reason I explained above?

    #1020237
    Halle Winkler
    Politepix

    OK, that isn’t really about threading so you don’t need a thread-based solution to that issue. Yes, you can interrupt TTS speech using speech recognition if you require the user to use headphones, or you can alter FliteController to not call the methods sendSuspendNotificationOnMainThread and sendResumeNotificationOnMainThread if you want to experiment with what happens when speech recognition doesn’t suspend while the user is using the main speaker.

    #1020272
    meVenkatarao
    Participant

    Thanks for the clarification. Yes! voice recognition is suspended while reading. I have seen that recogniser is picking up what is being read, could that be stopped & without earphones, can it be workable?

    Thanks,
    Venkat

    #1020274
    Halle Winkler
    Politepix

    I don’t recommend doing it because you are always going to encounter the issue that live speech in the same shared audio environment in which you are doing recognition will be attempted to be processed by the recognition engine. You could try to control it using Rejecto, but even in that case you are going to get mixed results, just like if you were just doing speech recognition but two people were talking into it at the same time.

    #1020293
    meVenkatarao
    Participant

    Ok! so not compliable to put both recognition & synthesis. Thanks halle, good responses. You could close the ticket.

    Thanks,
    Venkat

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.