添加语音websocket等,还没测试
This commit is contained in:
43
keyBoard/Class/AiTalk/V/KBAiWaveformView.h
Normal file
43
keyBoard/Class/AiTalk/V/KBAiWaveformView.h
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// KBAiWaveformView.h
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Mac on 2026/1/15.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 波形动画视图
|
||||
/// 根据音量 RMS 值实时显示波形动画
|
||||
@interface KBAiWaveformView : UIView
|
||||
|
||||
/// 波形颜色
|
||||
@property(nonatomic, strong) UIColor *waveColor;
|
||||
|
||||
/// 波形条数量
|
||||
@property(nonatomic, assign) NSInteger barCount;
|
||||
|
||||
/// 波形条宽度
|
||||
@property(nonatomic, assign) CGFloat barWidth;
|
||||
|
||||
/// 波形条间距
|
||||
@property(nonatomic, assign) CGFloat barSpacing;
|
||||
|
||||
/// 更新音量值
|
||||
/// @param rms 音量 RMS 值 (0.0 - 1.0)
|
||||
- (void)updateWithRMS:(float)rms;
|
||||
|
||||
/// 开始动画(空闲波动)
|
||||
- (void)startIdleAnimation;
|
||||
|
||||
/// 停止动画
|
||||
- (void)stopAnimation;
|
||||
|
||||
/// 重置波形
|
||||
- (void)reset;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user