← All SmartAdapters Audio

SmartAudioTTSAdapter

Reads the text of an Audio control aloud as natural, lifelike speech.

Attaches to Audio

Set the text, and the adapter turns it into spoken audio through a text-to-speech endpoint. It is the voice half of the audio pair — useful for accessibility, notifications and hands-free flows.

Because it works through the standard Audio control, playback behaves like any other audio in the application.

Voices and audio formats follow the endpoint configuration, so switching from a cloud voice to a self-hosted one is an endpoint change, not a UI change.

What it gives you

  • Text-to-speech for the Audio control.
  • Natural, lifelike voice output.
  • Pairs with TTS endpoints such as OpenAI or LocalAI.

Use it for

  • Reading notifications and reports aloud
  • Accessibility for low-vision users
  • Hands-free confirmation in warehouse and field apps

Like every adapter, it runs through a SmartHub and inherits its SmartEndpoint — switching the model or provider never changes this code.

csharp
var hub = new SmartHub(this) {
    Endpoint = new OpenAIEndpointTTS()
};

var tts = new SmartAudioTTSAdapter { Audio = audio1 };
audio1.Text = "Your report is ready to download.";
await tts.SpeakAsync();

Read the SmartAudioTTSAdapter docs ↗