Playing a pre-recorded sound before synthesized speech.

Home Forums OpenEars Playing a pre-recorded sound before synthesized speech.

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

  • Author
    Posts
  • #14068
    MB
    Participant

    Hi,

    Is it possible to play a pre-recorded sound before playing synthesized speech?
    This is what I’ve figured out so far.

    I can create an OpenEarsEventsObserver object and set the delegate to object which implements.

    – (void) fliteDidStartSpeaking;

    However how do I used this callback method to insert/play pre recorded sound before synthesized speech.

    Thanks,

    –MB.

    #14144
    Halle Winkler
    Politepix

    Hello,

    You can play a sound whenever you like using standard AVAudioPlayer methods and their delegates. Just initiate speech once the AVAudioPlayer delegate method audioPlayerDidFinishPlaying:successfully: returns.

    #14187
    MB
    Participant

    Thanks for the response.
    I want to play the sound before synthesized speech starts playing. Is that possible? The ‘audioPlayerDidFinishPlaying:successfully:’ would only allow audio to be inserted afterwards.

    #14189
    Halle Winkler
    Politepix

    Hello,

    The ‘audioPlayerDidFinishPlaying:successfully:’ would only allow audio to be inserted afterwards.

    Only if you start playing the AVAudioPlayer sound after the speech returns the OpenEarsEventsObserver method. If you initiate the speech as a result of the audioPlayerDidFinishPlaying:successfully: method of a sound that you play using AVAudioPlayer being called, the sound will precede the speech.

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