You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
652 B

import 'dart:async';
import 'dart:typed_data';
/// 语音识别服务接口
abstract class AudioService {
/// 开始录音
Future<bool> enableRecord(String filePath);
/// 暂停录音
Future<bool> pauseRecord();
/// 继续录音
Future<bool> resumeRecord();
/// 设置音频配置
Future<bool> setAudioConfig({
int sampleRate = 16000,
int channels = 1,
});
// /// 移动文件到新路径
Future<bool> moveFile(String sourcePath, String destPath);
// /// 重命名指定路径的音频文件
Future<bool> renameFile(String filePath, String newName);
/// 结束录音
Future<bool> stopRecord(bool isSave);
}