Table of Contents

Class RealtimeClient

Namespace
AssemblyAI.Realtime
Assembly
AssemblyAI.dll

The client to interact with the AssemblyAI Realtime HTTP API. To interact with the Realtime WebSocket API, use the RealtimeTranscriber class.

public class RealtimeClient
Inheritance
RealtimeClient
Inherited Members

Methods

CreateTemporaryTokenAsync(CreateRealtimeTemporaryTokenParams, RequestOptions?, CancellationToken)

Create a temporary authentication token for Streaming Speech-to-Text

public Task<RealtimeTemporaryTokenResponse> CreateTemporaryTokenAsync(CreateRealtimeTemporaryTokenParams request, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

request CreateRealtimeTemporaryTokenParams
options RequestOptions
cancellationToken CancellationToken

Returns

Task<RealtimeTemporaryTokenResponse>

Examples

await client.Realtime.CreateTemporaryTokenAsync(
    new CreateRealtimeTemporaryTokenParams { ExpiresIn = 480 }
);

CreateTemporaryTokenAsync(int, RequestOptions?, CancellationToken)

Create a temporary authentication token for Streaming Speech-to-Text

public Task<RealtimeTemporaryTokenResponse> CreateTemporaryTokenAsync(int expiresIn, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

expiresIn int
options RequestOptions
cancellationToken CancellationToken

Returns

Task<RealtimeTemporaryTokenResponse>

CreateTranscriber()

Create a real-time transcriber

public RealtimeTranscriber CreateTranscriber()

Returns

RealtimeTranscriber

The real-time transcriber

CreateTranscriber(RealtimeTranscriberOptions)

Create a real-time transcriber with options

public RealtimeTranscriber CreateTranscriber(RealtimeTranscriberOptions options)

Parameters

options RealtimeTranscriberOptions

Options for the real-time transcriber

Returns

RealtimeTranscriber

The real-time transcriber