[−][src]Struct alass_util::AudioSink
Receives audio samples to be processed for voice-activity and used as reference by the synchronization process
Fields
state: AudioSinkState
Methods
impl AudioSink
[src]
pub fn send_samples(
self: &mut AudioSink,
samples: &[i16]
) -> Result<(), AudioSinkError>
[src]
self: &mut AudioSink,
samples: &[i16]
) -> Result<(), AudioSinkError>
Recieve incoming samples
Voice-activity data is processed on the fly in CHUNK_SAMPLES
sized chunks. Remaining
samples are buffered until the next invocation or the AudioSink
is closed.
pub fn close(self: &mut AudioSink) -> Result<(), AudioSinkError>
[src]
Closes the AudioSink
This flushes any remaining samples and finishes processing voice-activity.
AudioSink
will no longer accept samples once closed.
pub fn voice_activity(&mut self) -> VoiceActivity
[src]
Returns voice-activity data, closing the AudioSink
if it has not been already
pub fn load_sample_data(filename: &str) -> Result<Vec<i16>, Error>
[src]
Loads sample data from file (for debugging)
pub fn load_vad_data(filename: &str) -> Result<Vec<bool>, Error>
[src]
Loads voice-activity data from file (for debugging)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AudioSink
impl !Send for AudioSink
impl !Sync for AudioSink
impl Unpin for AudioSink
impl UnwindSafe for AudioSink
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,