Skip to content

tryAGI/Cartesia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cartesia

Nuget package dotnet License: MIT Discord

Features 🔥

  • Fully generated C# SDK based on official Cartesia OpenAPI specification using AutoSDK
  • Same day update to support new features
  • Updated and supported automatically if there are no breaking changes
  • All modern .NET features - nullability, trimming, NativeAOT, etc.
  • Support .Net Framework/.Net Standard 2.0

Usage

using Cartesia;

using var client = new CartesiaClient(apiKey);

Check API Status

Check the Cartesia API status.

using var client = new CartesiaClient(apiKey);

// Check the API status to verify connectivity.
var response = await client.ApiStatus.ApiStatusGetAsync(
    cartesiaVersion: ApiStatusGetCartesiaVersion.x20250416);

Speech To Text Client Get Text Async

using var api = new CartesiaClient(apiKey);
ISpeechToTextClient speechClient = api;

// Transcribe audio using the MEAI ISpeechToTextClient interface.
// Cartesia processes the audio synchronously — no polling required.
using var httpClient = new HttpClient();
await using var audioStream = await httpClient.GetStreamAsync(
    "https://cdn.openai.com/API/docs/audio/alloy.wav");

var ms = new MemoryStream();
await audioStream.CopyToAsync(ms);
ms.Position = 0;

var response = await speechClient.GetTextAsync(ms);

Console.WriteLine($"Text: {response.Text}");

Speech To Text Client Get Service Metadata

using var api = new CartesiaClient("dummy-key");
ISpeechToTextClient speechClient = api;

// Retrieve metadata about the speech-to-text provider.
var metadata = speechClient.GetService<SpeechToTextClientMetadata>();

Speech To Text Client Get Service Self

using var api = new CartesiaClient("dummy-key");
ISpeechToTextClient speechClient = api;

// Access the underlying CartesiaClient from the MEAI interface.
var self = speechClient.GetService<CartesiaClient>();

Support

Priority place for bugs: https://github.com/tryAGI/Cartesia/issues
Priority place for ideas and general questions: https://github.com/tryAGI/Cartesia/discussions
Discord: https://discord.gg/Ca2xhfBf3v

Acknowledgments

JetBrains logo

This project is supported by JetBrains through the Open Source Support Program.

CodeRabbit logo

This project is supported by CodeRabbit through the Open Source Support Program.

About

C# SDK for Cartesia — low-latency TTS, STT, voice cloning, agents | Generated from OpenAPI

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages