Class SttComponent

Assembly: redb.Route.Llm.dll

Speech-to-text transport. Scheme: stt. Producer-only, symmetric with
llm:// and embed://: To("stt://<connectionFactoryName>")
turns the exchange body (recorded audio as byte[], ReadOnlyMemory<byte>
or a Stream) into the recognised text written to Out.Body.

The URI host names an (Provider / BaseUrl /
ApiKey / ModelId — set ModelId to the speech model), which is where local
and paid recognition part company: point BaseUrl at a whisper server on
127.0.0.1 and the route costs nothing to run, point it at a paid endpoint
and the same route bills. Neither is visible from the route.


From("direct://voice")
.To(Tg.Download(token)) // attachment file_id → bytes
.To("stt://local") // bytes → text
.To("direct://chat"); // and on as an ordinary reply

[EndpointRole(EndpointRole.Producer, Hint = "Use To(\"stt://<factory>\").")]
public sealed class SttComponent : ComponentBase, IComponent, IAsyncDisposable

Inheritance

Object→ComponentBase→SttComponent

Implements

Inherited Members

Properties

ProviderFactory

Builds the from a resolved connection

public Func<LlmConnectionFactory, ITranscriptionProvider> ProviderFactory { get; set; }

Scheme

The URI scheme this component handles (e.g., "kafka", "rabbitmq").

public override string Scheme { get; }

Methods

CreateEndpoint(EndpointUri)

Creates an endpoint from a parsed URI.

public override IEndpoint CreateEndpoint(EndpointUri uri)