cgunn

Forum Replies Created

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

  • Author
    Posts
  • in reply to: How can I get 'can' pronounced correctly #1015953
    cgunn
    Participant

    Its not that odd. If you think about it, when you say the phrase “i can really do that” you pronounce the ‘can’ in a very short ‘cn’ way (regardless of your accent, I think), and its different with “can of beans”. So I wouldn’t really call it a bug – there is no way to differentiate the two unless you go into the complexity of analysing the context. Anyway, your suggestion of “CAH ANN’ works a treat! And in my app, i am more likely to come across the ‘tin’ can that the other one, so i am happy to go with that pronunciation. Thanks.

    in reply to: ConvertInput error in pocketsphinxDidReceiveHypothesis #13605
    cgunn
    Participant

    Thanks for this answer – I’m sure you are right – there must have been some memory corruption somewhere that was causing this side effect. I have now completely rewritten my app and have not (yet!) seen the problem.

    in reply to: ConvertInput error in pocketsphinxDidReceiveHypothesis #11614
    cgunn
    Participant

    I’ve now discovered that it seems to be to do with having 2 OpenEarsEventsObserverDelegates in the system. I had my main ViewController as an OpenEarsEventsObserverDelegate so that it can change the user interface when fliteController output starts and stops. i also had another class, Speech, as a second OpenEarsEventsObserverDelegate so that it can process the speech. In my view controller, if i set the delegate to ‘this’, the error occurs, but if i omit that line (leaving only one delegate in the system – the Speech class), the error does not occur. So i think i can reorganise my code to have only one delegate and have it inform the other class of the OpenEars events when they occur.

    in reply to: ConvertInput error in pocketsphinxDidReceiveHypothesis #11613
    cgunn
    Participant

    Also, the above output is followed by the line

    2012-10-14 16:15:29.380 RR[68064:c07] Flite sending interrupt speech request.

    before returning to the main loop.

    And to complicate it a bit more, i have now removed the inheritance from AVAudioPlayerDelegate, which fixed the problem yesterday, but now i am still getting the error – so it may not have been the cause.

    in reply to: ConvertInput error in pocketsphinxDidReceiveHypothesis #11610
    cgunn
    Participant

    OK, I’ve done what you suggested, but first, something didn’t paste correctly in my earlier message, because it got the angle brackets confused with html brackets. The line
    @interface Speech : NSObject
    should have shown as

    @interface Speech : NSObject {OpenEarsEventsObserverDelegate, AVAudioPlayerDelegate}

    (except replace the braces with angle brackets).

    A search for AudioSession revealed the two methods: audioSessionInterruptionDidBegin and audioSessionInterruptionDidEnd, but commenting them out didn’t fix the problem. Here is the output:

    2012-10-14 15:36:19.525 RR[66801:c07] VC Pocketsphinx calibration is complete.
    2012-10-14 15:36:19.526 RR[66801:c07] Speech: Pocketsphinx calibration is complete.
    2012-10-14 15:36:28.107 RR[66801:1f07] Speech detected…
    2012-10-14 15:36:29.864 RR[66801:1f07] Processing speech, please wait…
    2012-10-14 15:36:29.869 RR[66801:1f07] Pocketsphinx heard “START” with a score of (-1557) and an utterance ID of 000000000.
    2012-10-14 15:36:29.870 RR[66801:c07] The received hypothesis is START with a score of -1557 and an ID of 000000000

    — here i make a call to my dummy() function – (void) dummy { NSLog(@”dummy”);} —

    2012-10-14 15:36:40.707 RR[66801:1f07] aq@0x9671000: ConvertInput using invalid anchor time
    Error -66681: Unable to start the Audio Queue.
    2012-10-14 15:36:40.708 RR[66801:1f07] Listening.
    2012-10-14 15:36:40.708 RR[66801:c07] dummy

    in reply to: ConvertInput error in pocketsphinxDidReceiveHypothesis #11605
    cgunn
    Participant

    OK, I’ve discovered something more about this. This error seems to occur because the class that this code is in is both an OpenEarsEventsObserverDelegate and an AVAudioPlayerDelegate.

    @interface Speech : NSObject

    This is because it plays some pre-recorded sound clips as well as fliteController output, and I want to know when the clips are started and finished so i can turn off speech recognition during those sounds.
    If I remove the ‘AVAudioPlayerDelegate’, I seem to be able run consistently without the error occurring.

    Is it valid to have the class as a delegate of both? Could there be some conflict that is causing this error and lock-up?

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