Voice-to-Protocol Transcriber
Description
Record operation steps and observations via voice commands during experiments. Suitable for laboratory environments, helping researchers transcribe experimental operations in real-time and generate structured experiment records.
Use Cases
- - Chemistry experiment operation recording
- Biology experiment step tracking
- Physics experiment data recording
- Clinical experiment operation logging
- Any scenario requiring real-time step recording
Dependencies
CODEBLOCK0
Configuration
Configure in ~/.openclaw/config/voice-to-protocol-transcriber.json:
CODEBLOCK1
Usage
Basic Usage
CODEBLOCK2
Quick Start
CODEBLOCK3
Voice Commands
| Command | Description |
|---|
| "Start Recording" | Start voice recognition and recording |
| "Step [content]" |
Add an experiment step |
| "Observed [content]" | Add observation results |
| "Note [content]" | Add additional notes |
| "Save Record" | Save current experiment record |
| "Stop Recording" | End recording and save |
Output Format
Markdown Format
CODEBLOCK4
API
Python Call
CODEBLOCK5
Features
- - 🎙️ Real-time voice recognition
- 📝 Automatic classification (Step/Observation/Note)
- ⏱️ Automatic timestamps
- 💾 Auto-save
- 🌐 Multi-language support
- 📄 Multiple output formats (Markdown/Word/Plain Text)
- 🔇 Voice command control
Notes
- - First use requires microphone permission
- Recommended to use in quiet environments
- Chinese recognition requires good network connection
- Save regularly to avoid data loss
Changelog
1.0.0
- - Initial version release
- Support Chinese and English voice recognition
- Markdown and Word output formats
- Voice command control
Risk Assessment
| Risk Indicator | Assessment | Level |
|---|
| Code Execution | Python/R scripts executed locally | Medium |
| Network Access |
No external API calls | Low |
| File System Access | Read input files, write output files | Medium |
| Instruction Tampering | Standard prompt guidelines | Low |
| Data Exposure | Output files saved to workspace | Low |
Security Checklist
- - [ ] No hardcoded credentials or API keys
- [ ] No unauthorized file system access (../)
- [ ] Output does not expose sensitive information
- [ ] Prompt injection protections in place
- [ ] Input file paths validated (no ../ traversal)
- [ ] Output directory restricted to workspace
- [ ] Script execution in sandboxed environment
- [ ] Error messages sanitized (no stack traces exposed)
- [ ] Dependencies audited
Prerequisites
CODEBLOCK6
Evaluation Criteria
Success Metrics
- - [ ] Successfully executes main functionality
- [ ] Output meets quality standards
- [ ] Handles edge cases gracefully
- [ ] Performance is acceptable
Test Cases
- 1. Basic Functionality: Standard input → Expected output
- Edge Case: Invalid input → Graceful error handling
- Performance: Large dataset → Acceptable processing time
Lifecycle Status
- - Current Stage: Draft
- Next Review Date: 2026-03-06
- Known Issues: None
- Planned Improvements:
- Performance optimization
- Additional feature support
语音转实验记录转录器
描述
在实验过程中通过语音指令记录操作步骤和观察结果。适用于实验室环境,帮助研究人员实时转录实验操作并生成结构化实验记录。
使用场景
- - 化学实验操作记录
- 生物实验步骤追踪
- 物理实验数据记录
- 临床实验操作日志
- 任何需要实时步骤记录的场景
依赖项
bash
pip install speechrecognition pyaudio pydub python-docx
配置
在 ~/.openclaw/config/voice-to-protocol-transcriber.json 中配置:
json
{
language: zh-CN,
output_format: markdown,
autosaveinterval: 60,
save_directory: ~/Documents/Experiment-Protocols,
experiment_name: default,
enable_timestamp: true,
voice_commands: {
start_recording: 开始记录,
stop_recording: 停止记录,
add_observation: 观察到,
add_step: 步骤,
save_protocol: 保存记录,
add_note: 备注
}
}
使用方法
基本用法
bash
openclaw skill voice-to-protocol-transcriber --config config.json
快速开始
bash
开始语音录制
openclaw skill voice-to-protocol-transcriber --experiment 细胞培养实验-2024-02-06
使用特定语言
openclaw skill voice-to-protocol-transcriber --lang en-US
语音指令
添加实验步骤 |
| 观察到 [内容] | 添加观察结果 |
| 备注 [内容] | 添加额外备注 |
| 保存记录 | 保存当前实验记录 |
| 停止记录 | 结束录制并保存 |
输出格式
Markdown 格式
markdown
实验记录:[实验名称]
日期:2024-02-06
时间:14:30:25
记录人:[用户]
步骤 1
时间:14:31:00
操作:[语音转录内容]
观察 1
时间:14:32:15
内容:[观察结果]
备注 1
时间:14:35:00
内容:[备注信息]
实验记录于 14:45:00 结束
API
Python 调用
python
from skills.voicetoprotocol_transcriber import ProtocolTranscriber
初始化
transcriber = ProtocolTranscriber(
experiment_name=我的实验,
language=zh-CN
)
开始监听
transcriber.start_listening()
手动添加条目
transcriber.add_step(准备培养皿)
transcriber.add_observation(培养基变浑浊)
保存并停止
transcriber.save()
transcriber.stop()
功能特点
- - 🎙️ 实时语音识别
- 📝 自动分类(步骤/观察/备注)
- ⏱️ 自动时间戳
- 💾 自动保存
- 🌐 多语言支持
- 📄 多种输出格式(Markdown/Word/纯文本)
- 🔇 语音指令控制
注意事项
- - 首次使用需要麦克风权限
- 建议在安静环境中使用
- 中文识别需要良好的网络连接
- 定期保存以避免数据丢失
更新日志
1.0.0
- - 初始版本发布
- 支持中文和英文语音识别
- Markdown 和 Word 输出格式
- 语音指令控制
风险评估
| 风险指标 | 评估 | 等级 |
|---|
| 代码执行 | Python/R 脚本在本地执行 | 中 |
| 网络访问 |
无外部 API 调用 | 低 |
| 文件系统访问 | 读取输入文件,写入输出文件 | 中 |
| 指令篡改 | 标准提示词指南 | 低 |
| 数据泄露 | 输出文件保存到工作区 | 低 |
安全检查清单
- - [ ] 无硬编码凭据或 API 密钥
- [ ] 无未经授权的文件系统访问(../)
- [ ] 输出不暴露敏感信息
- [ ] 已实施提示注入防护
- [ ] 输入文件路径已验证(无 ../ 遍历)
- [ ] 输出目录限制在工作区内
- [ ] 脚本在沙盒环境中执行
- [ ] 错误消息已清理(不暴露堆栈跟踪)
- [ ] 依赖项已审计
前置条件
bash
Python 依赖项
pip install -r requirements.txt
评估标准
成功指标
- - [ ] 成功执行主要功能
- [ ] 输出符合质量标准
- [ ] 优雅处理边缘情况
- [ ] 性能可接受
测试用例
- 1. 基本功能:标准输入 → 预期输出
- 边缘情况:无效输入 → 优雅的错误处理
- 性能:大数据集 → 可接受的处理时间
生命周期状态
- - 当前阶段:草稿
- 下次审核日期:2026-03-06
- 已知问题:无
- 计划改进:
- 性能优化
- 额外功能支持