Play wav file after hypothesis

Home Forums OpenEars Play wav file after hypothesis

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

  • Author
    Posts
  • #1022600
    kelvinKW
    Participant

    Hello!

    Is there any method that can allow OpenEars, after recognition
    , playing a wav/mp3 file after hypothesis?

    Thank you!

    #1022601
    Halle Winkler
    Politepix

    Welcome,

    This is outside of OpenEars’ API since it isn’t intended to be a general-purpose audio toolkit, but you can just play back a WAV using AVAudioPlayer after receiving a hypothesis.

    #1022606
    kelvinKW
    Participant

    Thanks for your answer!

    But how can I modify the source code ?
    Is it modify at self.heardtextview.text?

    #1022607
    Halle Winkler
    Politepix

    You can put AVAudioPlayer playback in – (void) pocketsphinxDidReceiveHypothesis:(NSString *)hypothesis recognitionScore:(NSString *)recognitionScore utteranceID:(NSString *)utteranceID.

    #1022703
    kelvinKW
    Participant

    Sorry, I need another help.

    The situation is that, I want to produce different mp3 sound for each recognition.

    Example is that:

    When pocketsplinx receive hypothesis A, after recognition, it will play
    A.mp3

    When pocketsplinx receive hypothesis B, after recognition, it will play
    B.mp3

    How can I modify the source code to let such happen?

    thank you!

    #1022706
    Halle Winkler
    Politepix

    It’s the same answer as my first answer above. OpenEars doesn’t play audio files, so you don’t have to modify OpenEars’ source code in order to do that. You will put the logic for playing audio files in your own app code, and you can use OpenEars’ API to decide when to trigger that code in your app.

    #1022739
    kelvinKW
    Participant

    “You will put the logic for playing audio files in your own app code, and you can use OpenEars’ API to decide when to trigger that code in your app.”

    Can you explain this with more detail?
    Since I am quite confusing about this.

    thank you

    #1022740
    Halle Winkler
    Politepix

    Hi,

    Sorry, that is getting into more general questions about how to use Objective-C to develop apps. As much as I wish I could assist with those more general questions, I only have the resources to offer help with OpenEars here.

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