silero-vad-0.1.0.4: Voice activity detection powered by SileroVAD.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Silero.Model

Synopsis

Documentation

newtype SileroModel Source #

Holds state to be used for voice activity detection. **Warning**: This is **NOT** thread-safe due to this mutating state internally.

Constructors

SileroModel 

Fields

Instances

Instances details
Storable SileroModel Source # 
Instance details

Defined in Silero.Model

Generic SileroModel Source # 
Instance details

Defined in Silero.Model

Associated Types

type Rep SileroModel :: Type -> Type #

type Rep SileroModel Source # 
Instance details

Defined in Silero.Model

type Rep SileroModel = D1 ('MetaData "SileroModel" "Silero.Model" "silero-vad-0.1.0.4-LLE8kAW4RRSB4MSAngBbdI" 'True) (C1 ('MetaCons "SileroModel" 'PrefixI 'True) (S1 ('MetaSel ('Just "api") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Ptr ()))))

detectSpeech :: MonadIO m => SileroModel -> Vector Float -> m Float Source #

Detect if speech is found within the given audio samples. This has the following requirements: - Must be 16khz sample rate. - Must be mono-channel. - Must be 16-bit audio. - Must contain exactly 512 samples.

| **Warning: SileroModel holds internal state and is NOT thread safe.**

resetModel :: MonadIO m => SileroModel -> m () Source #

  • *Warning: SileroModel holds internal state and is NOT thread safe.**

withModel :: MonadUnliftIO m => (SileroModel -> m a) -> m a Source #

  • *Warning: SileroModel holds internal state and is NOT thread safe.**