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
stringoptions
RequestOptionscancellationToken
CancellationToken
Returns
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
stringsubtitleFormat
SubtitleFormatoptions
RequestOptionscancellationToken
CancellationToken
Returns
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
stringsubtitleFormat
SubtitleFormatcharsPerCaption
intoptions
RequestOptionscancellationToken
CancellationToken
Returns
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
RequestOptionsHTTP 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
stringThe next or previous page URL to query the transcript list.
options
RequestOptionsHTTP 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
UploadedFileThe file uploaded to AssemblyAI
options
RequestOptionsHTTP 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
UploadedFileThe file uploaded to AssemblyAI
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
FileInfoThe audio file to transcribe
options
RequestOptionsHTTP 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
FileInfoThe audio file to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
disposeStream
boolDispose the stream as soon as possible
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
disposeStream
boolDispose the stream as soon as possible
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
UriThe URI to the audio file to transcribe
options
RequestOptionsHTTP 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
UriThe URI to the audio file to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
UploadedFileThe file uploaded to AssemblyAI to transcribe
options
RequestOptionsHTTP 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
UploadedFileThe file uploaded to AssemblyAI to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
TranscriptParamsThe transcript parameters
options
RequestOptionsHTTP 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
FileInfoThe local file to transcribe
options
RequestOptionsHTTP 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
FileInfoThe local file to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
disposeStream
boolDispose the stream as soon as possible
options
RequestOptionsHTTP 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
StreamThe audio file stream to transcribe
disposeStream
boolDispose the stream as soon as possible
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
UriThe URI to the audio file to transcribe
options
RequestOptionsHTTP 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
UriThe URI to the audio file to transcribe
transcriptParams
TranscriptOptionalParamsThe transcript parameters
options
RequestOptionsHTTP 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
stringpollingInterval
TimeSpan?pollingTimeout
TimeSpan?options
RequestOptionscancellationToken
CancellationToken
Returns
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
stringThe 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
RequestOptionsHTTP request options
cancellationToken
CancellationTokenCancellation 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
stringwords
string[]options
RequestOptionscancellationToken
CancellationToken