Class TranscriptsClient
- Namespace
- AssemblyAI.Transcripts
- Assembly
- AssemblyAI.dll
public class TranscriptsClient
- Inheritance
-
TranscriptsClient
- Derived
- Inherited Members
Methods
DeleteAsync(string, RequestOptions?, CancellationToken)
Remove the data from the transcript and mark it as deleted.
public Task<Transcript> DeleteAsync(string transcriptId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.DeleteAsync("{transcript_id}");
GetAsync(string, RequestOptions?, CancellationToken)
Get the transcript resource. The transcript is ready when the "status" is "completed".
public Task<Transcript> GetAsync(string transcriptId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.GetAsync("transcript_id");
GetParagraphsAsync(string, RequestOptions?, CancellationToken)
Get the transcript split by paragraphs. The API will attempt to semantically segment your transcript into paragraphs to create more reader-friendly transcripts.
public Task<ParagraphsResponse> GetParagraphsAsync(string transcriptId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.GetParagraphsAsync("transcript_id");
GetRedactedAudioAsync(string, RequestOptions?, CancellationToken)
Retrieve the redacted audio object containing the status and URL to the redacted audio.
public Task<RedactedAudioResponse> GetRedactedAudioAsync(string transcriptId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.GetRedactedAudioAsync("transcript_id");
GetSentencesAsync(string, RequestOptions?, CancellationToken)
Get the transcript split by sentences. The API will attempt to semantically segment the transcript into sentences to create more reader-friendly transcripts.
public Task<SentencesResponse> GetSentencesAsync(string transcriptId, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.GetSentencesAsync("transcript_id");
GetSubtitlesAsync(string, SubtitleFormat, GetSubtitlesParams, 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, GetSubtitlesParams request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringsubtitleFormat
SubtitleFormatrequest
GetSubtitlesParamsoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.GetSubtitlesAsync(
"transcript_id",
SubtitleFormat.Srt,
new GetSubtitlesParams()
);
ListAsync(ListTranscriptParams, 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(ListTranscriptParams request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
request
ListTranscriptParamsoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.ListAsync(new ListTranscriptParams());
SubmitAsync(TranscriptParams, RequestOptions?, CancellationToken)
Create a transcript from a media file that is accessible via a URL.
public Task<Transcript> SubmitAsync(TranscriptParams request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
request
TranscriptParamsoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.SubmitAsync(
new TranscriptParams
{
LanguageCode = TranscriptLanguageCode.EnUs,
LanguageDetection = true,
LanguageConfidenceThreshold = 0.7f,
Punctuate = true,
FormatText = true,
Disfluencies = false,
Multichannel = true,
DualChannel = false,
WebhookUrl = "https://your-webhook-url/path",
WebhookAuthHeaderName = "webhook-secret",
WebhookAuthHeaderValue = "webhook-secret-value",
AutoHighlights = true,
AudioStartFrom = 10,
AudioEndAt = 280,
WordBoost = new List<string>() { "aws", "azure", "google cloud" },
BoostParam = TranscriptBoostParam.High,
FilterProfanity = true,
RedactPii = true,
RedactPiiAudio = true,
RedactPiiAudioQuality = RedactPiiAudioQuality.Mp3,
RedactPiiPolicies = new List<PiiPolicy>()
{
PiiPolicy.UsSocialSecurityNumber,
PiiPolicy.CreditCardNumber,
},
RedactPiiSub = SubstitutionPolicy.Hash,
SpeakerLabels = true,
SpeakersExpected = 2,
ContentSafety = true,
IabCategories = true,
CustomSpelling = new List<TranscriptCustomSpelling>()
{
new TranscriptCustomSpelling
{
From = new List<string>() { "dicarlo" },
To = "Decarlo",
},
},
SentimentAnalysis = true,
AutoChapters = true,
EntityDetection = true,
SpeechThreshold = 0.5f,
Summarization = true,
SummaryModel = SummaryModel.Informative,
SummaryType = SummaryType.Bullets,
CustomTopics = true,
Topics = new List<string>() { "topics" },
AudioUrl = "https://assembly.ai/wildfires.mp3",
}
);
WordSearchAsync(string, WordSearchParams, 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, WordSearchParams request, RequestOptions? options = null, CancellationToken cancellationToken = default)
Parameters
transcriptId
stringrequest
WordSearchParamsoptions
RequestOptionscancellationToken
CancellationToken
Returns
Examples
await client.Transcripts.WordSearchAsync("transcript_id", new WordSearchParams());