10-of-my-most-popular-text-to-image-series-prompts-78b0897e
generate a bunch of images, then you curate the results to handpick the best ones
通用语音识别 Skill。支持多种音频格式(ogg/mp3/wav/m4a),使用硅基流动 SenseVoice API 进行语音转文字。当用户发送语音消息、音频文件,或需要转录音频时触发。
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install demo112/speech-recognition打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
使用硅基流动 SenseVoice API 进行语音识别,支持多种音频格式。
| 触发场景 | 说明 |
|---|---|
| 用户发送语音消息 | .ogg / .mp3 / .wav / .m4a 文件 |
| 用户要求转录音频 | "转录这个音频"、"语音转文字" |
| 音频文件处理 | 需要提取音频中的文字内容 |
在 ~/.openclaw/openclaw.json 中配置:
{
"providers": {
"siliconflow": {
"apiKey": "sk-xxx"
}
}
}
POST https://api.siliconflow.cn/v1/audio/transcriptions
| 模型 | 说明 |
|---|---|
FunAudioLLM/SenseVoiceSmall |
默认,中文效果好 |
import requests
api_key = "sk-xxx"
with open("/path/to/audio.mp3", "rb") as f:
audio_data = f.read()
response = requests.post(
"https://api.siliconflow.cn/v1/audio/transcriptions",
headers={"Authorization": f"Bearer {api_key}"},
files={"file": ("audio.mp3", audio_data, "audio/mpeg")},
data={"model": "FunAudioLLM/SenseVoiceSmall"},
timeout=60
)
print(response.json().get("text", ""))
当用户发送 .ogg 语音消息时:
# 1. 转换格式(如果是 ogg)
ffmpeg -i /path/to/audio.ogg -ar 16000 -ac 1 /tmp/audio.mp3 -y
# 2. 调用硅基流动 API(API Key 从环境变量读取)
python3 -c "
import requests
import os
api_key = os.environ.get('SILICONFLOW_API_KEY')
if not api_key:
raise ValueError('请设置 SILICONFLOW_API_KEY 环境变量')
with open('/tmp/audio.mp3', 'rb') as f:
audio_data = f.read()
response = requests.post(
'https://api.siliconflow.cn/v1/audio/transcriptions',
headers={'Authorization': f'Bearer {api_key}'},
files={'file': ('audio.mp3', audio_data, 'audio/mpeg')},
data={'model': 'FunAudioLLM/SenseVoiceSmall'},
timeout=60
)
print(response.json().get('text', ''))
"
| 格式 | 扩展名 | 说明 |
|---|---|---|
| MP3 | .mp3 |
推荐,兼容性好 |
| OGG | .ogg |
Telegram/Signal... |
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
# 通用语音识别
使用硅基流动 SenseVoice API 进行语音识别,支持多种音频格式。
---
## 激活条件
| 触发场景 | 说明 |
|----------|------|
| 用户发送语音消息 | `.ogg` / `.mp3` / `.wav` / `.m4a` 文件 |
| 用户要求转录音频 | "转录这个音频"、"语音转文字" |
| 音频文件处理 | 需要提取音频中的文字内容 |
---
## 配置
### API Key
在 `~/.openclaw/openclaw.json` 中配置:
```json
{
"providers": {
"siliconflow": {
"apiKey": "sk-xxx"
}
}
}
```
### API 端点
```
POST https://api.siliconflow.cn/v1/audio/transcriptions
```
### 支持的模型
| 模型 | 说明 |
|------|------|
| `FunAudioLLM/SenseVoiceSmall` | 默认,中文效果好 |
---
## 使用方法
### 方法一:直接调用 API
```python
import requests
api_key = "sk-xxx"
with open("/path/to/audio.mp3", "rb") as f:
audio_data = f.read()
response = requests.post(
"https://api.siliconflow.cn/v1/audio/transcriptions",
headers={"Authorization": f"Bearer {api_key}"},
files={"file": ("audio.mp3", audio_data, "audio/mpeg")},
data={"model": "FunAudioLLM/SenseVoiceSmall"},
timeout=60
)
print(response.json().get("text", ""))
```
### 方法二:处理用户语音消息
当用户发送 `.ogg` 语音消息时:
```bash
# 1. 转换格式(如果是 ogg)
ffmpeg -i /path/to/audio.ogg -ar 16000 -ac 1 /tmp/audio.mp3 -y
# 2. 调用硅基流动 API(API Key 从环境变量读取)
python3 -c "
import requests
import os
api_key = os.environ.get('SILICONFLOW_API_KEY')
if not api_key:
raise ValueError('请设置 SILICONFLOW_API_KEY 环境变量')
with open('/tmp/audio.mp3', 'rb') as f:
audio_data = f.read()
response = requests.post(
'https://api.siliconflow.cn/v1/audio/transcriptions',
headers={'Authorization': f'Bearer {api_key}'},
files={'file': ('audio.mp3', audio_data, 'audio/mpeg')},
data={'model': 'FunAudioLLM/SenseVoiceSmall'},
timeout=60
)
print(response.json().get('text', ''))
"
```
---
## 支持的音频格式
| 格式 | 扩展名 | 说明 |
|------|--------|------|
| MP3 | `.mp3` | 推荐,兼容性好 |
| OGG | `.ogg` | Telegram/Signal...generate a bunch of images, then you curate the results to handpick the best ones
generate a bunch of images, then you curate the results to handpick the best ones
Productivity system based on Maya calendar with 13 natural tones for project management and personal development
Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.