Trying to play system sound after resuming recognition

Home Forums OpenEars Trying to play system sound after resuming recognition

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

  • Author
    Posts
  • #1026766
    ios.ninja
    Participant

    I’d like to play a system sound after a certain hypothesis detected, so I wrote:
    [[OEPocketsphinxController sharedInstance] suspendRecognition];

    And then in pocketsphinxDidSuspendRecognition I wrote:

    AudioServicesPlaySystemSound(1007);
    [[OEPocketsphinxController sharedInstance] resumeRecognition];

    but no sound is played. How could I do this?

    Thanks in advance

    #1026770
    Halle Winkler
    Politepix

    Welcome,

    The audio session category that OpenEars uses has the unintended side-effect of suppressing system sounds, so you can either play your sounds in an AVAudioPlayer, which will work fine, or set OEPocketsphinxController’s AudioMode to VoiceChat in order to play back system sounds (changing the audio mode can also have some side-effects, so test it out).

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