Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Sep 2, 2024
1 parent 39df56c commit db49ba8
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions ElevenLabs-DotNet/Dubbing/DubbingEndpoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ public sealed class DubbingEndpoint(ElevenLabsClient client) : ElevenLabsBaseEnd
protected override string Root => "dubbing";

/// <summary>
/// Initiates a dubbing operation asynchronously based on the provided <paramref name="request"/>.
/// Dubs provided audio or video file into given language.
/// </summary>
/// <param name="request">The <see cref="DubbingRequest"/> containing dubbing configuration and files.</param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/>.</param>
/// <returns>
/// A task representing the asynchronous dubbing operation. The task completes with the dubbing ID and expected duration in seconds if the operation succeeds.
/// </returns>
public async Task<DubbingResponse> StartDubbingAsync(DubbingRequest request, CancellationToken cancellationToken = default)
/// <returns> <see cref="DubbingResponse"/>.</returns>
public async Task<DubbingResponse> DubAsync(DubbingRequest request, CancellationToken cancellationToken = default)
{
ArgumentNullException.ThrowIfNull(request);
using var payload = new MultipartFormDataContent();
Expand Down Expand Up @@ -153,11 +151,11 @@ public async Task<bool> WaitForDubbingCompletionAsync(string dubbingId, int? max
}

/// <summary>
///
/// Returns metadata about a dubbing project, including whether it’s still in progress or not.
/// </summary>
/// <param name="dubbingId"></param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/>.</param>
/// <returns></returns>
/// <returns><see cref="DubbingProjectMetadata"/>.</returns>
public async Task<DubbingProjectMetadata> GetDubbingProjectMetadataAsync(string dubbingId, CancellationToken cancellationToken = default)
{
var response = await client.Client.GetAsync(GetUrl($"/{dubbingId}"), cancellationToken).ConfigureAwait(false);
Expand All @@ -167,7 +165,7 @@ public async Task<DubbingProjectMetadata> GetDubbingProjectMetadataAsync(string
}

/// <summary>
/// Retrieves the transcript for the dub asynchronously in the specified format (SRT or WebVTT).
/// Returns transcript for the dub in the specified format (SRT or WebVTT).
/// </summary>
/// <param name="dubbingId">The ID of the dubbing project.</param>
/// <param name="languageCode">The language code of the transcript.</param>
Expand All @@ -189,7 +187,7 @@ public async Task<string> GetTranscriptForDubAsync(string dubbingId, string lang
}

/// <summary>
/// Retrieves the dubbed file asynchronously as a sequence of byte arrays.
/// Returns dubbed file as a streamed file.
/// </summary>
/// <param name="dubbingId">The ID of the dubbing project.</param>
/// <param name="languageCode">The language code of the dubbed content.</param>
Expand Down

0 comments on commit db49ba8

Please sign in to comment.