跳转到内容
本站为社区维护的非官方中文翻译,与 Cloudflare, Inc. 无关联。本站不提供账户登录,请勿在任何非官方站点输入您的 Cloudflare 账户信息。官方文档:developers.cloudflare.com
Deepgram logo

aura-1

Text-to-Speech • Deepgram

查看 MarkdownAgent 设置
  • Cloudflare-hosted
  • Batch
  • Partner
  • Real-time

Aura 是一款具备上下文感知能力的文本转语音(TTS)模型,会根据所提供文本的上下文自然地控制语速、表现力和填充词。输入文本的质量会直接影响输出音频的自然程度。

模型信息
条款和许可证链接 ↗
批处理是
合作伙伴是
实时是
单位定价$0.015 per 1k characters

用法


export default {
  async fetch(request, env, ctx): Promise<Response> {
      const resp = await env.AI.run("@cf/deepgram/aura-1", {
        "text":"Hello World!"
      }, {
        returnRawResponse: true
      });

      return resp;
  },
} satisfies ExportedHandler<Env>;

curl --request POST   --url 'https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/ai/run/@cf/deepgram/aura-1'   --header 'Authorization: Bearer {TOKEN}'   --header 'Content-Type: application/json'   --data '{
    "text":"Hello world!"
}'

参数

speaker
stringdefault: angusenum: angus, asteria, arcas, orion, orpheus, athena, luna, zeus, perseus, helios, hera, stella用于生成音频的说话人(音色)。
encoding
stringenum: linear16, flac, mulaw, alaw, mp3, opus, aac输出音频的编码格式。
container
stringenum: none, wav, oggContainer 指定输出音频的文件格式封装。可用选项取决于编码类型。
text
stringrequired要转换为语音的文本内容
sample_rate
numberSample Rate 指定输出音频的采样率。不同编码支持不同的采样率;对于某些编码,采样率不可配置
bit_rate
number音频的比特率,单位为比特每秒(bps)。可根据编码类型从预定义范围或具体数值中选择。

绑定返回包含音频的 ReadableStream,音频格式为 MPEG (请查看模型的输出 schema)。

API schema(原始)

输入
输出

这篇文档对您有帮助吗?