翻篇收录说明
翻篇网页快照

Text-to-Speech (Bytes) - Cartesia Docs

https://docs.cartesia.ai/api-reference/tts/bytes

最近抓取:2026-12-04 16:39:16(北京时间)

最近内容变化:2026-12-02 13:37:12(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Stream audio from a complete transcript

正文摘录

Text-to-Speech (Bytes)cURLcurl --request POST \ --url https://api.cartesia.ai/tts/bytes \ --header 'Authorization: Bearer <token>' \ --header 'Cartesia-Version: <cartesia-version>' \ --header 'Content-Type: application/json' \ --data @- <<EOF { "model_id": "sonic-3.6", "transcript": "Hi there, it's awesome to meet you.", "voice": "db6b0ed5-d5d3-463d-ae85-518a07d3c2b4", "output_format": { "container": "wav", "encoding": "pcm_s16le", "sample_rate": 44100 }, "language": "<string>", "locale": "<string>", "accent": "<string>", "normalization": "auto", "pronunciation_dict_id": "<string>", "generation_config": { "volume": 1, "speed": 1 } } EOF200"<string>"POST/tts/bytesTry itText-to-Speech (Bytes)cURLcurl --request POST \ --url https://api.cartesia.ai/tts/bytes \ --header 'Authorization: Bearer <token>' \ --header 'Cartesia-Version: <cartesia-version>' \ --header 'Content-Type: application/json' \ --data @- <<EOF { "model_id": "sonic-3.6", "transcript": "Hi there, it's awesome to meet you.", "voice": "db6b0ed5-d5d3-463d-ae85-518a07d3c2b4", "output_format": { "container": "wav", "encoding": "pcm_s16le", "sample_rate": 44100 }, "language": "<string>", "locale": "<string>", "accent": "<string>", "normalization": "auto", "pronunciation_dict_id": "<string>", "generation_config": { "volume": 1, "speed": 1 } } EOF200"<string>"AuthorizationsAPIKeyAuthAccessTokenAuthAuthorizationstringheaderdefault:$CARTESIA_API_KEYrequiredCartesia API key (sk_car_...). Get one at play.cartesia.ai/keys.HeadersCartesia-Versionenum<string>default:2026-08-14requiredAPI version header.Available options: 2026-08-14 Example:"2026-08-14"Bodyapplication/jsonmodel_idenum<string>default:sonic-3.6requiredThe ID of the model to use for the generation. See Models all options.Available options: sonic-3.6, sonic-3.5, sonic-3, sonic-latest Example:"sonic-3.6"transcriptstringdefault:Hi there, it's awesome to meet you.requiredvoicestringTTSRequestVoiceObject · objectrequiredThe ID of the voice.Example:"db6b0ed5-d5d3-463d-ae85-518a07d3c2b4"output_formatWAVOutputFormat · objectrequiredWAVOutputFormatMP3OutputFormatRAWOutputFormatShow child attributeslanguagestring | nullThe transcript's language or locale (for example en or en-GB). language and locale accept the same values. Set one or the other, never both; setting both returns a 400 error. See supported codes.localestring | nullThe transcript's language or locale (for example en or en-GB). locale and language accept the same values. Set one or the other, never both; setting both returns a 400 error. See supported codes.accentstring | nullUsually unnecessary: Cartesia picks the closest accent the voice supports for the requested language or locale. Set it only to make a multilingual voice sound accented (e.g. speak English with a French accent). Must come from the voice's Get Voice accents field. Learn more here.normalizationstring | nulldefault:autoText normalization. auto (default) runs the locale-aware normalizer, off skips it, or pass a language or locale code (for example en or en-IN) to pin the normalizer independently of the generation language. See Text Normalization.pronunciation_dict_idstring | nullThe ID of a pronunciation dictionary to use for the generation. Pronunciation dictionaries are supported by sonic-3 models and newer.generation_configGenerationConfig · objectConfigure the various attributes of the generated speech. Available on sonic-3 and newer models; not available on earlier models. See Volume, Speed, and Emotion for a guide on this option.Show child attributesResponse200 - audio/*Audio bytesThe response is of type file.Was this page helpful?YesNo