CocoaPods trunk is moving to be read-only. Read more on the blog, there are 12 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Jul 2015 |
Maintained by Quentin Hayot.
Queue management system for AVSpeechSynthesizer
Drop QHSpeechSyntesizerQueue.h and QHSpeechSyntesizerQueue.m in your project, then
#import "QHSpeechSyntesizerQueue.h"QHSpeechSyntesizerQueue *syntesizerQueue = [[QHSpeechSyntesizerQueue alloc] init];[syntesizerQueue readLast:@"This message will be added to the end of the queue" withLanguage:@"en_US" andRate:@"0.2"];[syntesizerQueue readNext:@"This message will be read next" withLanguage:@"en_US" andRate:@"0.2" andClearQueue:NO];If you set andClearQueue: to YES, the queue will be cleared and this will be the last message to be read.
[syntesizerQueue readImmediately:@"This message will be read next" withLanguage:@"en_US" andRate:@"0.2" andClearQueue:NO];If you set andClearQueue: to YES, the queue will be cleared and this will be the last message to be read.
Stop the queue's playback and clear the queue immediately.
[syntesizerQueue stop];Stop the queue's playback and clear the queue. If something is currently being read, it will stop afterwards.
[syntesizerQueue stopAfterCurrent];Pause the queue's playback immediately.
[syntesizerQueue pause];Pause the queue's playback. If something is currently being read, it will pause afterwards.
[syntesizerQueue pauseAfterCurrent];Resume the queue's playback.
[syntesizerQueue resume];Clear the queue. If something is being read, it will not be interupted and future added messages will be read if not paused/stopped.
[syntesizerQueue clearQueue];Set this to YES to duck all the device's audio sessions when a string is being read. Defaults to YES.
syntesizerQueue.duckOthers = YES;The delay before reading a message. Default is 0.0
syntesizerQueue.preDelay = 1.0;The delay after reading a message. Default is 0.0
syntesizerQueue.postDelay = 1.0;You can set a QHSpeechSynthesizerQueueDelegate to be notified of playback events.
@protocol QHSpeechSynthesizerQueueDelegate <NSObject>
@optional
- (void)speechSynthesizerQueueDidStartTalking:(QHSpeechSynthesizerQueue *)queue;
- (void)speechSynthesizerQueueDidFinishTalking:(QHSpeechSynthesizerQueue *)queue;
- (void)speechSynthesizerQueueDidPauseTalking:(QHSpeechSynthesizerQueue *)queue;
- (void)speechSynthesizerQueueDidContinueTalking:(QHSpeechSynthesizerQueue *)queue;
- (void)speechSynthesizerQueueDidCancelTalking:(QHSpeechSynthesizerQueue *)queue;
- (void)speechSynthesizerQueueWillStartTalking:(QHSpeechSynthesizerQueue *)queue;
@end