pub struct AudioTranscoder { /* private fields */ }Expand description
Audio transcoder: Detects file format and converts non-WAV files to WAV.
Implementations§
Source§impl AudioTranscoder
impl AudioTranscoder
Source§impl AudioTranscoder
impl AudioTranscoder
Sourcepub async fn transcode_to_wav_with_config<P: AsRef<Path>>(
&self,
input_path: P,
min_success_rate: Option<f64>,
) -> Result<(PathBuf, TranscodeStats)>
pub async fn transcode_to_wav_with_config<P: AsRef<Path>>( &self, input_path: P, min_success_rate: Option<f64>, ) -> Result<(PathBuf, TranscodeStats)>
Audio transcoding method with configuration, allowing specification of minimum success rate
Sourcepub async fn transcode_to_wav<P: AsRef<Path>>(
&self,
input_path: P,
) -> Result<PathBuf>
pub async fn transcode_to_wav<P: AsRef<Path>>( &self, input_path: P, ) -> Result<PathBuf>
Transcode input audio file to WAV and save to temporary directory (backward compatibility).
Sourcepub async fn extract_segment<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
input: P,
output: Q,
_start: Duration,
_end: Duration,
) -> Result<()>
pub async fn extract_segment<P: AsRef<Path>, Q: AsRef<Path>>( &self, input: P, output: Q, _start: Duration, _end: Duration, ) -> Result<()>
Extract audio segment for specified time range and convert to WAV.
§Arguments
input- Input audio file pathoutput- Output WAV file path_start- Start time for extraction (currently unused)_end- End time for extraction (currently unused)
Sourcepub async fn transcode_to_format<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
input: P,
output: Q,
_sample_rate: u32,
_channels: u32,
) -> Result<()>
pub async fn transcode_to_format<P: AsRef<Path>, Q: AsRef<Path>>( &self, input: P, output: Q, _sample_rate: u32, _channels: u32, ) -> Result<()>
Transcode audio to specified format (WAV), ignoring parameters.
§Arguments
input- Input audio file pathoutput- Output file path_sample_rate- Target sample rate (currently unused)_channels- Target channel count (currently unused)
Auto Trait Implementations§
impl Freeze for AudioTranscoder
impl RefUnwindSafe for AudioTranscoder
impl Send for AudioTranscoder
impl Sync for AudioTranscoder
impl Unpin for AudioTranscoder
impl UnwindSafe for AudioTranscoder
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