pub struct ForcedAlignmentService<'a> { /* private fields */ }Expand description
Forced alignment service providing typed access to alignment endpoints.
Obtained via ElevenLabsClient::forced_alignment.
Implementations§
Source§impl<'a> ForcedAlignmentService<'a>
impl<'a> ForcedAlignmentService<'a>
Sourcepub async fn create(
&self,
audio_data: &[u8],
file_name: &str,
text: &str,
) -> Result<ForcedAlignmentResponse>
pub async fn create( &self, audio_data: &[u8], file_name: &str, text: &str, ) -> Result<ForcedAlignmentResponse>
Aligns text to an audio file and returns character-level alignment data.
Calls POST /v1/forced-alignment with a multipart request containing
the audio file and the text to align.
§Arguments
audio_data— Raw bytes of the audio file.file_name— File name for the audio (e.g."audio.mp3").text— The text to align against the audio.
§Errors
Returns an error if the API request fails.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ForcedAlignmentService<'a>
impl<'a> !RefUnwindSafe for ForcedAlignmentService<'a>
impl<'a> Send for ForcedAlignmentService<'a>
impl<'a> Sync for ForcedAlignmentService<'a>
impl<'a> Unpin for ForcedAlignmentService<'a>
impl<'a> UnsafeUnpin for ForcedAlignmentService<'a>
impl<'a> !UnwindSafe for ForcedAlignmentService<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request