Reply To: NeatSpeech not playing audio after stopping

Home Forums OpenEars plugins NeatSpeech not playing audio after stopping Reply To: NeatSpeech not playing audio after stopping

#1024338
lfoster0
Participant

Thanks for the quick response, I really appreciate it :)

I have only used OpenEars 2.x and I’m initializing the objects in – viewDidLoad.

Here is the code with some more logging:

- (void) toggleAudio {
    NSLog(@"pressed");
    NSLog(@"Audio Enabled: %i",self.audioEnabled);
    if (self.audioEnabled) {
        NSLog(@"saying text: %@", self.currentTrip.trip_description);
        [self.voiceController sayWithNeatSpeech:self.currentTrip.trip_description withVoice:self.voice];
    }
    else {
        [self.voiceController stopSpeaking];
    }
    self.audioEnabled  = !self.audioEnabled;
}

- (void) neatSpeechWillSay:(NSString *)statement {
    NSLog(@"neatSpeechWillSay %@",statement);
}

- (void) fliteDidStartSpeaking {
    NSLog(@"SPEEEEAAKKKINNNGGGGG");
}

- (void) fliteDidFinishSpeaking {
    NSLog(@"DONE SPEAKING");
}

Here is the log from pressing the button 3 times:

So the first time I press it everything is fine:

2015-01-15 14:19:06.773 gyyde[11166:60b] pressed
2015-01-15 14:19:06.789 gyyde[11166:60b] Audio Enabled: 1
2015-01-15 14:19:06.792 gyyde[11166:60b] saying text: The route of the tour can be seen on the above map; we begin by walking out of the civic plaza, along 7th until we reach City Hall and the Cenotaph and the beginning of George Street.  We then walk down George Street until 3rd Avenue.  We follow 3rd avenue for 3 blocks until we reach Brunswick Street.  We walk up Brunswick street until 5th Avenue, back towards the library for one block along 5th, we turn left down Quebec and then right onto 4th Avenue to see a few more historic sites before turning right onto Dominion and heading back to the Civic Plaza and the Library for the end of our tour.
2015-01-15 14:19:06.867 gyyde[11166:60b] SPEEEEAAKKKINNNGGGGG

And then I give it a few seconds to read through things and we have:

2015-01-15 14:19:10.936 gyyde[11166:60b] neatSpeechWillSay The route of the tour can be seen on the above map;
2015-01-15 14:19:13.994 gyyde[11166:60b] neatSpeechWillSay we begin by walking out of the civic plaza,

I press it again and it stops fine, and self.audioEnabled is 0:

2015-01-15 14:19:20.589 gyyde[11166:60b] pressed
2015-01-15 14:19:20.596 gyyde[11166:60b] Audio Enabled: 0

And then pressing it again I get:

2015-01-15 14:19:39.745 gyyde[11166:60b] pressed
2015-01-15 14:19:39.748 gyyde[11166:60b] Audio Enabled: 1
2015-01-15 14:19:39.751 gyyde[11166:60b] saying text: The route of the tour can be seen on the above map; we begin by walking out of the civic plaza, along 7th until we reach City Hall and the Cenotaph and the beginning of George Street.  We then walk down George Street until 3rd Avenue.  We follow 3rd avenue for 3 blocks until we reach Brunswick Street.  We walk up Brunswick street until 5th Avenue, back towards the library for one block along 5th, we turn left down Quebec and then right onto 4th Avenue to see a few more historic sites before turning right onto Dominion and heading back to the Civic Plaza and the Library for the end of our tour.

So self.audioEnabled is true the next time and it still has the correct text to say again. I left it sitting there for a few minutes and nothing happened :(

Thanks!