Skip to main content

Cloudflare Workers AI Sound to Text Configuration

地址

https://developers.cloudflare.com/workers-ai/models/whisper/

可配置参数

参数名字描述默认值
account_idaccount id访问 https://dash.cloudflare.com/ 获取
api_tokenAPI token访问 https://dash.cloudflare.com/profile/api-tokens 获取 token
model_idmodel id, 注意带上 @@cf/openai/whisper

配置示例

roles.json
{
"start_text": "哈哈哈哈哈,我是一个超快可爱的大小兔,请问有什么我可以帮助你的吗?",
"prompt": "你是一个知识渊博,乐于助人的智能机器人,你的名字叫“小兔”,你的任务是陪我聊天",
"max_message_count": 5,
"stt_type": "cf-workers-ai-asr",
"stt_config": {
"account_id": "3ccbf9e8xxxxxxxxxxxx4576285"
"api_token": "RT0Pxxxxxxx"
"model_id": "@cf/openai/whisper"
}
}

环境变量

      CF_WORKERS_AI_ASR_ACCOUNT_ID: 3ccbf9e8xxxxxxxxxxxx4576285
CF_WORKERS_AI_ASR_API_TOKEN: RT0Pxxxxxxx
CF_WORKERS_AI_ASR_MODEL_ID: "@cf/openai/whisper"