灵云SDK开发手册(iOS API)  8.1
HCITtsPlayerManager.h
1 //
2 // HCITtsPlayerManager.h
3 // HCI_TTS_PLAYER_Example
4 //
5 // Created by jths on 2018/1/26.
6 // Copyright ? 2018年 Cloud. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "SinoVoiceError.h"
11 #import "HCITtsSynthSyllable.h"
12 #import "hci_sys.h"
14 /* @{ */
16 /* @{ */
17 
21 #define MODULE_NAME "HCI_TTS_PLAYER"
22 
25 typedef enum : NSUInteger {
37 /* @} */
39 /* @{ */
43 @protocol HCITtsPlayerManagerDelegate <NSObject>
44 
45 @optional
46 
50 - (void)onPlayerEventStateChange:(HCI_PLAYER_STATE)state;
51 
55 - (void)onPlayerEventPlayerError:(SinoVoiceError *)error;
56 
63 - (void)onPlayerEventTimeChange:(int)current andTotal:(int)total;
64 
71 - (void)onPlayerEventProgressChange:(NSString *)sentence andSyllablesList:(NSArray *)syllables;
72 
73 @end
74 /* @} */
76 /* @{ */
80 @interface HCITtsPlayerManager : NSObject
81 
82 
83 @property (nonatomic, weak) id<HCITtsPlayerManagerDelegate>delegate;
84 
88 @property (nonatomic, copy) NSString *capkey;
89 
93 @property (nonatomic, copy) NSString *dataPath;
94 
98 @property (nonatomic, copy) NSString *resPrefix;
99 
103 @property (nonatomic, readonly) HCI_PLAYER_STATE state;
104 /* @} */
106 /* @{ */
111 
118 - (void)setSynthParameter:(NSString *)value forKey:(NSString *)key;
119 
123 - (void)removeSynthParameterForKey:(NSString *)key;
124 
130 - (void)startSession:(NSString *)config;
131 
137 - (void)play:(NSString *)text;
138 
142 - (void)pause;
143 
147 - (void)resume;
148 
152 - (void)stop;
153 
159 - (void)seek:(int)time;
160 
164 - (void)destroy;
165 /* @} */
166 /* @} */
167 @end
168