## The Sanas Speech AI SDK

The Sanas Speech AI SDK is a C++ library that gives your application real-time access to the Sanas cloud speech processing platform. You stream audio in, processed audio comes back — along with optional live transcripts.

This SDK is the C++ counterpart of the [Python SDK](https://developer.sanas.ai/API-Reference/Overview). It exposes the same class surface (`IRemoteSDK`, `IAudioProcessor`, `InitParams`, `AudioParams`, `ProcessorState`, and the result-code enums). This guide uses **Language Translation** as its worked example throughout, but the core integration pattern — lifecycle, audio format, state handling — is identical for all processing modes.

## What the SDK supports

The SDK is a generic processing interface. Depending on your account entitlements (subscription plan), the same API can power three distinct processing modes:

| Processing mode       | Use case                                                                                     | How to configure                                |
|-----------------------|---------------------------------------------------------------------------------------------|------------------------------------------------| 
| Language Translation   | Real-time speech-to-speech translation between languages. Delivers translated audio and live transcripts in both source and target languages. | `AudioParams::WithLanguages(src, tgt, rate)` | 
| Speech Enhancement      | Reduces background noise and improves call clarity.                                      | `AudioParams::WithModel("<model-key>", rate)` |
| Accent Translation      | Standardises the accent of the speaker for improved intelligibility.                       | `AudioParams::WithModel("<model-key>", rate)` |

## What you get with Language Translation

- Translated audio returned synchronously in the same call that sends the original audio.
- Live transcript events for both the source language (what was spoken) and the target language (the translation), delivered asynchronously via callback.
- The ability to switch source/target languages on an active stream without recreating the connection.

## Key concepts

Four concepts cover everything you need to understand before writing your first integration.

| Concept             | Object                | What it does                                                                                          |
|---------------------|-----------------------|-------------------------------------------------------------------------------------------------------|
| SDK                 | `IRemoteSDK`         | The top-level object. Create one per process, initialise once, then use it to create audio processors. |
| Audio Processor     | `IAudioProcessor`    | Represents one live audio stream. Create one per concurrent call or session. Each processor runs independently. |
| Processor State     | `ProcessorState`     | Tracks the connection lifecycle: `kInitializing` → `kReady`. You may only send audio when the state is `kReady`. |
| Transcript Event     | `TranscriptCallback` | JSON event delivered on a background thread, containing recognised source speech or translated target text. |

**One mode per processor.** A processor is configured for exactly one processing mode — Language Translation or a named speech model. The mode is set at creation time and cannot be changed (though for LT you can switch the language pair on a live processor using `UpdateLanguageConfig`).

## Architecture

Your application interacts only with the two SDK interfaces — `IRemoteSDK` and `IAudioProcessor`. All network communication, authentication, and processing is handled by the SDK and the Sanas cloud.

```
Your application  ──►  SDK layer (RemoteSdk)  ──►  Sanas cloud
   IRemoteSDK              network / auth            speech processing
   IAudioProcessor         media transport           translation + transcripts
```

## SDK properties at a glance

| Property           | Value                                                             |
|--------------------|------------------------------------------------------------------|
| Language / API     | C++17, single public header `RemoteSDK.h`                        |
| Namespace          | `sanas::remote`                                                 |
| Library            | `RemoteSdk` (`.dll` / `.so` / `.dylib`)                        |
| Thread-safety      | All SDK calls are thread-safe; multiple processors can run concurrently |
| Audio format       | 32-bit float, mono, 8 / 16 / 48 kHz                             |

## Next steps

[**Installation & Linking**](https://developer.sanas.ai/API-Reference/Cpp-SDK/Guides/Installation)

[**Quick Start**](https://developer.sanas.ai/API-Reference/Cpp-SDK/Guides/Quick-Start)

[**Configuration Reference**](https://developer.sanas.ai/API-Reference/Cpp-SDK/Reference/Configuration)

[**Glossary**](https://developer.sanas.ai/API-Reference/Cpp-SDK/Glossary)
