Files
CustomPlugin/Libs/iflyMSC.framework/Headers/IFlySpeechSynthesizerDelegate.h
2023-04-10 18:48:16 +08:00

82 lines
1.7 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// IFlySpeechSynthesizerDelegate.h
// MSC
//
// Created by ypzhao on 13-3-20.
// Copyright (c) 2013年 iflytek. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "IFlySpeechEvent.h"
@class IFlySpeechError;
/*!
* 语音合成回调
*/
@protocol IFlySpeechSynthesizerDelegate <NSObject>
@required
/*!
* 结束回调<br>
* 当整个合成结束之后会回调此函数
*
* @param error 错误码
*/
- (void) onCompleted:(IFlySpeechError*) error;
@optional
/*!
* 开始合成回调
*/
- (void) onSpeakBegin;
/*!
* 缓冲进度回调
*
* @param progress 缓冲进度0-100
* @param msg 附件信息此版本为nil
*/
- (void) onBufferProgress:(int) progress message:(NSString *)msg;
/*!
* 播放进度回调
*
* @param progress 当前播放进度0-100
* @param beginPos 当前播放文本的起始位置0-100
* @param endPos 当前播放文本的结束位置0-100
*/
- (void) onSpeakProgress:(int) progress beginPos:(int)beginPos endPos:(int)endPos;
/*!
* 暂停播放回调
*/
- (void) onSpeakPaused;
/*!
* 恢复播放回调<br>
* 注意此回调方法SDK内部不执行播放恢复全部在onSpeakBegin中执行
*/
- (void) onSpeakResumed;
/*!
* 正在取消回调<br>
* 注意此回调方法SDK内部不执行
*/
- (void) onSpeakCancel;
/*!
* 扩展事件回调<br>
* 根据事件类型返回额外的数据
*
* @param eventType 事件类型具体参见IFlySpeechEventType枚举。目前只支持EVENT_TTS_BUFFER也就是实时返回合成音频。
* @param arg0 arg0
* @param arg1 arg1
* @param eventData 事件数据
*/
- (void) onEvent:(int)eventType arg0:(int)arg0 arg1:(int)arg1 data:(NSData *)eventData;
@end