Table of Contents

Class ExtendedTranscriptsClient

Namespace
AssemblyAI.Transcripts
Assembly
AssemblyAI.dll

The client to interact with the AssemblyAI Transcripts API.

public class ExtendedTranscriptsClient : TranscriptsClient
Inheritance
ExtendedTranscriptsClient
Inherited Members

Methods

GetRedactedAudioFileAsync(string, RequestOptions?, CancellationToken)

Retrieve the redacted audio file.

public Task<Stream> GetRedactedAudioFileAsync(string transcriptId, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

transcriptId string
options RequestOptions
cancellationToken CancellationToken

Returns

Task<Stream>

A task that resolves to a stream of the redacted audio file

GetSubtitlesAsync(string, SubtitleFormat, RequestOptions?, CancellationToken)

Export your transcript in SRT or VTT format to use with a video player for subtitles and closed captions.

public Task<string> GetSubtitlesAsync(string transcriptId, SubtitleFormat subtitleFormat, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

transcriptId string
subtitleFormat SubtitleFormat
options RequestOptions
cancellationToken CancellationToken

Returns

Task<string>

A task that resolves to a string of the subtitles

GetSubtitlesAsync(string, SubtitleFormat, int, RequestOptions?, CancellationToken)

Export your transcript in SRT or VTT format to use with a video player for subtitles and closed captions.

public Task<string> GetSubtitlesAsync(string transcriptId, SubtitleFormat subtitleFormat, int charsPerCaption, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

transcriptId string
subtitleFormat SubtitleFormat
charsPerCaption int
options RequestOptions
cancellationToken CancellationToken

Returns

Task<string>

A task that resolves to a string of the subtitles

ListAsync(RequestOptions?, CancellationToken)

Retrieve a list of transcripts you created. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.

public Task<TranscriptList> ListAsync(RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<TranscriptList>

A list of transcripts you created

ListAsync(string, RequestOptions?, CancellationToken)

Retrieve a list of transcripts you created. Transcripts are sorted from newest to oldest. The previous URL always points to a page with older transcripts.

public Task<TranscriptList> ListAsync(string listUrl, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

listUrl string

The next or previous page URL to query the transcript list.

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<TranscriptList>

A list of transcripts you created

SubmitAsync(UploadedFile, RequestOptions?, CancellationToken)

Create a transcript from a file uploaded to AssemblyAI.

public Task<Transcript> SubmitAsync(UploadedFile file, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

file UploadedFile

The file uploaded to AssemblyAI

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(UploadedFile, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Create a transcript from a file uploaded to AssemblyAI.

public Task<Transcript> SubmitAsync(UploadedFile file, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

file UploadedFile

The file uploaded to AssemblyAI

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(FileInfo, RequestOptions?, CancellationToken)

Create a transcript from a local file.

public Task<Transcript> SubmitAsync(FileInfo audioFile, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFile FileInfo

The audio file to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(FileInfo, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Create a transcript from a local file.

public Task<Transcript> SubmitAsync(FileInfo audioFile, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFile FileInfo

The audio file to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(Stream, RequestOptions?, CancellationToken)

Create a transcript from a file stream.

public Task<Transcript> SubmitAsync(Stream audioFileStream, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(Stream, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Create a transcript from a file stream.

public Task<Transcript> SubmitAsync(Stream audioFileStream, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(Stream, bool, RequestOptions?, CancellationToken)

Create a transcript from a file stream.

public Task<Transcript> SubmitAsync(Stream audioFileStream, bool disposeStream, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

disposeStream bool

Dispose the stream as soon as possible

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(Stream, bool, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Create a transcript from a file stream.

public Task<Transcript> SubmitAsync(Stream audioFileStream, bool disposeStream, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

disposeStream bool

Dispose the stream as soon as possible

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(Uri, RequestOptions?, CancellationToken)

Create a transcript from an audio file URI.

public Task<Transcript> SubmitAsync(Uri audioFileUrl, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileUrl Uri

The URI to the audio file to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

SubmitAsync(Uri, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Create a transcript from an audio file URI.

public Task<Transcript> SubmitAsync(Uri audioFileUrl, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileUrl Uri

The URI to the audio file to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

Returns a task that resolves to a queued transcript

TranscribeAsync(UploadedFile, RequestOptions?, CancellationToken)

Transcribe a file uploaded to AssemblyAI.

public Task<Transcript> TranscribeAsync(UploadedFile file, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

file UploadedFile

The file uploaded to AssemblyAI to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(UploadedFile, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Transcribe a file uploaded to AssemblyAI.

public Task<Transcript> TranscribeAsync(UploadedFile file, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

file UploadedFile

The file uploaded to AssemblyAI to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(TranscriptParams, RequestOptions?, CancellationToken)

Transcribe an audio file via its public URI.

public Task<Transcript> TranscribeAsync(TranscriptParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

transcriptParams TranscriptParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(FileInfo, RequestOptions?, CancellationToken)

Transcribe a local file

public Task<Transcript> TranscribeAsync(FileInfo audioFile, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFile FileInfo

The local file to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(FileInfo, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Transcribe a local file

public Task<Transcript> TranscribeAsync(FileInfo audioFile, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFile FileInfo

The local file to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(Stream, RequestOptions?, CancellationToken)

Transcribe a file stream.

public Task<Transcript> TranscribeAsync(Stream audioFileStream, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(Stream, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Transcribe a file stream.

public Task<Transcript> TranscribeAsync(Stream audioFileStream, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(Stream, bool, RequestOptions?, CancellationToken)

Transcribe a file stream.

public Task<Transcript> TranscribeAsync(Stream audioFileStream, bool disposeStream, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

disposeStream bool

Dispose the stream as soon as possible

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(Stream, bool, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Transcribe a file stream.

public Task<Transcript> TranscribeAsync(Stream audioFileStream, bool disposeStream, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileStream Stream

The audio file stream to transcribe

disposeStream bool

Dispose the stream as soon as possible

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(Uri, RequestOptions?, CancellationToken)

Transcribe an audio file via its public URI.

public Task<Transcript> TranscribeAsync(Uri audioFileUrl, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileUrl Uri

The URI to the audio file to transcribe

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

TranscribeAsync(Uri, TranscriptOptionalParams, RequestOptions?, CancellationToken)

Transcribe an audio file via its public URI.

public Task<Transcript> TranscribeAsync(Uri audioFileUrl, TranscriptOptionalParams transcriptParams, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

audioFileUrl Uri

The URI to the audio file to transcribe

transcriptParams TranscriptOptionalParams

The transcript parameters

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Returns

Task<Transcript>

A task that resolves to a transcript with status "completed" or "error".

WaitUntilReady(string, TimeSpan?, TimeSpan?, RequestOptions?, CancellationToken)

[Obsolete("Use `WaitUntilReadyAsync` instead.")]
public Task<Transcript> WaitUntilReady(string id, TimeSpan? pollingInterval = null, TimeSpan? pollingTimeout = null, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string
pollingInterval TimeSpan?
pollingTimeout TimeSpan?
options RequestOptions
cancellationToken CancellationToken

Returns

Task<Transcript>

WaitUntilReadyAsync(string, TimeSpan?, TimeSpan?, RequestOptions?, CancellationToken)

Wait until the transcript status is either "completed" or "error".

public Task<Transcript> WaitUntilReadyAsync(string id, TimeSpan? pollingInterval = null, TimeSpan? pollingTimeout = null, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

id string

The transcript ID

pollingInterval TimeSpan?

How frequently the transcript is polled. Defaults to 3s.

pollingTimeout TimeSpan?

How long to wait until the timeout exception thrown. Defaults to infinite.

options RequestOptions

HTTP request options

cancellationToken CancellationToken

Cancellation token

Returns

Task<Transcript>

The transcript with status "completed" or "error"

WordSearchAsync(string, string[], RequestOptions?, CancellationToken)

Search through the transcript for keywords. You can search for individual words, numbers, or phrases containing up to five words or numbers.

public Task<WordSearchResponse> WordSearchAsync(string transcriptId, string[] words, RequestOptions? options = null, CancellationToken cancellationToken = default)

Parameters

transcriptId string
words string[]
options RequestOptions
cancellationToken CancellationToken

Returns

Task<WordSearchResponse>