Contents

SpeechDetector

A module that performs a voice activity detection (VAD) analysis.

Declaration

final class SpeechDetector

Overview

This module asks “is there speech?” and provides you with the ability to gate transcription by the presence of voices, saving power otherwise used by attempting to transcribe what is likely to be silence.

To enable voice activated transcription, initialize a SpeechDetector module. Like any other module, it can be set when first initializing SpeechAnalyzer:

let transcriber = SpeechTranscriber(..)
let speechDetector = SpeechDetector()
let analyzer = SpeechAnalyzer(.., modules: [speechDetector, transcriber])

or later on with setModules(_:):

let analyzer = SpeechAnalyzer(..)
let transcriber = SpeechTranscriber(..)
let speechDetector = SpeechDetector()
try await analyzer.setModules([transcriber, speechDetector])

Topics

Creating a detector

Getting results

See Also

Modules