Skip to content

Latest Text To Speech Model

Exercise the production Sonic 3.6 snapshot end to end with Russian text.

This example assumes using Cartesia; is in scope and apiKey contains your Cartesia API key.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
using var client = new CartesiaClient(apiKey);

var audio = await client.Tts.TtsBytesAsync(
    TtsBytesCartesiaVersion.x20251104,
    new TTSRequest
    {
        ModelId = TTSModel.Sonic3620260827,
        Transcript = "Привет! Это стабильная модель Cartesia Sonic 3.6.",
        Voice = new TTSRequestVoiceSpecifier
        {
            Mode = TTSRequestVoiceSpecifierMode.Id,
            Id = "694f9389-aac1-45b6-b726-9d9369183238",
        },
        Language = SupportedLanguage.Ru,
        OutputFormat = new RawOutputFormat
        {
            Container = RawOutputFormatContainer.Raw,
            Encoding = RawEncoding.PcmS16le,
            SampleRate = 24000,
        },
    });