BDRecognizerViewController.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // BDRecognizerViewController.h
  3. // BDVoiceRecognitionClient
  4. //
  5. // Created by Baidu on 13-9-25.
  6. // Copyright (c) 2013 Baidu Inc. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import "BDRecognizerViewDelegate.h"
  11. #import "BDSEventManager.h"
  12. #import "BDSASRDefines.h"
  13. #import "BDRecognizerViewParamsObject.h"
  14. #import "BDTheme.h"
  15. // 对话框的高度和宽度
  16. extern const float VR_DIALOG_VIEW_WIDTH;
  17. extern const float VR_DIALOG_VIEW_HEIGHT;
  18. /**
  19. * @brief 语音识别弹窗视图控制类
  20. */
  21. @interface BDRecognizerViewController : UIViewController<BDSClientASRDelegate, BDRecognizerDialogDelegate, AVAudioPlayerDelegate>
  22. /**
  23. * @brief 创建弹窗实例
  24. * @param origin 控件左上角的坐标
  25. * @param theme 控件的主题,如果为nil,则为默认主题
  26. *
  27. * @return 弹窗实例
  28. */
  29. - (id)initRecognizerViewControllerWithOrigin:(CGPoint)origin
  30. theme:(BDTheme *)theme
  31. enableFullScreen:(BOOL)enableFullScreen
  32. paramsObject:(BDRecognizerViewParamsObject *)paramsObject
  33. delegate:(id<BDRecognizerViewDelegate>)delegate;
  34. /**
  35. * @brief 启动识别
  36. *
  37. */
  38. - (void)startVoiceRecognition;
  39. /**
  40. * @brief - 取消本次识别,并移除View
  41. */
  42. - (void)cancelVoiceRecognition;
  43. /**
  44. * @brief 屏幕旋转后调用设置识别弹出窗位置
  45. *
  46. */
  47. - (void)changeFrameAfterOriented:(CGPoint)origin;
  48. @end // BDRecognizerViewController