Cartesia ↗ 提供具有可定制语音模型的高级文本转语音服务。
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cartesia
在向 Cartesia 发出请求时,请将您当前使用的 URL 中的 https://api.cartesia.ai/v1
替换为 https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cartesia
。
在向 Cartesia 发出请求时,请确保您拥有以下内容:
- 您的 AI 网关账户 ID。
- 您的 AI 网关网关名称。
- 一个有效的 Cartesia API 令牌。
- 您要使用的 Cartesia 语音模型的模型 ID 和语音 ID。
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/cartesia/tts/bytes \ --header 'Content-Type: application/json' \ --header 'Cartesia-Version: 2024-06-10' \ --header 'X-API-Key: {cartesia_api_token}' \ --data '{ "transcript": "Welcome to Cloudflare - AI Gateway!", "model_id": "sonic-english", "voice": { "mode": "id", "id": "694f9389-aac1-45b6-b726-9d9369183238" }, "output_format": { "container": "wav", "encoding": "pcm_f32le", "sample_rate": 44100 }}
- @2025 Cloudflare Ubitools
- Cf Repo