Neatspeech – progress inside a long text

Home Forums OpenEars plugins Neatspeech – progress inside a long text

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

  • Author
    Posts
  • #1015765
    alexbrie
    Participant

    My app currently uses the original flite, adapted for my special needs. I am considering purchasing NeatSpeech in order to improve the voice qualities.

    Basically, I need a granular access to the text fragment currently spoken – I want to visually highlight the current text fragment spoken.

    In my adaptation, a background thread generates the wav for each fragment, while the foreground thread sends it to the audioplayer and highlights the previously generated one.

    NeatSpeech already does this, but without giving me any notification as to which fragment (of the larger text it received) is currently spoken.

    Sure, I could just send NeatSpeech smaller phrases – but then I’d artificially insert delays(caused by voice generating the wav) after each small fragment/sentence – and I don’t want to.

    What I would need is some way to inspect the NSRange for the fragment-currently spoken out of the original large text that I sent to Neat Speech – and be notified when NeatSpeech started speaking a new fragment (a notification that sends a nsrange for the fragment that has just been passed to the audioplayer would fit both needs).

    Also, and this is a question, if the voice is currently saying a big text, calling it again with yet another text will do what? (A – push the new text in the queue for background processing, B – stop the current speech and replace it with the new one or C – none of the above)

    Thanks for your help and guidance
    Alex

    #1015767
    Halle Winkler
    Politepix

    Welcome Alex,

    I’ve gotten multiple requests for information about which queue item is being played, so I’m hearing that and think I am going to try add it as a feature. The way it would work would be to add another OpenEarsEventsObserver callback that states the phrase that is about to be played as an NSString. Will that be granular enough for you? NeatSpeech separates clauses in a long statement and plays them separately, so this would tell you a specific sentence clause that is being played rather than the whole long text. Returning NSRange would be pretty far out of the usual API return value so I don’t think that would work well for most other users, but your feedback on the idea of getting the current queue item that is about to play as an NSString would be valuable.

    To answer your question, NeatSpeech puts the new statement at the end of the queue, meaning you can always send new data and it will just get queued behind what is already there. If you want to clear the queue first, you can send the message stopSpeaking to NeatSpeech before queueing new speech, which will stop it immediately, or send stopSpeakingAfterCurrentItemInQueue and it will finish the current item and then stop, after which you can send more statements.

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