2

I can hear the text read through my headphones when they are connected. However, if I disconnect headphones it doesn't play at all. How do I turn on speaker for this speech? This is my code:

[syn stopSpeakingAtBoundary:AVSpeechBoundaryImmediate];
syn = [[AVSpeechSynthesizer alloc] init];
syn.delegate = self;
utt = [AVSpeechUtterance  speechUtteranceWithString:rtext];
float speechSpeed = 0.3;
NSLog(@"Read***** text%@",rtext);
[utt setRate:speechSpeed];
utt.volume = 1;
[syn speakUtterance:utt];

Chris Chambers
  • 1,367
  • 21
  • 39
jhoblik
  • 21
  • 3
  • 2
    My son help me to fix issue. My phone was in mode turn off ringing. This setup also turn off speaker for AVSpeechSynthesizer. – jhoblik Dec 06 '13 at 21:55

0 Answers0